Public report of EpicGames/lore, published 27 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 27 October 2026, 08:33 UTC · Survey ID cd_82d8fd69501648d486705ad88d193555

EpicGames/lore

Measured 27 October 2026, 08:28 UTC, at code version 5babe18

Regression: 2 dimensions fell since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 72out of 100 At risk Down 1 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 262,074 lines of product code in 25 projects, tests not counted · Estimated rebuild effort: about 5.2 person-years · Weakest lens: Security and Compliance, 60

Findings by how serious they are

31 critical 1367 serious 160 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 08:28 UTC

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

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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

71of 71 dimensions measured by tools.
1538of 1558 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
71dimensions across 8 lenses, read from 262,074 lines of product code in 25 projects.
Chapters

Executive summary

EpicGames/lore is rated At risk because critical security findings are open, most of them in its servers and containers. Its score is held back in part because it has pipeline tools referenced by a changeable name. It scores 72 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Security and Compliance, at 60, is the weakest lens and counts most in the score. The best first step is restoring certificate checks, worth about 7 points. Fixing the product with no limit on what it can connect to comes next, worth about 2 points. Raising Security and Compliance to 68 would lift the score to about 75.

Sixteen settings leave the servers or containers unsafe. Seven pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and four pipeline steps run downloads nobody checks. Correcting the unsafe settings, pinning each tool to an exact version and checking each download against a checksum would close these risks. The password or key in the code and the password or key in the code's history need replacing, with the old ones switched off. The pipeline step that installs packages without pinning their versions needs the packages it installs pinned to exact versions.

The product code is 262,074 lines, about €750,000 to rebuild.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Security and Compliance 60 · counts for 45%Code Health 73 · counts for 25%Production Readiness 82 · counts for 14%Maturity 88 · counts for 8%Architecture 93 · counts for 4%Domain Modelling 100 · counts for 2%Event Sourcing 100 · counts for 1%Performance 100 · counts for 1%

If Security and Compliance rose from 60 to 68, the lowest score rated Strong, the score would rise from 72 to about 75.

Code composition: what the lines of code are
Product code 47%Tests 53%
New since the last survey: 152 findings

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

  • Cyclomatic Complexity · LocalMutableStore::flush_all (cyclomatic 44) lore-storage/src/local/mutable_store.rs
  • Cyclomatic Complexity · LocalImmutableStore::verify_fragment_held (cyclomatic 39) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · LocalImmutableStore::store_entry (cyclomatic 33) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · stress.kill_loop (cyclomatic 29) scripts/store-stress/stress.py
  • Cyclomatic Complexity · Campaign.parse_work (cyclomatic 22) scripts/store-stress/stress.py
  • Cyclomatic Complexity · LocalImmutableStore::new_claimed (cyclomatic 19) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · StoreLock::acquire_at_gate (cyclomatic 19) lore-storage/src/local/store_lock.rs
  • Cyclomatic Complexity · stress.report (cyclomatic 19) scripts/store-stress/stress.py
  • Cyclomatic Complexity · lore_revision::revision::find_last_merged_revision (cyclomatic 18) lore-revision/src/revision.rs
  • Cyclomatic Complexity · State::collect_dirty_paths_linked (cyclomatic 17) lore-revision/src/state.rs
  • Cyclomatic Complexity · lore_revision::file::dirty::dirty_path (cyclomatic 17) lore-revision/src/file/dirty.rs
  • Cyclomatic Complexity · ImmutableStoreBucket::deserialize_file_content (cyclomatic 17) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · lore_revision::file::obliterate::impact::snapshot_affected (cyclomatic 16) lore-revision/src/file/obliterate/impact.rs
  • Cyclomatic Complexity · lore_revision::revision::resolve_revision (cyclomatic 16) lore-revision/src/revision.rs
  • Cyclomatic Complexity · lore_storage::write::file_matches (cyclomatic 16) lore-storage/src/write.rs
  • Cyclomatic Complexity · stress.fault_sweep (cyclomatic 16) scripts/store-stress/stress.py
  • Cognitive Complexity · LocalMutableStore::flush_all (cognitive 123) lore-storage/src/local/mutable_store.rs
  • Cognitive Complexity · LocalImmutableStore::verify_fragment_held (cognitive 66) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · stress.kill_loop (cognitive 63) scripts/store-stress/stress.py
  • Cognitive Complexity · LocalImmutableStore::store_entry (cognitive 62) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · lore_revision::file::obliterate::impact::snapshot_affected (cognitive 42) lore-revision/src/file/obliterate/impact.rs
  • Cognitive Complexity · State::collect_dirty_paths_linked (cognitive 38) lore-revision/src/state.rs
  • Cognitive Complexity · stress.disk_full (cognitive 36) scripts/store-stress/stress.py
  • Cognitive Complexity · stress.fault_sweep (cognitive 34) scripts/store-stress/stress.py
  • Cognitive Complexity · MutableStoreBucket::send_keys (cognitive 33) lore-storage/src/local/mutable_store.rs
  • Cognitive Complexity · lore_revision::file::obliterate::impact::check (cognitive 26) lore-revision/src/file/obliterate/impact.rs
  • Cognitive Complexity · lore_revision::state::collect_dirty_paths_linked (cognitive 26) lore-revision/src/state.rs
  • Cognitive Complexity · LocalImmutableStore::new_claimed (cognitive 25) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · stress.report (cognitive 25) scripts/store-stress/stress.py
  • Cognitive Complexity · LocalImmutableStore::survey_groups (cognitive 24) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · ImmutableStoreGroup::flush_delayed (cognitive 23) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · LocalMutableStore::flush_delayed (cognitive 23) lore-storage/src/local/mutable_store.rs
  • Cognitive Complexity · StoreLock::acquire_at_gate (cognitive 23) lore-storage/src/local/store_lock.rs
  • Cognitive Complexity · lore_revision::repository::status::report_staged_changes (cognitive 21) lore-revision/src/repository/status.rs
  • Cognitive Complexity · LocalMutableStore::survey_groups (cognitive 21) lore-storage/src/local/mutable_store.rs
  • Cognitive Complexity · PackStore::store (cognitive 21) lore-storage/src/packstore.rs
  • Cognitive Complexity · LocalMutableStore::new_claimed (cognitive 20) lore-storage/src/local/mutable_store.rs
  • Cognitive Complexity · Campaign.parse_work (cognitive 20) scripts/store-stress/stress.py
  • Cognitive Complexity · stress.deterministic (cognitive 19) scripts/store-stress/stress.py
  • Cognitive Complexity · lore_credential::token_store::refresh_user_token (cognitive 18) lore-credential/src/token_store.rs
  • Cognitive Complexity · ImmutableStoreBucket::deserialize_file_content (cognitive 18) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · lore_revision::file::obliterate::impact::check_branches (cognitive 17) lore-revision/src/file/obliterate/impact.rs
  • Cognitive Complexity · stress.shared_round (cognitive 17) scripts/store-stress/stress.py
  • Cognitive Complexity · lore_revision::repository::clone::clone (cognitive 16) lore-revision/src/repository/clone.rs
  • Cognitive Complexity · stress.multi_process (cognitive 16) scripts/store-stress/stress.py
  • God Classes · FileTooLong: store-stress/stress.py scripts/store-stress/stress.py
  • God Classes · MethodTooLong: LocalImmutableStore.verify_fragment_held lore-storage/src/local/immutable_store.rs
  • God Classes · FileTooLong: storage_service/client.rs lore-transport/src/quic/storage_service/client.rs
  • God Classes · FileTooLong: src/packstore.rs lore-storage/src/packstore.rs
  • God Classes · ClassTooLong: PackStore lore-storage/src/packstore.rs
  • God Classes · MethodTooLong: LocalImmutableStore.store_entry lore-storage/src/local/immutable_store.rs
  • God Classes · FileTooLong: local/store_lock.rs lore-storage/src/local/store_lock.rs
  • God Classes · TooManyMethods: PackStore lore-storage/src/packstore.rs
  • God Classes · FileTooLong: file/audit.rs lore-revision/src/file/audit.rs
  • God Classes · FileTooLong: auth/exchange.rs lore-transport/src/auth/exchange.rs
  • God Classes · TooManyFunctions: lore_storage::local::fan_out lore-storage/src/local/fan_out.rs
  • God Classes · MethodTooLong: ImmutableStoreBucket.deserialize_file_content lore-storage/src/local/immutable_store.rs
  • God Classes · TooManyMethods: Connection lore-transport/src/connection.rs
  • God Classes · FunctionTooLong: lore_revision::branch::create::create lore-revision/src/branch/create.rs
  • God Classes · MethodTooLong: LocalImmutableStore.evict_group_sized lore-storage/src/local/immutable_store.rs
  • God Classes · FileTooLong: src/auth.rs lore/src/auth.rs
  • God Classes · FunctionTooLong: lore_revision::repository::store::immutable_query_address lore-revision/src/repository/store.rs
  • Code Duplication · Near-duplicate member pair (132 shared lines) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Near-duplicate member pair (126 shared lines) lore-transport/src/auth/exchange.rs
  • Code Duplication · Near-duplicate member pair (119 shared lines) lore-revision/src/branch/merge.rs
  • Code Duplication · Near-duplicate member pair (60 shared lines) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Near-duplicate member pair (55 shared lines) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Near-duplicate member pair (40 shared lines) lore-revision/src/link/remove.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) lore-client/src/cli/commands/branch.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) lore-client/src/cli/commands/file.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-client/src/cli/commands/branch.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-client/src/cli/commands/file.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-revision/src/branch/merge.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-server/src/protocol/replication_store/get.rs
  • Code Duplication · Duplicated block (48–50 lines × 2) lore-transport/src/auth/exchange.rs
  • Code Duplication · Duplicated block (37 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (30–33 lines × 2) lore-transport/src/auth/exchange.rs
  • Code Duplication · Duplicated block (31 lines × 2) lore-server/src/grpc/revision/v1/service.rs
  • Code Duplication · Duplicated block (26 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (24 lines × 2) lore-revision/src/branch/merge.rs
  • Code Duplication · Duplicated block (20–22 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (21 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (21 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (20–21 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (20–21 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (19 lines × 2) lore-revision/src/link/add.rs
  • Code Duplication · Duplicated block (19 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (19 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (16–19 lines × 2) lore-storage/src/packstore.rs
  • Code Duplication · Duplicated block (17–18 lines × 2) lore-aws/src/dynamodb.rs
  • Code Duplication · Duplicated block (18 lines × 2) lore-revision/src/file/obliterate/impact.rs
  • Code Duplication · Duplicated block (18 lines × 2) lore-revision/src/file/stage.rs
  • Code Duplication · Duplicated block (18 lines × 2) lore-storage/src/local/mutable_store.rs
  • Code Duplication · Duplicated block (17 lines × 3) lore-transport/src/connection.rs
  • Code Duplication · Duplicated block (16–17 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (16 lines × 2) lore-revision/src/branch/merge.rs
  • Code Duplication · Duplicated block (16 lines × 2) lore-server/src/grpc/revision/v1/service.rs
  • Code Duplication · Duplicated block (15 lines × 2) lore-revision/src/repository/clone.rs
  • Code Duplication · Duplicated block (15 lines × 2) lore-storage/src/local/mutable_store.rs
  • Code Duplication · Duplicated block (14 lines × 3) lore-revision/src/link/add.rs

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

Fixed since the last survey: 127 findings

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

  • Cyclomatic Complexity · LocalImmutableStore::store (cyclomatic 42) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · LocalImmutableStore::verify_fragment (cyclomatic 40) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · LocalImmutableStore::new (cyclomatic 24) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · lore_storage::read::load_fragment (cyclomatic 22) lore-storage/src/read.rs
  • Cyclomatic Complexity · LocalMutableStore::list (cyclomatic 19) lore-storage/src/local/mutable_store.rs
  • Cyclomatic Complexity · lore_client::cli::commands::revision::resolve_link_messages (cyclomatic 17) lore-client/src/cli/commands/revision.rs
  • Cyclomatic Complexity · lore_client::cli::commands::revision::resolve_layer_messages (cyclomatic 17) lore-client/src/cli/commands/revision.rs
  • Cyclomatic Complexity · lore_revision::file::dirty::dirty_move (cyclomatic 17) lore-revision/src/file/dirty.rs
  • Cyclomatic Complexity · lore_storage::read::read_content_into_buffer (cyclomatic 17) lore-storage/src/read.rs
  • Cyclomatic Complexity · LocalImmutableStore::evict_group_sized (cyclomatic 16) lore-storage/src/local/immutable_store.rs
  • Cyclomatic Complexity · LocalMutableStore::new (cyclomatic 16) lore-storage/src/local/mutable_store.rs
  • Cyclomatic Complexity · lore_storage::defragment::read_defragment (cyclomatic 16) lore-storage/src/defragment.rs
  • Cyclomatic Complexity · lore_storage::read::read_into (cyclomatic 16) lore-storage/src/read.rs
  • Cognitive Complexity · LocalImmutableStore::store (cognitive 79) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · LocalMutableStore::list (cognitive 76) lore-storage/src/local/mutable_store.rs
  • Cognitive Complexity · LocalImmutableStore::verify_fragment (cognitive 67) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · State::collect_dirty_paths (cognitive 33) lore-revision/src/state.rs
  • Cognitive Complexity · lore_storage::read::load_fragment (cognitive 33) lore-storage/src/read.rs
  • Cognitive Complexity · LocalImmutableStore::new (cognitive 31) lore-storage/src/local/immutable_store.rs
  • Cognitive Complexity · LocalMutableStore::new (cognitive 26) lore-storage/src/local/mutable_store.rs
  • Cognitive Complexity · lore_revision::state::collect_dirty_paths_inner (cognitive 24) lore-revision/src/state.rs
  • Cognitive Complexity · lore_storage::read::read_content_into_buffer (cognitive 22) lore-storage/src/read.rs
  • Cognitive Complexity · State::cache_file_metadata (cognitive 19) lore-revision/src/state.rs
  • Cognitive Complexity · lore_server::grpc::handlers::repository_delete::repository_delete (cognitive 18) lore-server/src/grpc/handlers/repository_delete.rs
  • Cognitive Complexity · RevisionService::branch_list (cognitive 18) lore-transport/src/grpc/revision_client.rs
  • Cognitive Complexity · lore_revision::repository::clone::clone_execute (cognitive 17) lore-revision/src/repository/clone.rs
  • Cognitive Complexity · lore_revision::repository::clone::clone_node (cognitive 17) lore-revision/src/repository/clone.rs
  • Cognitive Complexity · lore_server::grpc::repository::v1::repository_delete::handler (cognitive 17) lore-server/src/grpc/repository/v1/repository_delete.rs
  • Cognitive Complexity · lore_client::cli::commands::service::run::service_main (cognitive 16) lore-client/src/cli/commands/service/run.rs
  • God Classes · MethodTooLong: LocalImmutableStore.store lore-storage/src/local/immutable_store.rs
  • God Classes · MethodTooLong: LocalImmutableStore.verify_fragment lore-storage/src/local/immutable_store.rs
  • God Classes · MethodTooLong: LocalImmutableStore.new lore-storage/src/local/immutable_store.rs
  • God Classes · MethodTooLong: LocalMutableStore.new lore-storage/src/local/mutable_store.rs
  • God Classes · ClassTooLong: RepositoryContext lore-revision/src/repository.rs
  • God Classes · FunctionTooLong: lore_revision::link::remove::remove lore-revision/src/link/remove.rs
  • Code Duplication · Near-duplicate member pair (133 shared lines) lore-transport/src/auth/exchange.rs
  • Code Duplication · Near-duplicate member pair (113 shared lines) lore-revision/src/branch/merge.rs
  • Code Duplication · Near-duplicate member pair (66 shared lines) lore-client/src/cli/commands/revision.rs
  • Code Duplication · Near-duplicate member pair (57 shared lines) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Near-duplicate member pair (43 shared lines) lore-revision/src/link/remove.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) lore-client/src/cli/commands/branch.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) lore-client/src/cli/commands/file.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-client/src/cli/commands/branch.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-client/src/cli/commands/file.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-revision/src/branch/merge.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-server/src/protocol/replication_store/get.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (55–57 lines × 2) lore-transport/src/auth/exchange.rs
  • Code Duplication · Duplicated block (33 lines × 2) lore-server/src/grpc/revision/v1/service.rs
  • Code Duplication · Duplicated block (28–32 lines × 2) lore-transport/src/auth/exchange.rs
  • Code Duplication · Duplicated block (23–28 lines × 2) lore-storage/src/read.rs
  • Code Duplication · Duplicated block (26 lines × 2) lore-revision/src/link/add.rs
  • Code Duplication · Duplicated block (23 lines × 2) lore-revision/src/fs/realize.rs
  • Code Duplication · Duplicated block (20 lines × 2) lore-revision/src/branch/merge.rs
  • Code Duplication · Duplicated block (20 lines × 2) lore-storage/src/read.rs
  • Code Duplication · Duplicated block (18–19 lines × 2) lore-revision/src/commit.rs
  • Code Duplication · Duplicated block (19 lines × 2) lore-storage/src/local/mutable_store.rs
  • Code Duplication · Duplicated block (17–19 lines × 2) lore-storage/src/packstore.rs
  • Code Duplication · Duplicated block (17 lines × 3) lore-revision/src/link/add.rs
  • Code Duplication · Duplicated block (17 lines × 3) lore-transport/src/connection.rs
  • Code Duplication · Duplicated block (17 lines × 2) lore-revision/src/metadata/clear.rs
  • Code Duplication · Duplicated block (15–17 lines × 2) lore-server/src/grpc/handlers/branch_push.rs
  • Code Duplication · Duplicated block (16–17 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (17 lines × 2) lore-transport/src/grpc/repository_client.rs
  • Code Duplication · Duplicated block (13–16 lines × 2) lore/src/revision_tree/handle.rs
  • Code Duplication · Duplicated block (14–15 lines × 2) lore-server/src/grpc/handlers/repository_delete.rs
  • Code Duplication · Duplicated block (15 lines × 2) lore-server/src/grpc/revision/v1/service.rs
  • Code Duplication · Duplicated block (14–15 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (13–14 lines × 2) lore-aws/src/dynamodb.rs
  • Code Duplication · Duplicated block (13–14 lines × 2) lore-credential/src/token_store.rs
  • Code Duplication · Duplicated block (14 lines × 2) lore-revision/src/branch/merge.rs
  • Code Duplication · Duplicated block (14 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (13 lines × 2) lore-revision/src/auth/login.rs
  • Code Duplication · Duplicated block (13 lines × 2) lore-revision/src/repository/clone.rs
  • Code Duplication · Duplicated block (13 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (13 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (13 lines × 2) lore-storage/src/read.rs
  • Code Duplication · Duplicated block (13 lines × 2) lore-transport/src/auth/exchange.rs
  • Code Duplication · Duplicated block (12 lines × 2) lore-revision/src/commit.rs
  • Code Duplication · Duplicated block (12 lines × 2) lore-revision/src/repository.rs
  • Code Duplication · Duplicated block (12 lines × 2) lore-revision/src/store/remote.rs
  • Code Duplication · Duplicated block (12 lines × 2) lore-storage/src/local/mutable_store.rs
  • Code Duplication · Duplicated block (12 lines × 2) lore-transport/src/auth/exchange.rs
  • Code Duplication · Duplicated block (12 lines × 2) lore/src/storage/remote.rs
  • Code Duplication · Duplicated block (11 lines × 2) lore-revision/src/file/stage.rs
  • Code Duplication · Duplicated block (11 lines × 2) lore-transport/src/grpc/mod.rs
  • Code Duplication · Duplicated block (10 lines × 3) lore-revision/src/store/remote.rs
  • Code Duplication · Duplicated block (10 lines × 2) lore-revision/src/file/dirty.rs
  • Code Duplication · Duplicated block (10 lines × 2) lore-revision/src/file/dirty.rs
  • Code Duplication · Duplicated block (10 lines × 2) lore/src/call.rs
  • Code Duplication · Duplicated block (8–9 lines × 3) lore-revision/src/store/remote.rs
  • Code Duplication · Duplicated block (9 lines × 2) lore-revision/src/metadata/set.rs
  • Code Duplication · Duplicated block (9 lines × 2) lore-revision/src/repository.rs
  • Code Duplication · Duplicated block (9 lines × 2) lore-revision/src/repository/clone.rs
  • Code Duplication · Duplicated block (9 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (8–9 lines × 2) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (9 lines × 2) lore-storage/src/read.rs
  • Code Duplication · Duplicated block (7–8 lines × 4) lore-storage/src/local/immutable_store.rs
  • Code Duplication · Duplicated block (8 lines × 2) lore-revision/src/repository.rs
  • Code Duplication · Duplicated block (7 lines × 3) lore-revision/src/repository.rs
Rebuild cost: about €750,000 · Estimate
Cost to rebuild€250,000 to €1,300,000, for 4,171 to 13,233 hours of work, about 5.2 person-years for 3 to 10 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×1.0 at a score of 72. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 262,074 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
Raises the score by about 7 points · Medium effort · Web-Security Posture
2
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Raises the score by about 2 points · Low effort · Network Egress Confinement
3
Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
Raises the score by about 3 points · Medium effort · Access Controls

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €750,000 to build again, about 5.2 person-years of work. Its weakest lens is Security and Compliance, at 60 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch lore lore lore-base lore-base lore->lore-base lore-credential lore-credential lore->lore-credential lore-error-set lore-error-set lore->lore-error-set lore-io lore-io lore->lore-io lore-macro lore-macro lore->lore-macro lore-notification lore-notification lore->lore-notification lore-revision lore-revision lore->lore-revision lore-storage lore-storage lore->lore-storage lore-transport lore-transport lore->lore-transport lore-aws lore-aws lore-aws->lore-base lore-aws->lore-error-set lore-aws->lore-macro lore-aws->lore-revision lore-aws->lore-storage lore-telemetry lore-telemetry lore-aws->lore-telemetry lore-aws-migrate lore-aws-migrate lore-aws-migrate->lore-aws lore-aws-migrate->lore-storage lore-base->lore-error-set lore-base->lore-io lore-base->lore-macro lore-credential->lore-base lore-credential->lore-error-set lore-hashicorp lore-hashicorp lore-hashicorp->lore-revision lore-hashicorp->lore-telemetry lore-io->lore-macro lore-notification->lore-base lore-notification->lore-error-set lore-proto lore-proto lore-notification->lore-proto lore-notification->lore-revision lore-notification->lore-storage lore-notification->lore-transport lore-proto->lore-base lore-revision->lore-base lore-revision->lore-credential lore-revision->lore-error-set lore-revision->lore-io lore-revision->lore-macro lore-revision->lore-proto lore-revision->lore-storage lore-revision->lore-telemetry lore-revision->lore-transport lore-server lore-server lore-server->lore-aws lore-server->lore-base lore-server->lore-error-set lore-server->lore-hashicorp lore-server->lore-macro lore-server->lore-notification lore-server->lore-proto lore-server->lore-revision lore-server->lore-storage lore-server->lore-telemetry lore-server->lore-transport lore-storage->lore-base lore-storage->lore-error-set lore-storage->lore-io lore-storage->lore-macro lore-storage->lore-telemetry lore-storage->lore-transport lore-telemetry->lore-error-set lore-transport->lore-base lore-transport->lore-credential lore-transport->lore-error-set lore-transport->lore-macro lore-transport->lore-proto rbe-lore rbe-lore rbe-lore->lore rbe-lore->lore-base rbe-lore->lore-macro rbe-lore->lore-revision rbe-proto rbe-proto rbe-lore->rbe-proto rbe-server rbe-server rbe-server->lore-base rbe-server->lore-macro rbe-server->rbe-lore rbe-server->rbe-proto rbe-worker rbe-worker rbe-worker->lore-base rbe-worker->lore-macro rbe-worker->rbe-lore rbe-worker->rbe-proto __more__ +5 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

791 modules, with 2253 dependencies between them. 3 loops run through 168 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 751 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 lore_base.types2 lore_base.types.store_types3 lore_server.auth.jwt4 lore_server.hooks.dispatch5 lore_server.protocol.attribute_map6 lore_telemetry7 quinn_proto.frame8 lore_proto.grpc.lore.model.v19 quinn_proto.connection.streams.send10 quinn_proto.transport_error11 lore_proto.grpc.urc.model12 lore_revision.util.path13 lore_storage.local.store_lock14 lore_transport.connection15 lore_revision.interface16 lore_storage.immutable_store17 lore_transport.quic.client18 lore_transport.session19 lore.storage.handle20 lore_revision.filter21 lore_server.protocol.storage.messages22 lore_storage.write23 lore.storage.store24 lore_revision.state25 lore_server.grpc.server26 quinn_proto.connection27 lore_server.settings28 lore_storage.local.immutable_store29 lore_revision.repository30 lore_revision.node31 lore_revision.fs.filesystem_provider32 lore_revision.change33 lore_revision.branch34 lore_proto.grpc.lore.thin_client.v135 lore.revision_tree.handle36 lore_revision.event37 lore.interface38 lore_revision.revision.sync39 lore_revision.layer40 lore_transport.grpc
1 lore_base.types
2 lore_base.types.store_types
3 lore_server.auth.jwt
4 lore_server.hooks.dispatch
5 lore_server.protocol.attribute_map
6 lore_telemetry
7 quinn_proto.frame
8 lore_proto.grpc.lore.model.v12
9 quinn_proto.connection.streams.send1
10 quinn_proto.transport_error1
11 lore_proto.grpc.urc.model1073
12 lore_revision.util.path34
13 lore_storage.local.store_lock11
14 lore_transport.connection312
15 lore_revision.interface13111
16 lore_storage.immutable_store713
17 lore_transport.quic.client23
18 lore_transport.session813
19 lore.storage.handle111
20 lore_revision.filter131
21 lore_server.protocol.storage.messages1111
22 lore_storage.write1712
23 lore.storage.store211221
24 lore_revision.state11181521419661
25 lore_server.grpc.server15121
26 quinn_proto.connection531
27 lore_server.settings12
28 lore_storage.local.immutable_store17213422
29 lore_revision.repository313472221
30 lore_revision.node931323
31 lore_revision.fs.filesystem_provider3214228461
32 lore_revision.change22121
33 lore_revision.branch1111113122231
34 lore_proto.grpc.lore.thin_client.v1331
35 lore.revision_tree.handle22331
36 lore_revision.event22131
37 lore.interface21
38 lore_revision.revision.sync51422413311
39 lore_revision.layer515341111
40 lore_transport.grpc1111811
Uses a module listed above itPart of a loopThe module itself
1 lore_base.types2 lore_base.types.store_types3 lore_server.auth.jwt4 lore_server.hooks.dispatch5 lore_server.protocol.attribute_map6 lore_telemetry7 quinn_proto.frame8 lore_proto.grpc.lore.model.v19 quinn_proto.connection.streams.send10 quinn_proto.transport_error11 lore_proto.grpc.urc.model12 lore_revision.util.path13 lore_storage.local.store_lock14 lore_transport.connection15 lore_revision.interface16 lore_storage.immutable_store17 lore_transport.quic.client18 lore_transport.session19 lore.storage.handle20 lore_revision.filter21 lore_server.protocol.storage.messages22 lore_storage.write23 lore.storage.store24 lore_revision.state25 lore_server.grpc.server26 quinn_proto.connection27 lore_server.settings28 lore_storage.local.immutable_store29 lore_revision.repository30 lore_revision.node31 lore_revision.fs.filesystem_provider32 lore_revision.change33 lore_revision.branch34 lore_proto.grpc.lore.thin_client.v135 lore.revision_tree.handle36 lore_revision.event37 lore.interface38 lore_revision.revision.sync39 lore_revision.layer40 lore_transport.grpclore_base.types1lore_base.types.store_types2lore_server.auth.jwt3lore_server.hooks.dispatch4lore_server.protocol.attribute_map5lore_telemetry6quinn_proto.frame7lore_proto.grpc.lore.model.v18quinn_proto.connection.streams.send9quinn_proto.transport_error10lore_proto.grpc.urc.model11lore_revision.util.path12lore_storage.local.store_lock13lore_transport.connection14lore_revision.interface15lore_storage.immutable_store16lore_transport.quic.client17lore_transport.session18lore.storage.handle19lore_revision.filter20lore_server.protocol.storage.messages21lore_storage.write22lore.storage.store23lore_revision.state24lore_server.grpc.server25quinn_proto.connection26lore_server.settings27lore_storage.local.immutable_store28lore_revision.repository29lore_revision.node30lore_revision.fs.filesystem_provider31lore_revision.change32lore_revision.branch33lore_proto.grpc.lore.thin_client.v134lore.revision_tree.handle35lore_revision.event36lore.interface37lore_revision.revision.sync38lore_revision.layer39lore_transport.grpc4021110733411312131117132381311113111111712211221111815214196611512153112172134223134722219313233214228461221211111113122231331223312213121514224133115153411111111811+751 more modules (most-connected shown)

At a glance — Code Health · 73% · Strong ·

At a glance — Architecture · 93% · Exemplary ·

At a glance — Maturity · 88% · Exemplary ·

At a glance — Readiness · 82% · Strong ·

At a glance — Security · 60% · Adequate · gated by D29, D31, D36 ·

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

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A02:2025 — Security Misconfiguration38High / Critical
A05:2025 — Injection18High / Critical
A03:2025 — Software Supply Chain Failures18Medium
A07:2025 — Authentication Failures3High / Critical

Roadmap

First, eliminate the unconditional TLS certificate verification by trusting only valid or explicitly added root certificates to secure the web security posture. Second, centralize access controls by defining roles and permissions in a single, testable location rather than scattering checks throughout the code. Third, replace interpolated log messages with structured logging to improve observability and debugging. Finally, address the single network egress policy gap and improve kernel and syscall confinement to restrict system-level access.

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

Do thisHelpsEffortDimension
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.+6.6 ptsMediumWeb-Security Posture
Resolve the 1 No network policy finding(s) in Network Egress Confinement.+1.8 ptsLowNetwork Egress Confinement
Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.+3.3 ptsMediumAccess Controls
Interpolated log message defeats structured logging+3.1 ptsMediumStructured logging
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+1.5 ptsLowREDACTED Scanning
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4).+1.1 ptsLowStatic Analysis (SAST)
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.1 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.1 ptsLowSupply-chain Provenance & Signing

File quality

Per-file score 0–10 — a quality signature. Of 293 files carrying findings, judged against the Preview bar: 1% slop · 19% mixed · 80% near-clean.

FileScoreBandWorst signal
REDACTED1.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.4SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED1.9SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.0MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
lore-transport/src/quic/storage_service/client.rs5.6MixedGod Classes: FileTooLong: storage_service/client.rs
lore-server/src/quic/storage_service.rs5.7MixedGod Classes: FunctionTooLong: lore_server::quic::storage_service::build_storage_protocol_request_span
REDACTED5.8MixedDependency Vulnerabilities: Medium advisory (unsound): REDACTED
lore-server/src/quic/storage_service_v4.rs5.9MixedCyclomatic Complexity: StorageServiceV4::run_request_handler (cyclomatic 23)
lore-storage/src/local/store_lock.rs5.9MixedCyclomatic Complexity: StoreLock::acquire_at_gate (cyclomatic 19)
lore-server/src/quic/replication_store_service/server.rs5.9MixedGod Classes: MethodTooLong: ReplicationStoreService.build_request_span
lore-revision/src/revision/sync.rs6.0MixedExplicit Debt: TodoComment
lore-revision/src/stage.rs6.0MixedExplicit Debt: TodoComment
lore-revision/src/revision.rs6.0MixedExplicit Debt: TodoComment
lore-revision/src/repository.rs6.0MixedExplicit Debt: TodoComment
lore-storage/src/local/mutable_store.rs6.0MixedExplicit Debt: TodoComment
lore-revision/src/fs/realize.rs6.0MixedExplicit Debt: TodoComment

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

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

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

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

Could not be resolved — 17

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. 71 of 71 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 71 dimensions across the health lenses
D1D2D3D4D5D6D7D9D12D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D37D40D41D43D44AX10AX3AX4AX8AX9C2DM4DM5ES1ES2M1M2M3P1P10P2P3P4P5P6P7PF3S1X1X12X13X14X15X17X19X21X22X23X24X25X26X27X28X29X3X30X4

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, 1538 of 1558 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 measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17c79-a4dc-778c-8ea5-a359f324ea34.

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 MEASURED: test source is present (.py, .rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`, or lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`, or lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — 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 (.py, .rs) and this repository declares a Cargo test suite (repository root, 514 test files), but it was not re-run: its build outgrew the 7 GB scratch ceiling (7.024 GB measured) and was stopped; its suite was not run. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D41 Kernel & Syscall Confinement — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Contrib/helm/templates/data-statefulset.yaml:12, REDACTED:11 did not read as a pod spec (a templated manifest such as Helm's that is not YAML until rendered, or a workload whose pod spec this check does not locate), so the seccomp/AppArmor profile in force there was not judged and no row about them can appear on this card.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (lore-integration-tests/compose.yaml). compose up failed (exit 18 — an image could not be pulled) — consul-node-1 Pulling minio Pulling dynamodb Pulling consul-server Pulling dynamodb Error Get "https://registry-1.docker.io/v2/": Forbidden consul-node-1 Error context canceled minio Error context canceled consul-server Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: consul-node-1 Skipped - Image is already being pulled by consul-server dynamodb Pulling consul-server Pulling minio Pulling consul-server Error Get "https://registry-1.docker.io/v2/": Forbidden dynamodb Error Get "https://registry-1.docker.io/v2/": Forbidden minio Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'aws_sdk_dynamodb' is imported (lore-aws/src/clients.rs:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • 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. 'aws_sdk_dynamodb' is imported (lore-aws/src/clients.rs:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • 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. 'aws_sdk_dynamodb' is imported (lore-aws/src/clients.rs:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • 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. 'aws_sdk_dynamodb' is imported (lore-aws/src/clients.rs:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Python, Rust, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Python, Rust, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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 reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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 reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 306 further occurrence(s) are not listed individually; the score already reflects all 346.
  • 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 reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C, Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
  • D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

105 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was lore_revision::revision::sync::sync at 60. A further 5 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 lore_client::cli::cli::handle_lore_commands at 25 — they are counted neither in the figure above nor in this dimension's score. 4 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: lore-client/src/cli/cli.rs (lore_client::cli::cli::handle_lore_commands at 25), lore-server/src/grpc/mod.rs (lore_server::grpc::map_message_handle_error_to_status at 24), lore-server/src/quic/storage_service.rs (lore_server::quic::storage_service::message_handle_error_to_label at 24), lore-server/src/quic/replication_store_service/server.rs (ReplicationStoreService::build_request_span at 18). 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.

lore_revision::revision::sync::sync (cyclomatic 60) · ×63lore-revision/src/revision/sync.rs:426
LocalImmutableStore::verify_fragment_held (cyclomatic 39) · ×8lore-storage/src/local/immutable_store.rs:6161
lore_client::cli::commands::repository::handle_repository_status (cyclomatic 42) · ×4lore-client/src/cli/commands/repository.rs:519
lore_storage::local::immutable_store::flush_locked_group (cyclomatic 41) · ×4lore-storage/src/local/immutable_store.rs:6580
lore_server::server::async_main (cyclomatic 32) · ×3lore-server/src/server.rs:1892

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

What to do

  1. Bring the 17 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with lore_revision::revision::sync::sync (cyclomatic 60), lore_revision::stage::stage_node_from_metadata (cyclomatic 56), lore_revision::repository::status::status (cyclomatic 50). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 17 together lifts Cyclomatic Complexity from 6.5 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. 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.0 / 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.0 / 10 · rule-coverage 100% · ceiling Prevented

269 method(s) exceeded the cognitive complexity threshold of 15; the worst was LocalMutableStore::flush_all at 123.

lore_revision::fs::realize::verify_filesystem (cognitive 105) · ×134lore-revision/src/fs/realize.rs:594
lore_storage::local::immutable_store::flush_locked_group (cognitive 90) · ×18lore-storage/src/local/immutable_store.rs:6580
LocalImmutableStore::verify (cognitive 75) · ×16lore-storage/src/local/immutable_store.rs:5775
lore_server::server::async_main (cognitive 43) · ×14lore-server/src/server.rs:1892
lore_client::cli::commands::repository::handle_repository_status (cognitive 74) · ×12lore-client/src/cli/commands/repository.rs:519

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

What to do

  1. Bring the 21 bodies over 60 down to 60 or less in Cognitive Complexity — start with LocalMutableStore::flush_all (cognitive 123), lore_revision::fs::realize::verify_filesystem (cognitive 105), lore_revision::stage::stage_node_from_metadata (cognitive 96). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 21 together lifts Cognitive Complexity from 5.0 to about 6.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. 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.0 / 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.0 / 10 · rule-coverage 100% · ceiling Prevented

230 god class(es) detected.

FunctionTooLong: lore_server::server::async_main · ×108lore-server/src/server.rs:1892
FileTooLong: src/state.rs · ×80lore-revision/src/state.rs
MethodTooLong: LocalMutableStore.flush_all · ×17lore-storage/src/local/mutable_store.rs:1587
ClassTooLong: LocalImmutableStore · ×12lore-storage/src/local/immutable_store.rs:654
TooManyMethods: State · ×10lore-revision/src/state.rs:390

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

What to do

  1. Resolve the 108 FunctionTooLong finding(s) in God Classes — start with stage.rs (9), merge.rs (8), commit.rs (7). — One of this dimension's main actionable groups (108 warning-level).
  2. Resolve the 80 FileTooLong finding(s) in God Classes — start with branch.rs (3), repository.rs (3), revision.rs (3). — One of this dimension's main actionable groups (80 warning-level).
  3. Resolve the 17 MethodTooLong finding(s) in God Classes — start with immutable_store.rs (7), server.rs (2), state.rs (2). — One of this dimension's main actionable groups (17 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.1 / 10Stronggated by 523 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.1 / 10 · rule-coverage 100% · ceiling Verified

491 duplicated block group(s) detected. A further 32 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (11 lines × 2) · ×35lore-revision/src/branch/merge.rs:4491
Duplicated block (14 lines × 2) · ×30lore-client/src/cli/commands/file.rs:1099
Duplicated block (8 lines × 2) · ×28lore-aws/src/store/immutable_store.rs:1073
Duplicated block (10 lines × 2) · ×27lore-client/src/cli/commands/file.rs:2004
Duplicated block (9 lines × 2) · ×27lore-aws/src/store/immutable_store.rs:1093

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

What to do

  1. Resolve the 35 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with branch.rs (3), state.rs (3), service.rs (3). — One of this dimension's main actionable groups (35 warning-level).
  2. Resolve the 30 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with repository.rs (3), state.rs (3), service.rs (3). — One of this dimension's main actionable groups (30 warning-level).
  3. Resolve the 28 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with immutable_store.rs (3), commit.rs (3), repository_metadata_get.rs (2). — One of this dimension's main actionable groups (28 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 · Coupling9.7 / 10Stronggated by 1 serious finding✓ 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 9.7 / 10 · rule-coverage 100% · ceiling Prevented

25 production modules (Cargo+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 20 of the 25 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: lore-base

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 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 10 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

10 of 566 classes have LCOM4 above 3.

Low cohesion: StorageClient (LCOM4 14) · ×10lore-transport/src/quic/storage_service/client.rs:76

What to do

  1. Resolve the 10 Low cohesion finding(s) in Cohesion (LCOM4) — start with client.rs (2), filesystem_provider.rs, mutable_store.rs. — One of this dimension's main actionable groups (10 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.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Classify ADR enforcement: ADR-00001: Use FastCDC, a well-documented content-defined chunking strategy · ×26docs/developing/decisions/00001-fast-cdc.md

What to do

  1. Resolve the 26 Classify ADR enforcement finding(s) in Architectural Integrity — start with 00001-fast-cdc.md, 00002-branch-tracking-in-mutable-store.md, 00003-auth-tokens-for-sub-repos.md. — One of this dimension's main actionable groups (26 recommendation-level).
  2. Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D9 · Test Distribution9.6 / 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 9.6 / 10 · rule-coverage 100% · ceiling Documented

7014 test methods: 1497 unit, 5517 integration, 0 BDD, 0 e2e. The Rust suite contributes 5715 `#[test]` function(s) across 514 file(s) declaring at least one; its unit/integration split is Cargo's own — 500 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 1299 test function(s) across 114 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.

Inverted test pyramid

✓ On the Gold path — maintain.

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

D12 · Dependency Hygiene9.8 9.5 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 97% · ceiling Verified

4 outdated, 0 yanked direct Cargo dependencies. 110 of 113 direct crates were graded against crates.io (0 not published there, 3 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: backtrace · ×4

✓ On the Gold path — maintain.

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

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

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 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 476 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.5 / 10Stronggated by 53 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.5 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: lore-revision/src/stage.rs (54×56=3024); lore-revision/src/state.rs (103×25=2575); lore-revision/src/repository.rs (55×46=2530)

Hotspot: lore-revision/src/stage.rs · ×53lore-revision/src/stage.rs:2384

What to do

  1. Resolve the 53 Hotspot finding(s) in Churn × Complexity Hotspots — start with diff.rs (3), stage.rs (2), repository.rs (2). — One of this dimension's main actionable groups (53 warning-level).

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

D16 · Bus Factor8.0 / 10Strong✓ Tool-verified

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

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

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

102 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is lore-storage/src/local/immutable_store.rs. Counted over 528 of the 737 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 Debt9.9 / 10Stronggated by 140 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

140 deducted task-comment markers across 262074 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×135scripts/test/lore.py:78
HackComment · ×5lore-revision/tests/state.rs:423

What to do

  1. Resolve the 135 TodoComment finding(s) in Explicit Debt — start with stage.rs (19), realize.rs (10), state.rs (8). — One of this dimension's main actionable groups (135 warning-level).
  2. Resolve the 5 HackComment finding(s) in Explicit Debt — start with state.rs (2), build.rs (2), storage_test.rs. — One of this dimension's main actionable groups (5 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality8.3 / 10Strong✓ 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 8.3 / 10 · rule-coverage 100% · ceiling Documented

25 of 26 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question). How well each record argues its case is not measured.

ADR lacks an enforcement field · ×24docs/developing/decisions/00003-auth-tokens-for-sub-repos.md:8detected by adr-integrity
ADR consequences name no cost · ×6docs/developing/decisions/00001-fast-cdc.md:29detected by adr-integrity
ADR has no Consequences section · ×2docs/developing/decisions/00018-external-instance-directory-registry.md:6detected by adr-integrity

What to do

  1. Resolve the 24 ADR lacks an enforcement field finding(s) in ADR Quality — start with 00003-auth-tokens-for-sub-repos.md, 00004-s3-storage-options.md, 00005-web-framework.md. — One of this dimension's main actionable groups (24 recommendation-level).
  2. Resolve the 6 ADR consequences name no cost finding(s) in ADR Quality — start with 00001-fast-cdc.md, 00005-web-framework.md, 00006-s3-storage-options-reconsidered.md. — One of this dimension's main actionable groups (6 recommendation-level).
  3. Resolve the 2 ADR has no Consequences section finding(s) in ADR Quality — start with 00018-external-instance-directory-registry.md, 00025-service-version-compatibility.md. — One of this dimension's main actionable groups (2 recommendation-level).

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

D26 · Project Cohesion6.0 / 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 6.0 / 10 · rule-coverage 100% · ceiling Documented

5 of 25 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ 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 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 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 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 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)3.1 / 10Weak✓ 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 3.1 / 10 · rule-coverage 100% · ceiling Documented

18 finding(s): 0 critical, 12 high, 6 medium, 0 low. 7 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 37 file(s) — `contrib/bazel/lore-rbe` (line 89, line 93, line 471), `contrib/helm/templates/certificate.yaml`, `contrib/helm/templates/configmap.yaml`, `REDACTED`, `REDACTED`, … (+32 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
  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 7 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 (7 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities7.2 / 10Strong✓ 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 7.2 / 10 · rule-coverage 100% · ceiling Documented

15 finding(s): 0 critical, 0 high, 15 medium, 0 low.

REDACTED
REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security3.2 / 10Weak✓ 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 3.2 / 10 · rule-coverage 100% · ceiling Documented

38 finding(s): 1 critical, 15 high, 8 medium, 14 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 15 High IaC finding(s) in IaC & Container Security — start with REDACTED (10), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (15 issue-level).
  2. Resolve the 1 Critical IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 8 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (8 warning-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 528 of the 737 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 Coupling9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

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

Strongest change-coupling: interface.rs↔command.rs 94%; mod.rs↔stage.rs 60%; mod.rs↔realize.rs 56%

Change coupling: interface.rs ↔ command.rs · ×3lore/src/interface.rs:1

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with mod.rs (2), interface.rs. — One of this dimension's main actionable groups (3 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ 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 2.5 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  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.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D40 · Network Egress Confinement6.0 / 10Adequate✓ Tool-verified

What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.

Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.

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

0/2 network-egress controls present (network policy, egress restriction).

No network policy

What to do

  1. Resolve the 1 No network policy finding(s) in Network Egress Confinement. — One of this dimension's main actionable groups (1 recommendation-level).

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

D41 · Kernel & Syscall Confinement6.0 / 10Adequate✓ Tool-verified

What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.

Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.

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

No workload manifest could be read as a pod spec, so no confinement was judged.

What to do

  1. Improve Kernel & Syscall Confinement — currently 6.0/10. — No workload manifest could be read as a pod spec, so no confinement was judged.

Detailed fixes: d41_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. 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-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

C2 · Access Controls7.0 / 10Strong✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.

What to do

  • Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
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.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)7.2 / 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 build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add a README to the 19 of 26 project(s) that lack one — worth up to 1.5 pts.
M2 · Architecture documentation10.0 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Grow the ADR log (currently 27) — reach 50 to raise the maturity tier; document significant decisions as they're made.
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.

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 · Observability9.8 / 10Exemplary✓ 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 14/15 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Dependabot is configured but does not watch `npm`, `cargo`, `pip` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • 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.

P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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 resilience10.0 / 10Exemplary○ Nothing flagged

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.

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, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

S1 · Web-Security Posture5.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves HTTP itself (`axum::serve(` (lore-server/src/http/server.rs:334)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.

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

  • a rustls `ServerCertVerifier` that accepts every certificate (`SkipServerVerification`) is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer — reqwest, native-tls, rustls and openssl's `SslConnector` all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: `reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(…))`, a rustls `RootCertStore` holding its CA, or `SslConnectorBuilder::set_ca_file`, which keeps the chain and hostname checks on. — lore-transport/src/quic/client.rs:767
  • Set: Content-Security-Policy, X-Content-Type-Options. Missing: Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−1.0 on this card.) The server: `axum::serve(` (lore-server/src/http/server.rs:334).

What to do

  • Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
  • Add Strict-Transport-Security, X-Frame-Options beside the headers the Rust server already sets.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped2.2 / 10Critical✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `id` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — notices/third-party-notices.hbs:9
  • `crate.name` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — notices/third-party-notices.hbs:11
  • `../text` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — notices/third-party-notices.hbs:12

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

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

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

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging4.1 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:219
  • `error!` at line 251 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:251
  • `error!` at line 255 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:255
  • `info!` at line 272 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:272
  • `error!` at line 279 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:279
  • `error!` at line 280 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:280
  • `warn!` at line 288 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:288
  • `info!` at line 476 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:476
  • `info!` at line 619 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:619
  • `info!` at line 734 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:734
  • `info!` at line 1404 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1404
  • `info!` at line 1418 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1418
  • `info!` at line 1475 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1475
  • `warn!` at line 1727 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1727
  • `info!` at line 1741 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1741
  • `warn!` at line 1748 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1748
  • `warn!` at line 1752 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1752
  • `info!` at line 1975 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:1975
  • `info!` at line 2028 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2028
  • `info!` at line 2032 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2032
  • `info!` at line 2139 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2139
  • `info!` at line 2351 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2351
  • `trace!` at line 2528 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2528
  • `debug!` at line 2531 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2531
  • `info!` at line 2534 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2534
  • `warn!` at line 2537 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2537
  • `error!` at line 2540 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/server.rs:2540
  • `info!` at line 107 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/topology/composite.rs:107
  • `info!` at line 143 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/topology/composite.rs:143
  • `error!` at line 28 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/guard.rs:28
  • `error!` at line 35 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/guard.rs:35
  • `error!` at line 42 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/guard.rs:42
  • `trace!` at line 128 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/tokio_bridge.rs:128
  • `trace!` at line 137 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/tokio_bridge.rs:137
  • `trace!` at line 146 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/tokio_bridge.rs:146
  • `trace!` at line 283 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/tokio_bridge.rs:283
  • `trace!` at line 292 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/tokio_bridge.rs:292
  • `trace!` at line 301 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/tokio_bridge.rs:301
  • `trace!` at line 310 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/telemetry/tokio_bridge.rs:310
  • `debug!` at line 341 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — lore-server/src/store/grpc_replica.rs:341

What to do

  • Interpolated log message defeats structured logging

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 Health73%StrongSolid.
Architecture93%ExemplarySolid.
Maturity88%ExemplarySolid.
Readiness82%StrongSolid.
Security60%Adequate — gated by D29, D31, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Event Sourcing100%ExemplarySolid.
Performance100%ExemplarySolid.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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: this repository stores data through 'aws_sdk_dynamodb' (lore-aws/src/clients.rs:7) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'aws_sdk_dynamodb' (lore-aws/src/clients.rs:7) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'aws_sdk_dynamodb' (lore-aws/src/clients.rs:7) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
Not included — 51 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 — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — consul-node-1 Pulling minio Pulling dynamodb Pulling consul-server Pulling dynamodb Error Get "https://registry-1.docker.io/v2/": Forbidden consul-node-1 Error context canceled minio Error context canceled consul-server Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: consul-node-1 Skipped - Image is already being pulled by consul-server dynamodb Pulling consul-server Pulling minio Pulling consul-server Error Get "https://registry-1.docker.io/v2/": Forbidden dynamodb Error Get "https://registry-1.docker.io/v2/": Forbidden minio Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; 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: this repository stores data through 'aws_sdk_dynamodb' (lore-aws/src/clients.rs:7) but declares no persisted model this check reads (Diesel table! columns, SeaORM entity / Diesel model / sqlx FromRow struct fields, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQL string literals). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • D10 Test Quality — ~290795 lines of test source are present (.py, .rs) 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
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; Python, Rust not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — None of 23 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
  • D8 Code Coverage — Coverage not 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 — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • 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 — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M4 Documentation accuracy — Not applicable: the 60 current-state document(s) make no claim of a kind M4 checks. 231 claim(s) of kinds M4 does not check were not checked (path 135, command argument 11, environment variable 67, setting 11, route 4, cd 3); M4 checks only links and versions.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • 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
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 31 finding(s)
D31 · IaC & Container Security · High IaC · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Critical IaC · ×1
  • REDACTED
S1 · Web-Security Posture · TLS certificate validation disabled · ×1
  • TLS certificate validation disabled lore-transport/src/quic/client.rs:767 — a rustls `ServerCertVerifier` that accepts every certificate (`SkipServerVerification`) is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer — reqwest, native-tls, rustls and openssl's `SslConnector` all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: `reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(…))`, a rustls `RootCertStore` holding its CA, or `SslConnectorBuilder::set_ca_file`, which keeps the chain and hostname checks on.
Serious — 1367 finding(s)
D17 · Explicit Debt · TodoComment · ×135
  • TodoComment scripts/test/lore.py:78 — # TODO: Remove the following section when pytest migrations are done — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/test/test_replicated_store.py:205 — # todo(plockhart) enable obliterate test once test-suite Auth has been updated — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/test/test_sync.py:284 — # TODO(UCS-11886) Once we support server side fast-forward this should succeed
  • TodoComment scripts/test/test_topology.py:340 — # todo(plockhart) we need to artificially slow down this durable local store to make the test work — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment scripts/test/test_topology.py:375 — # todo(plockhart) we need to artificially slow down this durable local store to make the test work — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-transport/src/connection.rs:1348 — // TODO(vri): UCS-19226 - Links: Connection reuse for already connected links
  • TodoComment lore-transport/src/grpc/mod.rs:75 — // TODO(mjansson): This needs to be configurable, URC source should not be Epic specific — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-storage/src/local/mutable_store.rs:1966 — // TODO (raghav.narula) limit the number of deserialized buckets kept in memory on the client/cli — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/tests/unit/settings.rs:1321 — // TODO(mjansson): The Settings and ServerSettings structs SHOULD use `#[serde(deny_unknown_fields)]` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/server.rs:1477 — // TODO(mjansson): Identity handling — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/topology/rotating_id_fixed.rs:109 — // todo(plockhart) we may want to bail out of the task with repeated failures — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-hashicorp/src/consul/service_peer_discovery.rs:193 — // todo(plockhart) we may want to bail out of the task with repeated failures — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/store/replica_factory.rs:207 — // todo(plockhart) configure expected_rtt_ms based off latency to replication target — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/store/replica_factory.rs:282 — // todo(plockhart) remove GRPC write replication after we gain confidence in QUIC — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/store/replicated_store.rs:505 — // todo(UCS-18195) - configure the max query size to be whatever the QUIC Server says is the max_query_batch
  • TodoComment lore-server/src/quic/stream_handler.rs:55 — // todo(plockhart) differentiate this label value and add to alerting rules — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/protocol/storage.rs:41 — // TODO(jcohen): we should put this behind an integration test feature — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/grpc/lock_service.rs:155 — // TODO: UCS-13626 move branch out of individual resources into the main message
  • TodoComment lore-server/src/grpc/lock_service.rs:331 — // TODO: UCS-13626 move branch out of individual resources into the main message
  • TodoComment lore-server/src/grpc/replication_service.rs:79 — // TODO(jcohen): make this capacity configurable or unbounded — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/grpc/storage_service.rs:129 — // TODO(psharpe): Make channel capacity configurable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/grpc/storage_service.rs:276 — // TODO(psharpe): make this capacity configurable or unbounded — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/grpc/handlers/branch_list.rs:72 — // TODO(mjansson): Change this to a streaming response — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/grpc/handlers/repository_list.rs:59 — // TODO(mjansson): Change this to a streaming response — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lore-server/src/grpc/handlers/obliterate.rs:114 — // TODO(jcohen): track metrics for stats — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 110 more in this group — see findings.md.
D2 · Cognitive Complexity · lore_revision · ×134
  • lore_revision::fs::realize::verify_filesystem (cognitive 105) lore-revision/src/fs/realize.rs:594 — lore_revision::fs::realize::verify_filesystem has cognitive complexity 105 (threshold 15). Drivers by points: if/else 37 (92 pts), boolean chains 6, match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 59). 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.
  • lore_revision::stage::stage_node_from_metadata (cognitive 96) lore-revision/src/stage.rs:2384 — lore_revision::stage::stage_node_from_metadata has cognitive complexity 96 (threshold 15). Drivers by points: if/else 46 (79 pts), boolean chains 11, match/switch 4 (6 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::projfs::serve::get_directory_enumeration_async (cognitive 95) lore-revision/src/projfs/serve.rs:497 — lore_revision::projfs::serve::get_directory_enumeration_async has cognitive complexity 95 (threshold 15). Drivers by points: if/else 30 (77 pts), loops 5 (13 pts), boolean chains 5 (nesting depth added 55). 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.
  • lore_revision::repository::status::status (cognitive 95) lore-revision/src/repository/status.rs:1739 — lore_revision::repository::status::status has cognitive complexity 95 (threshold 15). Drivers by points: if/else 37 (69 pts), loops 5 (11 pts), boolean chains 10, match/switch 3 (5 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::revision::sync::sync (cognitive 90) lore-revision/src/revision/sync.rs:426 — lore_revision::revision::sync::sync has cognitive complexity 90 (threshold 15). Drivers by points: if/else 45 (68 pts), boolean chains 15, match/switch 5 (7 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::history::find_branch_point (cognitive 83) lore-revision/src/history.rs:67 — lore_revision::history::find_branch_point has cognitive complexity 83 (threshold 15). Drivers by points: if/else 23 (67 pts), loops 5 (11 pts), boolean chains 5 (nesting depth added 50). 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.
  • lore_revision::stage::stage_from_parent_revision_in_operation (cognitive 81) lore-revision/src/stage.rs:3019 — lore_revision::stage::stage_from_parent_revision_in_operation has cognitive complexity 81 (threshold 15). Drivers by points: if/else 33 (60 pts), loops 6 (11 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 38). Of this number, 79 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::state::diff::add_change_for_paired_nodes (cognitive 79) lore-revision/src/state/diff.rs:947 — lore_revision::state::diff::add_change_for_paired_nodes has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 8, match/switch 2 (7 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • lore_revision::repository::branch_switch_target (cognitive 72) lore-revision/src/repository.rs:3282 — lore_revision::repository::branch_switch_target has cognitive complexity 72 (threshold 15). Drivers by points: if/else 33 (64 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::stage::stage_directory (cognitive 72) lore-revision/src/stage.rs:1783 — lore_revision::stage::stage_directory has cognitive complexity 72 (threshold 15). Drivers by points: if/else 18 (43 pts), match/switch 7 (20 pts), loops 6 (9 pts) (nesting depth added 41). 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.
  • lore_revision::revision::diff3_with_source_cap (cognitive 70) lore-revision/src/revision.rs:326 — lore_revision::revision::diff3_with_source_cap has cognitive complexity 70 (threshold 15). Drivers by points: if/else 22 (37 pts), loops 12 (15 pts), boolean chains 10, match/switch 4 (8 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.
  • lore_revision::file::unstage::unstage_node (cognitive 63) lore-revision/src/file/unstage.rs:897 — lore_revision::file::unstage::unstage_node has cognitive complexity 63 (threshold 15). Drivers by points: if/else 31 (57 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::repository::load_and_connect_with_token (cognitive 61) lore-revision/src/repository.rs:2306 — lore_revision::repository::load_and_connect_with_token has cognitive complexity 61 (threshold 15). Drivers by points: if/else 33 (43 pts), boolean chains 11, match/switch 6 (7 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • lore_revision::repository::layer_branch_switch (cognitive 60) lore-revision/src/repository.rs:3549 — lore_revision::repository::layer_branch_switch has cognitive complexity 60 (threshold 15). Drivers by points: if/else 15 (38 pts), match/switch 3 (13 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • lore_revision::fs::realize::realize_changes_delete (cognitive 59) lore-revision/src/fs/realize.rs:1381 — lore_revision::fs::realize::realize_changes_delete has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (52 pts), loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • lore_revision::immutable::cache_through (cognitive 56) lore-revision/src/immutable.rs:984 — lore_revision::immutable::cache_through has cognitive complexity 56 (threshold 15). Drivers by points: loops 10 (27 pts), if/else 8 (18 pts), boolean chains 6, match/switch 2 (5 pts) (nesting depth added 30). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • lore_revision::repository::clone::process_block_item (cognitive 56) lore-revision/src/repository/clone.rs:663 — lore_revision::repository::clone::process_block_item has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (45 pts), match/switch 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::revision::find_last_merged_revision (cognitive 55) lore-revision/src/revision.rs:1073 — lore_revision::revision::find_last_merged_revision has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (50 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • lore_revision::revision::info::info (cognitive 53) lore-revision/src/revision/info.rs:172 — lore_revision::revision::info::info has cognitive complexity 53 (threshold 15). Drivers by points: if/else 15 (42 pts), boolean chains 4, match/switch 1 (4 pts), loops 1 (3 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • lore_revision::stage::stage_link_paths_from_parent_revision (cognitive 53) lore-revision/src/stage.rs:3573 — lore_revision::stage::stage_link_paths_from_parent_revision has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (39 pts), loops 5 (9 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::file::stage::stage_move (cognitive 51) lore-revision/src/file/stage.rs:1158 — lore_revision::file::stage::stage_move has cognitive complexity 51 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::commit::weave_history (cognitive 48) lore-revision/src/commit.rs:3517 — lore_revision::commit::weave_history has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 3 (7 pts), boolean chains 1 (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.
  • lore_revision::commit::commit_staged_with_layers (cognitive 46) lore-revision/src/commit.rs:688 — lore_revision::commit::commit_staged_with_layers has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 13, match/switch 3 (5 pts), loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::file::diff::emit_diff3_changes (cognitive 45) lore-revision/src/file/diff.rs:470 — lore_revision::file::diff::emit_diff3_changes has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (35 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_revision::file::obliterate::impact::snapshot_affected (cognitive 42) lore-revision/src/file/obliterate/impact.rs:191 — lore_revision::file::obliterate::impact::snapshot_affected has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • + 109 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×108
  • FunctionTooLong: lore_server::server::async_main lore-server/src/server.rs:1892 — FunctionTooLong — lore_server::server::async_main runs 435 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 335 over it, 4.35× 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: lore_revision::stage::stage_from_parent_revision_in_operation lore-revision/src/stage.rs:3019 — FunctionTooLong — lore_revision::stage::stage_from_parent_revision_in_operation runs 390 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 290 over it, 3.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::revision::sync::sync lore-revision/src/revision/sync.rs:426 — FunctionTooLong — lore_revision::revision::sync::sync runs 366 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 266 over it, 3.66× 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: lore_revision::stage::stage_node_from_metadata lore-revision/src/stage.rs:2384 — FunctionTooLong — lore_revision::stage::stage_node_from_metadata runs 352 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 252 over it, 3.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::repository::status::status lore-revision/src/repository/status.rs:1739 — FunctionTooLong — lore_revision::repository::status::status runs 309 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 209 over it, 3.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::revision::restore::restore lore-revision/src/revision/restore.rs:216 — FunctionTooLong — lore_revision::revision::restore::restore runs 292 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 192 over it, 2.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::file::unstage::unstage_node lore-revision/src/file/unstage.rs:897 — FunctionTooLong — lore_revision::file::unstage::unstage_node runs 290 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 190 over it, 2.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::state::collect_fragments lore-revision/src/state.rs:8072 — FunctionTooLong — lore_revision::state::collect_fragments runs 289 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 189 over it, 2.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.
  • FunctionTooLong: lore_revision::state::diff::add_change_for_paired_nodes lore-revision/src/state/diff.rs:947 — FunctionTooLong — lore_revision::state::diff::add_change_for_paired_nodes runs 288 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 188 over it, 2.88× 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: lore_revision::link::add::add lore-revision/src/link/add.rs:43 — FunctionTooLong — lore_revision::link::add::add runs 284 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 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::file::stage::stage_move lore-revision/src/file/stage.rs:1158 — FunctionTooLong — lore_revision::file::stage::stage_move 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: lore_revision::branch::merge::merge_into lore-revision/src/branch/merge.rs:4360 — FunctionTooLong — lore_revision::branch::merge::merge_into runs 276 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 176 over it, 2.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.
  • FunctionTooLong: lore_transport::connection::connect_impl lore-transport/src/connection.rs:377 — FunctionTooLong — lore_transport::connection::connect_impl runs 274 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 174 over it, 2.74× 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: lore_revision::stage::stage_directory lore-revision/src/stage.rs:1783 — FunctionTooLong — lore_revision::stage::stage_directory runs 266 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 166 over it, 2.66× 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: lore_revision::revision::diff3_with_source_cap lore-revision/src/revision.rs:326 — FunctionTooLong — lore_revision::revision::diff3_with_source_cap runs 262 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 162 over it, 2.62× 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: lore_revision::fs::realize::verify_filesystem lore-revision/src/fs/realize.rs:594 — FunctionTooLong — lore_revision::fs::realize::verify_filesystem runs 261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 161 over it, 2.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::stage::stage_link_paths_from_parent_revision lore-revision/src/stage.rs:3573 — FunctionTooLong — lore_revision::stage::stage_link_paths_from_parent_revision runs 257 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 157 over it, 2.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.
  • FunctionTooLong: lore_revision::state::os_diff::diff_filesystem_directory_walk lore-revision/src/state/os_diff.rs:1206 — FunctionTooLong — lore_revision::state::os_diff::diff_filesystem_directory_walk runs 232 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 132 over it, 2.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::commit::commit_staged_with_layers lore-revision/src/commit.rs:688 — FunctionTooLong — lore_revision::commit::commit_staged_with_layers runs 229 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 129 over it, 2.29× 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: lore_revision::repository::load_and_connect_with_token lore-revision/src/repository.rs:2306 — FunctionTooLong — lore_revision::repository::load_and_connect_with_token runs 227 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 127 over it, 2.27× 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: lore_client::cli::commands::repository::handle_repository_status lore-client/src/cli/commands/repository.rs:519 — FunctionTooLong — lore_client::cli::commands::repository::handle_repository_status runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::commit::commit_link_only lore-revision/src/commit.rs:1185 — FunctionTooLong — lore_revision::commit::commit_link_only 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: lore_revision::projfs::serve::get_directory_enumeration_async lore-revision/src/projfs/serve.rs:497 — FunctionTooLong — lore_revision::projfs::serve::get_directory_enumeration_async runs 203 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: lore_revision::repository::clone::clone_into lore-revision/src/repository/clone.rs:1201 — FunctionTooLong — lore_revision::repository::clone::clone_into 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: lore_revision::immutable::cache_through lore-revision/src/immutable.rs:984 — FunctionTooLong — lore_revision::immutable::cache_through runs 186 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 86 over it, 1.86× 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.
  • + 83 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×80
  • FileTooLong: src/state.rs lore-revision/src/state.rs — FileTooLong — 5735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 81 free functions. The bar is 500 significant lines; this is 5235 over it, 11.47× 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: local/immutable_store.rs lore-storage/src/local/immutable_store.rs — FileTooLong — 4249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 70% of them inside a single declaration: LocalImmutableStore (5 blocks, 654-6435). The bar is 500 significant lines; this is 3749 over it, 8.50× 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: branch/merge.rs lore-revision/src/branch/merge.rs — FileTooLong — 3269 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 54 free functions. The bar is 500 significant lines; this is 2769 over it, 6.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/commit.rs lore-revision/src/commit.rs — FileTooLong — 3248 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 54 free functions. The bar is 500 significant lines; this is 2748 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: src/stage.rs lore-revision/src/stage.rs — FileTooLong — 2904 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 2404 over it, 5.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/branch.rs lore-revision/src/branch.rs — FileTooLong — 2595 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 83 free functions. The bar is 500 significant lines; this is 2095 over it, 5.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/repository.rs lore-revision/src/repository.rs — FileTooLong — 2457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 58 free functions. The bar is 500 significant lines; this is 1957 over it, 4.91× 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/interface.rs lore/src/interface.rs — FileTooLong — 2295 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 312 free functions. The bar is 500 significant lines; this is 1795 over it, 4.59× 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: fs/realize.rs lore-revision/src/fs/realize.rs — FileTooLong — 1886 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 1386 over it, 3.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: state/os_diff.rs lore-revision/src/state/os_diff.rs — FileTooLong — 1812 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 1312 over it, 3.62× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/revision.rs lore-client/src/cli/commands/revision.rs — FileTooLong — 1787 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 47 free functions. The bar is 500 significant lines; this is 1287 over it, 3.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/server.rs lore-server/src/server.rs — FileTooLong — 1699 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 39 free functions. The bar is 500 significant lines; this is 1199 over it, 3.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: repository/clone.rs lore-revision/src/repository/clone.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). 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: src/link.rs lore-revision/src/link.rs — FileTooLong — 1528 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 46 free functions. The bar is 500 significant lines; this is 1028 over it, 3.06× 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/write.rs lore-storage/src/write.rs — FileTooLong — 1486 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 47 free functions. The bar is 500 significant lines; this is 986 over it, 2.97× 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: repository/status.rs lore-revision/src/repository/status.rs — FileTooLong — 1426 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 926 over it, 2.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: local/mutable_store.rs lore-storage/src/local/mutable_store.rs — FileTooLong — 1414 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 914 over it, 2.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: file/reset.rs lore-revision/src/file/reset.rs — FileTooLong — 1403 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 903 over it, 2.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/file.rs lore-client/src/cli/commands/file.rs — FileTooLong — 1392 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 38 free functions. The bar is 500 significant lines; this is 892 over it, 2.78× 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: store/immutable_store.rs lore-aws/src/store/immutable_store.rs — FileTooLong — 1350 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 78% of them inside a single declaration: AwsImmutableStore (3 blocks, 534-2191). The bar is 500 significant lines; this is 850 over it, 2.70× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/read.rs lore-storage/src/read.rs — FileTooLong — 1333 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 833 over it, 2.67× 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: grpc/mod.rs lore-transport/src/grpc/mod.rs — FileTooLong — 1289 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 789 over it, 2.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: branch/push.rs lore-revision/src/branch/push.rs — FileTooLong — 1274 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 774 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/repository.rs lore-client/src/cli/commands/repository.rs — FileTooLong — 1224 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 724 over it, 2.45× 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/branch.rs lore-client/src/cli/commands/branch.rs — FileTooLong — 1201 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 701 over it, 2.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 55 more in this group — see findings.md.
D1 · Cyclomatic Complexity · lore_revision · ×63
  • lore_revision::revision::sync::sync (cyclomatic 60) lore-revision/src/revision/sync.rs:426 — lore_revision::revision::sync::sync has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_revision::stage::stage_node_from_metadata (cyclomatic 56) lore-revision/src/stage.rs:2384 — lore_revision::stage::stage_node_from_metadata has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_revision::repository::status::status (cyclomatic 50) lore-revision/src/repository/status.rs:1739 — lore_revision::repository::status::status has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_revision::revision::diff3_with_source_cap (cyclomatic 49) lore-revision/src/revision.rs:326 — lore_revision::revision::diff3_with_source_cap 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.
  • lore_revision::repository::load_and_connect_with_token (cyclomatic 46) lore-revision/src/repository.rs:2306 — lore_revision::repository::load_and_connect_with_token has cyclomatic complexity 46 (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.
  • lore_revision::fs::realize::verify_filesystem (cyclomatic 43) lore-revision/src/fs/realize.rs:594 — lore_revision::fs::realize::verify_filesystem has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_revision::stage::stage_from_parent_revision_in_operation (cyclomatic 39) lore-revision/src/stage.rs:3019 — lore_revision::stage::stage_from_parent_revision_in_operation has cyclomatic complexity 39 (threshold 15). Of this number, 38 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_revision::commit::commit_staged_with_layers (cyclomatic 36) lore-revision/src/commit.rs:688 — lore_revision::commit::commit_staged_with_layers has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_revision::projfs::serve::get_directory_enumeration_async (cyclomatic 35) lore-revision/src/projfs/serve.rs:497 — lore_revision::projfs::serve::get_directory_enumeration_async has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_revision::file::unstage::unstage_node (cyclomatic 34) lore-revision/src/file/unstage.rs:897 — lore_revision::file::unstage::unstage_node 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.
  • lore_revision::stage::stage_directory (cyclomatic 32) lore-revision/src/stage.rs:1783 — lore_revision::stage::stage_directory 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.
  • lore_revision::immutable::cache_through (cyclomatic 30) lore-revision/src/immutable.rs:984 — lore_revision::immutable::cache_through has cyclomatic complexity 30 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • lore_revision::file::stage::stage_move (cyclomatic 29) lore-revision/src/file/stage.rs:1158 — lore_revision::file::stage::stage_move 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.
  • lore_revision::history::find_branch_point (cyclomatic 29) lore-revision/src/history.rs:67 — lore_revision::history::find_branch_point 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.
  • lore_revision::state::diff::add_change_for_paired_nodes (cyclomatic 28) lore-revision/src/state/diff.rs:947 — lore_revision::state::diff::add_change_for_paired_nodes 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.
  • lore_revision::repository::branch_switch_target (cyclomatic 26) lore-revision/src/repository.rs:3282 — lore_revision::repository::branch_switch_target 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.
  • lore_revision::repository::clone::process_block_item (cyclomatic 25) lore-revision/src/repository/clone.rs:663 — lore_revision::repository::clone::process_block_item 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.
  • lore_revision::state::os_diff::diff_filesystem_directory_walk (cyclomatic 25) lore-revision/src/state/os_diff.rs:1206 — lore_revision::state::os_diff::diff_filesystem_directory_walk 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.
  • lore_revision::stage::stage_link_paths_from_parent_revision (cyclomatic 24) lore-revision/src/stage.rs:3573 — lore_revision::stage::stage_link_paths_from_parent_revision 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.
  • lore_revision::stage::stage_filesystem_path (cyclomatic 23) lore-revision/src/stage.rs:550 — lore_revision::stage::stage_filesystem_path 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.
  • lore_revision::state::collect_fragments (cyclomatic 23) lore-revision/src/state.rs:8072 — lore_revision::state::collect_fragments 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.
  • lore_revision::file::stage::stage (cyclomatic 22) lore-revision/src/file/stage.rs:540 — lore_revision::file::stage::stage 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.
  • lore_revision::fs::realize::realize_change_modify_add (cyclomatic 22) lore-revision/src/fs/realize.rs:1815 — lore_revision::fs::realize::realize_change_modify_add 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.
  • lore_revision::repository::layer_branch_switch (cyclomatic 22) lore-revision/src/repository.rs:3549 — lore_revision::repository::layer_branch_switch 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.
  • lore_revision::branch::merge::merge_repository (cyclomatic 21) lore-revision/src/branch/merge.rs:447 — lore_revision::branch::merge::merge_repository 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.
  • + 38 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×53
  • Hotspot: lore-revision/src/stage.rs lore-revision/src/stage.rs:2384 — lore-revision/src/stage.rs changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in lore_revision::stage::stage_node_from_metadata at line 2384. 3 of those changes were fix/bug commits, and the other 51 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/stage.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: lore-revision/src/state.rs lore-revision/src/state.rs:2782 — lore-revision/src/state.rs changed 103 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in State::move_node at line 2782. 6 of those changes were fix/bug commits, and the other 97 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/state.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: lore-revision/src/repository.rs lore-revision/src/repository.rs:2306 — lore-revision/src/repository.rs changed 55 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in lore_revision::repository::load_and_connect_with_token at line 2306. 1 of those changes was a fix/bug commit, and the other 54 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/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: lore-storage/src/local/immutable_store.rs lore-storage/src/local/immutable_store.rs:6580 — lore-storage/src/local/immutable_store.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in lore_storage::local::immutable_store::flush_locked_group at line 6580. 1 of those changes was a fix/bug commit, and the other 52 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-storage/src/local/immutable_store.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lore-revision/src/revision/sync.rs lore-revision/src/revision/sync.rs:426 — lore-revision/src/revision/sync.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in lore_revision::revision::sync::sync at line 426. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/revision/sync.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: lore-revision/src/fs/realize.rs lore-revision/src/fs/realize.rs:594 — lore-revision/src/fs/realize.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in lore_revision::fs::realize::verify_filesystem at line 594. 3 of those changes were fix/bug commits, and the other 39 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/fs/realize.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: lore-revision/src/repository/status.rs lore-revision/src/repository/status.rs:1739 — lore-revision/src/repository/status.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in lore_revision::repository::status::status at line 1739. 3 of those changes were fix/bug commits, and the other 31 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/repository/status.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: lore-revision/src/commit.rs lore-revision/src/commit.rs:688 — lore-revision/src/commit.rs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in lore_revision::commit::commit_staged_with_layers at line 688. 1 of those changes was a fix/bug commit, and the other 45 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/commit.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: lore-storage/src/local/mutable_store.rs lore-storage/src/local/mutable_store.rs:1587 — lore-storage/src/local/mutable_store.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in LocalMutableStore::flush_all at line 1587. 1 of those changes was a fix/bug commit, and the other 30 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-storage/src/local/mutable_store.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lore-revision/src/repository/clone.rs lore-revision/src/repository/clone.rs:663 — lore-revision/src/repository/clone.rs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in lore_revision::repository::clone::process_block_item at line 663. 1 of those changes was a fix/bug commit, and the other 45 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/repository/clone.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: lore-server/src/server.rs lore-server/src/server.rs:1892 — lore-server/src/server.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in lore_server::server::async_main at line 1892. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-server/src/server.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: lore-revision/src/immutable.rs lore-revision/src/immutable.rs:984 — lore-revision/src/immutable.rs changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in lore_revision::immutable::cache_through at line 984. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/immutable.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: lore-revision/src/file/stage.rs lore-revision/src/file/stage.rs:1158 — lore-revision/src/file/stage.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in lore_revision::file::stage::stage_move at line 1158. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/file/stage.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: lore-revision/src/revision.rs lore-revision/src/revision.rs:326 — lore-revision/src/revision.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in lore_revision::revision::diff3_with_source_cap at line 326. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/revision.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: lore-revision/src/file/unstage.rs lore-revision/src/file/unstage.rs:897 — lore-revision/src/file/unstage.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in lore_revision::file::unstage::unstage_node at line 897. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/file/unstage.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: lore-storage/src/write.rs lore-storage/src/write.rs:1131 — lore-storage/src/write.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in lore_storage::write::leader_body at line 1131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-storage/src/write.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: lore-revision/src/branch/merge.rs lore-revision/src/branch/merge.rs:447 — lore-revision/src/branch/merge.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in lore_revision::branch::merge::merge_repository at line 447. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/branch/merge.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: lore-client/src/cli/commands/repository.rs lore-client/src/cli/commands/repository.rs:519 — lore-client/src/cli/commands/repository.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in lore_client::cli::commands::repository::handle_repository_status at line 519. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-client/src/cli/commands/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: lore-revision/src/file/reset.rs lore-revision/src/file/reset.rs:1636 — lore-revision/src/file/reset.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in lore_revision::file::reset::reset_walk_directory at line 1636. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/file/reset.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: lore-revision/src/state/diff.rs lore-revision/src/state/diff.rs:947 — lore-revision/src/state/diff.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in lore_revision::state::diff::add_change_for_paired_nodes at line 947. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/state/diff.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: lore-revision/src/branch.rs lore-revision/src/branch.rs:2773 — lore-revision/src/branch.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in lore_revision::branch::try_auto_resolve_conflict at line 2773. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/branch.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: lore-client/src/cli/commands/branch.rs lore-client/src/cli/commands/branch.rs:823 — lore-client/src/cli/commands/branch.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in lore_client::cli::commands::branch::handle_branch_push at line 823. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-client/src/cli/commands/branch.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: lore-transport/src/connection.rs lore-transport/src/connection.rs:377 — lore-transport/src/connection.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in lore_transport::connection::connect_impl at line 377. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-transport/src/connection.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: lore-revision/src/link/add.rs lore-revision/src/link/add.rs:43 — lore-revision/src/link/add.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in lore_revision::link::add::add at line 43. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-revision/src/link/add.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: lore-storage/src/read.rs lore-storage/src/read.rs:1729 — lore-storage/src/read.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in lore_storage::read::resolve_root at line 1729. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 06:47:25 +00:00' --until='2026-10-27 06:47:25 +00:00' --full-history --no-merges -- lore-storage/src/read.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.
  • + 28 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×35
  • Duplicated block (11 lines × 2) lore-revision/src/branch/merge.rs:4491 — lore-revision/src/branch/merge.rs:4491-4501 | lore-revision/src/revision/restore.rs:322-332 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/revision/restore.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) lore-revision/src/branch/merge.rs:4529 — lore-revision/src/branch/merge.rs:4529-4539 | lore-revision/src/revision/restore.rs:365-375 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/revision/restore.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) lore-revision/src/commit.rs:2802 — lore-revision/src/commit.rs:2802-2812 | lore-revision/src/commit.rs:2863-2873 — both copies are in the same file, so extract the block into 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) lore-revision/src/fs/realize.rs:2305 — lore-revision/src/fs/realize.rs:2305-2315 | lore-revision/src/fs/realize.rs:2728-2738 — both copies are in the same file, so extract the block into 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) lore-revision/src/link/remove.rs:51 — lore-revision/src/link/remove.rs:51-61 | lore-revision/src/link/update.rs:46-56 — before extracting anything, compare `lore-revision/src/link/remove.rs` and `lore-revision/src/link/update.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 (11 lines × 2) lore-revision/src/metadata/branch.rs:175 — lore-revision/src/metadata/branch.rs:175-185 | lore-revision/src/metadata/repository.rs:168-178 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-revision/src/metadata/branch.rs:218 — lore-revision/src/metadata/branch.rs:218-228 | lore-revision/src/metadata/repository.rs:210-220 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-revision/src/projfs/serve.rs:924 — lore-revision/src/projfs/serve.rs:924-934 | lore-revision/src/projfs/serve.rs:970-980 — both copies are in the same file, so extract the block into 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) lore-revision/src/revision.rs:566 — lore-revision/src/revision.rs:566-576 | lore-revision/src/revision.rs:611-621 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:4388 — lore-revision/src/state.rs:4388-4398 | lore-revision/src/state.rs:4463-4473 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:6478 — lore-revision/src/state.rs:6478-6488 | lore-revision/src/state.rs:6490-6500 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:7727 — lore-revision/src/state.rs:7727-7737 | lore-revision/src/state.rs:7751-7761 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/branch_push.rs:180 — lore-server/src/grpc/handlers/branch_push.rs:180-190 | lore-server/src/grpc/revision/v1/branch_push.rs:73-83 — 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) lore-server/src/grpc/handlers/branch_query.rs:97 — lore-server/src/grpc/handlers/branch_query.rs:97-107 | lore-server/src/grpc/handlers/branch_query.rs:139-149 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/revision_list.rs:287 — lore-server/src/grpc/handlers/revision_list.rs:287-297 | lore-server/src/grpc/revision/v1/revision_list.rs:564-574 — 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) lore-server/src/grpc/thinclient/v1/helpers.rs:189 — lore-server/src/grpc/thinclient/v1/helpers.rs:189-199 | lore-server/src/grpc/thinclient/v1/revision_info.rs:247-257 — before extracting anything, compare `lore-server/src/grpc/thinclient/v1/helpers.rs` and `lore-server/src/grpc/thinclient/v1/revision_info.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 (11 lines × 2) lore-storage/src/defragment.rs:769 — lore-storage/src/defragment.rs:769-779 | lore-storage/src/defragment.rs:1427-1439 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/immutable_store.rs:5023 — lore-storage/src/local/immutable_store.rs:5023-5033 | lore-storage/src/local/mutable_store.rs:1601-1611 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-storage/src/local/immutable_store.rs:5043 — lore-storage/src/local/immutable_store.rs:5043-5053 | lore-storage/src/local/mutable_store.rs:1889-1899 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-transport/src/auth/exchange.rs:303 — lore-transport/src/auth/exchange.rs:303-313 | lore-transport/src/auth/exchange.rs:470-481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lore-transport/src/grpc/mod.rs:504 — lore-transport/src/grpc/mod.rs:504-514 | lore-transport/src/grpc/mod.rs:540-550 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) lore-transport/src/grpc/storage_client.rs:1034 — lore-transport/src/grpc/storage_client.rs:1034-1044 | lore-transport/src/grpc/storage_client.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) lore-transport/src/quic/client.rs:1249 — lore-transport/src/quic/client.rs:1249-1259 | lore-transport/src/quic/client.rs:1277-1287 — both copies are in the same file, so extract the block into 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) lore/src/storage/put_file.rs:145 — lore/src/storage/put_file.rs:145-155 | lore/src/storage/put_file_resolved.rs:164-174 — 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) lore-server/src/grpc/forwarded_revision/v1/service.rs:110 — lore-server/src/grpc/forwarded_revision/v1/service.rs:110-120 | lore-server/src/grpc/revision_service.rs:155-165 — before extracting anything, compare `lore-server/src/grpc/forwarded_revision/v1/service.rs` and `lore-server/src/grpc/revision_service.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×30
  • Duplicated block (14 lines × 2) lore-client/src/cli/commands/file.rs:1099 — lore-client/src/cli/commands/file.rs:1099-1112 | lore-client/src/cli/commands/revision.rs:2350-2363 — before extracting anything, compare `lore-client/src/cli/commands/file.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) lore-client/src/cli/commands/repository.rs:1043 — lore-client/src/cli/commands/repository.rs:1043-1056 | lore-client/src/cli/commands/revision.rs:1455-1468 — before extracting anything, compare `lore-client/src/cli/commands/repository.rs` and `lore-client/src/cli/commands/revision.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 (14 lines × 2) lore-client/src/cli/commands/repository.rs:1156 — lore-client/src/cli/commands/repository.rs:1156-1169 | lore-client/src/cli/commands/repository.rs:1320-1333 — both copies are in the same file, so extract the block into 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) lore-client/src/cli/commands/revision.rs:991 — lore-client/src/cli/commands/revision.rs:991-1004 | lore-client/src/cli/commands/revision.rs:1088-1101 — both copies are in the same file, so extract the block into 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) lore-client/src/cli/commands/revision.rs:1744 — lore-client/src/cli/commands/revision.rs:1744-1757 | lore-client/src/cli/commands/revision.rs:2040-2053 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/diff.rs:53 — lore-revision/src/branch/diff.rs:53-66 | lore-revision/src/branch/diff.rs:67-80 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:4220 — lore-revision/src/branch/merge.rs:4220-4233 | lore-revision/src/branch/merge.rs:4579-4592 — both copies are in the same file, so extract the block into 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) lore-revision/src/link.rs:1844 — lore-revision/src/link.rs:1844-1857 | lore-revision/src/link/info.rs:72-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) lore-revision/src/link/remove.rs:63 — lore-revision/src/link/remove.rs:63-76 | lore-revision/src/link/update.rs:58-71 — before extracting anything, compare `lore-revision/src/link/remove.rs` and `lore-revision/src/link/update.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 (14 lines × 2) lore-revision/src/repository.rs:4062 — lore-revision/src/repository.rs:4062-4075 | lore-revision/src/repository/delete.rs:38-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 (14 lines × 2) lore-revision/src/state.rs:1025 — lore-revision/src/state.rs:1025-1038 | lore-revision/src/state.rs:1127-1140 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:3986 — lore-revision/src/state.rs:3986-3999 | lore-revision/src/state.rs:4061-4074 — both copies are in the same file, so extract the block into 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) lore-revision/src/state/diff.rs:1478 — lore-revision/src/state/diff.rs:1478-1491 | lore-revision/src/state/diff.rs:1502-1515 — both copies are in the same file, so extract the block into 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) lore-revision/src/util/fs.rs:581 — lore-revision/src/util/fs.rs:581-594 | lore-revision/src/util/fs.rs:693-706 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/branch_delete.rs:48 — lore-server/src/grpc/handlers/branch_delete.rs:48-61 | lore-server/src/grpc/revision/v1/branch_delete.rs:105-118 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) lore-server/src/grpc/handlers/repository_query.rs:104 — lore-server/src/grpc/handlers/repository_query.rs:104-117 | lore-server/src/grpc/handlers/repository_query.rs:174-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) lore-server/src/grpc/repository/v1/repository_get.rs:180 — lore-server/src/grpc/repository/v1/repository_get.rs:180-193 | lore-server/src/grpc/repository/v1/repository_get.rs:249-262 — both copies are in the same file, so extract the block into 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) lore-server/src/quic/mod.rs:341 — lore-server/src/quic/mod.rs:341-354 | lore-server/src/quic/mod.rs:366-379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) lore-server/src/store/replica.rs:283 — lore-server/src/store/replica.rs:283-296 | lore-server/src/store/replicated_store.rs:308-321 — before extracting anything, compare `lore-server/src/store/replica.rs` and `lore-server/src/store/replicated_store.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) lore/src/branch.rs:1649 — lore/src/branch.rs:1649-1662 | lore/src/repository.rs:1308-1321 — before extracting anything, compare `lore/src/branch.rs` and `lore/src/repository.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 (14 lines × 2) lore/src/storage/mutable_compare_and_swap.rs:124 — lore/src/storage/mutable_compare_and_swap.rs:124-137 | lore/src/storage/mutable_load.rs:118-131 — 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) lore-server/src/grpc/forwarded_revision/v1/service.rs:74 — lore-server/src/grpc/forwarded_revision/v1/service.rs:74-87 | lore-server/src/grpc/revision_service.rs:119-132 — before extracting anything, compare `lore-server/src/grpc/forwarded_revision/v1/service.rs` and `lore-server/src/grpc/revision_service.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) lore-server/src/grpc/forwarded_revision/v1/service.rs:92 — lore-server/src/grpc/forwarded_revision/v1/service.rs:92-105 | lore-server/src/grpc/revision_service.rs:137-150 — before extracting anything, compare `lore-server/src/grpc/forwarded_revision/v1/service.rs` and `lore-server/src/grpc/revision_service.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) lore-server/src/grpc/revision/v1/service.rs:280 — lore-server/src/grpc/revision/v1/service.rs:280-293 | lore-server/src/grpc/revision_service.rs:374-387 — before extracting anything, compare `lore-server/src/grpc/revision/v1/service.rs` and `lore-server/src/grpc/revision_service.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) lore-server/src/quic/storage_service.rs:544 — lore-server/src/quic/storage_service.rs:544-557 | lore-server/src/quic/storage_service_v4.rs:458-471 — 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.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×28
  • Duplicated block (8 lines × 2) lore-aws/src/store/immutable_store.rs:1073 — lore-aws/src/store/immutable_store.rs:1073-1080 | lore-aws/src/store/immutable_store.rs:1133-1140 — both copies are in the same file, so extract the block into 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) lore-client/src/cli/commands/revision.rs:1277 — lore-client/src/cli/commands/revision.rs:1277-1285 | lore-client/src/cli/commands/revision.rs:1338-1345 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:3327 — lore-revision/src/branch/merge.rs:3327-3334 | lore-revision/src/branch/merge.rs:3526-3533 — both copies are in the same file, so extract the block into 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) lore-revision/src/commit.rs:1884 — lore-revision/src/commit.rs:1884-1891 | lore-revision/src/commit.rs:3051-3058 — both copies are in the same file, so extract the block into 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) lore-revision/src/commit.rs:3622 — lore-revision/src/commit.rs:3622-3629 | lore-revision/src/commit.rs:3633-3640 — both copies are in the same file, so extract the block into 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) lore-revision/src/fs/realize.rs:2471 — lore-revision/src/fs/realize.rs:2471-2480 | lore-revision/src/fs/realize.rs:2561-2568 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata.rs:688 — lore-revision/src/metadata.rs:688-695 | lore-revision/src/metadata.rs:727-734 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/repository_create.rs:158 — lore-server/src/grpc/handlers/repository_create.rs:158-167 | lore-server/src/grpc/repository/v1/repository_create.rs:236-243 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_create.rs` and `lore-server/src/grpc/repository/v1/repository_create.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) lore-server/src/grpc/handlers/repository_metadata_get.rs:31 — lore-server/src/grpc/handlers/repository_metadata_get.rs:31-38 | lore-server/src/grpc/handlers/repository_metadata_set.rs:98-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) lore-server/src/grpc/repository/v1/repository_metadata_get.rs:35 — lore-server/src/grpc/repository/v1/repository_metadata_get.rs:35-42 | lore-server/src/grpc/repository/v1/repository_metadata_set.rs:50-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 (8 lines × 2) lore-server/src/grpc/revision/v1/branch_get.rs:117 — lore-server/src/grpc/revision/v1/branch_get.rs:117-124 | lore-server/src/grpc/revision/v1/branch_push.rs:230-237 — 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) lore-server/src/grpc/revision/v1/branch_metadata_get.rs:37 — lore-server/src/grpc/revision/v1/branch_metadata_get.rs:37-44 | lore-server/src/grpc/revision/v1/branch_metadata_set.rs:51-58 — 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) lore-server/src/grpc/storage/v1/get.rs:97 — lore-server/src/grpc/storage/v1/get.rs:97-104 | lore-server/src/grpc/storage/v1/get_metadata.rs:92-99 — before extracting anything, compare `lore-server/src/grpc/storage/v1/get.rs` and `lore-server/src/grpc/storage/v1/get_metadata.rs` as WHOLE FILES: this scan already matched 5 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 (8 lines × 2) lore-server/src/lock/store.rs:94 — lore-server/src/lock/store.rs:94-101 | lore-server/src/lock/store.rs:115-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lore-storage/src/fragment_engine.rs:141 — lore-storage/src/fragment_engine.rs:141-148 | lore-storage/src/fragment_engine.rs:582-589 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/immutable_store.rs:3246 — lore-storage/src/local/immutable_store.rs:3246-3253 | lore-storage/src/local/mutable_store.rs:2114-2121 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-storage/src/mutable_conformance.rs:318 — lore-storage/src/mutable_conformance.rs:318-325 | lore-storage/src/mutable_conformance.rs:382-389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) lore-transport/src/grpc/storage_client.rs:993 — lore-transport/src/grpc/storage_client.rs:993-1000 | lore-transport/src/grpc/storage_client.rs:1077-1084 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/environment/v1/service.rs:108 — lore-server/src/grpc/environment/v1/service.rs:108-115 | lore-server/src/grpc/environment_service.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) lore-storage/src/local/immutable_store.rs:5130 — lore-storage/src/local/immutable_store.rs:5130-5137 | lore-storage/src/local/mutable_store.rs:1915-1922 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore/src/revision_tree/handle.rs:274 — lore/src/revision_tree/handle.rs:274-281 | lore/src/storage/handle.rs:97-104 — `lore/src/revision_tree/handle.rs` and `lore/src/storage/handle.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 4 separate duplicated blocks between them, totalling at least 33 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 (8 lines × 2) lore-server/src/protocol/replication_store/copy.rs:102 — lore-server/src/protocol/replication_store/copy.rs:102-109 | lore-server/src/protocol/replication_store/obliterate.rs:98-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) lore-transport/src/auth/mod.rs:335 — lore-transport/src/auth/mod.rs:335-342 | lore-transport/src/connection.rs:79-86 — 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) lore/src/storage/mutable_list.rs:139 — lore/src/storage/mutable_list.rs:139-146 | lore/src/storage/mutable_store.rs:152-159 — 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) lore-server/src/authnz/auth.rs:40 — lore-server/src/authnz/auth.rs:40-47 | lore-server/src/authnz/rebac.rs:52-59 — 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.
  • + 3 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×27
  • Duplicated block (10 lines × 2) lore-client/src/cli/commands/file.rs:2004 — lore-client/src/cli/commands/file.rs:2004-2013 | lore-client/src/cli/commands/file.rs:2057-2066 — both copies are in the same file, so extract the block into 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) lore-credential/src/token_store.rs:747 — lore-credential/src/token_store.rs:747-756 | lore-credential/src/token_store.rs:816-825 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:3408 — lore-revision/src/branch/merge.rs:3408-3417 | lore-revision/src/branch/merge.rs:3895-3904 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:4687 — lore-revision/src/branch/merge.rs:4687-4696 | lore-revision/src/revision/restore.rs:527-536 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/revision/restore.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) lore-revision/src/commit.rs:1359 — lore-revision/src/commit.rs:1359-1369 | lore-revision/src/link/remove.rs:56-65 — 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) lore-revision/src/repository/info.rs:129 — lore-revision/src/repository/info.rs:129-138 | lore-revision/src/repository/info.rs:174-183 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:1560 — lore-revision/src/state.rs:1560-1569 | lore-revision/src/state.rs:1590-1599 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:5532 — lore-revision/src/state.rs:5532-5541 | lore-revision/src/state.rs:5642-5651 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/storage_service.rs:141 — lore-server/src/grpc/storage_service.rs:141-150 | lore-server/src/grpc/storage_service.rs:288-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lore-server/src/grpc/thinclient/v1/helpers.rs:204 — lore-server/src/grpc/thinclient/v1/helpers.rs:204-213 | lore-server/src/grpc/thinclient/v1/revision_info.rs:125-134 — before extracting anything, compare `lore-server/src/grpc/thinclient/v1/helpers.rs` and `lore-server/src/grpc/thinclient/v1/revision_info.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 (10 lines × 2) lore-server/src/notification/local.rs:120 — lore-server/src/notification/local.rs:120-129 | lore-server/src/notification/local.rs:143-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 (10 lines × 2) lore-server/src/store/replica.rs:241 — lore-server/src/store/replica.rs:241-250 | lore-server/src/store/replicated_store.rs:269-278 — before extracting anything, compare `lore-server/src/store/replica.rs` and `lore-server/src/store/replicated_store.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) lore-storage/src/mutable_conformance.rs:335 — lore-storage/src/mutable_conformance.rs:335-344 | lore-storage/src/mutable_conformance.rs:453-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lore-storage/src/mutable_conformance.rs:743 — lore-storage/src/mutable_conformance.rs:743-752 | lore-storage/src/mutable_conformance.rs:776-785 — both copies are in the same file, so extract the block into 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) lore-telemetry/src/metrics/grpc_metrics.rs:31 — lore-telemetry/src/metrics/grpc_metrics.rs:31-40 | lore-telemetry/src/metrics/http_metrics.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 (10 lines × 2) lore-transport/src/connection.rs:661 — lore-transport/src/connection.rs:661-670 | lore-transport/src/connection.rs:695-704 — both copies are in the same file, so extract the block into 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) lore/src/call.rs:109 — lore/src/call.rs:109-118 | lore/src/call.rs:215-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) lore/src/file.rs:449 — lore/src/file.rs:449-458 | lore/src/revision.rs:540-549 — 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) lore/src/revision_tree/handle.rs:240 — lore/src/revision_tree/handle.rs:240-249 | lore/src/storage/handle.rs:43-53 — `lore/src/revision_tree/handle.rs` and `lore/src/storage/handle.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 4 separate duplicated blocks between them, totalling at least 33 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (10 lines × 2) lore-revision/src/file/dirty.rs:1041 — lore-revision/src/file/dirty.rs:1041-1053 | lore-revision/src/file/dirty.rs:1075-1084 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata/find.rs:60 — lore-revision/src/metadata/find.rs:60-69 | lore-revision/src/metadata/find.rs:72-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 (10 lines × 2) lore-revision/src/branch/reset.rs:151 — lore-revision/src/branch/reset.rs:151-160 | lore-revision/src/file/reset.rs:724-733 — 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) lore-client/src/cli/commands/link.rs:294 — lore-client/src/cli/commands/link.rs:294-303 | lore-client/src/cli/commands/link.rs:352-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 (10 lines × 2) lore-storage/src/mutable_conformance.rs:705 — lore-storage/src/mutable_conformance.rs:705-714 | lore-storage/src/mutable_conformance.rs:754-763 — both copies are in the same file, so extract the block into 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) lore-server/src/telemetry/tokio_bridge.rs:143 — lore-server/src/telemetry/tokio_bridge.rs:143-152 | lore-server/src/telemetry/tokio_bridge.rs:289-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×27
  • Duplicated block (9 lines × 2) lore-aws/src/store/immutable_store.rs:1093 — lore-aws/src/store/immutable_store.rs:1093-1101 | lore-aws/src/store/immutable_store.rs:1156-1164 — both copies are in the same file, so extract the block into 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) lore-error-set-macro/src/codegen.rs:569 — lore-error-set-macro/src/codegen.rs:569-577 | lore-error-set-macro/src/codegen.rs:603-611 — both copies are in the same file, so extract the block into 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) lore-error-set-macro/src/codegen.rs:778 — lore-error-set-macro/src/codegen.rs:778-786 | lore-error-set-macro/src/codegen.rs:815-823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lore-io/src/iocp.rs:209 — lore-io/src/iocp.rs:209-217 | lore-io/src/uring.rs:112-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) lore-io/src/iocp.rs:984 — lore-io/src/iocp.rs:984-992 | lore-io/src/uring.rs:934-942 — 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) lore-revision/src/branch.rs:2184 — lore-revision/src/branch.rs:2184-2192 | lore-revision/src/branch.rs:2263-2271 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:2294 — lore-revision/src/branch/merge.rs:2294-2302 | lore-revision/src/branch/merge.rs:3219-3227 — both copies are in the same file, so extract the block into 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) lore-revision/src/fs/realize.rs:1637 — lore-revision/src/fs/realize.rs:1637-1645 | lore-revision/src/fs/realize.rs:1649-1657 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:3532 — lore-revision/src/state.rs:3532-3540 | lore-revision/src/state.rs:3553-3561 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:9061 — lore-revision/src/state.rs:9061-9069 | lore-revision/src/state.rs:9071-9079 — both copies are in the same file, so extract the block into 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) lore-revision/src/util/fs.rs:555 — lore-revision/src/util/fs.rs:555-563 | lore-revision/src/util/fs.rs:592-600 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/path_diff.rs:73 — lore-server/src/grpc/handlers/path_diff.rs:73-81 | lore-server/src/grpc/handlers/path_diff.rs:90-98 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/thinclient/v1/helpers.rs:201 — lore-server/src/grpc/thinclient/v1/helpers.rs:201-209 | lore-server/src/grpc/thinclient/v1/revision_info.rs:259-267 — before extracting anything, compare `lore-server/src/grpc/thinclient/v1/helpers.rs` and `lore-server/src/grpc/thinclient/v1/revision_info.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 (9 lines × 2) lore-storage/src/conformance.rs:304 — lore-storage/src/conformance.rs:304-312 | lore-storage/src/mutable_conformance.rs:251-259 — 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) lore-storage/src/local/immutable_store.rs:6863 — lore-storage/src/local/immutable_store.rs:6863-6871 | lore-storage/src/local/mutable_store.rs:2377-2385 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-storage/src/mutable_conformance.rs:406 — lore-storage/src/mutable_conformance.rs:406-414 | lore-storage/src/mutable_conformance.rs:428-436 — both copies are in the same file, so extract the block into 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) lore-telemetry/src/metrics/grpc_tower_layer.rs:95 — lore-telemetry/src/metrics/grpc_tower_layer.rs:95-103 | lore-telemetry/src/metrics/http_tower_layer.rs:85-93 — 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) lore/src/dependency.rs:79 — lore/src/dependency.rs:79-87 | lore/src/dependency.rs:191-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lore/src/dependency.rs:90 — lore/src/dependency.rs:90-98 | lore/src/dependency.rs:202-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 (9 lines × 2) lore/src/revision_tree/delete.rs:186 — lore/src/revision_tree/delete.rs:186-194 | lore/src/revision_tree/modify.rs:178-186 — before extracting anything, compare `lore/src/revision_tree/delete.rs` and `lore/src/revision_tree/modify.rs` as WHOLE FILES: this scan already matched 5 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 (9 lines × 2) lore-revision/src/metadata/branch.rs:108 — lore-revision/src/metadata/branch.rs:108-116 | lore-revision/src/metadata/repository.rs:101-109 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-revision/src/state/diff.rs:460 — lore-revision/src/state/diff.rs:460-468 | lore-revision/src/state/os_diff.rs:2336-2344 — 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) lore/src/file.rs:411 — lore/src/file.rs:411-419 | lore/src/revision.rs:510-518 — 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) lore-storage/src/mutable_conformance.rs:404 — lore-storage/src/mutable_conformance.rs:404-412 | lore-storage/src/mutable_conformance.rs:691-700 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lore-revision/src/branch.rs:598 — lore-revision/src/branch.rs:598-606 | lore-revision/src/branch.rs:617-625 — both copies are in the same file, so extract the 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 (7 lines × 2) · ×24
  • Duplicated block (7 lines × 2) contrib/bazel/crates/rbe-lore/src/lib.rs:875 — contrib/bazel/crates/rbe-lore/src/lib.rs:875-881 | contrib/bazel/crates/rbe-lore/src/lib.rs:987-993 — both copies are in the same file, so extract the block into 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) lore-aws/src/store/lock_store.rs:540 — lore-aws/src/store/lock_store.rs:540-546 | lore-aws/src/store/lock_store.rs:594-601 — both copies are in the same file, so extract the block into 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) lore-base/src/allocator/rpmalloc.rs:145 — lore-base/src/allocator/rpmalloc.rs:145-151 | lore-base/src/allocator/rpmalloc.rs:172-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lore-client/src/cli/commands/revision.rs:984 — lore-client/src/cli/commands/revision.rs:984-990 | lore-client/src/cli/commands/revision.rs:1081-1087 — both copies are in the same file, so extract the block into 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) lore-error-set-macro/src/codegen.rs:175 — lore-error-set-macro/src/codegen.rs:175-181 | lore-error-set-macro/src/codegen.rs:331-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lore-revision/src/file/stage.rs:555 — lore-revision/src/file/stage.rs:555-561 | lore-revision/src/repository/status.rs:1762-1770 — 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) lore-revision/src/metadata/find.rs:52 — lore-revision/src/metadata/find.rs:52-58 | lore-revision/src/metadata/find.rs:63-70 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lore-revision/src/repository/clone.rs:1009 — lore-revision/src/repository/clone.rs:1009-1017 | lore-revision/src/repository/create.rs:217-223 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) lore-revision/src/state.rs:254 — lore-revision/src/state.rs:254-262 | lore-revision/src/state.rs:351-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lore-revision/src/state.rs:8079 — lore-revision/src/state.rs:8079-8086 | lore-revision/src/state.rs:8093-8099 — both copies are in the same file, so extract the block into 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) lore-revision/src/state/os_diff.rs:1517 — lore-revision/src/state/os_diff.rs:1517-1523 | lore-revision/src/state/os_diff.rs:1625-1631 — both copies are in the same file, so extract the block into 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) lore-revision/src/util/path.rs:704 — lore-revision/src/util/path.rs:704-710 | lore-revision/src/util/path.rs:733-739 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/repository_query.rs:171 — lore-server/src/grpc/handlers/repository_query.rs:171-177 | lore-server/src/grpc/repository/v1/repository_get.rs:246-252 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_query.rs` and `lore-server/src/grpc/repository/v1/repository_get.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) lore-server/src/grpc/handlers/revision_list.rs:268 — lore-server/src/grpc/handlers/revision_list.rs:268-274 | lore-server/src/grpc/revision/v1/revision_list.rs:543-549 — 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) lore-server/src/protocol/storage/mutable_cas.rs:45 — lore-server/src/protocol/storage/mutable_cas.rs:45-51 | lore-server/src/protocol/storage/mutable_store_handler.rs:41-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) lore-transport/src/grpc/storage_client.rs:783 — lore-transport/src/grpc/storage_client.rs:783-789 | lore-transport/src/grpc/storage_client.rs:846-852 — both copies are in the same file, so extract the block into 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) lore/src/revision_tree/delete.rs:203 — lore/src/revision_tree/delete.rs:203-209 | lore/src/revision_tree/modify.rs:188-194 — before extracting anything, compare `lore/src/revision_tree/delete.rs` and `lore/src/revision_tree/modify.rs` as WHOLE FILES: this scan already matched 5 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 (7 lines × 2) contrib/bazel/crates/rbe-server/src/cas.rs:73 — contrib/bazel/crates/rbe-server/src/cas.rs:73-79 | contrib/bazel/crates/rbe-server/src/exec.rs:393-399 — 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) lore-storage/src/local/immutable_store.rs:968 — lore-storage/src/local/immutable_store.rs:968-974 | lore-storage/src/local/mutable_store.rs:404-410 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-client/src/cli/commands/branch.rs:1785 — lore-client/src/cli/commands/branch.rs:1785-1791 | lore-client/src/cli/commands/repository.rs:1683-1689 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/repository.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) lore-storage/src/local/fan_out.rs:595 — lore-storage/src/local/fan_out.rs:595-604 | lore-storage/src/local/immutable_store/info.rs:72-78 — 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) lore-client/src/cli/commands/repository.rs:677 — lore-client/src/cli/commands/repository.rs:677-683 | lore-client/src/cli/commands/repository.rs:742-748 — both copies are in the same file, so extract the block into 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) lore-revision/src/commit.rs:756 — lore-revision/src/commit.rs:756-762 | lore-revision/src/commit.rs:1277-1283 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/revision/v1/branch_list.rs:161 — lore-server/src/grpc/revision/v1/branch_list.rs:161-167 | lore-server/src/grpc/revision/v1/branch_list.rs:220-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×22
  • Duplicated block (12 lines × 2) lore-aws/src/dynamodb.rs:361 — lore-aws/src/dynamodb.rs:361-372 | lore-aws/src/dynamodb.rs:575-586 — both copies are in the same file, so extract the block into 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) lore-client/src/cli/commands/revision.rs:1261 — lore-client/src/cli/commands/revision.rs:1261-1272 | lore-client/src/cli/commands/revision.rs:1322-1333 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:3996 — lore-revision/src/branch/merge.rs:3996-4007 | lore-revision/src/branch/merge.rs:4022-4033 — both copies are in the same file, so extract the block into 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) lore-revision/src/dependency/add.rs:48 — lore-revision/src/dependency/add.rs:48-59 | lore-revision/src/dependency/remove.rs:41-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 (12 lines × 2) lore-revision/src/dependency/add.rs:122 — lore-revision/src/dependency/add.rs:122-133 | lore-revision/src/dependency/remove.rs:81-93 — 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) lore-revision/src/file/reset.rs:1361 — lore-revision/src/file/reset.rs:1361-1372 | lore-revision/src/file/reset.rs:1501-1512 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata/clear.rs:43 — lore-revision/src/metadata/clear.rs:43-54 | lore-revision/src/metadata/clear.rs:93-104 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata/clear.rs:59 — lore-revision/src/metadata/clear.rs:59-70 | lore-revision/src/metadata/clear.rs:144-155 — both copies are in the same file, so extract the block into 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) lore-revision/src/projfs/serve.rs:1205 — lore-revision/src/projfs/serve.rs:1205-1216 | lore-revision/src/projfs/serve.rs:1228-1239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lore-revision/src/state.rs:212 — lore-revision/src/state.rs:212-223 | lore-revision/src/state.rs:302-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lore-revision/src/state/diff.rs:719 — lore-revision/src/state/diff.rs:719-730 | lore-revision/src/state/diff.rs:812-823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) lore-server/src/grpc/handlers/branch_metadata_set.rs:107 — lore-server/src/grpc/handlers/branch_metadata_set.rs:107-118 | lore-server/src/grpc/revision/v1/branch_metadata_set.rs:60-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.
  • Duplicated block (12 lines × 2) lore-server/src/store/replica.rs:324 — lore-server/src/store/replica.rs:324-335 | lore-server/src/store/replica.rs:372-383 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/immutable_store.rs:6281 — lore-storage/src/local/immutable_store.rs:6281-6292 | lore-storage/src/local/immutable_store.rs:6299-6310 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/repository/v1/service.rs:172 — lore-server/src/grpc/repository/v1/service.rs:172-183 | lore-server/src/grpc/repository_service.rs:138-149 — 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) lore-server/src/grpc/repository/v1/service.rs:188 — lore-server/src/grpc/repository/v1/service.rs:188-199 | lore-server/src/grpc/repository_service.rs:154-165 — 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) lore-revision/src/branch/push.rs:1018 — lore-revision/src/branch/push.rs:1018-1031 | lore-revision/src/branch/push.rs:1063-1074 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/create.rs:121 — lore-revision/src/branch/create.rs:121-133 | lore-revision/src/branch/create.rs:268-279 — both copies are in the same file, so extract the block into 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) lore-revision/src/revision.rs:967 — lore-revision/src/revision.rs:967-978 | lore-revision/src/revision.rs:1090-1102 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/branch_metadata_get.rs:34 — lore-server/src/grpc/handlers/branch_metadata_get.rs:34-45 | lore-server/src/grpc/revision/v1/branch_metadata_get.rs:42-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 (12 lines × 2) lore-server/src/grpc/handlers/branch_protect.rs:35 — lore-server/src/grpc/handlers/branch_protect.rs:35-46 | lore-server/src/grpc/handlers/branch_unprotect.rs:35-46 — 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) lore-revision/src/state.rs:1006 — lore-revision/src/state.rs:1006-1017 | lore-revision/src/state.rs:1107-1118 — both copies are in the same file, so extract the 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 × 2) · ×21
  • Duplicated block (15 lines × 2) lore-client/src/cli/commands/layer.rs:141 — lore-client/src/cli/commands/layer.rs:141-155 | lore-client/src/cli/commands/layer.rs:199-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 (15 lines × 2) lore-revision/src/branch/diff.rs:86 — lore-revision/src/branch/diff.rs:86-100 | lore-revision/src/branch/diff.rs:103-117 — both copies are in the same file, so extract the block into 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) lore-revision/src/file/diff.rs:309 — lore-revision/src/file/diff.rs:309-323 | lore-revision/src/file/diff.rs:450-464 — both copies are in the same file, so extract the block into 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) lore-revision/src/file/diff.rs:509 — lore-revision/src/file/diff.rs:509-523 | lore-revision/src/file/diff.rs:657-671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) lore-revision/src/fs/realize.rs:320 — lore-revision/src/fs/realize.rs:320-334 | lore-revision/src/fs/realize.rs:342-356 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata.rs:456 — lore-revision/src/metadata.rs:456-470 | lore-revision/src/metadata.rs:490-504 — both copies are in the same file, so extract the block into 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) lore-revision/src/node.rs:1243 — lore-revision/src/node.rs:1243-1257 | lore-revision/src/node.rs:1286-1300 — both copies are in the same file, so extract the block into 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) lore-revision/src/repository/clone.rs:1904 — lore-revision/src/repository/clone.rs:1904-1918 | lore-revision/src/repository/clone.rs:1922-1936 — both copies are in the same file, so extract the block into 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) lore-revision/src/stage.rs:1203 — lore-revision/src/stage.rs:1203-1217 | lore-revision/src/stage.rs:1229-1243 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:230 — lore-revision/src/state.rs:230-245 | lore-revision/src/state.rs:333-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 (15 lines × 2) lore-revision/src/state.rs:1043 — lore-revision/src/state.rs:1043-1057 | lore-revision/src/state.rs:1145-1159 — both copies are in the same file, so extract the block into 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) lore-revision/src/state/dump.rs:152 — lore-revision/src/state/dump.rs:152-166 | lore-revision/src/state/dump.rs:169-183 — both copies are in the same file, so extract the block into 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) lore-revision/src/state/os_diff.rs:1567 — lore-revision/src/state/os_diff.rs:1567-1581 | lore-revision/src/state/os_diff.rs:1745-1759 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/mutable_store.rs:2078 — lore-storage/src/local/mutable_store.rs:2078-2092 | lore-storage/src/local/mutable_store.rs:2222-2236 — both copies are in the same file, so extract the block into 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) lore/src/storage/get_metadata.rs:254 — lore/src/storage/get_metadata.rs:254-268 | lore/src/storage/upload.rs:203-217 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) lore-storage/src/local/immutable_store.rs:6696 — lore-storage/src/local/immutable_store.rs:6696-6710 | lore-storage/src/local/immutable_store.rs:6774-6790 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/mutable_store.rs:1736 — lore-storage/src/local/mutable_store.rs:1736-1750 | lore-storage/src/local/mutable_store.rs:1820-1836 — both copies are in the same file, so extract the block into 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) lore-revision/src/state.rs:3308 — lore-revision/src/state.rs:3308-3322 | lore-revision/src/state.rs:3404-3419 — both copies are in the same file, so extract the block into 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) lore-server/src/hooks/dispatch.rs:313 — lore-server/src/hooks/dispatch.rs:313-327 | lore-server/src/hooks/dispatch.rs:424-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 (15 lines × 2) lore-server/src/grpc/storage/v1/get_resolved.rs:244 — lore-server/src/grpc/storage/v1/get_resolved.rs:244-258 | lore-server/src/grpc/storage/v1/put_resolved.rs:280-294 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) lore-storage/src/conformance.rs:466 — lore-storage/src/conformance.rs:466-480 | lore-storage/src/conformance.rs:873-887 — both copies are in the same file, so extract the 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 lines × 2) · ×19
  • Duplicated block (13 lines × 2) contrib/bazel/crates/rbe-server/src/main.rs:194 — contrib/bazel/crates/rbe-server/src/main.rs:194-206 | contrib/bazel/crates/rbe-worker/src/lib.rs:274-286 — 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) lore-client/src/cli/commands/repository.rs:1749 — lore-client/src/cli/commands/repository.rs:1749-1761 | lore-client/src/cli/commands/repository.rs:1784-1796 — both copies are in the same file, so extract the block into 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) lore-io/src/uring.rs:435 — lore-io/src/uring.rs:435-447 | lore-io/src/uring.rs:465-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lore-revision/src/branch/merge.rs:4639 — lore-revision/src/branch/merge.rs:4639-4651 | lore-revision/src/revision/restore.rs:482-494 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/revision/restore.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) lore-revision/src/dependency/resolve.rs:129 — lore-revision/src/dependency/resolve.rs:129-141 | lore-revision/src/dependency/resolve.rs:272-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) lore-revision/src/file/dirty.rs:1522 — lore-revision/src/file/dirty.rs:1522-1534 | lore-revision/src/file/dirty.rs:1585-1597 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata/branch.rs:145 — lore-revision/src/metadata/branch.rs:145-157 | lore-revision/src/metadata/repository.rs:137-149 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-revision/src/state.rs:8435 — lore-revision/src/state.rs:8435-8447 | lore-revision/src/state.rs:8453-8465 — both copies are in the same file, so extract the block into 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) lore-storage/src/fragment_engine.rs:104 — lore-storage/src/fragment_engine.rs:104-116 | lore-storage/src/fragment_engine.rs:568-580 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/immutable_store.rs:1377 — lore-storage/src/local/immutable_store.rs:1377-1389 | lore-storage/src/local/mutable_store.rs:689-701 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-storage/src/local/immutable_store.rs:6654 — lore-storage/src/local/immutable_store.rs:6654-6666 | lore-storage/src/local/mutable_store.rs:1684-1696 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-transport/src/auth/exchange.rs:280 — lore-transport/src/auth/exchange.rs:280-292 | lore-transport/src/auth/exchange.rs:443-455 — both copies are in the same file, so extract the block into 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) lore/src/call.rs:87 — lore/src/call.rs:87-99 | lore/src/call.rs:193-205 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/revision/v1/revision_list.rs:173 — lore-server/src/grpc/revision/v1/revision_list.rs:173-185 | lore-server/src/grpc/thinclient/v1/revision_info.rs:55-68 — 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) lore-server/src/grpc/storage/v1/get.rs:79 — lore-server/src/grpc/storage/v1/get.rs:79-91 | lore-server/src/grpc/storage/v1/get_metadata.rs:74-86 — before extracting anything, compare `lore-server/src/grpc/storage/v1/get.rs` and `lore-server/src/grpc/storage/v1/get_metadata.rs` as WHOLE FILES: this scan already matched 5 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 (13 lines × 2) lore-server/src/grpc/storage/v1/get.rs:173 — lore-server/src/grpc/storage/v1/get.rs:173-185 | lore-server/src/grpc/storage/v1/get_metadata.rs:172-184 — before extracting anything, compare `lore-server/src/grpc/storage/v1/get.rs` and `lore-server/src/grpc/storage/v1/get_metadata.rs` as WHOLE FILES: this scan already matched 5 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 (13 lines × 2) lore-revision/src/repository.rs:4061 — lore-revision/src/repository.rs:4061-4073 | lore-revision/src/repository/list.rs:27-39 — 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) lore/src/dependency.rs:396 — lore/src/dependency.rs:396-408 | lore/src/dependency.rs:434-446 — both copies are in the same file, so extract the block into 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) lore-server/src/hooks/dispatch.rs:299 — lore-server/src/hooks/dispatch.rs:299-311 | lore-server/src/hooks/dispatch.rs:410-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · lore_storage · ×18
  • lore_storage::local::immutable_store::flush_locked_group (cognitive 90) lore-storage/src/local/immutable_store.rs:6580 — lore_storage::local::immutable_store::flush_locked_group has cognitive complexity 90 (threshold 15). Drivers by points: if/else 24 (61 pts), boolean chains 11, loops 3 (9 pts), match/switch 3 (9 pts) (nesting depth added 49). 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.
  • lore_storage::write::leader_body (cognitive 44) lore-storage/src/write.rs:1131 — lore_storage::write::leader_body has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24 (34 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::write::compare_previous_chunks (cognitive 32) lore-storage/src/write.rs:2280 — lore_storage::write::compare_previous_chunks has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 2 (5 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.
  • lore_storage::fragment_engine::write_fragmentlist_impl (cognitive 31) lore-storage/src/fragment_engine.rs:492 — lore_storage::fragment_engine::write_fragmentlist_impl has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::read::write_root_to_file (cognitive 31) lore-storage/src/read.rs:1465 — lore_storage::read::write_root_to_file has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::defragment::walk_intermediate_level (cognitive 25) lore-storage/src/defragment.rs:490 — lore_storage::defragment::walk_intermediate_level has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::local::immutable_store::detect_any_older_immutable_bucket (cognitive 23) lore-storage/src/local/immutable_store.rs:926 — lore_storage::local::immutable_store::detect_any_older_immutable_bucket has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::local::immutable_store::oodle_migration::migrate_bucket (cognitive 23) lore-storage/src/local/immutable_store/oodle_migration.rs:69 — lore_storage::local::immutable_store::oodle_migration::migrate_bucket has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::fs_util::unlink_recursive (cognitive 22) lore-storage/src/fs_util.rs:45 — lore_storage::fs_util::unlink_recursive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 1 (nesting depth added 12). 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.
  • lore_storage::local::mutable_store::maybe_fan_out_mutable_group (cognitive 20) lore-storage/src/local/mutable_store.rs:2357 — lore_storage::local::mutable_store::maybe_fan_out_mutable_group has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 7 (9 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.
  • lore_storage::read::resolve_root (cognitive 20) lore-storage/src/read.rs:1729 — lore_storage::read::resolve_root has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::write::file_matches (cognitive 20) lore-storage/src/write.rs:1810 — lore_storage::write::file_matches has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, match/switch 1 (2 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, 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.
  • lore_storage::read::read_into (cognitive 19) lore-storage/src/read.rs:781 — lore_storage::read::read_into has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, match/switch 1 (2 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, 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.
  • lore_storage::compress::decompress_into (cognitive 18) lore-storage/src/compress.rs:705 — lore_storage::compress::decompress_into has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (lore_storage::compress::decompress_into_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.
  • lore_storage::compress::decompress_into_slice (cognitive 18) lore-storage/src/compress.rs:838 — lore_storage::compress::decompress_into_slice has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (lore_storage::compress::decompress_into) 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.
  • lore_storage::defragment::read_defragment (cognitive 18) lore-storage/src/defragment.rs:1329 — lore_storage::defragment::read_defragment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (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.
  • lore_storage::local::immutable_store::maybe_fan_out_immutable_group (cognitive 18) lore-storage/src/local/immutable_store.rs:6848 — lore_storage::local::immutable_store::maybe_fan_out_immutable_group has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 7 (9 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_storage::read::remote_get_retry (cognitive 18) lore-storage/src/read.rs:135 — lore_storage::read::remote_get_retry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · MethodTooLong · ×17
  • MethodTooLong: LocalMutableStore.flush_all lore-storage/src/local/mutable_store.rs:1587 — MethodTooLong — flush_all 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.
  • MethodTooLong: StorageServiceV4.run_request_handler lore-server/src/quic/storage_service_v4.rs:179 — MethodTooLong — run_request_handler runs 198 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 98 over it, 1.98× 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: LocalImmutableStore.verify_fragment_held lore-storage/src/local/immutable_store.rs:6161 — MethodTooLong — verify_fragment_held 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.
  • MethodTooLong: GrpcServerBuilder.with_jwt_verifier lore-server/src/grpc/server.rs:657 — MethodTooLong — with_jwt_verifier runs 179 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 79 over it, 1.79× 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: ReplicationStoreService.build_request_span lore-server/src/quic/replication_store_service/server.rs:244 — MethodTooLong — build_request_span runs 148 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 48 over it, 1.48× 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: LocalImmutableStore.verify lore-storage/src/local/immutable_store.rs:5775 — MethodTooLong — verify runs 144 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 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LocalImmutableStore.store_entry lore-storage/src/local/immutable_store.rs:3025 — MethodTooLong — store_entry runs 134 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 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: State.move_node lore-revision/src/state.rs:2782 — MethodTooLong — move_node 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: LocalImmutableStore.compact_packfiles lore-storage/src/local/immutable_store.rs:4150 — MethodTooLong — compact_packfiles runs 119 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 19 over it, 1.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.
  • MethodTooLong: LoreStorageService.copy lore-server/src/grpc/storage_service.rs:477 — MethodTooLong — copy 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: JwkServiceImpl.fetch_new_keys lore-server/src/auth/jwk.rs:528 — MethodTooLong — fetch_new_keys runs 111 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 11 over it, 1.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.
  • MethodTooLong: LocalImmutableStore.compact_group_packfiles lore-storage/src/local/immutable_store.rs:4358 — MethodTooLong — compact_group_packfiles runs 110 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 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ImmutableStoreBucket.deserialize_file_content lore-storage/src/local/immutable_store.rs:1137 — MethodTooLong — deserialize_file_content runs 106 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 6 over it, 1.06× 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: DynamoDbLockStore.unlock_resources lore-aws/src/store/lock_store.rs:571 — MethodTooLong — unlock_resources runs 105 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 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: State.serialize lore-revision/src/state.rs:792 — MethodTooLong — serialize runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LocalImmutableStore.evict_group_sized lore-storage/src/local/immutable_store.rs:3638 — MethodTooLong — evict_group_sized runs 102 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 2 over it, 1.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.
  • MethodTooLong: SerialChunking.resolve_into lore-transport/src/quic/chunking.rs:83 — MethodTooLong — resolve_into runs 101 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 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×17
  • Duplicated block (16 lines × 2) lore-client/src/cli/commands/auth.rs:534 — lore-client/src/cli/commands/auth.rs:534-549 | lore-client/src/cli/commands/lock.rs:321-336 — 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) lore-client/src/cli/commands/branch.rs:1684 — lore-client/src/cli/commands/branch.rs:1684-1699 | lore-client/src/cli/commands/repository.rs:1578-1593 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/repository.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) lore-client/src/cli/commands/branch.rs:1765 — lore-client/src/cli/commands/branch.rs:1765-1780 | lore-client/src/cli/commands/repository.rs:1663-1678 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/repository.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) lore-revision/src/branch/merge.rs:4280 — lore-revision/src/branch/merge.rs:4280-4295 | lore-revision/src/branch/merge.rs:4645-4660 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:4474 — lore-revision/src/branch/merge.rs:4474-4489 | lore-revision/src/revision/restore.rs:305-320 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/revision/restore.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) lore-revision/src/file/dirty.rs:1426 — lore-revision/src/file/dirty.rs:1426-1441 | lore-revision/src/fs/realize.rs:2081-2096 — 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) lore-revision/src/stage.rs:3155 — lore-revision/src/stage.rs:3155-3170 | lore-revision/src/stage.rs:3421-3436 — both copies are in the same file, so extract the block into 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) lore-revision/src/stage.rs:3303 — lore-revision/src/stage.rs:3303-3318 | lore-revision/src/stage.rs:3464-3479 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/revision/v1/service.rs:230 — lore-server/src/grpc/revision/v1/service.rs:230-245 | lore-server/src/grpc/revision_service.rs:201-216 — before extracting anything, compare `lore-server/src/grpc/revision/v1/service.rs` and `lore-server/src/grpc/revision_service.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) lore-server/src/grpc/storage_service.rs:212 — lore-server/src/grpc/storage_service.rs:212-227 | lore-server/src/grpc/storage_service.rs:616-631 — both copies are in the same file, so extract the block into 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) lore-transport/src/grpc/storage_client.rs:1046 — lore-transport/src/grpc/storage_client.rs:1046-1061 | lore-transport/src/grpc/storage_client.rs:1130-1145 — both copies are in the same file, so extract the block into 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) lore-server/src/plugins/registry.rs:153 — lore-server/src/plugins/registry.rs:153-168 | lore-server/src/plugins/registry.rs:199-214 — both copies are in the same file, so extract the block into 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) lore-server/src/store/replica.rs:252 — lore-server/src/store/replica.rs:252-267 | lore-server/src/store/replicated_store.rs:285-300 — before extracting anything, compare `lore-server/src/store/replica.rs` and `lore-server/src/store/replicated_store.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (16 lines × 2) lore-server/src/plugins/registry.rs:632 — lore-server/src/plugins/registry.rs:632-647 | lore-server/src/plugins/registry.rs:670-685 — both copies are in the same file, so extract the block into 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) lore-server/src/plugins/registry.rs:398 — lore-server/src/plugins/registry.rs:398-413 | lore-server/src/plugins/registry.rs:444-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.
  • Duplicated block (16 lines × 2) lore-server/src/plugins/registry.rs:521 — lore-server/src/plugins/registry.rs:521-536 | lore-server/src/plugins/registry.rs:567-582 — both copies are in the same file, so extract the block into 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) lore-server/src/plugins/registry.rs:275 — lore-server/src/plugins/registry.rs:275-290 | lore-server/src/plugins/registry.rs:322-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · LocalImmutableStore · ×16
  • LocalImmutableStore::verify (cognitive 75) lore-storage/src/local/immutable_store.rs:5775 — LocalImmutableStore::verify has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (53 pts), loops 7 (19 pts), boolean chains 3 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalImmutableStore::verify_fragment_held (cognitive 66) lore-storage/src/local/immutable_store.rs:6161 — LocalImmutableStore::verify_fragment_held has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (44 pts), boolean chains 11, loops 4 (6 pts), match/switch 3 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalImmutableStore::store_entry (cognitive 62) lore-storage/src/local/immutable_store.rs:3025 — LocalImmutableStore::store_entry has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (48 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • LocalImmutableStore::group_verify_store (cognitive 41) lore-storage/src/local/immutable_store.rs:4509 — LocalImmutableStore::group_verify_store has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (29 pts), match/switch 2 (8 pts), loops 2 (3 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.
  • LocalImmutableStore::evict_oldest (cognitive 38) lore-storage/src/local/immutable_store.rs:3939 — LocalImmutableStore::evict_oldest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 3 (5 pts), boolean chains 4, match/switch 1 (3 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.
  • LocalImmutableStore::lookup (cognitive 29) lore-storage/src/local/immutable_store.rs:2676 — LocalImmutableStore::lookup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 1 (nesting depth added 19). 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.
  • LocalImmutableStore::new_claimed (cognitive 25) lore-storage/src/local/immutable_store.rs:2214 — LocalImmutableStore::new_claimed has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, loops 1 (2 pts), match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalImmutableStore::find (cognitive 25) lore-storage/src/local/immutable_store.rs:3231 — LocalImmutableStore::find has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalImmutableStore::survey_groups (cognitive 24) lore-storage/src/local/immutable_store.rs:1928 — LocalImmutableStore::survey_groups has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalImmutableStore::compact_packfiles (cognitive 24) lore-storage/src/local/immutable_store.rs:4150 — LocalImmutableStore::compact_packfiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (21 pts), loops 2, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • LocalImmutableStore::deserialize_all_buckets (cognitive 23) lore-storage/src/local/immutable_store.rs:2602 — LocalImmutableStore::deserialize_all_buckets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (11 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.
  • LocalImmutableStore::evict_group_sized (cognitive 22) lore-storage/src/local/immutable_store.rs:3638 — LocalImmutableStore::evict_group_sized has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalImmutableStore::compact_group_packfiles (cognitive 22) lore-storage/src/local/immutable_store.rs:4358 — LocalImmutableStore::compact_group_packfiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, match/switch 3 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • LocalImmutableStore::put (cognitive 21) lore-storage/src/local/immutable_store.rs:5441 — LocalImmutableStore::put has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • LocalImmutableStore::copy_source_slot (cognitive 17) lore-storage/src/local/immutable_store.rs:2786 — LocalImmutableStore::copy_source_slot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalImmutableStore::compact_bucket_packfile (cognitive 16) lore-storage/src/local/immutable_store.rs:4830 — LocalImmutableStore::compact_bucket_packfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 pts), loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×16
  • Duplicated block (5 lines × 2) lore-revision/src/diff.rs:64 — lore-revision/src/diff.rs:64-68 | lore-revision/src/diff.rs:169-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lore-revision/src/file/reset.rs:542 — lore-revision/src/file/reset.rs:542-546 | lore-revision/src/file/reset.rs:717-721 — both copies are in the same file, so extract the block into 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) lore-revision/src/file/stage.rs:951 — lore-revision/src/file/stage.rs:951-956 | lore-revision/src/link.rs:1834-1838 — 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) lore-revision/src/repository.rs:1704 — lore-revision/src/repository.rs:1704-1708 | lore-revision/src/repository.rs:1729-1733 — both copies are in the same file, so extract the block into 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) lore-revision/src/repository.rs:3946 — lore-revision/src/repository.rs:3946-3953 | lore-revision/src/repository.rs:3965-3969 — both copies are in the same file, so extract the block into 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) lore-server/src/protocol/replication_store/get.rs:86 — lore-server/src/protocol/replication_store/get.rs:86-90 | lore-server/src/protocol/replication_store/get_metadata.rs:75-80 — 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) lore-server/src/protocol/storage/copy.rs:44 — lore-server/src/protocol/storage/copy.rs:44-48 | lore-server/src/protocol/storage/copy.rs:63-67 — both copies are in the same file, so extract the block into 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) lore-storage/src/read.rs:496 — lore-storage/src/read.rs:496-500 | lore-storage/src/read.rs:1678-1682 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/grpc_internal_server.rs:254 — lore-server/src/grpc/grpc_internal_server.rs:254-258 | lore-server/src/grpc/server.rs:906-910 — 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) lore-storage/src/local/immutable_store.rs:1597 — lore-storage/src/local/immutable_store.rs:1597-1601 | lore-storage/src/local/mutable_store.rs:303-307 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) lore-client/src/cli/commands/file.rs:2016 — lore-client/src/cli/commands/file.rs:2016-2020 | lore-client/src/cli/commands/file.rs:2069-2073 — both copies are in the same file, so extract the block into 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) lore-revision/src/commit.rs:1861 — lore-revision/src/commit.rs:1861-1865 | lore-revision/src/commit.rs:4645-4649 — both copies are in the same file, so extract the block into 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) lore-revision/src/file/dirty.rs:1352 — lore-revision/src/file/dirty.rs:1352-1356 | lore-revision/src/file/dirty.rs:1543-1547 — both copies are in the same file, so extract the block into 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) lore-revision/src/store/mutable.rs:111 — lore-revision/src/store/mutable.rs:111-115 | lore-revision/src/store/mutable.rs:163-167 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/fan_out.rs:588 — lore-storage/src/local/fan_out.rs:588-592 | lore-storage/src/local/immutable_store/info.rs:65-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) scripts/store-stress/stress.py:981 — scripts/store-stress/stress.py:981-985 | scripts/store-stress/stress.py:1053-1057 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×15
  • Duplicated block (6 lines × 2) lore-client/src/cli/commands/lock.rs:144 — lore-client/src/cli/commands/lock.rs:144-149 | lore-client/src/cli/commands/lock.rs:202-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) lore-revision/src/commit.rs:4007 — lore-revision/src/commit.rs:4007-4013 | lore-revision/src/commit.rs:4378-4383 — both copies are in the same file, so extract the block into 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) lore-revision/src/file/dirty.rs:166 — lore-revision/src/file/dirty.rs:166-171 | lore-revision/src/file/dirty.rs:1362-1367 — both copies are in the same file, so extract the block into 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) lore-revision/src/file/reset.rs:596 — lore-revision/src/file/reset.rs:596-601 | lore-revision/src/file/reset.rs:781-786 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata.rs:722 — lore-revision/src/metadata.rs:722-727 | lore-revision/src/metadata.rs:1140-1145 — both copies are in the same file, so extract the block into 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) lore-revision/src/store/mutable.rs:127 — lore-revision/src/store/mutable.rs:127-132 | lore-revision/src/store/mutable.rs:179-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) lore-server/src/protocol/storage/mutable_cas.rs:38 — lore-server/src/protocol/storage/mutable_cas.rs:38-43 | lore-server/src/protocol/storage/mutable_store_handler.rs:35-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) lore-storage/src/compress.rs:728 — lore-storage/src/compress.rs:728-733 | lore-storage/src/compress.rs:1145-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.
  • Duplicated block (6 lines × 2) lore-storage/src/defragment.rs:137 — lore-storage/src/defragment.rs:137-143 | lore-storage/src/defragment.rs:508-513 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) lore-storage/src/local/immutable_store.rs:1503 — lore-storage/src/local/immutable_store.rs:1503-1508 | lore-storage/src/local/mutable_store.rs:767-772 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-storage/src/local/immutable_store.rs:1627 — lore-storage/src/local/immutable_store.rs:1627-1633 | lore-storage/src/local/mutable_store.rs:1489-1494 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-transport/src/grpc/storage_client.rs:1249 — lore-transport/src/grpc/storage_client.rs:1249-1254 | lore-transport/src/grpc/storage_client.rs:1297-1302 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/mod.rs:381 — lore-server/src/grpc/mod.rs:381-386 | lore-server/src/http/mod.rs:26-31 — 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) lore/src/revision_tree/handle.rs:254 — lore/src/revision_tree/handle.rs:254-259 | lore/src/storage/handle.rs:58-63 — `lore/src/revision_tree/handle.rs` and `lore/src/storage/handle.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 4 separate duplicated blocks between them, totalling at least 33 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 2) lore/src/revision_tree/handle.rs:305 — lore/src/revision_tree/handle.rs:305-312 | lore/src/storage/handle.rs:127-132 — `lore/src/revision_tree/handle.rs` and `lore/src/storage/handle.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 4 separate duplicated blocks between them, totalling at least 33 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.
D2 · Cognitive Complexity · lore_server · ×14
  • lore_server::server::async_main (cognitive 43) lore-server/src/server.rs:1892 — lore_server::server::async_main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 7, loops 2 (3 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • lore_server::grpc::revision::v1::revision_list::walk_revisions (cognitive 37) lore-server/src/grpc/revision/v1/revision_list.rs:491 — lore_server::grpc::revision::v1::revision_list::walk_revisions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_server::grpc::revision::v1::branch_list::produce_branches (cognitive 32) lore-server/src/grpc/revision/v1/branch_list.rs:143 — lore_server::grpc::revision::v1::branch_list::produce_branches has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), match/switch 3 (5 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_server::grpc::revision::v1::revision_list::resolve_start (cognitive 22) lore-server/src/grpc/revision/v1/revision_list.rs:269 — lore_server::grpc::revision::v1::revision_list::resolve_start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • lore_server::grpc::thinclient::v1::revision_diff::run_three_way (cognitive 20) lore-server/src/grpc/thinclient/v1/revision_diff.rs:448 — lore_server::grpc::thinclient::v1::revision_diff::run_three_way has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 5, 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.
  • lore_server::grpc::handlers::revision_list::walk_revisions (cognitive 19) lore-server/src/grpc/handlers/revision_list.rs:210 — lore_server::grpc::handlers::revision_list::walk_revisions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2, 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.
  • lore_server::grpc::handlers::branch_list::branch_list_handler (cognitive 18) lore-server/src/grpc/handlers/branch_list.rs:57 — lore_server::grpc::handlers::branch_list::branch_list_handler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_server::grpc::handlers::repository_create::repository_create (cognitive 18) lore-server/src/grpc/handlers/repository_create.rs:147 — lore_server::grpc::handlers::repository_create::repository_create has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_server::auth::jwt_axum_middleware::jwt_axum_verify_authorization (cognitive 17) lore-server/src/auth/jwt_axum_middleware.rs:29 — lore_server::auth::jwt_axum_middleware::jwt_axum_verify_authorization has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (17 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • lore_server::grpc::handlers::branch_diff::branch_diff_handler (cognitive 16) lore-server/src/grpc/handlers/branch_diff.rs:106 — lore_server::grpc::handlers::branch_diff::branch_diff_handler has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • lore_server::grpc::handlers::branch_push::verify_fragments (cognitive 16) lore-server/src/grpc/handlers/branch_push.rs:974 — lore_server::grpc::handlers::branch_push::verify_fragments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_server::grpc::handlers::revision_state_history::handler (cognitive 16) lore-server/src/grpc/handlers/revision_state_history.rs:26 — lore_server::grpc::handlers::revision_state_history::handler has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_server::grpc::repository::v1::repository_create::repository_create_inner (cognitive 16) lore-server/src/grpc/repository/v1/repository_create.rs:225 — lore_server::grpc::repository::v1::repository_create::repository_create_inner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_server::server::log_base_address (cognitive 16) lore-server/src/server.rs:1720 — lore_server::server::log_base_address has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lore_client · ×12
  • lore_client::cli::commands::repository::handle_repository_status (cognitive 74) lore-client/src/cli/commands/repository.rs:519 — lore_client::cli::commands::repository::handle_repository_status has cognitive complexity 74 (threshold 15). Drivers by points: if/else 37 (60 pts), loops 5 (9 pts), boolean chains 4, match/switch 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.
  • lore_client::cli::commands::revision::handle_revision_info (cognitive 40) lore-client/src/cli/commands/revision.rs:675 — lore_client::cli::commands::revision::handle_revision_info has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 4 (12 pts), match/switch 2 (5 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_client::cli::commands::revision::resolve_layer_messages (cognitive 34) lore-client/src/cli/commands/revision.rs:1021 — lore_client::cli::commands::revision::resolve_layer_messages has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (8 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_client::cli::commands::branch::handle_branch_push (cognitive 30) lore-client/src/cli/commands/branch.rs:823 — lore_client::cli::commands::branch::handle_branch_push has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 4, 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.
  • lore_client::cli::commands::file::handle_file_history (cognitive 30) lore-client/src/cli/commands/file.rs:1446 — lore_client::cli::commands::file::handle_file_history has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 2, 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.
  • lore_client::cli::commands::revision::handle_revision_history (cognitive 26) lore-client/src/cli/commands/revision.rs:569 — lore_client::cli::commands::revision::handle_revision_history has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (5 pts), boolean chains 2, match/switch 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.
  • lore_client::cli::commands::revision::resolve_link_messages (cognitive 26) lore-client/src/cli/commands/revision.rs:922 — lore_client::cli::commands::revision::resolve_link_messages has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (6 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_client::cli::commands::revision::handle_revision_commit (cognitive 20) lore-client/src/cli/commands/revision.rs:1153 — lore_client::cli::commands::revision::handle_revision_commit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 3, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_client::cli::commands::branch::handle_branch_info (cognitive 18) lore-client/src/cli/commands/branch.rs:649 — lore_client::cli::commands::branch::handle_branch_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_client::cli::commands::branch::handle_branch_list (cognitive 17) lore-client/src/cli/commands/branch.rs:1383 — lore_client::cli::commands::branch::handle_branch_list has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • lore_client::cli::commands::file::handle_file_diff (cognitive 17) lore-client/src/cli/commands/file.rs:882 — lore_client::cli::commands::file::handle_file_diff has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • lore_client::cli::commands::repository::handle_repository_verify_fragment (cognitive 16) lore-client/src/cli/commands/repository.rs:1171 — lore_client::cli::commands::repository::handle_repository_verify_fragment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D3 · God Classes · ClassTooLong · ×12
  • ClassTooLong: LocalImmutableStore lore-storage/src/local/immutable_store.rs:654 — ClassTooLong — 2971 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 68 methods, 5 blocks, lines 654-6435. The bar is 400 significant lines; this is 2571 over it, 7.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: State lore-revision/src/state.rs:390 — ClassTooLong — 2484 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 135 methods, 3 blocks, lines 390-4634. The bar is 400 significant lines; this is 2084 over it, 6.21× 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: AwsImmutableStore lore-aws/src/store/immutable_store.rs:534 — ClassTooLong — 1049 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 3 blocks, lines 534-2191. The bar is 400 significant lines; this is 649 over it, 2.62× 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: LocalMutableStore lore-storage/src/local/mutable_store.rs:335 — ClassTooLong — 786 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, 4 blocks, lines 335-2347. The bar is 400 significant lines; this is 386 over it, 1.97× 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: CompositeStore lore-revision/src/store/composite.rs:471 — ClassTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 3 blocks, lines 471-1572. The bar is 400 significant lines; this is 281 over it, 1.70× 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: StorageService lore-transport/src/grpc/storage_client.rs:486 — ClassTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 19 methods, 2 blocks, lines 486-1359. The bar is 400 significant lines; this is 194 over it, 1.49× 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: PackStore lore-storage/src/packstore.rs:212 — ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 2 blocks, lines 212-1122. The bar is 400 significant lines; this is 144 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LoreBlobStore contrib/bazel/crates/rbe-lore/src/lib.rs:331 — ClassTooLong — 539 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 331-1204. The bar is 400 significant lines; this is 139 over it, 1.35× 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: StorageClient lore-transport/src/quic/storage_service/client.rs:76 — ClassTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 5 blocks, lines 76-1086. The bar is 400 significant lines; this is 138 over it, 1.35× 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: LoreStorageService lore-server/src/grpc/storage_service.rs:73 — ClassTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 4 blocks, lines 73-839. The bar is 400 significant lines; this is 124 over it, 1.31× 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: Metadata lore-revision/src/metadata.rs:306 — ClassTooLong — 464 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 47 methods, 4 blocks, lines 306-1169. The bar is 400 significant lines; this is 64 over it, 1.16× 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: DynamoDbImpl lore-aws/src/dynamodb.rs:194 — ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 2 blocks, lines 194-814. The bar is 400 significant lines; this is 50 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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×11
  • Members sharing a duplicated core (4 members, 50+ identical tokens) lore-client/src/cli/commands/branch.rs:1033 — lore-client/src/cli/commands/branch.rs:1033-1104 | lore-client/src/cli/commands/branch.rs:1106-1170 | lore-client/src/cli/commands/revision.rs:1621-1679 | lore-client/src/cli/commands/revision.rs:1681-1757 — 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) lore-client/src/cli/commands/file.rs:1170 — lore-client/src/cli/commands/file.rs:1170-1237 | lore-client/src/cli/commands/file.rs:1239-1287 | lore-client/src/cli/commands/file.rs:1301-1341 | lore-client/src/cli/commands/file.rs:1362-1419 — 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) lore-revision/src/branch/merge.rs:3117 — lore-revision/src/branch/merge.rs:3117-3161 | lore-revision/src/branch/merge.rs:3836-3931 | lore-revision/src/revision/cherry_pick.rs:296-340 | lore-revision/src/revision/revert.rs:276-316 — 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) lore-revision/src/metadata.rs:669 — lore-revision/src/metadata.rs:669-705 | lore-revision/src/metadata.rs:707-745 | lore-revision/src/metadata.rs:904-1028 | lore-revision/src/metadata.rs:1132-1164 — 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) lore-revision/src/metadata/get.rs:19 — lore-revision/src/metadata/get.rs:19-44 | lore-revision/src/metadata/get.rs:60-90 | lore-revision/src/metadata/list.rs:18-43 | lore-revision/src/metadata/list.rs:49-79 — 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) lore-server/src/grpc/handlers/repository_query.rs:103 — lore-server/src/grpc/handlers/repository_query.rs:103-157 | lore-server/src/grpc/handlers/repository_query.rs:165-215 | lore-server/src/grpc/repository/v1/repository_get.rs:179-227 | lore-server/src/grpc/repository/v1/repository_get.rs:239-284 — 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) lore-server/src/grpc/storage/v1/mutable_compare_and_swap.rs:26 — lore-server/src/grpc/storage/v1/mutable_compare_and_swap.rs:26-66 | lore-server/src/grpc/storage/v1/mutable_load.rs:27-68 | lore-server/src/grpc/storage/v1/mutable_store.rs:25-56 | lore-server/src/grpc/storage/v1/verify.rs:26-71 — 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) lore-server/src/protocol/replication_store/get.rs:53 — lore-server/src/protocol/replication_store/get.rs:53-62 | lore-server/src/protocol/replication_store/get_metadata.rs:49-58 | lore-server/src/protocol/replication_store/obliterate.rs:48-57 | lore-server/src/protocol/replication_store/put.rs:74-103 — 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) lore-storage/src/conformance.rs:508 — lore-storage/src/conformance.rs:508-573 | lore-storage/src/conformance.rs:705-740 | lore-storage/src/conformance.rs:752-796 | lore-storage/src/conformance.rs:977-1024 — 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) lore-transport/src/grpc/storage_client.rs:991 — lore-transport/src/grpc/storage_client.rs:991-1069 | lore-transport/src/grpc/storage_client.rs:1075-1153 | lore-transport/src/grpc/storage_client.rs:1158-1195 | lore-transport/src/grpc/storage_client.rs:1203-1240 — 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) lore/src/revision_tree/add.rs:881 — lore/src/revision_tree/add.rs:881-891 | lore/src/revision_tree/delete.rs:572-581 | lore/src/revision_tree/modify.rs:372-381 | lore/src/revision_tree/move_node.rs:693-702 — 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.
D3 · God Classes · TooManyMethods · ×10
  • TooManyMethods: State lore-revision/src/state.rs:390 — TooManyMethods — 135 methods. The bar is 30 methods; this is 105 over it, 4.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LocalImmutableStore lore-storage/src/local/immutable_store.rs:654 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RepositoryContext lore-revision/src/repository.rs:604 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Metadata lore-revision/src/metadata.rs:306 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PackStore lore-storage/src/packstore.rs:212 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 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.
  • TooManyMethods: Node lore-revision/src/node.rs:338 — 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: IoDriver lore-io/src/driver.rs:156 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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: IocpDriver lore-io/src/iocp.rs:294 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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: RelativePath lore-revision/src/util/path.rs:444 — 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: Connection lore-transport/src/connection.rs:897 — 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.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×10
  • Low cohesion: StorageClient (LCOM4 14) lore-transport/src/quic/storage_service/client.rs:76 — StorageClient's methods fall into 14 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 14 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ReplicationStoreClient (LCOM4 9) lore-server/src/quic/replication_store_service/client.rs:187 — ReplicationStoreClient's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TestOperation (LCOM4 6) lore-revision/src/fs/filesystem_provider.rs:1302 — TestOperation'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: AwsMutableStore (LCOM4 5) lore-aws/src/store/mutable_store.rs:232 — AwsMutableStore'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: ExternalAllocator (LCOM4 4) lore-base/src/allocator/mod.rs:42 — ExternalAllocator's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ReplicationStoreService (LCOM4 4) lore-server/src/quic/replication_store_service/server.rs:114 — ReplicationStoreService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: StorageService (LCOM4 4) lore-server/src/quic/storage_service.rs:444 — StorageService's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: StorageServiceV4 (LCOM4 4) lore-server/src/quic/storage_service_v4.rs:94 — StorageServiceV4's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PathLock (LCOM4 4) lore-storage/src/local/store_lock.rs:384 — PathLock's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WriteOptions (LCOM4 4) lore-storage/src/options.rs:9 — WriteOptions'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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×9
  • Duplicated block (18 lines × 2) lore-io/src/psync.rs:643 — lore-io/src/psync.rs:643-660 | lore-io/src/uring.rs:153-170 — 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) lore-revision/src/branch/merge.rs:4297 — lore-revision/src/branch/merge.rs:4297-4314 | lore-revision/src/branch/merge.rs:4668-4685 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lore-revision/src/file/obliterate/impact.rs:133 — lore-revision/src/file/obliterate/impact.rs:133-150 | lore-revision/src/file/obliterate/impact.rs:169-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lore-revision/src/file/stage.rs:1134 — lore-revision/src/file/stage.rs:1134-1151 | lore-revision/src/file/stage.rs:1525-1542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lore-revision/src/link/info.rs:64 — lore-revision/src/link/info.rs:64-81 | lore-revision/src/link/remove.rs:69-86 — before extracting anything, compare `lore-revision/src/link/info.rs` and `lore-revision/src/link/remove.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) lore-revision/src/metadata.rs:670 — lore-revision/src/metadata.rs:670-687 | lore-revision/src/metadata.rs:708-725 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lore-storage/src/local/mutable_store.rs:2040 — lore-storage/src/local/mutable_store.rs:2040-2057 | lore-storage/src/local/mutable_store.rs:2174-2191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) lore-transport/src/grpc/repository_client.rs:242 — lore-transport/src/grpc/repository_client.rs:242-259 | lore-transport/src/grpc/revision_client.rs:367-384 — 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) lore-transport/src/grpc/storage_client.rs:1008 — lore-transport/src/grpc/storage_client.rs:1008-1025 | lore-transport/src/grpc/storage_client.rs:1092-1109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · LocalImmutableStore · ×8
  • LocalImmutableStore::verify_fragment_held (cyclomatic 39) lore-storage/src/local/immutable_store.rs:6161 — LocalImmutableStore::verify_fragment_held has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • LocalImmutableStore::store_entry (cyclomatic 33) lore-storage/src/local/immutable_store.rs:3025 — LocalImmutableStore::store_entry has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • LocalImmutableStore::verify (cyclomatic 26) lore-storage/src/local/immutable_store.rs:5775 — LocalImmutableStore::verify 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.
  • LocalImmutableStore::evict_oldest (cyclomatic 24) lore-storage/src/local/immutable_store.rs:3939 — LocalImmutableStore::evict_oldest 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.
  • LocalImmutableStore::compact_group_packfiles (cyclomatic 21) lore-storage/src/local/immutable_store.rs:4358 — LocalImmutableStore::compact_group_packfiles 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.
  • LocalImmutableStore::put (cyclomatic 20) lore-storage/src/local/immutable_store.rs:5441 — LocalImmutableStore::put 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.
  • LocalImmutableStore::new_claimed (cyclomatic 19) lore-storage/src/local/immutable_store.rs:2214 — LocalImmutableStore::new_claimed 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.
  • LocalImmutableStore::compact_packfiles (cyclomatic 19) lore-storage/src/local/immutable_store.rs:4150 — LocalImmutableStore::compact_packfiles 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.
D31 · IaC & Container Security · Medium IaC · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×8
  • Duplicated block (20 lines × 2) lore-revision/src/branch/merge.rs:3293 — lore-revision/src/branch/merge.rs:3293-3312 | lore-revision/src/stage.rs:3132-3151 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/stage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) lore-revision/src/file/diff.rs:479 — lore-revision/src/file/diff.rs:479-498 | lore-revision/src/file/diff.rs:729-748 — both copies are in the same file, so extract the block into 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) lore-revision/src/fs/realize.rs:2335 — lore-revision/src/fs/realize.rs:2335-2354 | lore-revision/src/fs/realize.rs:2758-2777 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata/set.rs:90 — lore-revision/src/metadata/set.rs:90-109 | lore-revision/src/metadata/set.rs:322-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) lore-revision/src/stage.rs:1879 — lore-revision/src/stage.rs:1879-1898 | lore-revision/src/stage.rs:2021-2040 — both copies are in the same file, so extract the block into 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) lore-server/src/grpc/handlers/branch_create.rs:35 — lore-server/src/grpc/handlers/branch_create.rs:35-54 | lore-server/src/grpc/revision/v1/branch_create.rs:37-56 — 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 (20 lines × 2) lore-server/src/grpc/handlers/repository_metadata_get.rs:40 — lore-server/src/grpc/handlers/repository_metadata_get.rs:40-59 | lore-server/src/grpc/repository/v1/repository_metadata_get.rs:44-63 — 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 (20 lines × 2) lore-revision/src/revision/cherry_pick.rs:189 — lore-revision/src/revision/cherry_pick.rs:189-208 | lore-revision/src/revision/revert.rs:184-204 — before extracting anything, compare `lore-revision/src/revision/cherry_pick.rs` and `lore-revision/src/revision/revert.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×8
  • Duplicated block (11 lines × 3) lore-client/src/cli/commands/auth.rs:530 — lore-client/src/cli/commands/auth.rs:530-540 | lore-client/src/cli/commands/lock.rs:317-327 | lore-client/src/cli/commands/revision.rs:2543-2553 — 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) lore-client/src/cli/commands/file.rs:1193 — lore-client/src/cli/commands/file.rs:1193-1203 | lore-client/src/cli/commands/file.rs:1242-1252 | lore-client/src/cli/commands/file.rs:1384-1394 — 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) lore-client/src/cli/commands/file.rs:1193 — lore-client/src/cli/commands/file.rs:1193-1203 | lore-client/src/cli/commands/file.rs:1328-1338 | lore-client/src/cli/commands/file.rs:1384-1394 — 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) lore-revision/src/link.rs:1843 — lore-revision/src/link.rs:1843-1853 | lore-revision/src/link/info.rs:71-81 | lore-revision/src/link/remove.rs:76-86 — before extracting anything, compare `lore-revision/src/link/info.rs` and `lore-revision/src/link/remove.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 3) lore-revision/src/lock/file/acquire.rs:126 — lore-revision/src/lock/file/acquire.rs:126-136 | lore-revision/src/lock/file/release.rs:130-140 | lore-revision/src/lock/file/status.rs:131-141 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (11 lines × 3) lore-revision/src/metadata/branch.rs:302 — lore-revision/src/metadata/branch.rs:302-312 | lore-revision/src/metadata/repository.rs:291-301 | lore-revision/src/metadata/set.rs:86-96 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore/src/branch.rs:1645 — lore/src/branch.rs:1645-1655 | lore/src/repository.rs:1304-1314 | lore/src/revision.rs:533-543 — before extracting anything, compare `lore/src/branch.rs` and `lore/src/repository.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 (11 lines × 3) lore-storage/src/defragment.rs:769 — lore-storage/src/defragment.rs:769-779 | lore-storage/src/defragment.rs:1167-1177 | lore-storage/src/defragment.rs:1427-1439 — 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.
D2 · Cognitive Complexity · lore_transport · ×7
  • lore_transport::connection::connect_impl (cognitive 55) lore-transport/src/connection.rs:377 — lore_transport::connection::connect_impl has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (46 pts), match/switch 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_transport::quic::response_reader::read_response (cognitive 33) lore-transport/src/quic/response_reader.rs:113 — lore_transport::quic::response_reader::read_response has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_transport::quic::client::connect_happy_eyeballs (cognitive 25) lore-transport/src/quic/client.rs:985 — lore_transport::quic::client::connect_happy_eyeballs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_transport::auth::exchange::exchange_custom_resource (cognitive 21) lore-transport/src/auth/exchange.rs:433 — lore_transport::auth::exchange::exchange_custom_resource has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (21 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, 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.
  • lore_transport::auth::exchange::auth_exchange_for_identity (cognitive 21) lore-transport/src/auth/exchange.rs:652 — lore_transport::auth::exchange::auth_exchange_for_identity has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • lore_transport::quic::client::reconnect (cognitive 21) lore-transport/src/quic/client.rs:1126 — lore_transport::quic::client::reconnect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts), loops 2 (4 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.
  • lore_transport::auth::exchange::exchange (cognitive 20) lore-transport/src/auth/exchange.rs:270 — lore_transport::auth::exchange::exchange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17 (20 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×7
  • Duplicated block (19 lines × 2) lore-aws/src/store/immutable_store.rs:1410 — lore-aws/src/store/immutable_store.rs:1410-1428 | lore-aws/src/store/immutable_store.rs:1650-1668 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) lore-client/src/cli/commands/branch.rs:1086 — lore-client/src/cli/commands/branch.rs:1086-1104 | lore-client/src/cli/commands/revision.rs:1661-1679 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-client/src/cli/commands/branch.rs:1736 — lore-client/src/cli/commands/branch.rs:1736-1754 | lore-client/src/cli/commands/repository.rs:1632-1650 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/repository.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) lore-revision/src/link/add.rs:422 — lore-revision/src/link/add.rs:422-440 | lore-revision/src/link/update.rs:207-225 — before extracting anything, compare `lore-revision/src/link/add.rs` and `lore-revision/src/link/update.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) lore-storage/src/local/immutable_store.rs:2007 — lore-storage/src/local/immutable_store.rs:2007-2025 | lore-storage/src/local/mutable_store.rs:1046-1064 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-storage/src/local/immutable_store.rs:6795 — lore-storage/src/local/immutable_store.rs:6795-6813 | lore-storage/src/local/mutable_store.rs:1842-1860 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-storage/src/mutable_conformance.rs:504 — lore-storage/src/mutable_conformance.rs:504-522 | lore-storage/src/mutable_conformance.rs:551-569 — both copies are in the same file, so extract the 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 × 2) · ×6
  • Duplicated block (21 lines × 2) lore-revision/src/fs/realize.rs:2306 — lore-revision/src/fs/realize.rs:2306-2326 | lore-revision/src/fs/realize.rs:2613-2633 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata/branch.rs:303 — lore-revision/src/metadata/branch.rs:303-323 | lore-revision/src/metadata/repository.rs:292-312 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) lore-storage/src/local/immutable_store.rs:1945 — lore-storage/src/local/immutable_store.rs:1945-1965 | lore-storage/src/local/mutable_store.rs:985-1005 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) lore-storage/src/local/immutable_store.rs:6704 — lore-storage/src/local/immutable_store.rs:6704-6724 | lore-storage/src/local/mutable_store.rs:1744-1764 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) lore-transport/src/grpc/storage_client.rs:1160 — lore-transport/src/grpc/storage_client.rs:1160-1180 | lore-transport/src/grpc/storage_client.rs:1205-1225 — both copies are in the same file, so extract the block into 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) lore/src/repository.rs:517 — lore/src/repository.rs:517-537 | lore/src/repository.rs:581-601 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D17 · Explicit Debt · HackComment · ×5
  • HackComment lore-revision/tests/state.rs:423 — // Hack to mark all data as durably stored — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment lore-revision/tests/state.rs:441 — // Hack to mark all data as durably stored — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment lore-integration-tests/tests/storage_test.rs:6202 — // hack inside `put.rs` requires the source buffer to outlive every event, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment lore-client/build.rs:13 — // Hack around EXE and DLL having the same file name for PDB file — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment lore-capi/build.rs:242 — // Hack around EXE and DLL having the same file name for PDB file — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · LocalMutableStore · ×5
  • LocalMutableStore::flush_all (cognitive 123) lore-storage/src/local/mutable_store.rs:1587 — LocalMutableStore::flush_all has cognitive complexity 123 (threshold 15). Drivers by points: if/else 25 (86 pts), loops 5 (14 pts), match/switch 3 (12 pts), boolean chains 11 (nesting depth added 79). 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.
  • LocalMutableStore::flush_delayed (cognitive 23) lore-storage/src/local/mutable_store.rs:1485 — LocalMutableStore::flush_delayed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LocalMutableStore::load (cognitive 22) lore-storage/src/local/mutable_store.rs:2097 — LocalMutableStore::load has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, 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.
  • LocalMutableStore::survey_groups (cognitive 21) lore-storage/src/local/mutable_store.rs:974 — LocalMutableStore::survey_groups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), match/switch 2 (4 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.
  • LocalMutableStore::new_claimed (cognitive 20) lore-storage/src/local/mutable_store.rs:1174 — LocalMutableStore::new_claimed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (7 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lore · ×5
  • lore::revision_tree::move_node::plan_entries (cognitive 51) lore/src/revision_tree/move_node.rs:349 — lore::revision_tree::move_node::plan_entries has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (32 pts), match/switch 4 (12 pts), loops 3 (4 pts), boolean chains 3 (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.
  • lore::revision_tree::add::plan_entries (cognitive 47) lore/src/revision_tree/add.rs:470 — lore::revision_tree::add::plan_entries has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (28 pts), match/switch 5 (17 pts), boolean chains 1, loops 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.
  • lore::revision_tree::delete::plan_entries (cognitive 24) lore/src/revision_tree/delete.rs:177 — lore::revision_tree::delete::plan_entries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore::revision_tree::delete::next_level (cognitive 18) lore/src/revision_tree/delete.rs:277 — lore::revision_tree::delete::next_level has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore::storage::copy::copy_local (cognitive 18) lore/src/storage/copy.rs:107 — lore::storage::copy::copy_local has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 4 (8 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 · CompositeStore · ×5
  • CompositeStore::query (cognitive 26) lore-revision/src/store/composite.rs:1131 — CompositeStore::query has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), match/switch 2 (4 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.
  • CompositeStore::get_metadata_from_remotes (cognitive 23) lore-revision/src/store/composite.rs:826 — CompositeStore::get_metadata_from_remotes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CompositeStore::topology_peers_refreshed (cognitive 21) lore-revision/src/store/composite.rs:558 — CompositeStore::topology_peers_refreshed has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CompositeStore::copy_implementation (cognitive 21) lore-revision/src/store/composite.rs:922 — CompositeStore::copy_implementation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CompositeStore::get_from_remotes (cognitive 20) lore-revision/src/store/composite.rs:729 — CompositeStore::get_from_remotes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 2, 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.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lore-client/src/cli/commands/branch.rs:649 — lore-client/src/cli/commands/branch.rs:649-753 | lore-client/src/cli/commands/link.rs:280-334 | lore-client/src/cli/commands/link.rs:336-379 | lore-client/src/cli/commands/revision.rs:569-673 | lore-client/src/cli/commands/revision.rs:675-823 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lore-client/src/cli/commands/file.rs:1827 — lore-client/src/cli/commands/file.rs:1827-1869 | lore-client/src/cli/commands/file.rs:1871-1919 | lore-client/src/cli/commands/file.rs:1921-1987 | lore-client/src/cli/commands/link.rs:114-183 | lore-client/src/cli/commands/link.rs:185-216 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lore-server/src/grpc/handlers/branch_diff.rs:41 — lore-server/src/grpc/handlers/branch_diff.rs:41-76 | lore-server/src/grpc/handlers/revision_diff.rs:36-103 | lore-server/src/grpc/handlers/revision_tree.rs:35-97 | lore-server/src/grpc/thinclient/v1/revision_diff.rs:120-187 | lore-server/src/grpc/thinclient/v1/revision_tree.rs:59-117 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lore-server/src/grpc/storage_service.rs:418 — lore-server/src/grpc/storage_service.rs:418-472 | lore-server/src/grpc/storage_service.rs:651-698 | lore-server/src/grpc/storage_service.rs:704-743 | lore-server/src/grpc/storage_service.rs:749-781 | lore-server/src/grpc/storage_service.rs:787-832 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) lore/src/revision_tree/add.rs:474 — lore/src/revision_tree/add.rs:474-628 | lore/src/revision_tree/delete.rs:181-264 | lore/src/revision_tree/metadata_clear.rs:127-139 | lore/src/revision_tree/metadata_set.rs:158-191 | lore/src/revision_tree/modify.rs:173-228 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×5
  • Duplicated block (17 lines × 2) lore-client/src/cli/commands/revision.rs:966 — lore-client/src/cli/commands/revision.rs:966-982 | lore-client/src/cli/commands/revision.rs:1063-1079 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:3368 — lore-revision/src/branch/merge.rs:3368-3384 | lore-revision/src/branch/merge.rs:3583-3599 — both copies are in the same file, so extract the block into 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) lore-revision/src/branch/merge.rs:4235 — lore-revision/src/branch/merge.rs:4235-4251 | lore-revision/src/branch/merge.rs:4594-4610 — both copies are in the same file, so extract the block into 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) lore-revision/src/file/info.rs:710 — lore-revision/src/file/info.rs:710-726 | lore-revision/src/file/info.rs:807-823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) lore-revision/src/branch/merge.rs:3350 — lore-revision/src/branch/merge.rs:3350-3366 | lore-revision/src/branch/merge.rs:3565-3581 — both copies are in the same file, so extract the 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 × 3) · ×5
  • Duplicated block (15 lines × 3) lore-client/src/cli/commands/branch.rs:1017 — lore-client/src/cli/commands/branch.rs:1017-1031 | lore-client/src/cli/commands/revision.rs:1826-1840 | lore-client/src/cli/commands/revision.rs:2118-2132 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 3) lore-client/src/cli/commands/branch.rs:1225 — lore-client/src/cli/commands/branch.rs:1225-1239 | lore-client/src/cli/commands/revision.rs:1915-1929 | lore-client/src/cli/commands/revision.rs:2197-2211 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 3) lore-revision/src/file/stage.rs:1134 — lore-revision/src/file/stage.rs:1134-1148 | lore-revision/src/file/stage.rs:1525-1539 | lore-revision/src/stage.rs:3547-3561 — 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 (15 lines × 3) lore-server/src/grpc/storage_service.rs:705 — lore-server/src/grpc/storage_service.rs:705-719 | lore-server/src/grpc/storage_service.rs:750-764 | lore-server/src/grpc/storage_service.rs:788-802 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (15 lines × 3) lore-revision/src/branch.rs:2816 — lore-revision/src/branch.rs:2816-2830 | lore-revision/src/branch.rs:2862-2876 | lore-revision/src/branch.rs:2900-2914 — 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 (14–15 lines × 2) · ×5
  • Duplicated block (14–15 lines × 2) lore-client/src/cli/commands/lock.rs:172 — lore-client/src/cli/commands/lock.rs:172-186 | lore-client/src/cli/commands/lock.rs:223-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–15 lines × 2) lore-revision/src/file/obliterate.rs:135 — lore-revision/src/file/obliterate.rs:135-149 | lore-revision/src/file/write.rs:236-249 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14–15 lines × 2) lore-storage/src/compress.rs:716 — lore-storage/src/compress.rs:716-730 | lore-storage/src/compress.rs:849-862 — both copies are in the same file, so extract the block into 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) lore-transport/src/auth/exchange.rs:609 — lore-transport/src/auth/exchange.rs:609-623 | lore-transport/src/auth/exchange.rs:779-792 — both copies are in the same file, so extract the block into 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) lore/src/layer/add.rs:22 — lore/src/layer/add.rs:22-36 | lore/src/layer/remove.rs:26-39 — 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 (10 lines × 3) · ×5
  • Duplicated block (10 lines × 3) lore-client/src/cli/commands/file.rs:871 — lore-client/src/cli/commands/file.rs:871-880 | lore-client/src/cli/commands/file.rs:1106-1115 | lore-client/src/cli/commands/revision.rs:2357-2366 — before extracting anything, compare `lore-client/src/cli/commands/file.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-revision/src/repository.rs:1714 — lore-revision/src/repository.rs:1714-1723 | lore-revision/src/repository.rs:2062-2071 | lore-revision/src/repository.rs:2161-2170 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) lore-server/src/grpc/storage_service.rs:212 — lore-server/src/grpc/storage_service.rs:212-221 | lore-server/src/grpc/storage_service.rs:374-385 | lore-server/src/grpc/storage_service.rs:616-625 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) lore-server/src/protocol/replication_store/get.rs:114 — lore-server/src/protocol/replication_store/get.rs:114-123 | lore-server/src/protocol/replication_store/get_metadata.rs:99-108 | lore-server/src/protocol/replication_store/query.rs:139-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (10 lines × 3) lore-server/src/grpc/storage_service.rs:151 — lore-server/src/grpc/storage_service.rs:151-160 | lore-server/src/grpc/storage_service.rs:298-309 | lore-server/src/grpc/storage_service.rs:510-519 — 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 · lore_client · ×4
  • lore_client::cli::commands::repository::handle_repository_status (cyclomatic 42) lore-client/src/cli/commands/repository.rs:519 — lore_client::cli::commands::repository::handle_repository_status has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • lore_client::cli::commands::branch::handle_branch_push (cyclomatic 30) lore-client/src/cli/commands/branch.rs:823 — lore_client::cli::commands::branch::handle_branch_push 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.
  • lore_client::cli::commands::revision::handle_revision_info (cyclomatic 20) lore-client/src/cli/commands/revision.rs:675 — lore_client::cli::commands::revision::handle_revision_info 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.
  • lore_client::cli::commands::revision::handle_revision_commit (cyclomatic 20) lore-client/src/cli/commands/revision.rs:1153 — lore_client::cli::commands::revision::handle_revision_commit has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · lore_storage · ×4
  • lore_storage::local::immutable_store::flush_locked_group (cyclomatic 41) lore-storage/src/local/immutable_store.rs:6580 — lore_storage::local::immutable_store::flush_locked_group 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.
  • lore_storage::write::leader_body (cyclomatic 29) lore-storage/src/write.rs:1131 — lore_storage::write::leader_body 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.
  • lore_storage::defragment::walk_intermediate_level (cyclomatic 16) lore-storage/src/defragment.rs:490 — lore_storage::defragment::walk_intermediate_level 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.
  • lore_storage::write::file_matches (cyclomatic 16) lore-storage/src/write.rs:1810 — lore_storage::write::file_matches 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.
D2 · Cognitive Complexity · State · ×4
  • State::collect_dirty_paths_linked (cognitive 38) lore-revision/src/state.rs:3585 — State::collect_dirty_paths_linked has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 3, loops 2 (3 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.
  • State::block_deserialize (cognitive 37) lore-revision/src/state.rs:1458 — State::block_deserialize has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (36 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.
  • State::serialize (cognitive 34) lore-revision/src/state.rs:792 — State::serialize has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (7 pts), loops 2 (4 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.
  • State::move_node (cognitive 28) lore-revision/src/state.rs:2782 — State::move_node has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×4
  • Duplicated block (17–18 lines × 2) lore-aws/src/dynamodb.rs:309 — lore-aws/src/dynamodb.rs:309-326 | lore-aws/src/dynamodb.rs:545-561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17–18 lines × 2) lore-revision/src/repository/clone.rs:727 — lore-revision/src/repository/clone.rs:727-744 | lore-revision/src/repository/clone.rs:855-871 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17–18 lines × 2) lore-revision/src/state.rs:3325 — lore-revision/src/state.rs:3325-3342 | lore-revision/src/state.rs:3422-3438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17–18 lines × 2) lore-transport/src/grpc/mod.rs:115 — lore-transport/src/grpc/mod.rs:115-131 | lore-transport/src/grpc/mod.rs:168-185 — both copies are in the same file, so extract the 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–14 lines × 2) · ×4
  • Duplicated block (13–14 lines × 2) lore-base/src/allocator/growvec.rs:52 — lore-base/src/allocator/growvec.rs:52-65 | lore-base/src/allocator/growvec.rs:143-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lore-revision/src/branch/merge.rs:1648 — lore-revision/src/branch/merge.rs:1648-1661 | lore-revision/src/branch/merge.rs:2805-2817 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lore-revision/src/commit.rs:3532 — lore-revision/src/commit.rs:3532-3544 | lore-revision/src/commit.rs:3587-3600 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13–14 lines × 2) lore-revision/src/state/os_diff.rs:1874 — lore-revision/src/state/os_diff.rs:1874-1886 | lore-revision/src/state/os_diff.rs:2243-2256 — both copies are in the same file, so extract the 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 × 2) · ×4
  • Duplicated block (12–13 lines × 2) lore-io/src/iocp.rs:533 — lore-io/src/iocp.rs:533-545 | lore-io/src/iocp.rs:572-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 (12–13 lines × 2) lore-revision/src/fs/realize.rs:678 — lore-revision/src/fs/realize.rs:678-689 | lore-revision/src/fs/realize.rs:827-839 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lore-revision/src/stage.rs:1933 — lore-revision/src/stage.rs:1933-1945 | lore-revision/src/stage.rs:2046-2057 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) lore-revision/src/state.rs:3349 — lore-revision/src/state.rs:3349-3361 | lore-revision/src/state.rs:3446-3457 — both copies are in the same file, so extract the 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 × 2) · ×4
  • Duplicated block (10–11 lines × 2) lore-client/src/cli/commands/link.rs:125 — lore-client/src/cli/commands/link.rs:125-134 | lore-client/src/cli/commands/repository.rs:1057-1067 — 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) lore-revision/src/file/dirty.rs:897 — lore-revision/src/file/dirty.rs:897-907 | lore-revision/src/file/reset.rs:1344-1353 — 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) lore-revision/src/history.rs:177 — lore-revision/src/history.rs:177-186 | lore-revision/src/history.rs:188-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) lore-revision/src/util/fs.rs:662 — lore-revision/src/util/fs.rs:662-672 | lore-revision/src/util/fs.rs:704-713 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) lore-revision/src/branch/merge.rs:3173 — lore-revision/src/branch/merge.rs:3173-3180 | lore-revision/src/stage.rs:3132-3139 | lore-revision/src/stage.rs:3595-3602 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/stage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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) lore-transport/src/connection.rs:630 — lore-transport/src/connection.rs:630-637 | lore-transport/src/connection.rs:661-668 | lore-transport/src/connection.rs:695-702 — 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) lore/src/branch.rs:1637 — lore/src/branch.rs:1637-1644 | lore/src/repository.rs:1296-1303 | lore/src/revision.rs:525-532 — before extracting anything, compare `lore/src/branch.rs` and `lore/src/repository.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 × 3) lore-storage/src/local/immutable_store.rs:5270 — lore-storage/src/local/immutable_store.rs:5270-5277 | lore-storage/src/local/immutable_store.rs:5318-5326 | lore-storage/src/local/immutable_store.rs:5379-5388 — 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 lines × 4) · ×4
  • Duplicated block (7 lines × 4) lore-client/src/cli/commands/branch.rs:1735 — lore-client/src/cli/commands/branch.rs:1735-1741 | lore-client/src/cli/commands/file.rs:1098-1104 | lore-client/src/cli/commands/repository.rs:1631-1637 | lore-client/src/cli/commands/revision.rs:2349-2355 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/file.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) lore-server/src/grpc/handlers/branch_metadata_set.rs:107 — lore-server/src/grpc/handlers/branch_metadata_set.rs:107-113 | lore-server/src/grpc/handlers/repository_metadata_set.rs:107-113 | lore-server/src/grpc/repository/v1/repository_metadata_set.rs:59-65 | lore-server/src/grpc/revision/v1/branch_metadata_set.rs:60-66 — before extracting anything, compare `lore-server/src/grpc/handlers/branch_metadata_set.rs` and `lore-server/src/grpc/handlers/repository_metadata_set.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) lore-transport/src/grpc/storage_client.rs:992 — lore-transport/src/grpc/storage_client.rs:992-998 | lore-transport/src/grpc/storage_client.rs:1076-1082 | lore-transport/src/grpc/storage_client.rs:1159-1165 | lore-transport/src/grpc/storage_client.rs:1204-1210 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 4) lore-revision/src/file/stage.rs:1134 — lore-revision/src/file/stage.rs:1134-1140 | lore-revision/src/file/stage.rs:1525-1531 | lore-revision/src/stage.rs:3547-3553 | lore-revision/src/stage.rs:3904-3910 — 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 lines × 3) · ×4
  • Duplicated block (7 lines × 3) lore-revision/src/stage.rs:3165 — lore-revision/src/stage.rs:3165-3171 | lore-revision/src/stage.rs:3215-3221 | lore-revision/src/stage.rs:3431-3437 — 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) lore-revision/src/stage.rs:3486 — lore-revision/src/stage.rs:3486-3492 | lore-server/src/server.rs:2211-2217 | lore-server/src/server.rs:2316-2322 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 3) lore-revision/src/state.rs:1519 — lore-revision/src/state.rs:1519-1525 | lore-revision/src/state.rs:1546-1552 | lore-revision/src/state.rs:1578-1584 — 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) lore-transport/src/quic/storage_service/client.rs:765 — lore-transport/src/quic/storage_service/client.rs:765-771 | lore-transport/src/quic/storage_service/client.rs:815-821 | lore-transport/src/quic/storage_service/client.rs:869-875 — 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 (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) lore-base/src/allocator/growvec.rs:51 — lore-base/src/allocator/growvec.rs:51-56 | lore-base/src/allocator/growvec.rs:77-82 | lore-base/src/allocator/growvec.rs:142-147 — 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) lore-client/src/cli/commands/revision.rs:576 — lore-client/src/cli/commands/revision.rs:576-581 | lore-client/src/cli/commands/revision.rs:698-703 | lore-client/src/cli/commands/revision.rs:1306-1312 — 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) lore-transport/src/grpc/storage_client.rs:782 — lore-transport/src/grpc/storage_client.rs:782-787 | lore-transport/src/grpc/storage_client.rs:814-819 | lore-transport/src/grpc/storage_client.rs:845-850 — 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) lore-server/src/grpc/revision/v1/branch_get.rs:118 — lore-server/src/grpc/revision/v1/branch_get.rs:118-123 | lore-server/src/grpc/revision/v1/branch_get.rs:157-162 | lore-server/src/grpc/revision/v1/branch_push.rs:231-236 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×4
  • Duplicated block (5 lines × 3) contrib/bazel/crates/rbe-lore/src/lib.rs:791 — contrib/bazel/crates/rbe-lore/src/lib.rs:791-795 | contrib/bazel/crates/rbe-lore/src/lib.rs:878-882 | contrib/bazel/crates/rbe-lore/src/lib.rs:990-994 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) lore-client/src/cli/commands/file.rs:2009 — lore-client/src/cli/commands/file.rs:2009-2013 | lore-client/src/cli/commands/file.rs:2062-2066 | lore-client/src/cli/commands/file.rs:2107-2111 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) lore-revision/src/metadata.rs:721 — lore-revision/src/metadata.rs:721-725 | lore-revision/src/metadata.rs:924-928 | lore-revision/src/metadata.rs:1139-1143 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) lore-server/src/grpc/handlers/branch_query.rs:45 — lore-server/src/grpc/handlers/branch_query.rs:45-49 | lore-server/src/grpc/revision/v1/revision_list.rs:166-171 | lore-server/src/grpc/thinclient/v1/revision_info.rs:48-53 — 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.
D1 · Cyclomatic Complexity · lore_server · ×3
  • lore_server::server::async_main (cyclomatic 32) lore-server/src/server.rs:1892 — lore_server::server::async_main has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • lore_server::grpc::revision::v1::revision_list::walk_revisions (cyclomatic 19) lore-server/src/grpc/revision/v1/revision_list.rs:491 — lore_server::grpc::revision::v1::revision_list::walk_revisions 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.
  • lore_server::grpc::thinclient::v1::revision_diff::run_three_way (cyclomatic 16) lore-server/src/grpc/thinclient/v1/revision_diff.rs:448 — lore_server::grpc::thinclient::v1::revision_diff::run_three_way 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.
D1 · Cyclomatic Complexity · lore · ×3
  • lore::revision_tree::move_node::plan_entries (cyclomatic 28) lore/src/revision_tree/move_node.rs:349 — lore::revision_tree::move_node::plan_entries 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.
  • lore::revision_tree::add::plan_entries (cyclomatic 22) lore/src/revision_tree/add.rs:470 — lore::revision_tree::add::plan_entries 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.
  • lore::revision_tree::delete::plan_entries (cyclomatic 17) lore/src/revision_tree/delete.rs:177 — lore::revision_tree::delete::plan_entries 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 · State · ×3
  • State::move_node (cyclomatic 25) lore-revision/src/state.rs:2782 — State::move_node has cyclomatic complexity 25 (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.
  • State::block_deserialize (cyclomatic 20) lore-revision/src/state.rs:1458 — State::block_deserialize 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.
  • State::collect_dirty_paths_linked (cyclomatic 17) lore-revision/src/state.rs:3585 — State::collect_dirty_paths_linked 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 · MetadataMigrator · ×3
  • MetadataMigrator::discover_legacy_fragments (cognitive 23) lore-aws/src/store/immutable_store/metadata_migrator.rs:178 — MetadataMigrator::discover_legacy_fragments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • MetadataMigrator::fragment_stream_consumer (cognitive 22) lore-aws/src/store/immutable_store/metadata_migrator.rs:335 — MetadataMigrator::fragment_stream_consumer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • MetadataMigrator::process_fragment (cognitive 19) lore-aws/src/store/immutable_store/metadata_migrator.rs:239 — MetadataMigrator::process_fragment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: interface.rs ↔ command.rs lore/src/interface.rs:1 — `lore/src/interface.rs` and `lore/src/remote/command.rs` change together 94% of the time (15 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `9806175d` Add lore file audit, per-line attribution for files; `b2c99013` lore-capi: Add `service status` command to get errors from the service; `9075a3ae` lore-capi: Expose the link list staged as a C API entry point — run `git show` on any of them.
  • Change coupling: mod.rs ↔ stage.rs lore-revision/src/fs/os/mod.rs:1 — `lore-revision/src/fs/os/mod.rs` and `lore-revision/src/stage.rs` change together 60% of the time (15 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `69beb02a` lore-revision: Make a provider's content source asynchronous and fall…; `5a6804bf` lore-revision: Rename operation named properly and added tests in os …; `a03e294b` lore-revision: Derive the case variations a directory holds from its … — run `git show` on any of them.
  • Change coupling: mod.rs ↔ realize.rs lore-revision/src/fs/os/mod.rs:1 — `lore-revision/src/fs/os/mod.rs` and `lore-revision/src/fs/realize.rs` change together 56% of the time (14 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `51e3ad8f` lore-revision: Let a provider that holds the working tree as an in-me…; `d8484098` lore-revision: Change file system provider operation trait to have a …; `5a6804bf` lore-revision: Rename operation named properly and added tests in os … — run `git show` on any of them.
D4 · Code Duplication · Near-duplicate member pair (42 shared lines) · ×3
  • Near-duplicate member pair (42 shared lines) lore-revision/src/branch/merge.rs:3280 — lore-revision/src/branch/merge.rs:3280-3448 | lore-revision/src/branch/merge.rs:3525-3623 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (42 shared lines) lore-revision/src/state.rs:3285 — lore-revision/src/state.rs:3285-3342 | lore-revision/src/state.rs:3383-3438 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (42 shared lines) lore/src/dependency.rs:78 — lore/src/dependency.rs:78-145 | lore/src/dependency.rs:190-253 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) lore-revision/src/branch.rs:2801 — lore-revision/src/branch.rs:2801-2826 | lore-revision/src/branch.rs:2885-2910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (26 lines × 2) lore-server/src/grpc/handlers/repository_create.rs:119 — lore-server/src/grpc/handlers/repository_create.rs:119-144 | lore-server/src/grpc/repository/v1/repository_create.rs:197-222 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_create.rs` and `lore-server/src/grpc/repository/v1/repository_create.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (26 lines × 2) lore-storage/src/local/immutable_store.rs:6673 — lore-storage/src/local/immutable_store.rs:6673-6698 | lore-storage/src/local/mutable_store.rs:1713-1738 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) lore-client/src/cli/commands/revision.rs:2402 — lore-client/src/cli/commands/revision.rs:2402-2423 | lore-client/src/cli/commands/revision.rs:2429-2450 — both copies are in the same file, so extract the block into 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) lore-io/src/psync.rs:687 — lore-io/src/psync.rs:687-708 | lore-io/src/uring.rs:175-196 — 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 (22 lines × 2) lore-storage/src/read.rs:160 — lore-storage/src/read.rs:160-181 | lore-storage/src/read.rs:2145-2166 — both copies are in the same file, so extract the 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–20 lines × 2) · ×3
  • Duplicated block (19–20 lines × 2) lore-revision/src/stage.rs:3326 — lore-revision/src/stage.rs:3326-3345 | lore-revision/src/stage.rs:3398-3416 — both copies are in the same file, so extract the block into 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–20 lines × 2) lore-server/src/grpc/handlers/repository_create.rs:58 — lore-server/src/grpc/handlers/repository_create.rs:58-77 | lore-server/src/grpc/repository/v1/repository_create.rs:141-159 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_create.rs` and `lore-server/src/grpc/repository/v1/repository_create.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (19–20 lines × 2) lore-storage/src/local/immutable_store.rs:6907 — lore-storage/src/local/immutable_store.rs:6907-6925 | lore-storage/src/local/mutable_store.rs:2429-2448 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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–19 lines × 2) · ×3
  • Duplicated block (18–19 lines × 2) lore-revision/src/file/reset.rs:1374 — lore-revision/src/file/reset.rs:1374-1391 | lore-revision/src/file/reset.rs:1514-1532 — both copies are in the same file, so extract the block into 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) lore-revision/src/stage.rs:3223 — lore-revision/src/stage.rs:3223-3240 | lore-revision/src/stage.rs:3758-3776 — both copies are in the same file, so extract the block into 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) lore-revision/src/stage.rs:3821 — lore-revision/src/stage.rs:3821-3838 | lore-revision/src/stage.rs:3866-3884 — both copies are in the same file, so extract the 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) · ×3
  • Duplicated block (15–17 lines × 2) lore-revision/src/commit.rs:2108 — lore-revision/src/commit.rs:2108-2122 | lore-revision/src/commit.rs:2595-2611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15–17 lines × 2) lore-revision/src/fs/realize.rs:2317 — lore-revision/src/fs/realize.rs:2317-2333 | lore-revision/src/fs/realize.rs:2635-2649 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15–17 lines × 2) lore-revision/src/repository/verify.rs:402 — lore-revision/src/repository/verify.rs:402-416 | lore-revision/src/repository/verify.rs:550-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.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×3
  • Duplicated block (14 lines × 3) lore-revision/src/branch/merge.rs:3299 — lore-revision/src/branch/merge.rs:3299-3312 | lore-revision/src/branch/merge.rs:3741-3755 | lore-revision/src/stage.rs:3138-3151 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/stage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 3) lore-revision/src/link/add.rs:424 — lore-revision/src/link/add.rs:424-437 | lore-revision/src/link/remove.rs:149-162 | lore-revision/src/link/update.rs:209-222 — before extracting anything, compare `lore-revision/src/link/add.rs` and `lore-revision/src/link/update.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 3) lore-server/src/grpc/forwarded_repository/v1/repository_create.rs:28 — lore-server/src/grpc/forwarded_repository/v1/repository_create.rs:28-41 | lore-server/src/grpc/forwarded_revision/v1/branch_create.rs:28-41 | lore-server/src/grpc/forwarded_revision/v1/branch_delete.rs:28-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×3
  • Duplicated block (9 lines × 3) lore-client/src/cli/commands/branch.rs:664 — lore-client/src/cli/commands/branch.rs:664-672 | lore-client/src/cli/commands/link.rs:297-305 | lore-client/src/cli/commands/revision.rs:714-722 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) lore-client/src/cli/commands/auth.rs:153 — lore-client/src/cli/commands/auth.rs:153-165 | lore-client/src/cli/commands/auth.rs:384-392 | lore-client/src/cli/commands/auth.rs:407-419 — 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) lore-storage/src/mutable_conformance.rs:341 — lore-storage/src/mutable_conformance.rs:341-349 | lore-storage/src/mutable_conformance.rs:459-467 | lore-storage/src/mutable_conformance.rs:480-488 — 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–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) lore-revision/src/state.rs:5991 — lore-revision/src/state.rs:5991-5998 | lore-revision/src/state.rs:6000-6006 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/immutable_store.rs:6874 — lore-storage/src/local/immutable_store.rs:6874-6880 | lore-storage/src/local/mutable_store.rs:2392-2399 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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–8 lines × 2) scripts/store-stress/stress.py:1335 — scripts/store-stress/stress.py:1335-1341 | scripts/store-stress/stress.py:1346-1353 — both copies are in the same file, so extract the 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 (6 lines × 4) · ×3
  • Duplicated block (6 lines × 4) lore-revision/src/file/stage.rs:1407 — lore-revision/src/file/stage.rs:1407-1412 | lore-revision/src/stage.rs:3165-3170 | lore-revision/src/stage.rs:3215-3220 | lore-revision/src/stage.rs:3431-3436 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 4) lore-server/src/protocol/replication_store/get.rs:54 — lore-server/src/protocol/replication_store/get.rs:54-59 | lore-server/src/protocol/replication_store/get_metadata.rs:50-55 | lore-server/src/protocol/replication_store/obliterate.rs:49-54 | lore-server/src/protocol/replication_store/put.rs:75-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (6 lines × 4) lore/src/revision_tree/add.rs:883 — lore/src/revision_tree/add.rs:883-888 | lore/src/revision_tree/delete.rs:573-578 | lore/src/revision_tree/modify.rs:373-378 | lore/src/revision_tree/move_node.rs:694-699 — before extracting anything, compare `lore/src/revision_tree/delete.rs` and `lore/src/revision_tree/modify.rs` as WHOLE FILES: this scan already matched 5 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.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×3
  • Untrusted text written into markup unescaped notices/third-party-notices.hbs:9 — `id` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped notices/third-party-notices.hbs:11 — `crate.name` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped notices/third-party-notices.hbs:12 — `../text` is text this program did not author, and it is written into the text of an element through Handlebars' raw `{{{ }}}` output with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
D1 · Cyclomatic Complexity · MetadataMigrator · ×2
  • MetadataMigrator::process_fragment (cyclomatic 16) lore-aws/src/store/immutable_store/metadata_migrator.rs:239 — MetadataMigrator::process_fragment has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • MetadataMigrator::fragment_stream_consumer (cyclomatic 16) lore-aws/src/store/immutable_store/metadata_migrator.rs:335 — MetadataMigrator::fragment_stream_consumer 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 · lore_io · ×2
  • lore_io::uring::reaper_loop (cognitive 20) lore-io/src/uring.rs:872 — lore_io::uring::reaper_loop has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • lore_io::iocp::reaper_loop (cognitive 17) lore-io/src/iocp.rs:907 — lore_io::iocp::reaper_loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StreamHandler · ×2
  • StreamHandler::handle_stream (cognitive 18) lore-server/src/quic/stream_handler.rs:502 — StreamHandler::handle_stream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • StreamHandler::handle_message (cognitive 16) lore-server/src/quic/stream_handler.rs:271 — StreamHandler::handle_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 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, 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.
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: OtelTokioRuntimeMetrics lore-server/src/telemetry/tokio_bridge.rs:29 — TooManyFields — 40 stored fields beside 2 methods. The bar is 30 stored fields; this is 10 over it, 1.33× 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: LoreCli lore-client/src/cli/cli.rs:28 — TooManyFields — 33 stored fields. The bar is 30 stored fields; this is 3 over it, 1.10× 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 vulnerability · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) lore-server/src/grpc/handlers/branch_create.rs:69 — lore-server/src/grpc/handlers/branch_create.rs:69-155 | lore-server/src/grpc/handlers/branch_delete.rs:39-101 | lore-server/src/grpc/handlers/branch_get.rs:29-50 | lore-server/src/grpc/handlers/branch_metadata_set.rs:96-190 | lore-server/src/grpc/handlers/branch_protect.rs:28-63 | lore-server/src/grpc/handlers/branch_unprotect.rs:28-62 — 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) lore-server/src/grpc/storage/v1/copy.rs:146 — lore-server/src/grpc/storage/v1/copy.rs:146-227 | lore-server/src/grpc/storage/v1/get.rs:111-186 | lore-server/src/grpc/storage/v1/get_metadata.rs:110-185 | lore-server/src/grpc/storage/v1/get_resolved.rs:135-262 | lore-server/src/grpc/storage/v1/put.rs:112-183 | lore-server/src/grpc/storage/v1/put_resolved.rs:171-298 — 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 (30 lines × 2) · ×2
  • Duplicated block (30 lines × 2) lore-revision/src/branch/merge.rs:4325 — lore-revision/src/branch/merge.rs:4325-4354 | lore-revision/src/branch/merge.rs:4714-4743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (30 lines × 2) lore-revision/src/history.rs:84 — lore-revision/src/history.rs:84-113 | lore-revision/src/history.rs:114-143 — both copies are in the same file, so extract the 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) · ×2
  • Duplicated block (25 lines × 2) lore-revision/src/state.rs:7904 — lore-revision/src/state.rs:7904-7928 | lore-revision/src/state.rs:7934-7958 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (25 lines × 2) lore-transport/src/quic/storage_service/client.rs:756 — lore-transport/src/quic/storage_service/client.rs:756-780 | lore-transport/src/quic/storage_service/client.rs:860-884 — both copies are in the same file, so extract the 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 (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) lore-revision/src/branch/merge.rs:4253 — lore-revision/src/branch/merge.rs:4253-4276 | lore-revision/src/branch/merge.rs:4613-4636 — both copies are in the same file, so extract the block into 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) lore/src/dependency.rs:113 — lore/src/dependency.rs:113-136 | lore/src/dependency.rs:221-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.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) lore-revision/src/branch/merge.rs:2410 — lore-revision/src/branch/merge.rs:2410-2432 | lore-revision/src/branch/merge.rs:2445-2467 — both copies are in the same file, so extract the block into 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) lore-revision/src/metadata/branch.rs:405 — lore-revision/src/metadata/branch.rs:405-427 | lore-revision/src/metadata/repository.rs:392-414 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) lore-storage/src/local/immutable_store.rs:6726 — lore-storage/src/local/immutable_store.rs:6726-6745 | lore-storage/src/local/mutable_store.rs:1766-1786 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (20–21 lines × 2) lore-storage/src/local/immutable_store.rs:6822 — lore-storage/src/local/immutable_store.rs:6822-6842 | lore-storage/src/local/mutable_store.rs:1869-1888 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) lore-revision/src/branch/merge.rs:3741 — lore-revision/src/branch/merge.rs:3741-3757 | lore-revision/src/stage.rs:3138-3153 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/stage.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (16–17 lines × 2) lore-storage/src/local/immutable_store.rs:5322 — lore-storage/src/local/immutable_store.rs:5322-5338 | lore-storage/src/local/immutable_store.rs:5384-5399 — both copies are in the same file, so extract the 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) lore-revision/src/layer.rs:1164 — lore-revision/src/layer.rs:1164-1175 | lore-revision/src/layer.rs:1188-1201 — both copies are in the same file, so extract the block into 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) lore-storage/src/local/immutable_store.rs:6624 — lore-storage/src/local/immutable_store.rs:6624-6635 | lore-storage/src/local/mutable_store.rs:1660-1673 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×2
  • Duplicated block (13 lines × 4) lore-client/src/cli/commands/file.rs:1025 — lore-client/src/cli/commands/file.rs:1025-1037 | lore-client/src/cli/commands/file.rs:1044-1056 | lore-client/src/cli/commands/revision.rs:2285-2297 | lore-client/src/cli/commands/revision.rs:2303-2315 — before extracting anything, compare `lore-client/src/cli/commands/file.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) lore-server/src/grpc/storage/v1/copy.rs:213 — lore-server/src/grpc/storage/v1/copy.rs:213-225 | lore-server/src/grpc/storage/v1/get.rs:172-184 | lore-server/src/grpc/storage/v1/get_metadata.rs:171-183 | lore-server/src/grpc/storage/v1/put.rs:169-181 — before extracting anything, compare `lore-server/src/grpc/storage/v1/get.rs` and `lore-server/src/grpc/storage/v1/get_metadata.rs` as WHOLE FILES: this scan already matched 5 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) lore-client/src/cli/commands/branch.rs:1044 — lore-client/src/cli/commands/branch.rs:1044-1055 | lore-client/src/cli/commands/branch.rs:1116-1127 | lore-client/src/cli/commands/revision.rs:1703-1714 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) lore-client/src/cli/commands/branch.rs:1156 — lore-client/src/cli/commands/branch.rs:1156-1167 | lore-client/src/cli/commands/revision.rs:1743-1754 | lore-client/src/cli/commands/revision.rs:2039-2050 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) lore-server/src/http/presigned/repository/redeem.rs:79 — lore-server/src/http/presigned/repository/redeem.rs:79-89 | lore-server/src/http/repositories/repository/contents/content/get_repository_content.rs:67-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11–12 lines × 2) lore-storage/src/local/immutable_store.rs:3035 — lore-storage/src/local/immutable_store.rs:3035-3045 | lore-storage/src/local/immutable_store.rs:3414-3425 — both copies are in the same file, so extract the 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 × 4) · ×2
  • Duplicated block (10 lines × 4) lore-server/src/grpc/handlers/repository_query.rs:109 — lore-server/src/grpc/handlers/repository_query.rs:109-118 | lore-server/src/grpc/handlers/repository_query.rs:179-188 | lore-server/src/grpc/repository/v1/repository_get.rs:185-194 | lore-server/src/grpc/repository/v1/repository_get.rs:254-263 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_query.rs` and `lore-server/src/grpc/repository/v1/repository_get.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 4) lore-server/src/quic/replication_store_service/server.rs:311 — lore-server/src/quic/replication_store_service/server.rs:311-320 | lore-server/src/quic/replication_store_service/server.rs:322-331 | lore-server/src/quic/replication_store_service/server.rs:357-366 | lore-server/src/quic/replication_store_service/server.rs:392-401 — 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 (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) lore-revision/src/state.rs:3286 — lore-revision/src/state.rs:3286-3294 | lore-revision/src/state.rs:3384-3393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) lore-storage/src/local/immutable_store.rs:6853 — lore-storage/src/local/immutable_store.rs:6853-6861 | lore-storage/src/local/mutable_store.rs:2363-2372 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) lore-storage/src/local/immutable_store.rs:3244 — lore-storage/src/local/immutable_store.rs:3244-3252 | lore-storage/src/local/immutable_store.rs:6179-6186 — both copies are in the same file, so extract the block into 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) lore/src/revision_tree/metadata_clear.rs:129 — lore/src/revision_tree/metadata_clear.rs:129-136 | lore/src/revision_tree/metadata_set.rs:162-170 — 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 (6–7 lines × 2) · ×2
  • Duplicated block (6–7 lines × 2) lore-io/src/uring.rs:344 — lore-io/src/uring.rs:344-349 | lore-io/src/uring.rs:399-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 (6–7 lines × 2) lore-storage/src/local/immutable_store.rs:1202 — lore-storage/src/local/immutable_store.rs:1202-1208 | lore-storage/src/local/mutable_store.rs:559-564 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D1 · Cyclomatic Complexity · LocalMutableStore · ×1
  • LocalMutableStore::flush_all (cyclomatic 44) lore-storage/src/local/mutable_store.rs:1587 — LocalMutableStore::flush_all has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stress.kill_loop (cyclomatic 29) · ×1
  • stress.kill_loop (cyclomatic 29) scripts/store-stress/stress.py:732 — stress.kill_loop 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.
D1 · Cyclomatic Complexity · lore_transport · ×1
  • lore_transport::connection::connect_impl (cyclomatic 25) lore-transport/src/connection.rs:377 — lore_transport::connection::connect_impl has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · content_tabs._render_group (cyclomatic 24) · ×1
  • content_tabs._render_group (cyclomatic 24) docs/assets/hooks/content_tabs.py:98 — content_tabs._render_group has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StorageServiceV4 · ×1
  • StorageServiceV4::run_request_handler (cyclomatic 23) lore-server/src/quic/storage_service_v4.rs:179 — StorageServiceV4::run_request_handler 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 · LocalLockStore · ×1
  • LocalLockStore::query_locks (cyclomatic 22) lore-server/src/lock/store.rs:82 — LocalLockStore::query_locks has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Campaign.parse_work (cyclomatic 22) · ×1
  • Campaign.parse_work (cyclomatic 22) scripts/store-stress/stress.py:352 — Campaign.parse_work 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 · SerialChunking · ×1
  • SerialChunking::resolve_into (cyclomatic 21) lore-transport/src/quic/chunking.rs:83 — SerialChunking::resolve_into 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 · JwkServiceImpl · ×1
  • JwkServiceImpl::fetch_new_keys (cyclomatic 20) lore-server/src/auth/jwk.rs:528 — JwkServiceImpl::fetch_new_keys has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StoreLock · ×1
  • StoreLock::acquire_at_gate (cyclomatic 19) lore-storage/src/local/store_lock.rs:659 — StoreLock::acquire_at_gate 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 · stress.report (cyclomatic 19) · ×1
  • stress.report (cyclomatic 19) scripts/store-stress/stress.py:512 — stress.report has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · RevisionMetadata · ×1
  • RevisionMetadata::from_metadata (cyclomatic 18) lore-revision/src/revision.rs:84 — RevisionMetadata::from_metadata 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 · CompositeStore · ×1
  • CompositeStore::query (cyclomatic 17) lore-revision/src/store/composite.rs:1131 — CompositeStore::query 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 · ImmutableStoreBucket · ×1
  • ImmutableStoreBucket::deserialize_file_content (cyclomatic 17) lore-storage/src/local/immutable_store.rs:1137 — ImmutableStoreBucket::deserialize_file_content 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 · stress.fault_sweep (cyclomatic 16) · ×1
  • stress.fault_sweep (cyclomatic 16) scripts/store-stress/stress.py:988 — stress.fault_sweep 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 · SerialChunking · ×1
  • SerialChunking::resolve_into (cognitive 72) lore-transport/src/quic/chunking.rs:83 — SerialChunking::resolve_into has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (62 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · stress.kill_loop (cognitive 63) · ×1
  • stress.kill_loop (cognitive 63) scripts/store-stress/stress.py:732 — stress.kill_loop has cognitive complexity 63 (threshold 15). Drivers by points: if/else 14 (40 pts), ternaries 3 (12 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · content_tabs._render_group (cognitive 40) · ×1
  • content_tabs._render_group (cognitive 40) docs/assets/hooks/content_tabs.py:98 — content_tabs._render_group has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 5 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stress.disk_full (cognitive 36) · ×1
  • stress.disk_full (cognitive 36) scripts/store-stress/stress.py:1061 — stress.disk_full has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (14 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stress.fault_sweep (cognitive 34) · ×1
  • stress.fault_sweep (cognitive 34) scripts/store-stress/stress.py:988 — stress.fault_sweep has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MutableStoreBucket · ×1
  • MutableStoreBucket::send_keys (cognitive 33) lore-storage/src/local/mutable_store.rs:873 — MutableStoreBucket::send_keys has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · type-sizes.parse (cognitive 33) · ×1
  • type-sizes.parse (cognitive 33) scripts/type-sizes.py:75 — type-sizes.parse has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (26 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.
D2 · Cognitive Complexity · LocalLockStore · ×1
  • LocalLockStore::query_locks (cognitive 32) lore-server/src/lock/store.rs:82 — LocalLockStore::query_locks has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (10 pts), boolean chains 4, match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DynamoDbLockStore · ×1
  • DynamoDbLockStore::unlock_resources (cognitive 31) lore-aws/src/store/lock_store.rs:571 — DynamoDbLockStore::unlock_resources has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 2 (4 pts), match/switch 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 · JwkServiceImpl · ×1
  • JwkServiceImpl::fetch_new_keys (cognitive 29) lore-server/src/auth/jwk.rs:528 — JwkServiceImpl::fetch_new_keys has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lore_error_set_macro · ×1
  • lore_error_set_macro::codegen::to_snake_case (cognitive 27) lore-error-set-macro/src/codegen.rs:31 — lore_error_set_macro::codegen::to_snake_case has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TaskQueue · ×1
  • TaskQueue::new (cognitive 25) lore-revision/src/util/task_queue.rs:146 — TaskQueue::new has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stress.report (cognitive 25) · ×1
  • stress.report (cognitive 25) scripts/store-stress/stress.py:512 — stress.report has cognitive complexity 25 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 5 (7 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyData · ×1
  • DependencyData::deserialize (cognitive 24) lore-revision/src/dependency/mod.rs:434 — DependencyData::deserialize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StageDescent · ×1
  • StageDescent::descend (cognitive 24) lore-revision/src/stage.rs:811 — StageDescent::descend has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · CompositeTopology · ×1
  • CompositeTopology::refresh_loop (cognitive 23) lore-server/src/topology/composite.rs:90 — CompositeTopology::refresh_loop has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 3 (7 pts), loops 4 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImmutableStoreGroup · ×1
  • ImmutableStoreGroup::flush_delayed (cognitive 23) lore-storage/src/local/immutable_store.rs:1623 — ImmutableStoreGroup::flush_delayed has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (2 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StoreLock · ×1
  • StoreLock::acquire_at_gate (cognitive 23) lore-storage/src/local/store_lock.rs:659 — StoreLock::acquire_at_gate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, match/switch 3 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · type-sizes.show (cognitive 23) · ×1
  • type-sizes.show (cognitive 23) scripts/type-sizes.py:244 — type-sizes.show has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PackStore · ×1
  • PackStore::store (cognitive 21) lore-storage/src/packstore.rs:882 — PackStore::store has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Staging · ×1
  • Staging::evict (cognitive 20) contrib/bazel/crates/rbe-worker/src/lib.rs:968 — Staging::evict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · attribute.main (cognitive 20) · ×1
  • attribute.main (cognitive 20) scripts/allocations/attribute.py:49 — attribute.main has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 4 (6 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Campaign.parse_work (cognitive 20) · ×1
  • Campaign.parse_work (cognitive 20) scripts/store-stress/stress.py:352 — Campaign.parse_work has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CasService · ×1
  • CasService::get_tree (cognitive 19) contrib/bazel/crates/rbe-server/src/cas.rs:424 — CasService::get_tree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stress.deterministic (cognitive 19) · ×1
  • stress.deterministic (cognitive 19) scripts/store-stress/stress.py:1176 — stress.deterministic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · LoreBlobStore · ×1
  • LoreBlobStore::get_batch (cognitive 18) contrib/bazel/crates/rbe-lore/src/lib.rs:559 — LoreBlobStore::get_batch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 4 (6 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lore_aws · ×1
  • lore_aws::observe_aws_operation_callback (cognitive 18) lore-aws/src/lib.rs:38 — lore_aws::observe_aws_operation_callback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lore_credential · ×1
  • lore_credential::token_store::refresh_user_token (cognitive 18) lore-credential/src/token_store.rs:1015 — lore_credential::token_store::refresh_user_token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FilterInstance · ×1
  • FilterInstance::step (cognitive 18) lore-revision/src/filter.rs:1037 — FilterInstance::step has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImmutableStoreBucket · ×1
  • ImmutableStoreBucket::deserialize_file_content (cognitive 18) lore-storage/src/local/immutable_store.rs:1137 — ImmutableStoreBucket::deserialize_file_content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RepositoryService · ×1
  • RepositoryService::list (cognitive 18) lore-transport/src/grpc/repository_client.rs:161 — RepositoryService::list has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (8 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThresholdSerialChunking · ×1
  • ThresholdSerialChunking::frame_chunk (cognitive 18) lore-transport/src/quic/chunking.rs:460 — ThresholdSerialChunking::frame_chunk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Resolver · ×1
  • Resolver::holds_local_change (cognitive 17) lore-revision/src/fs/hold.rs:279 — Resolver::holds_local_change has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · StorageService · ×1
  • StorageService::spawn_copy_stream (cognitive 17) lore-transport/src/grpc/storage_client.rs:1290 — StorageService::spawn_copy_stream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stress.shared_round (cognitive 17) · ×1
  • stress.shared_round (cognitive 17) scripts/store-stress/stress.py:1297 — stress.shared_round has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (5 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ByteStreamService · ×1
  • ByteStreamService::write (cognitive 16) contrib/bazel/crates/rbe-server/src/cas.rs:679 — ByteStreamService::write has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MountManager · ×1
  • MountManager::mounts_of_entries (cognitive 16) lore-revision/src/fs/swfs/mount_manager.rs:49 — MountManager::mounts_of_entries has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 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.
D2 · Cognitive Complexity · StorageServiceV4 · ×1
  • StorageServiceV4::run_request_handler (cognitive 16) lore-server/src/quic/storage_service_v4.rs:179 — StorageServiceV4::run_request_handler has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 4 (7 pts), boolean chains 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 · TelemetryInitializer · ×1
  • TelemetryInitializer::from_config (cognitive 16) lore-server/src/telemetry/mod.rs:113 — TelemetryInitializer::from_config has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnvironmentConfig · ×1
  • EnvironmentConfig::from (cognitive 16) lore-transport/src/grpc/environment_client.rs:21 — EnvironmentConfig::from has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · content_tabs._transform (cognitive 16) · ×1
  • content_tabs._transform (cognitive 16) docs/assets/hooks/content_tabs.py:57 — content_tabs._transform has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stress.multi_process (cognitive 16) · ×1
  • stress.multi_process (cognitive 16) scripts/store-stress/stress.py:1209 — stress.multi_process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: lore_storage::local::fan_out lore-storage/src/local/fan_out.rs:96 — TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 30 shared lines) · ×1
  • Near-duplicate member family (4 members, 30 shared lines) lore-client/src/cli/commands/branch.rs:1704 — lore-client/src/cli/commands/branch.rs:1704-1754 | lore-client/src/cli/commands/file.rs:1062-1115 | lore-client/src/cli/commands/repository.rs:1601-1650 | lore-client/src/cli/commands/revision.rs:2321-2366 — These 4 members are variants of one another: a block of 30 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 39 shared lines) · ×1
  • Near-duplicate member family (3 members, 39 shared lines) lore-server/src/grpc/storage_service.rs:120 — lore-server/src/grpc/storage_service.rs:120-243 | lore-server/src/grpc/storage_service.rs:265-412 | lore-server/src/grpc/storage_service.rs:480-645 — These 3 members are variants of one another: a block of 39 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (132 shared lines) · ×1
  • Near-duplicate member pair (132 shared lines) lore-storage/src/local/immutable_store.rs:6585 — lore-storage/src/local/immutable_store.rs:6585-6842 | lore-storage/src/local/mutable_store.rs:1591-1911 — These two members are variants of one another: 132 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 (126 shared lines) · ×1
  • Near-duplicate member pair (126 shared lines) lore-transport/src/auth/exchange.rs:277 — lore-transport/src/auth/exchange.rs:277-422 | lore-transport/src/auth/exchange.rs:440-588 — These two members are variants of one another: 126 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 (119 shared lines) · ×1
  • Near-duplicate member pair (119 shared lines) lore-revision/src/branch/merge.rs:4189 — lore-revision/src/branch/merge.rs:4189-4354 | lore-revision/src/branch/merge.rs:4365-4743 — These two members are variants of one another: 119 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 (103 shared lines) · ×1
  • Near-duplicate member pair (103 shared lines) lore-storage/src/compress.rs:709 — lore-storage/src/compress.rs:709-836 | lore-storage/src/compress.rs:842-962 — These two members are variants of one another: 103 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 (60 shared lines) · ×1
  • Near-duplicate member pair (60 shared lines) lore-storage/src/local/immutable_store.rs:1931 — lore-storage/src/local/immutable_store.rs:1931-2085 | lore-storage/src/local/mutable_store.rs:978-1102 — 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 (55 shared lines) · ×1
  • Near-duplicate member pair (55 shared lines) lore-storage/src/local/immutable_store.rs:6852 — lore-storage/src/local/immutable_store.rs:6852-6925 | lore-storage/src/local/mutable_store.rs:2362-2448 — These two members are variants of one another: 55 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) lore-revision/src/revision/cherry_pick.rs:146 — lore-revision/src/revision/cherry_pick.rs:146-267 | lore-revision/src/revision/revert.rs:142-254 — 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 (41 shared lines) · ×1
  • Near-duplicate member pair (41 shared lines) lore-revision/src/state.rs:960 — lore-revision/src/state.rs:960-1078 | lore-revision/src/state.rs:1087-1179 — These two members are variants of one another: 41 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (40 shared lines) · ×1
  • Near-duplicate member pair (40 shared lines) lore-revision/src/link/remove.rs:39 — lore-revision/src/link/remove.rs:39-171 | lore-revision/src/link/update.rs:34-231 — These two members are variants of one another: 40 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 · Duplicated block (62 lines × 2) · ×1
  • Duplicated block (62 lines × 2) lore-storage/src/compress.rs:762 — lore-storage/src/compress.rs:762-823 | lore-storage/src/compress.rs:894-955 — both copies are in the same file, so extract the 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 (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) lore-transport/src/auth/exchange.rs:370 — lore-transport/src/auth/exchange.rs:370-422 | lore-transport/src/auth/exchange.rs:536-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.
D4 · Code Duplication · Duplicated block (48–50 lines × 2) · ×1
  • Duplicated block (48–50 lines × 2) lore-transport/src/auth/exchange.rs:317 — lore-transport/src/auth/exchange.rs:317-366 | lore-transport/src/auth/exchange.rs:485-532 — both copies are in the same file, so extract the 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 (39–41 lines × 2) · ×1
  • Duplicated block (39–41 lines × 2) lore-server/src/grpc/handlers/repository_create.rs:262 — lore-server/src/grpc/handlers/repository_create.rs:262-302 | lore-server/src/grpc/repository/v1/repository_create.rs:316-354 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_create.rs` and `lore-server/src/grpc/repository/v1/repository_create.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (39–40 lines × 2) · ×1
  • Duplicated block (39–40 lines × 2) lore-revision/src/commit.rs:1915 — lore-revision/src/commit.rs:1915-1954 | lore-revision/src/commit.rs:3074-3112 — both copies are in the same file, so extract the 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 (38–39 lines × 2) · ×1
  • Duplicated block (38–39 lines × 2) lore-server/src/grpc/handlers/repository_query.rs:111 — lore-server/src/grpc/handlers/repository_query.rs:111-149 | lore-server/src/grpc/repository/v1/repository_get.rs:187-224 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_query.rs` and `lore-server/src/grpc/repository/v1/repository_get.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) lore-storage/src/local/immutable_store.rs:1672 — lore-storage/src/local/immutable_store.rs:1672-1708 | lore-storage/src/local/mutable_store.rs:1527-1563 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (30–33 lines × 2) · ×1
  • Duplicated block (30–33 lines × 2) lore-transport/src/auth/exchange.rs:660 — lore-transport/src/auth/exchange.rs:660-692 | lore-transport/src/auth/exchange.rs:822-851 — both copies are in the same file, so extract the 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 (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) lore-server/src/grpc/revision/v1/service.rs:99 — lore-server/src/grpc/revision/v1/service.rs:99-129 | lore-server/src/grpc/revision_service.rs:79-109 — before extracting anything, compare `lore-server/src/grpc/revision/v1/service.rs` and `lore-server/src/grpc/revision_service.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) lore-revision/src/util/fs.rs:594 — lore-revision/src/util/fs.rs:594-622 | lore-revision/src/util/fs.rs:709-735 — both copies are in the same file, so extract the 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 (26–27 lines × 3) · ×1
  • Duplicated block (26–27 lines × 3) lore-revision/src/state.rs:8176 — lore-revision/src/state.rs:8176-8201 | lore-revision/src/state.rs:8239-8264 | lore-revision/src/state.rs:8275-8301 — 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 (21–27 lines × 2) · ×1
  • Duplicated block (21–27 lines × 2) lore-server/src/grpc/handlers/branch_push.rs:201 — lore-server/src/grpc/handlers/branch_push.rs:201-221 | lore-server/src/grpc/revision/v1/branch_push.rs:93-119 — 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 (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) lore-server/src/grpc/handlers/repository_query.rs:181 — lore-server/src/grpc/handlers/repository_query.rs:181-207 | lore-server/src/grpc/repository/v1/repository_get.rs:256-281 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_query.rs` and `lore-server/src/grpc/repository/v1/repository_get.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 83 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) lore-storage/src/compress.rs:732 — lore-storage/src/compress.rs:732-758 | lore-storage/src/compress.rs:864-890 — both copies are in the same file, so extract the 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 (26 lines × 3) · ×1
  • Duplicated block (26 lines × 3) lore-server/src/grpc/handlers/branch_metadata_set.rs:64 — lore-server/src/grpc/handlers/branch_metadata_set.rs:64-89 | lore-server/src/grpc/handlers/repository_metadata_set.rs:64-89 | lore-server/src/grpc/repository/v1/repository_metadata_set.rs:176-201 — before extracting anything, compare `lore-server/src/grpc/handlers/branch_metadata_set.rs` and `lore-server/src/grpc/handlers/repository_metadata_set.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (23–26 lines × 2) · ×1
  • Duplicated block (23–26 lines × 2) lore-revision/src/dependency/mod.rs:703 — lore-revision/src/dependency/mod.rs:703-725 | lore-revision/src/metadata/set.rs:235-260 — 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 (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) lore-revision/src/state.rs:5893 — lore-revision/src/state.rs:5893-5917 | lore-revision/src/state.rs:5919-5944 — both copies are in the same file, so extract the 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 (23–25 lines × 4) · ×1
  • Duplicated block (23–25 lines × 4) lore-client/src/cli/commands/branch.rs:1709 — lore-client/src/cli/commands/branch.rs:1709-1731 | lore-client/src/cli/commands/file.rs:1066-1090 | lore-client/src/cli/commands/repository.rs:1606-1628 | lore-client/src/cli/commands/revision.rs:2324-2346 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/file.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–24 lines × 2) · ×1
  • Duplicated block (20–24 lines × 2) lore-revision/src/revision/cherry_pick.rs:163 — lore-revision/src/revision/cherry_pick.rs:163-182 | lore-revision/src/revision/revert.rs:154-177 — before extracting anything, compare `lore-revision/src/revision/cherry_pick.rs` and `lore-revision/src/revision/revert.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–23 lines × 2) · ×1
  • Duplicated block (19–23 lines × 2) lore-revision/src/branch.rs:2206 — lore-revision/src/branch.rs:2206-2224 | lore-revision/src/branch.rs:2285-2307 — both copies are in the same file, so extract the 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–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) lore-server/src/grpc/handlers/repository_metadata_set.rs:107 — lore-server/src/grpc/handlers/repository_metadata_set.rs:107-129 | lore-server/src/grpc/repository/v1/repository_metadata_set.rs:59-80 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_metadata_set.rs` and `lore-server/src/grpc/repository/v1/repository_metadata_set.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) lore-server/src/grpc/handlers/branch_metadata_set.rs:35 — lore-server/src/grpc/handlers/branch_metadata_set.rs:35-56 | lore-server/src/grpc/handlers/repository_metadata_set.rs:35-56 | lore-server/src/grpc/repository/v1/repository_metadata_set.rs:147-168 — before extracting anything, compare `lore-server/src/grpc/handlers/branch_metadata_set.rs` and `lore-server/src/grpc/handlers/repository_metadata_set.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) lore-storage/src/local/immutable_store.rs:2062 — lore-storage/src/local/immutable_store.rs:2062-2081 | lore-storage/src/local/mutable_store.rs:1079-1100 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (19–21 lines × 3) · ×1
  • Duplicated block (19–21 lines × 3) lore-server/src/grpc/storage_service.rs:121 — lore-server/src/grpc/storage_service.rs:121-139 | lore-server/src/grpc/storage_service.rs:266-286 | lore-server/src/grpc/storage_service.rs:481-500 — 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 (18–20 lines × 3) · ×1
  • Duplicated block (18–20 lines × 3) lore-revision/src/branch/merge.rs:2382 — lore-revision/src/branch/merge.rs:2382-2399 | lore-revision/src/branch/merge.rs:2413-2432 | lore-revision/src/branch/merge.rs:2448-2467 — 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 (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) lore-server/src/cache/revision.rs:155 — lore-server/src/cache/revision.rs:155-173 | lore-server/src/cache/revision.rs:210-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–19 lines × 2) · ×1
  • Duplicated block (15–19 lines × 2) lore-server/src/grpc/thinclient/v1/helpers.rs:176 — lore-server/src/grpc/thinclient/v1/helpers.rs:176-190 | lore-server/src/grpc/thinclient/v1/revision_info.rs:86-104 — before extracting anything, compare `lore-server/src/grpc/thinclient/v1/helpers.rs` and `lore-server/src/grpc/thinclient/v1/revision_info.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.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×1
  • Duplicated block (16–19 lines × 2) lore-storage/src/packstore.rs:780 — lore-storage/src/packstore.rs:780-795 | lore-storage/src/packstore.rs:828-846 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) lore-revision/src/metadata/get.rs:20 — lore-revision/src/metadata/get.rs:20-37 | lore-revision/src/metadata/get.rs:61-78 | lore-revision/src/metadata/list.rs:19-36 | lore-revision/src/metadata/list.rs:50-67 — 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 (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) lore-revision/src/util/fs.rs:565 — lore-revision/src/util/fs.rs:565-580 | lore-revision/src/util/fs.rs:674-691 — both copies are in the same file, so extract the 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 × 6) · ×1
  • Duplicated block (15–17 lines × 6) lore-server/src/grpc/storage/v1/copy.rs:151 — lore-server/src/grpc/storage/v1/copy.rs:151-165 | lore-server/src/grpc/storage/v1/get.rs:113-128 | lore-server/src/grpc/storage/v1/get_metadata.rs:112-127 | lore-server/src/grpc/storage/v1/get_resolved.rs:137-152 | lore-server/src/grpc/storage/v1/put.rs:114-130 | lore-server/src/grpc/storage/v1/put_resolved.rs:173-188 — before extracting anything, compare `lore-server/src/grpc/storage/v1/get.rs` and `lore-server/src/grpc/storage/v1/get_metadata.rs` as WHOLE FILES: this scan already matched 5 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.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) lore-server/src/grpc/handlers/repository_metadata_get.rs:40 — lore-server/src/grpc/handlers/repository_metadata_get.rs:40-56 | lore-server/src/grpc/handlers/repository_metadata_set.rs:110-126 | lore-server/src/grpc/repository/v1/repository_metadata_get.rs:44-60 | lore-server/src/grpc/repository/v1/repository_metadata_set.rs:62-78 — before extracting anything, compare `lore-server/src/grpc/handlers/repository_metadata_set.rs` and `lore-server/src/grpc/repository/v1/repository_metadata_set.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) lore-transport/src/connection.rs:1273 — lore-transport/src/connection.rs:1273-1289 | lore-transport/src/connection.rs:1306-1322 | lore-transport/src/connection.rs:1329-1345 — 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 (15–16 lines × 4) · ×1
  • Duplicated block (15–16 lines × 4) lore-revision/src/branch/merge.rs:2384 — lore-revision/src/branch/merge.rs:2384-2398 | lore-revision/src/branch/merge.rs:2415-2430 | lore-revision/src/branch/merge.rs:2450-2465 | lore-revision/src/branch/merge.rs:4213-4227 — 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–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) lore-server/src/grpc/storage_service.rs:152 — lore-server/src/grpc/storage_service.rs:152-164 | lore-server/src/grpc/storage_service.rs:299-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 5) · ×1
  • Duplicated block (14 lines × 5) lore-client/src/cli/commands/file.rs:1856 — lore-client/src/cli/commands/file.rs:1856-1869 | lore-client/src/cli/commands/file.rs:1906-1919 | lore-client/src/cli/commands/file.rs:1974-1987 | lore-client/src/cli/commands/link.rs:170-183 | lore-client/src/cli/commands/link.rs:203-216 — 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.
D4 · Code Duplication · Duplicated block (11–14 lines × 5) · ×1
  • Duplicated block (11–14 lines × 5) lore-server/src/grpc/storage_service.rs:419 — lore-server/src/grpc/storage_service.rs:419-430 | lore-server/src/grpc/storage_service.rs:652-665 | lore-server/src/grpc/storage_service.rs:707-717 | lore-server/src/grpc/storage_service.rs:752-762 | lore-server/src/grpc/storage_service.rs:790-800 — 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) lore-client/src/cli/commands/branch.rs:664 — lore-client/src/cli/commands/branch.rs:664-676 | lore-client/src/cli/commands/revision.rs:587-600 | lore-client/src/cli/commands/revision.rs:714-727 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) lore-client/src/cli/commands/branch.rs:1571 — lore-client/src/cli/commands/branch.rs:1571-1583 | lore-client/src/cli/commands/branch.rs:1598-1610 | lore-client/src/cli/commands/branch.rs:1629-1641 — 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 (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) lore-storage/src/local/immutable_store.rs:6891 — lore-storage/src/local/immutable_store.rs:6891-6901 | lore-storage/src/local/mutable_store.rs:2414-2426 — before extracting anything, compare `lore-storage/src/local/immutable_store.rs` and `lore-storage/src/local/mutable_store.rs` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 377 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (10–12 lines × 11) · ×1
  • Duplicated block (10–12 lines × 11) lore-client/src/cli/commands/branch.rs:1249 — lore-client/src/cli/commands/branch.rs:1249-1258 | lore-client/src/cli/commands/branch.rs:1271-1280 | lore-client/src/cli/commands/branch.rs:1290-1299 | lore-client/src/cli/commands/branch.rs:1766-1777 | lore-client/src/cli/commands/repository.rs:1664-1675 | lore-client/src/cli/commands/revision.rs:1850-1859 | lore-client/src/cli/commands/revision.rs:1939-1948 | lore-client/src/cli/commands/revision.rs:1962-1971 | lore-client/src/cli/commands/revision.rs:2139-2148 | lore-client/src/cli/commands/revision.rs:2221-2230 | lore-client/src/cli/commands/revision.rs:2243-2252 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/repository.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 4) · ×1
  • Duplicated block (11–12 lines × 4) lore-client/src/cli/commands/branch.rs:1692 — lore-client/src/cli/commands/branch.rs:1692-1702 | lore-client/src/cli/commands/repository.rs:1586-1596 | lore-client/src/cli/commands/revision.rs:1745-1756 | lore-client/src/cli/commands/revision.rs:2041-2052 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/repository.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) lore-server/src/grpc/handlers/branch_create.rs:89 — lore-server/src/grpc/handlers/branch_create.rs:89-100 | lore-server/src/grpc/handlers/branch_delete.rs:48-58 | lore-server/src/grpc/revision/v1/branch_delete.rs:105-115 — 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–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) lore-storage/src/write.rs:477 — lore-storage/src/write.rs:477-488 | lore-storage/src/write.rs:500-509 — both copies are in the same file, so extract the 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–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) lore-revision/src/commit.rs:1770 — lore-revision/src/commit.rs:1770-1780 | lore-revision/src/commit.rs:3150-3158 — both copies are in the same file, so extract the 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–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) lore-revision/src/link/add.rs:104 — lore-revision/src/link/add.rs:104-114 | lore-revision/src/link/add.rs:139-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 29) · ×1
  • Duplicated block (10 lines × 29) lore-client/src/cli/commands/branch.rs:637 — lore-client/src/cli/commands/branch.rs:637-647 | lore-client/src/cli/commands/branch.rs:811-821 | lore-client/src/cli/commands/branch.rs:1160-1170 | lore-client/src/cli/commands/branch.rs:1251-1261 | lore-client/src/cli/commands/branch.rs:1273-1283 | lore-client/src/cli/commands/branch.rs:1292-1302 | lore-client/src/cli/commands/branch.rs:1330-1340 | lore-client/src/cli/commands/branch.rs:1549-1559 | lore-client/src/cli/commands/branch.rs:1576-1586 | lore-client/src/cli/commands/branch.rs:1603-1613 | lore-client/src/cli/commands/branch.rs:1634-1644 | lore-client/src/cli/commands/branch.rs:1665-1675 | lore-client/src/cli/commands/file.rs:1007-1017 | lore-client/src/cli/commands/file.rs:1030-1039 | lore-client/src/cli/commands/repository.rs:1100-1110 | lore-client/src/cli/commands/repository.rs:1398-1408 | lore-client/src/cli/commands/repository.rs:1825-1835 | lore-client/src/cli/commands/revision.rs:1574-1584 | lore-client/src/cli/commands/revision.rs:1609-1619 | lore-client/src/cli/commands/revision.rs:1782-1792 | lore-client/src/cli/commands/revision.rs:1852-1862 | lore-client/src/cli/commands/revision.rs:1941-1951 | lore-client/src/cli/commands/revision.rs:1964-1974 | lore-client/src/cli/commands/revision.rs:2078-2088 | lore-client/src/cli/commands/revision.rs:2141-2151 | lore-client/src/cli/commands/revision.rs:2223-2233 | lore-client/src/cli/commands/revision.rs:2245-2255 | lore-client/src/cli/commands/revision.rs:2268-2278 | lore-client/src/cli/commands/revision.rs:2290-2299 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/file.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×1
  • Duplicated block (10 lines × 6) lore-server/src/quic/storage_service.rs:88 — lore-server/src/quic/storage_service.rs:88-97 | lore-server/src/quic/storage_service.rs:101-110 | lore-server/src/quic/storage_service.rs:114-123 | lore-server/src/quic/storage_service.rs:151-160 | lore-server/src/quic/storage_service.rs:200-209 | lore-server/src/quic/storage_service.rs:213-222 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) lore-revision/src/link/add.rs:254 — lore-revision/src/link/add.rs:254-262 | lore-revision/src/link/info.rs:41-50 | lore-revision/src/link/remove.rs:50-59 | lore-revision/src/link/update.rs:45-54 — before extracting anything, compare `lore-revision/src/link/add.rs` and `lore-revision/src/link/update.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–10 lines × 4) · ×1
  • Duplicated block (7–10 lines × 4) lore-server/src/grpc/storage/v1/mutable_compare_and_swap.rs:28 — lore-server/src/grpc/storage/v1/mutable_compare_and_swap.rs:28-34 | lore-server/src/grpc/storage/v1/mutable_load.rs:29-35 | lore-server/src/grpc/storage/v1/mutable_store.rs:27-33 | lore-server/src/grpc/storage/v1/verify.rs:28-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) lore-server/src/quic/replication_store_service/server.rs:289 — lore-server/src/quic/replication_store_service/server.rs:289-297 | lore-server/src/quic/replication_store_service/server.rs:301-309 | lore-server/src/quic/replication_store_service/server.rs:335-343 | lore-server/src/quic/replication_store_service/server.rs:347-355 | lore-server/src/quic/replication_store_service/server.rs:370-378 | lore-server/src/quic/replication_store_service/server.rs:382-390 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) lore-client/src/cli/commands/branch.rs:1047 — lore-client/src/cli/commands/branch.rs:1047-1055 | lore-client/src/cli/commands/branch.rs:1119-1127 | lore-client/src/cli/commands/revision.rs:1624-1632 | lore-client/src/cli/commands/revision.rs:1706-1714 — before extracting anything, compare `lore-client/src/cli/commands/branch.rs` and `lore-client/src/cli/commands/revision.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) lore-storage/src/conformance.rs:510 — lore-storage/src/conformance.rs:510-518 | lore-storage/src/conformance.rs:721-728 | lore-storage/src/conformance.rs:754-761 — 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–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) lore-storage/src/conformance.rs:512 — lore-storage/src/conformance.rs:512-519 | lore-storage/src/conformance.rs:723-729 | lore-storage/src/conformance.rs:756-762 | lore-storage/src/conformance.rs:981-987 — 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 (4–7 lines × 5) · ×1
  • Duplicated block (4–7 lines × 5) lore-server/src/grpc/handlers/branch_diff.rs:42 — lore-server/src/grpc/handlers/branch_diff.rs:42-45 | lore-server/src/grpc/handlers/revision_diff.rs:37-40 | lore-server/src/grpc/handlers/revision_tree.rs:36-39 | lore-server/src/grpc/thinclient/v1/revision_diff.rs:122-128 | lore-server/src/grpc/thinclient/v1/revision_tree.rs:61-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) lore-server/src/grpc/handlers/branch_create.rs:70 — lore-server/src/grpc/handlers/branch_create.rs:70-75 | lore-server/src/grpc/handlers/branch_delete.rs:40-44 | lore-server/src/grpc/handlers/branch_get.rs:30-34 | lore-server/src/grpc/handlers/branch_metadata_set.rs:97-102 | lore-server/src/grpc/handlers/branch_protect.rs:29-33 | lore-server/src/grpc/handlers/branch_unprotect.rs:29-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 all 6 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) lore/src/revision_tree/add.rs:480 — lore/src/revision_tree/add.rs:480-484 | lore/src/revision_tree/delete.rs:186-190 | lore/src/revision_tree/metadata_clear.rs:129-133 | lore/src/revision_tree/metadata_set.rs:162-166 | lore/src/revision_tree/modify.rs:178-182 — before extracting anything, compare `lore/src/revision_tree/delete.rs` and `lore/src/revision_tree/modify.rs` as WHOLE FILES: this scan already matched 5 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 (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) lore-revision/src/branch/merge.rs:3118 — lore-revision/src/branch/merge.rs:3118-3125 | lore-revision/src/branch/merge.rs:3837-3841 | lore-revision/src/revision/cherry_pick.rs:297-304 | lore-revision/src/revision/revert.rs:277-281 — before extracting anything, compare `lore-revision/src/revision/cherry_pick.rs` and `lore-revision/src/revision/revert.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) lore-server/src/grpc/repository/v1/repository_create.rs:101 — lore-server/src/grpc/repository/v1/repository_create.rs:101-113 | lore-server/src/grpc/repository/v1/repository_get.rs:88-100 | lore-server/src/grpc/revision/v1/branch_create.rs:103-115 | lore-server/src/grpc/revision/v1/branch_delete.rs:76-88 | lore-server/src/grpc/revision/v1/branch_list.rs:84-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • Duplicated block (7 lines × 7) lore/src/revision_tree/add.rs:136 — lore/src/revision_tree/add.rs:136-142 | lore/src/revision_tree/delete.rs:121-127 | lore/src/revision_tree/metadata_clear.rs:101-107 | lore/src/revision_tree/metadata_get.rs:121-127 | lore/src/revision_tree/metadata_set.rs:118-124 | lore/src/revision_tree/modify.rs:126-132 | lore/src/revision_tree/move_node.rs:134-140 — before extracting anything, compare `lore/src/revision_tree/delete.rs` and `lore/src/revision_tree/modify.rs` as WHOLE FILES: this scan already matched 5 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 × 8) · ×1
  • Duplicated block (11 lines × 8) lore-server/src/quic/storage_service.rs:74 — lore-server/src/quic/storage_service.rs:74-84 | lore-server/src/quic/storage_service.rs:125-135 | lore-server/src/quic/storage_service.rs:137-147 | lore-server/src/quic/storage_service.rs:162-172 | lore-server/src/quic/storage_service.rs:174-184 | lore-server/src/quic/storage_service.rs:186-196 | lore-server/src/quic/storage_service.rs:226-236 | lore-server/src/quic/storage_service.rs:238-248 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: lore-base — lore-base: abstractness 0.06, instability 0.20, distance 0.74 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
Minor — 156 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging lore-server/src/server.rs:219 — `info!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:251 — `error!` at line 251 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:255 — `error!` at line 255 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:272 — `info!` at line 272 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:279 — `error!` at line 279 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:280 — `error!` at line 280 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:288 — `warn!` at line 288 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:476 — `info!` at line 476 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:619 — `info!` at line 619 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:734 — `info!` at line 734 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1404 — `info!` at line 1404 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1418 — `info!` at line 1418 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1475 — `info!` at line 1475 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1727 — `warn!` at line 1727 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1741 — `info!` at line 1741 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1748 — `warn!` at line 1748 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1752 — `warn!` at line 1752 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:1975 — `info!` at line 1975 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:2028 — `info!` at line 2028 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:2032 — `info!` at line 2032 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:2139 — `info!` at line 2139 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:2351 — `info!` at line 2351 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:2528 — `trace!` at line 2528 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:2531 — `debug!` at line 2531 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging lore-server/src/server.rs:2534 — `info!` at line 2534 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
D7 · Architectural Integrity · Classify ADR enforcement · ×26
  • Classify ADR enforcement: ADR-00001: Use FastCDC, a well-documented content-defined chunking strategy docs/developing/decisions/00001-fast-cdc.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00002: Use mutable store for branch tracking docs/developing/decisions/00002-branch-tracking-in-mutable-store.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00003: Auth tokens for sub-repos docs/developing/decisions/00003-auth-tokens-for-sub-repos.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00004: S3 storage options docs/developing/decisions/00004-s3-storage-options.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00005: Web server frameworks for Rust docs/developing/decisions/00005-web-framework.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00006: Reconsider S3 storage model docs/developing/decisions/00006-s3-storage-options-reconsidered.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00007: AWS mutable store options docs/developing/decisions/00007-aws-mutable-store-options.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00008: Optimize AWS store fragment association lookups docs/developing/decisions/00008-aws-store-fragment-associations.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00009: Lore library JavaScript binding options docs/developing/decisions/00009-lore-library-js-bindings.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00010: Increasing fragment max size docs/developing/decisions/00010-fragment-max-size.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00011: CLI frontend decisions docs/developing/decisions/00011-lore-cli-frontend.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00012: Log dispatch in core library docs/developing/decisions/00012-log-dispatch.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00013: Plugin dependency strategy for Lore Server modularization docs/developing/decisions/00013-plugin-dependency-strategy.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00014: Use mutable store for anchor tracking docs/developing/decisions/00014-anchor-tracking-in-mutable-store.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00015: Log macro separation into lore-log crate with callback dispatch docs/developing/decisions/00015-log-crate-separation.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00016: Switch default compression to Zstd level 6 docs/developing/decisions/00016-compression-algorithm-selection.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00017: FFI error detail on the Complete event docs/developing/decisions/00017-ffi-error-detail-on-complete-event.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00018: External instance directory registry docs/developing/decisions/00018-external-instance-directory-registry.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00019: Portable aarch64 Linux build, with Neoverse V1 tuning opt-in docs/developing/decisions/00019-portable-arm-build-with-neoverse-512tvb-opt-in.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00020: Store fragment metadata as S3 object metadata docs/developing/decisions/00020-fragment-metadata-on-s3-objects.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00020: Full error detail on the storage per-item events docs/developing/decisions/00020-storage-per-item-error-detail.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00021: View-independent merges, subtree adoption, and out-of-view conflicts docs/developing/decisions/00021-view-independent-merges-and-subtree-grafting.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00022: Bitcode as the only encoding between a client and the Lore service docs/developing/decisions/00022-service-ipc-bitcode.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00023: Data verification and trust contracts docs/developing/decisions/00023-data-verification-and-trust.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: ADR-00024: Store locks held while a store is in use, with the repository lock taken inside them docs/developing/decisions/00024-store-locks-held-per-span-contain-the-repository-lock.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • + 1 more in this group — see findings.md.
D20 · ADR Quality · ADR lacks an enforcement field · ×24
  • ADR lacks an enforcement field docs/developing/decisions/00003-auth-tokens-for-sub-repos.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00004-s3-storage-options.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00005-web-framework.md:9 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00006-s3-storage-options-reconsidered.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00007-aws-mutable-store-options.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00008-aws-store-fragment-associations.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00009-lore-library-js-bindings.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00010-fragment-max-size.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00011-lore-cli-frontend.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00012-log-dispatch.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00013-plugin-dependency-strategy.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00014-anchor-tracking-in-mutable-store.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00015-log-crate-separation.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00016-compression-algorithm-selection.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00017-ffi-error-detail-on-complete-event.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00018-external-instance-directory-registry.md:6 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00019-portable-arm-build-with-neoverse-512tvb-opt-in.md:11 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00020-fragment-metadata-on-s3-objects.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00020-storage-per-item-error-detail.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00021-view-independent-merges-and-subtree-grafting.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00022-service-ipc-bitcode.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00023-data-verification-and-trust.md:7 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00024-store-locks-held-per-span-contain-the-repository-lock.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
  • ADR lacks an enforcement field docs/developing/decisions/00025-service-version-compatibility.md:8 — Add an `enforcement:` frontmatter field or a plain `Enforcement:` header line (prose/test/analyzer/not-applicable) to make the rung explicit — the other ADRs in this repo already declare one.
X10 · Duplicated predicate · Duplicated predicate · ×18
  • Duplicated predicate lore-revision/src/branch/merge.rs:764 — `!has_conflicts && !dry_run && !options.no_commit` appears character-identically in 3 files — lore-revision/src/branch/merge.rs, lore-revision/src/revision/cherry_pick.rs, lore-revision/src/revision/revert.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/commit.rs:706 — `!layer.staged.is_zero() && layer.staged != layer.current` appears character-identically in 2 files — lore-revision/src/commit.rs, lore-revision/src/repository.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/store/composite.rs:229 — `!resolved.stored_durable || resolved.partition.is_zero()` appears character-identically in 2 files — lore-revision/src/store/composite.rs, lore-storage/src/write.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-server/src/grpc/handlers/repository_create.rs:166 — `Context::from_str(name) && !name_id.is_zero() && RepositoryId::from(name_id) != repository.id` appears character-identically in 2 files — lore-server/src/grpc/handlers/repository_create.rs, lore-server/src/grpc/repository/v1/repository_create.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/repository/clone.rs:1014 — `call.force() && !existing_repository_is_swfs` appears character-identically in 2 files — lore-revision/src/repository/clone.rs, lore-revision/src/repository/create.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-server/src/grpc/handlers/branch_metadata_set.rs:41 — `current_type != proposed_type || current_bytes != proposed_bytes` appears character-identically in 3 files — lore-server/src/grpc/handlers/branch_metadata_set.rs, lore-server/src/grpc/handlers/repository_metadata_set.rs, lore-server/src/grpc/repository/v1/repository_metadata_set.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-server/src/http/presigned/repository/redeem.rs:71 — `e.is_address_not_found() || e.is_payload_not_found()` appears character-identically in 2 files — lore-server/src/http/presigned/repository/redeem.rs, lore-server/src/http/repositories/repository/contents/content/get_repository_content.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore/src/storage/mutable_compare_and_swap.rs:97 — `effective.no_local && store.remote.is_none()` appears character-identically in 3 files — lore/src/storage/mutable_compare_and_swap.rs, lore/src/storage/mutable_load.rs, lore/src/storage/mutable_store.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-transport/src/auth/exchange.rs:684 — `identity_token.is_empty() && access_token.is_empty()` appears character-identically in 2 files — lore-transport/src/auth/exchange.rs, lore-transport/src/connection.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore/src/storage/put.rs:119 — `item.remote_write != 0 && !effective.no_remote` appears character-identically in 4 files — lore/src/storage/put.rs, lore/src/storage/put_file.rs, lore/src/storage/put_file_resolved.rs, lore/src/storage/put_resolved.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/metadata/branch.rs:302 — `keys.len() != values.len() || keys.len() != formats.len()` appears character-identically in 3 files — lore-revision/src/metadata/branch.rs, lore-revision/src/metadata/repository.rs, lore-revision/src/metadata/set.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/branch/reset.rs:196 — `mapped != Context::default() && mapped != branch.id && !global.force()` appears character-identically in 2 files — lore-revision/src/branch/reset.rs, lore-revision/src/repository.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/branch/reset.rs:201 — `mapped == Context::default() || global.force()` appears character-identically in 2 files — lore-revision/src/branch/reset.rs, lore-revision/src/repository.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/file/history.rs:368 — `options.revision.is_some() && options.branch.is_some()` appears character-identically in 2 files — lore-revision/src/file/history.rs, lore-revision/src/revision/history.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/file/dirty.rs:298 — `signature != layer.current && !execution_context().globals().dry_run()` appears character-identically in 2 files — lore-revision/src/file/dirty.rs, lore-revision/src/file/stage.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/metadata/branch.rs:409 — `std::str::from_utf8(key_slice) && !is_built_in_key(key)` appears character-identically in 2 files — lore-revision/src/metadata/branch.rs, lore-revision/src/metadata/repository.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-revision/src/metadata/branch.rs:151 — `value_type == MetadataType::Address && value.len() == std::mem::size_of::<Address>()` appears character-identically in 2 files — lore-revision/src/metadata/branch.rs, lore-revision/src/metadata/repository.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lore-server/src/grpc/handlers/branch_metadata_set.rs:67 — `value_type == MetadataType::Address && value_slice.len() == std::mem::size_of::<Address>()` appears character-identically in 3 files — lore-server/src/grpc/handlers/branch_metadata_set.rs, lore-server/src/grpc/handlers/repository_metadata_set.rs, lore-server/src/grpc/repository/v1/repository_metadata_set.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.
D31 · IaC & Container Security · Low IaC · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X7 · Silent fallback defaults · Silent fallback default on Err · ×12
  • Silent fallback default on Err lore-client/src/cli/commands/auth.rs:557 — `resolve_user_ids` turns every `Err` into `HashMap::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-client/src/cli/commands/revision.rs:2571 — `resolve_revision_user_ids` turns every `Err` into `HashMap::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-client/src/cli/util.rs:142 — `read_targets_file` turns every `Err` into `"".to_owned()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-revision/src/state.rs:4357 — `deserialize_link_merge_state` turns every `Err` into `Ok(vec![])` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-revision/src/filter.rs:258 — `load_filter` turns every `Err` into `Ok(FilterInstance::default())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-revision/src/find.rs:281 — `batch_load_history` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-revision/src/repository/prefetch.rs:168 — `tree_prefetch_from_env` turns every `Err` into `TreePrefetch::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-revision/src/revision/history.rs:211 — `load_remote_latest` turns every `Err` into `Hash::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-revision/src/state.rs:5560 — `format_parent_child_chain` turns every `Err` into `"<parent block unreadable>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-server/src/quic/storage_service.rs:540 — `command_to_metrics_label` turns every `Err` into `"unknown"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-server/src/quic/storage_service_v4.rs:454 — `command_to_metrics_label` turns every `Err` into `"unknown"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err lore-storage/src/local/immutable_store.rs:4926 — `packstore_total_size` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
D20 · ADR Quality · ADR consequences name no cost · ×6
  • ADR consequences name no cost docs/developing/decisions/00001-fast-cdc.md:29 — `docs/developing/decisions/00001-fast-cdc.md:29` lists its consequences as good-polarity items only, and none is a drawback, while other records in `docs/developing/decisions` record drawbacks the same way. State what this decision costs or rules out.
  • ADR consequences name no cost docs/developing/decisions/00005-web-framework.md:34 — `docs/developing/decisions/00005-web-framework.md:34` lists its consequences as good-polarity items only, and none is a drawback, while other records in `docs/developing/decisions` record drawbacks the same way. State what this decision costs or rules out.
  • ADR consequences name no cost docs/developing/decisions/00006-s3-storage-options-reconsidered.md:41 — `docs/developing/decisions/00006-s3-storage-options-reconsidered.md:41` lists its consequences as good-polarity items only, and none is a drawback, while other records in `docs/developing/decisions` record drawbacks the same way. State what this decision costs or rules out.
  • ADR consequences name no cost docs/developing/decisions/00009-lore-library-js-bindings.md:32 — `docs/developing/decisions/00009-lore-library-js-bindings.md:32` lists its consequences as good-polarity items only, and none is a drawback, while other records in `docs/developing/decisions` record drawbacks the same way. State what this decision costs or rules out.
  • ADR consequences name no cost docs/developing/decisions/00015-log-crate-separation.md:47 — `docs/developing/decisions/00015-log-crate-separation.md:47` lists its consequences as good-polarity items only, and none is a drawback, while other records in `docs/developing/decisions` record drawbacks the same way. State what this decision costs or rules out.
  • ADR consequences name no cost docs/developing/decisions/00016-compression-algorithm-selection.md:83 — `docs/developing/decisions/00016-compression-algorithm-selection.md:83` lists its consequences as good-polarity items only, and none is a drawback, while other records in `docs/developing/decisions` record drawbacks the same way. State what this decision costs or rules out.
D16 · Bus Factor · Off-boarding risk · ×4
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 66 significant file(s) lose their only recent owner: lore-storage/src/local/immutable_store.rs, lore-storage/src/write.rs, lore-revision/src/filter.rs, lore-storage/src/defragment.rs, lore-revision/src/immutable.rs, lore-storage/src/packstore.rs, lore-io/src/iocp.rs, lore-storage/src/local/fan_out.rs (+58 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 21 significant file(s) lose their only recent owner: lore-storage/src/mutable_conformance.rs, lore-server/src/quic/replication_store_service/client.rs, lore-server/src/quic/stream_observer.rs, lore-server/src/grpc/forwarded_requests.rs, lore-server/src/quic/replication_store_service/client_container.rs, lore-telemetry/src/metrics/grpc_tower_layer.rs, lore-server/src/grpc/tower/malformed_request.rs, lore-server/src/quic/replication_store_service.rs (+13 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 8 significant file(s) lose their only recent owner: lore-server/src/authnz/repository_authorizer.rs, lore-server/src/authnz/repository_catalog.rs, lore-server/src/auth/jwt.rs, lore-server/src/grpc/lock_service.rs, lore-transport/src/auth/ucs_auth.rs, lore-server/src/grpc/revision_service.rs, lore-server/src/authnz/resource_grants_authorizer.rs, lore-server/src/authnz/global_grants_authorizer.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 4 significant file(s) lose their only recent owner: lore-revision/src/fs/swfs/api_interface.rs, lore/src/service/service_main.rs, lore-revision/src/fs/swfs/paths.rs, lore-revision/src/fs/swfs/file.rs. Pair on, review, or document these before any departure.
D20 · ADR Quality · ADR has no Consequences section · ×2
  • ADR has no Consequences section docs/developing/decisions/00018-external-instance-directory-registry.md:6 — docs/developing/decisions/00018-external-instance-directory-registry.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Consequences section docs/developing/decisions/00025-service-version-compatibility.md:8 — docs/developing/decisions/00025-service-version-compatibility.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (102 single-owned of 528 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 528 of the 737 production source files in this repository met that bar). They are anonymized user #5 (2 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: lore-server/src/protocol/storage/mutable_store_handler.rs, lore-server/src/protocol/storage/mutable_cas.rs, lore-server/src/http/security_headers.rs.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 5 of 25 project(s) overshoot their size bounds, lowering Project Cohesion to 6.0/10. The most over is `lore-revision` (97691 LoC, 809 module-visible types across 27 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D40 · Network Egress Confinement · No network policy · ×1
  • No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
D9 · Test Distribution · Inverted test pyramid · ×1
  • Inverted test pyramid — Only 21 % of tests are unit tests (1497 unit vs 5517 integration, 0 BDD); a broader unit base gives faster, more localised feedback.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 14/15 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
S1 · Web-Security Posture · Security headers incomplete · ×1
  • Security headers incomplete — Set: Content-Security-Policy, X-Content-Type-Options. Missing: Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−1.0 on this card.) The server: `axum::serve(` (lore-server/src/http/server.rs:334).
Minor — 4 finding(s)
D12 · Dependency Hygiene · Outdated · ×4
  • Outdated: backtrace — `backtrace` is locked at 0.3.76 but 0.3.77 is the current stable release on crates.io, and it already satisfies the `"0.3.75"` requirement declared in lore-base/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p backtrace` and commit the updated REDACTED.
  • Outdated: tonic — `tonic` is locked at 0.14.6 but 0.14.7 is the current stable release on crates.io, and it already satisfies the `"0.14.2"` requirement declared in lore-integration-tests/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tonic` and commit the updated REDACTED.
  • Outdated: tonic-prost — `tonic-prost` is locked at 0.14.6 but 0.14.7 is the current stable release on crates.io, and it already satisfies the `"0.14.2"` requirement declared in lore-proto/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tonic-prost` and commit the updated REDACTED.
  • Outdated: tonic-prost-build — `tonic-prost-build` is locked at 0.14.6 but 0.14.7 is the current stable release on crates.io, and it already satisfies the `"0.14.2"` requirement declared in lore-proto/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tonic-prost-build` and commit the updated REDACTED.

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-d777eb7ffdc94371b46adba233956cf6/history.json --exit-code 0 --source .1artifacts/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-d777eb7ffdc94371b46adba233956cf6/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude lore-proto/src/grpc --exclude lore-revision/tests/data --exclude lore-server/src/legacy/generated .18artifacts/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-update15artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .38artifacts/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.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.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 01a17c79-a4dc-778c-8ea5-a359f324ea34 · 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