Public report — lore, published 29 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.17 (frozen) · verify this surveyFiledcd_36419bdc70a7470293481878665527ed
Filed 29 September 2026, 08:09 UTC
Public
Large · 316,508 LoC · 21 projects · rebuild ~5.2 person-years · weakest lens: Security (70%)
Findings by grade
33 critical1344 serious43 minor46 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
29 September 2026, 07:56 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
1387findings with an exact file:lineof 1420 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
53/127dimensions across the health lenses316508 LoC · 21 projects — wide & deep
⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.
Preview (pre-1.0). This repo hasn't declared a stable release, so it's judged against a relaxed, pre-production bar.
The platform holds a 78% health score, indicating a robust but at-risk asset. While the underlying structure is strong, specific operational gaps expose the business to unnecessary security and onboarding friction. This standing suggests the system is reliable for current operations but requires targeted intervention to maintain long-term velocity and safety.
The codebase is substantial, comprising over 316,000 lines of production logic and 136,000 lines of tests. Rebuilding this domain-specific logic from scratch would demand approximately 5.2 person-years and nearly €760,000, highlighting the significant value locked in the current architecture. The high proportion of complex, non-boilerplate code confirms that this is a mature, custom solution rather than a generic template, making preservation of its core integrity a priority.
The most critical vulnerability lies in network security posture. A single finding regarding network egress confinement represents a tangible exposure risk. Resolving this is the highest-leverage action available; it addresses a direct security gap with minimal effort compared to broader refactoring. Leaving this unaddressed keeps the organization open to potential data leakage or compliance violations, which could halt delivery or incur regulatory penalties.
Operational maturity and documentation present a secondary, though less urgent, concern. The system’s architecture and domain modeling are excellent, yet new engineers face friction due to incomplete onboarding materials. The README fails to reflect the full scope of the repository, omitting key AWS integrations and native projects. This disconnect slows down team ramp-up and increases the cognitive load for developers, indirectly impacting delivery speed and increasing the likelihood of human error during deployments.
Strengths are evident in the code’s structural integrity and domain alignment. The architecture is sound, and the domain modeling is perfect, ensuring that business logic is clearly represented and maintainable. These foundations provide a stable base for future enhancements, provided the immediate security and documentation gaps are closed.
Focus first on resolving the network egress policy. This action offers the best return on investment by mitigating the most significant risk with the least effort. Once secured, address the documentation discrepancies to improve team efficiency. Note that event-driven patterns and performance metrics were not measured, so this assessment reflects a partial view of the system’s total health.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Every measured lens already clears the Healthy floor — there is no single drag to lift.
Code composition — where the lines go
Tests 100%
New since the last scan (100+)
158 finding(s) are new versus the previous scan (2026-09-12) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
Rebuild cost & value ~ Modeled — €250,000–€1,300,000
1.3× (at 78% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~5.2 person-years of build effort (about ~€760,000 to rebuild). Its weakest lens is Security at 70% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 1.3× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Of everything flagged, the best return on effort is: Resolve the 1 No network policy finding(s) in Network Egress Confinement. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 1 No network policy finding(s) in Network Egress Confinement.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
751 modules, 2051 dependencies. 3 dependency cycles across 146 modules, marked above the diagonal.
Showing the 40 most-connected modules; 711 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
lore_proto.grpc.urc.model uses lore_proto.grpc.lore.model.v1. Changing lore_proto.grpc.lore.model.v1 can break lore_proto.grpc.urc.model, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
12→34 lore_proto.grpc.urc.model depends on lore_proto.grpc.lore.thin_client.v1cycle✕
Type pairs
3 distinct (type in lore_proto.grpc.urc.model → type in lore_proto.grpc.lore.thin_client.v1) references.
lore_proto.grpc.urc.model uses lore_proto.grpc.lore.thin_client.v1. Changing lore_proto.grpc.lore.thin_client.v1 can break lore_proto.grpc.urc.model, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
13→10 quinn_proto.connection.streams.send depends on quinn_proto.frame✕
Type pairs
1 distinct (type in quinn_proto.connection.streams.send → type in quinn_proto.frame) reference.
lore_server.protocol.storage.messages uses lore_server.auth.jwt. Changing lore_server.auth.jwt can break lore_server.protocol.storage.messages, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
16→6 lore_server.protocol.storage.messages depends on lore_server.protocol.attribute_map✕
Type pairs
1 distinct (type in lore_server.protocol.storage.messages → type in lore_server.protocol.attribute_map) reference.
lore_server.protocol.storage.messages uses lore_server.protocol.attribute_map. Changing lore_server.protocol.attribute_map can break lore_server.protocol.storage.messages, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
16→13 lore_server.protocol.storage.messages depends on quinn_proto.connection.streams.send✕
Type pairs
1 distinct (type in lore_server.protocol.storage.messages → type in quinn_proto.connection.streams.send) reference.
lore_server.protocol.storage.messages uses quinn_proto.connection.streams.send. Changing quinn_proto.connection.streams.send can break lore_server.protocol.storage.messages, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
17→2 lore_transport.connection depends on lore_base.types✕
Type pairs
3 distinct (type in lore_transport.connection → type in lore_base.types) references.
lore_revision.interface uses quinn_proto.connection.streams.send. Changing quinn_proto.connection.streams.send can break lore_revision.interface, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
18→15 lore_revision.interface depends on lore_revision.util.path✕
Type pairs
1 distinct (type in lore_revision.interface → type in lore_revision.util.path) reference.
lore_transport.quic.client uses quinn_proto.connection.streams.send. Changing quinn_proto.connection.streams.send can break lore_transport.quic.client, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→17 lore_transport.quic.client depends on lore_transport.connection✕
Type pairs
3 distinct (type in lore_transport.quic.client → type in lore_transport.connection) references.
lore_revision.link uses lore_revision.fs.filesystem_provider. Changing lore_revision.fs.filesystem_provider can break lore_revision.link, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
22→32 lore_revision.link depends on lore_revision.changecycle✕
Type pairs
1 distinct (type in lore_revision.link → type in lore_revision.change) reference.
lore_revision.state uses lore_revision.fs.filesystem_provider. Changing lore_revision.fs.filesystem_provider can break lore_revision.state, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
23→32 lore_revision.state depends on lore_revision.changecycle✕
Type pairs
6 distinct (type in lore_revision.state → type in lore_revision.change) references.
lore_revision.state uses lore_proto.grpc.lore.thin_client.v1. Changing lore_proto.grpc.lore.thin_client.v1 can break lore_revision.state, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
24→4 lore_server.grpc.server depends on lore_server.auth.jwt✕
Type pairs
1 distinct (type in lore_server.grpc.server → type in lore_server.auth.jwt) reference.
lore_storage.local.immutable_store uses lore_proto.grpc.urc.model. Changing lore_proto.grpc.urc.model can break lore_storage.local.immutable_store, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→26 lore_storage.local.immutable_store depends on lore_server.settings✕
Type pairs
2 distinct (type in lore_storage.local.immutable_store → type in lore_server.settings) references.
lore_storage.local.immutable_store uses lore_server.settings. Changing lore_server.settings can break lore_storage.local.immutable_store, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→2 lore_revision.repository depends on lore_base.types✕
Type pairs
3 distinct (type in lore_revision.repository → type in lore_base.types) references.
lore_revision.repository uses lore_storage.local.immutable_store. Changing lore_storage.local.immutable_store can break lore_revision.repository, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→36 lore_revision.repository depends on lore_revision.eventcycle✕
Type pairs
1 distinct (type in lore_revision.repository → type in lore_revision.event) reference.
lore_revision.node uses quinn_proto.connection.streams.send. Changing quinn_proto.connection.streams.send can break lore_revision.node, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→18 lore_revision.node depends on lore_revision.interface✕
Type pairs
3 distinct (type in lore_revision.node → type in lore_revision.interface) references.
lore_revision.fs.filesystem_provider uses quinn_proto.connection.streams.send. Changing quinn_proto.connection.streams.send can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→14 lore_revision.fs.filesystem_provider depends on quinn_proto.transport_error✕
Type pairs
1 distinct (type in lore_revision.fs.filesystem_provider → type in quinn_proto.transport_error) reference.
lore_revision.fs.filesystem_provider uses quinn_proto.transport_error. Changing quinn_proto.transport_error can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→15 lore_revision.fs.filesystem_provider depends on lore_revision.util.path✕
Type pairs
4 distinct (type in lore_revision.fs.filesystem_provider → type in lore_revision.util.path) references.
lore_revision.fs.filesystem_provider uses lore_revision.util.path. Changing lore_revision.util.path can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→21 lore_revision.fs.filesystem_provider depends on lore_revision.filter✕
Type pairs
2 distinct (type in lore_revision.fs.filesystem_provider → type in lore_revision.filter) references.
lore_revision.fs.filesystem_provider uses lore_revision.filter. Changing lore_revision.filter can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→23 lore_revision.fs.filesystem_provider depends on lore_revision.state✕
Type pairs
5 distinct (type in lore_revision.fs.filesystem_provider → type in lore_revision.state) references.
lore_revision.fs.filesystem_provider uses lore_revision.state. Changing lore_revision.state can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→29 lore_revision.fs.filesystem_provider depends on lore_revision.repository✕
Type pairs
4 distinct (type in lore_revision.fs.filesystem_provider → type in lore_revision.repository) references.
lore_revision.fs.filesystem_provider uses lore_revision.repository. Changing lore_revision.repository can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→30 lore_revision.fs.filesystem_provider depends on lore_revision.node✕
Type pairs
6 distinct (type in lore_revision.fs.filesystem_provider → type in lore_revision.node) references.
lore_revision.fs.filesystem_provider uses lore_revision.node. Changing lore_revision.node can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→34 lore_revision.fs.filesystem_provider depends on lore_proto.grpc.lore.thin_client.v1cycle✕
Type pairs
1 distinct (type in lore_revision.fs.filesystem_provider → type in lore_proto.grpc.lore.thin_client.v1) reference.
lore_revision.fs.filesystem_provider uses lore_proto.grpc.lore.thin_client.v1. Changing lore_proto.grpc.lore.thin_client.v1 can break lore_revision.fs.filesystem_provider, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
32→2 lore_revision.change depends on lore_base.types✕
Type pairs
2 distinct (type in lore_revision.change → type in lore_base.types) references.
lore_revision.change uses lore_revision.fs.filesystem_provider. Changing lore_revision.fs.filesystem_provider can break lore_revision.change, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→2 lore_revision.branch depends on lore_base.types✕
Type pairs
11 distinct (type in lore_revision.branch → type in lore_base.types) references.
lore_revision.branch uses lore_proto.grpc.lore.thin_client.v1. Changing lore_proto.grpc.lore.thin_client.v1 can break lore_revision.branch, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
33→36 lore_revision.branch depends on lore_revision.eventcycle✕
Type pairs
1 distinct (type in lore_revision.branch → type in lore_revision.event) reference.
lore_proto.grpc.lore.thin_client.v1 uses lore_proto.grpc.lore.model.v1. Changing lore_proto.grpc.lore.model.v1 can break lore_proto.grpc.lore.thin_client.v1, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→33 lore_proto.grpc.lore.thin_client.v1 depends on lore_revision.branch✕
Type pairs
1 distinct (type in lore_proto.grpc.lore.thin_client.v1 → type in lore_revision.branch) reference.
lore_proto.grpc.lore.thin_client.v1 uses lore_revision.branch. Changing lore_revision.branch can break lore_proto.grpc.lore.thin_client.v1, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→2 lore.revision_tree.handle depends on lore_base.types✕
Type pairs
2 distinct (type in lore.revision_tree.handle → type in lore_base.types) references.
lore.revision_tree.handle uses lore_proto.grpc.lore.thin_client.v1. Changing lore_proto.grpc.lore.thin_client.v1 can break lore.revision_tree.handle, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→2 lore_revision.event depends on lore_base.types✕
Type pairs
2 distinct (type in lore_revision.event → type in lore_base.types) references.
lore_revision.event uses quinn_proto.connection.streams.send. Changing quinn_proto.connection.streams.send can break lore_revision.event, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→18 lore_revision.event depends on lore_revision.interface✕
Type pairs
11 distinct (type in lore_revision.event → type in lore_revision.interface) references.
lore_revision.event uses lore_proto.grpc.lore.thin_client.v1. Changing lore_proto.grpc.lore.thin_client.v1 can break lore_revision.event, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→18 lore.interface depends on lore_revision.interface✕
Type pairs
2 distinct (type in lore.interface → type in lore_revision.interface) references.
lore_revision.revision.sync uses lore_revision.fs.filesystem_provider. Changing lore_revision.fs.filesystem_provider can break lore_revision.revision.sync, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
38→32 lore_revision.revision.sync depends on lore_revision.change✕
Type pairs
3 distinct (type in lore_revision.revision.sync → type in lore_revision.change) references.
lore_revision.layer uses lore_revision.fs.filesystem_provider. Changing lore_revision.fs.filesystem_provider can break lore_revision.layer, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
39→32 lore_revision.layer depends on lore_revision.change✕
Type pairs
1 distinct (type in lore_revision.layer → type in lore_revision.change) reference.
lore_transport.grpc uses lore_proto.grpc.lore.thin_client.v1. Changing lore_proto.grpc.lore.thin_client.v1 can break lore_transport.grpc, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
40→39 lore_transport.grpc depends on lore_revision.layer✕
Type pairs
1 distinct (type in lore_transport.grpc → type in lore_revision.layer) reference.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2021 — Security Misconfiguration
38
High / Critical
A03:2021 — Injection
17
High / Critical
A06:2021 — Vulnerable & Outdated Components
9
Medium
A02:2021 — Cryptographic Failures
2
High / Critical
Roadmap
Begin by resolving the single network policy finding to enforce egress confinement and address the four PowerShell download issues identified in static analysis. Simultaneously, remediate the fifteen high-severity findings in infrastructure and container security, prioritizing fixes in the REDACTED and network configuration. Finally, update the root README to include a quick-start guide and correct documentation drift regarding the AWS and native projects to ensure accuracy for new contributors.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No network policy finding(s) in Network Egress Confinement.
God Classes: MethodTooLong: ReplicationStoreService.build_request_span
lore-revision/src/stage.rs
6.0
Mixed
Explicit Debt: TodoComment
lore-revision/src/revision/sync.rs
6.0
Mixed
Explicit Debt: TodoComment
lore-revision/src/fs/realize.rs
6.0
Mixed
Explicit Debt: TodoComment
lore-revision/src/revision.rs
6.0
Mixed
Explicit Debt: TodoComment
lore-revision/src/branch/push.rs
6.0
Mixed
Explicit Debt: TodoComment
lore-client/src/cli/commands/repository.rs
6.0
Mixed
Explicit Debt: TodoComment
lore-revision/src/repository.rs
6.0
Mixed
Explicit Debt: TodoComment
lore-revision/src/projfs/serve.rs
6.0
Mixed
Explicit 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 — 33
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 — 1344
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 — 43
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 46
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. 46 of 53 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 7 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 53 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1387 of 1420 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs, .py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or `coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or `coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
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. This repository declares 4 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.rs, .py), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
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.
AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AX2 Stateful singletons — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
DM3 Integration-event coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — a domain type leaking across a crate boundary cannot be told apart from source alone from a legitimate shared-kernel crate. Reported as guidance rather than measured.
DM7 Repository granularity — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — detecting 'a repository per CHILD entity' needs the aggregate-root structure, which is not resolvable from source alone here. Reported as guidance rather than measured.
ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P10 Library API & versioning — 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 NuGet packaging and C# public API only, and no .NET project was loaded for 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.
PF1 Benchmark discipline — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
PF2 Allocation hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X10 Duplicated predicate — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X6 Hand-rolled structured-format parsing — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D25 ADR Conformance: ADR conformance is the LLM-scored fraction of sampled code that follows recorded decisions — it checks the decisions that were written down and the slices it sampled, not unrecorded rules or the whole tree.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
The LLM boundary
LLM-set scores this run (7): D19, D20, D21, D22, D25, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
105 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was lore_revision::stage::stage_node_from_metadata at 57. 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 23), lore-server/src/quic/storage_service.rs (lore_server::quic::storage_service::message_handle_error_to_label at 23), 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.
+ 13 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 61 lore_revision finding(s) in Cyclomatic Complexity — start with stage.rs (9), commit.rs (5), realize.rs (4). — One of this dimension's main actionable groups (61 warning-level).
Resolve the 8 LocalImmutableStore finding(s) in Cyclomatic Complexity — start with immutable_store.rs (8). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 6 lore_client finding(s) in Cyclomatic Complexity — start with revision.rs (4), repository.rs, branch.rs. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 28 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 130 lore_revision finding(s) in Cognitive Complexity — start with stage.rs (12), state.rs (9), commit.rs (8). — One of this dimension's main actionable groups (130 warning-level).
Resolve the 19 lore_storage finding(s) in Cognitive Complexity — start with read.rs (5), immutable_store.rs (3), write.rs (3). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 17 lore_server finding(s) in Cognitive Complexity — start with revision_list.rs (3), server.rs (2), branch_list.rs (2). — One of this dimension's main actionable groups (17 warning-level).
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.5 / 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.
ClassTooLong: State · ×10lore-revision/src/state.rs:385
TooManyMethods: State · ×7lore-revision/src/state.rs:385
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 111 FunctionTooLong finding(s) in God Classes — start with stage.rs (9), commit.rs (9), merge.rs (8). — One of this dimension's main actionable groups (111 warning-level).
Resolve the 69 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 (69 warning-level).
Resolve the 19 MethodTooLong finding(s) in God Classes — start with immutable_store.rs (7), state.rs (3), server.rs (2). — One of this dimension's main actionable groups (19 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
509 duplicated block group(s) detected. A further 33 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 130 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 34 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with file.rs (3), dirty.rs (3), state.rs (3). — One of this dimension's main actionable groups (34 warning-level).
Resolve the 32 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with state.rs (3), service.rs (3), merge.rs (2). — One of this dimension's main actionable groups (32 warning-level).
Resolve the 30 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with repository.rs (3), revision.rs (3), service.rs (3). — One of this dimension's main actionable groups (30 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.2 / 10Stronggated by 2 serious findings✓ 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.
21 production modules (Cargo+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 17 of the 21 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).
Off the main sequence: lore-io · ×2
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with client.rs (2), mutable_store.rs, mod.rs. — One of this dimension's main actionable groups (8 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
All 16 mechanizable ADR(s) are enforced: 15 by analyzers, 1 by tests. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
✓ On the Gold path — maintain.
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
5636 test methods: 4282 unit, 1354 integration, 0 BDD, 0 e2e. The Rust suite contributes 4487 `#[test]` function(s) across 414 file(s) declaring at least one; its unit/integration split is Cargo's own — 129 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 1149 test function(s) across 95 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.
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.
15 outdated, 0 yanked direct Cargo dependencies. 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: anyhow · ×15
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 500 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.
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.
Resolve the 51 Hotspot finding(s) in Churn × Complexity Hotspots — start with stage.rs (2), repository.rs (2), server.rs (2). — One of this dimension's main actionable groups (51 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.3 / 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.
86 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is lore-revision/src/stage.rs. Counted over 508 of the 694 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 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
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.
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.
144 deducted task-comment markers across 316508 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×139lore-aws/src/dynamodb.rs:75
HackComment · ×5lore-capi/build.rs:242
What to do
Resolve the 139 TodoComment finding(s) in Explicit Debt — start with stage.rs (19), realize.rs (10), state.rs (9). — One of this dimension's main actionable groups (139 warning-level).
Resolve the 5 HackComment finding(s) in Explicit Debt — start with build.rs (2), state.rs (2), storage_test.rs. — One of this dimension's main actionable groups (5 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
Lore's documentation is clear and complete for its repository root README (next-gen open-source version control with download links, a table of contents, an overview, and the full roadmap), plus well-structured per-directory READMEs that document their own directories. The architecture/Docs markdown files are also present but not shown in this summary. There are no visible defects among the documents reviewed. The repository's documentation is comprehensive and well-organized: the READMEs for each directory (e.g. lore-server/src/, docs/tutorials/) document what that directory does and how to use its contents, while architecture/design documents (docs/developing/README.md, docs/proposals/README.md) provide detailed design rationale, linter tooling, and a full outline of every section present in the body. The documentation is clear, complete, and well-structured for an open-source project.
Documentation: contradicts the codedocs/developing/doc-standards/tools/README.md
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR QualityStrong◐ Sampled · advisory
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.
Evaluated 22 ADR(s) individually; mean quality 8.8/10 (consistently complete and clear). 0 flagged with a specific gap.
What to do
Improve ADR Quality — currently 8.8/10. — Evaluated 22 ADR(s) individually; mean quality 8.8/10 (consistently complete and clear). 0 flagged with a specific gap.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyStronggated by 2 serious findings◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
Inconsistent return type for getter vs setter. The setter accepts u16, but the getter returns u64. This is likely a bug or unnecessary widening, as UDP payload sizes fit in u16.
Inconsistent naming for key update operations. `force_key_update` and `initiate_key_update` appear to do the same thing (triggering a key update), with only the verb 'force' vs 'initiate' distinguishing them. This creates ambiguity about whether one is synchronous/asynchronous or has different side effects.
What to do
Resolve the 1 Inconsistent return type for getter vs setter. The setter accepts u16,… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Inconsistent naming for key update operations. `force_key_update` and… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.
Method: Judged by language model at low temperature against ADRs plus a deterministic structural code summary; findings linked to repo-rooted ADR paths for traceability. Advisory.
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.
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
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
17 finding(s): 0 critical, 12 high, 5 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 41 file(s) — `contrib/helm/templates/certificate.yaml`, `contrib/helm/templates/configmap.yaml`, `REDACTED`, `REDACTED`, `contrib/helm/templates/poddisruptionbudget.yaml`, … (+36 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
What to do
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).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
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.
Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 2 Medium advisory (unsound) 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.
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).
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).
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.
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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 508 of the 694 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 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.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
Resolve the 1 No AppArmor/SELinux confinement finding(s) in Kernel & Syscall Confinement. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
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.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Do you agree with this assessment?
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.
Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Add a 'Testing' section to the root README — how to run the test suite.
Add a README to the 15 of 21 project(s) that lack one — worth up to 1.4 pts.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
README omits the lore-aws repository (and its AWS integration) — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
README omits the lore-base/native project — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
What to do
Reconcile the README with reality: README omits the lore-aws repository (and its AWS integration); README omits the lore-base/native project.
Only 11/13 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `lore-transport`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & 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).
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.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
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.
Unscored — 1 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.
D11 Test Reliability — 4 observation(s) recorded · This repository declares 4 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.rs, .py), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
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: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 70 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 analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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) — dynamodb Pulling consul-node-1 Pulling minio Pulling consul-server Pulling consul-node-1 Error Get "https://registry-1.docker.io/v2/": Forbidden consul-server Error Get "https://registry-1.docker.io/v2/": Forbidden dynamodb Error context canceled minio 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 minio Pulling dynamodb Pulling consul-server 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: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~136230 lines of test source are present (.rs, .py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
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.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D27 Navigability — symbol resolution incomplete — navigability not assessed
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 scored — a domain type leaking across a crate boundary cannot be told apart from source alone from a legitimate shared-kernel crate. Reported as guidance rather than measured
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 scored — detecting 'a repository per CHILD entity' needs the aggregate-root structure, which is not resolvable from source alone here. Reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P10 Library API & versioning — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
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 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
PF2 Allocation hygiene — 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
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X10 Duplicated predicate — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X7 Silent fallback defaults — 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
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.
D11 · Test Reliability· Test declared unreliable · ×4
Test declared unreliable: test_swfs_creates_external_dot_lore scripts/test/test_swfs.py:28— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "swfs is generally not available; test fails randomly under parallel execution". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
Test declared unreliable: test_swfs_repo_prevents_creating_non_swfs_repo scripts/test/test_swfs.py:56— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "swfs is generally not available; test fails randomly under parallel execution". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
Test declared unreliable: test_swfs_repo_prevents_creating_non_swfs_repo_after_restart scripts/test/test_swfs.py:81— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "swfs is generally not available; test fails randomly under parallel execution". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
Test declared unreliable: test_swfs_repo_can_be_force_created_over scripts/test/test_swfs.py:109— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "swfs is generally not available; test fails randomly under parallel execution". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
TodoComment lore-aws/src/dynamodb.rs:75— /// TODO(jcohen): Remove this when we're confident in the pagination support. — 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-aws/src/dynamodb.rs:681— // TODO(jcohen): We should probably disallow the combination of `Select::Count` — 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-aws/src/store/lock_store.rs:332— // TODO: generate metric — 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-chaos-client/src/probability.rs:168— // TODO: Add files that are in directories — 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-client/src/cli/util.rs:139— // TODO(mjansson): If this is a relative path it should be made absolute — 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-client/src/cli/cli.rs:432— // TODO(vri): Add command shortcuts — 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-client/src/cli/commands/repository.rs:360— // TODO(vri): Add optional path arg? — 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-client/src/cli/commands/logfile.rs:21— // TODO(vri): Add some more useful information — 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/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-revision/src/state.rs:1440— // TODO(mjansson): To support huge trees we might want to selectively — 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-revision/src/state.rs:1599— // TODO(mjansson): To support huge trees we might want to selectively — 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-revision/src/state.rs:1795— // TODO(mjansson): To support huge trees we might want to selectively — 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-revision/src/state.rs:3227— // TODO(vri): UCS-15592 - Improve by iteratively walking children
TodoComment lore-revision/src/state.rs:3529— // TODO(mjansson): This does not actually need to grab the whole node — 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-revision/src/state.rs:4293— // TODO(vri): Link revision divergence — 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-revision/src/state.rs:6646— // TODO(UCS-13059): Extend with file mode check
TodoComment lore-revision/src/state.rs:7226— // TODO(mjansson): User input should be behind an --interactive command line/API option — 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-revision/src/state.rs:10393— // TODO(UCS-11623): Check if the target link repository has no local changes - if so,
TodoComment lore-revision/src/stage.rs:2171— // TODO(vri): UCS-19227 - Links: Handle renaming and mismatching in staging
TodoComment lore-revision/src/stage.rs:2518— // TODO(vri): UCS-17955 - Merging and conflict resolution for links
TodoComment lore-revision/src/stage.rs:2715— // TODO(vri): UCS-17955 - Merging and conflict resolution for links
TodoComment lore-revision/src/stage.rs:2746— // TODO(vri): UCS-17955 - Merging and conflict resolution for links
TodoComment lore-revision/src/stage.rs:2860— // TODO(vri): UCS-17955 - Merging and conflict resolution for links
TodoComment lore-revision/src/stage.rs:2976— // TODO(vri): UCS-17955 - Merging and conflict resolution for links
lore_revision::fs::realize::realize_file_merge (cognitive 120) lore-revision/src/fs/realize.rs:2175— lore_revision::fs::realize::realize_file_merge has cognitive complexity 120 (threshold 15). Drivers by points: if/else 46 (103 pts), match/switch 4 (11 pts), boolean chains 6 (nesting depth added 64). 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::verify_filesystem (cognitive 98) lore-revision/src/fs/realize.rs:571— lore_revision::fs::realize::verify_filesystem has cognitive complexity 98 (threshold 15). Drivers by points: if/else 35 (85 pts), boolean chains 6, match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 54). 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 97) lore-revision/src/stage.rs:1949— lore_revision::stage::stage_node_from_metadata has cognitive complexity 97 (threshold 15). Drivers by points: if/else 46 (79 pts), boolean chains 12, 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 92) lore-revision/src/repository/status.rs:1365— lore_revision::repository::status::status has cognitive complexity 92 (threshold 15). Drivers by points: if/else 35 (66 pts), loops 6 (12 pts), boolean chains 9, match/switch 3 (5 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_revision::branch::push::collect_fragments_and_push (cognitive 86) lore-revision/src/branch/push.rs:704— lore_revision::branch::push::collect_fragments_and_push has cognitive complexity 86 (threshold 15). Drivers by points: if/else 32 (63 pts), boolean chains 10, match/switch 3 (7 pts), loops 4 (6 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_revision::revision::sync::sync (cognitive 83) lore-revision/src/revision/sync.rs:418— lore_revision::revision::sync::sync has cognitive complexity 83 (threshold 15). Drivers by points: if/else 41 (62 pts), boolean chains 14, match/switch 5 (7 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:2575— 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:916— 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:2993— 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::revision::diff3_with_source_cap (cognitive 70) lore-revision/src/revision.rs:327— 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::stage::stage_filesystem_path (cognitive 66) lore-revision/src/stage.rs:369— lore_revision::stage::stage_filesystem_path has cognitive complexity 66 (threshold 15). Drivers by points: if/else 31 (57 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (2 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.
lore_revision::file::unstage::unstage_node (cognitive 64) lore-revision/src/file/unstage.rs:916— lore_revision::file::unstage::unstage_node has cognitive complexity 64 (threshold 15). Drivers by points: if/else 31 (57 pts), boolean chains 5, 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::stage::stage_directory (cognitive 63) lore-revision/src/stage.rs:1378— lore_revision::stage::stage_directory has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (39 pts), match/switch 5 (14 pts), loops 6 (9 pts), boolean chains 1 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
lore_revision::repository::layer_branch_switch (cognitive 60) lore-revision/src/repository.rs:3257— 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::immutable::cache_through (cognitive 60) lore-revision/src/immutable.rs:574— lore_revision::immutable::cache_through has cognitive complexity 60 (threshold 15). Drivers by points: loops 11 (34 pts), if/else 9 (21 pts), boolean chains 5 (nesting depth added 35). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
lore_revision::fs::realize::realize_changes_delete (cognitive 59) lore-revision/src/fs/realize.rs:1342— 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::revision::info::info (cognitive 53) lore-revision/src/revision/info.rs:173— 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:3108— 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 52) lore-revision/src/file/stage.rs:1168— lore_revision::file::stage::stage_move has cognitive complexity 52 (threshold 15). Drivers by points: if/else 30 (46 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::repository::load_and_connect_with_token (cognitive 51) lore-revision/src/repository.rs:2105— lore_revision::repository::load_and_connect_with_token has cognitive complexity 51 (threshold 15). Drivers by points: if/else 30 (38 pts), boolean chains 7, match/switch 5 (6 pts) (nesting depth added 9). 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::revision::find_last_merged_revision (cognitive 50) lore-revision/src/revision.rs:1065— lore_revision::revision::find_last_merged_revision has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (46 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
lore_revision::commit::weave_history (cognitive 46) lore-revision/src/commit.rs:3367— lore_revision::commit::weave_history has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (39 pts), loops 3 (6 pts), boolean chains 1 (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.
lore_revision::file::diff::emit_diff3_changes (cognitive 45) lore-revision/src/file/diff.rs:469— 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.
FunctionTooLong: lore_server::server::async_main lore-server/src/server.rs:1870— FunctionTooLong — lore_server::server::async_main runs 402 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 302 over it, 4.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::branch::push::collect_fragments_and_push lore-revision/src/branch/push.rs:704— FunctionTooLong — lore_revision::branch::push::collect_fragments_and_push runs 388 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 288 over it, 3.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::stage::stage_from_parent_revision_in_operation lore-revision/src/stage.rs:2575— FunctionTooLong — lore_revision::stage::stage_from_parent_revision_in_operation runs 371 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::revision::sync::sync lore-revision/src/revision/sync.rs:418— FunctionTooLong — lore_revision::revision::sync::sync runs 353 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 253 over it, 3.53× 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:1949— 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::fs::realize::realize_file_merge lore-revision/src/fs/realize.rs:2175— FunctionTooLong — lore_revision::fs::realize::realize_file_merge runs 343 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 243 over it, 3.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::repository::status::status lore-revision/src/repository/status.rs:1365— FunctionTooLong — lore_revision::repository::status::status runs 319 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 219 over it, 3.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::file::unstage::unstage_node lore-revision/src/file/unstage.rs:916— 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::revision::restore::restore lore-revision/src/revision/restore.rs:216— FunctionTooLong — lore_revision::revision::restore::restore 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::state::diff::add_change_for_paired_nodes lore-revision/src/state/diff.rs:916— 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::state::collect_new_fragments lore-revision/src/state.rs:7484— FunctionTooLong — lore_revision::state::collect_new_fragments runs 287 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 187 over it, 2.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::link::add::add lore-revision/src/link/add.rs:44— FunctionTooLong — lore_revision::link::add::add runs 285 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 185 over it, 2.85× 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:1168— FunctionTooLong — lore_revision::file::stage::stage_move runs 280 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 180 over it, 2.80× 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:317— FunctionTooLong — lore_transport::connection::connect_impl runs 280 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 180 over it, 2.80× 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:4328— FunctionTooLong — lore_revision::branch::merge::merge_into runs 271 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 171 over it, 2.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::revision::diff3_with_source_cap lore-revision/src/revision.rs:327— 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:571— FunctionTooLong — lore_revision::fs::realize::verify_filesystem runs 259 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 159 over it, 2.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::stage::stage_link_paths_from_parent_revision lore-revision/src/stage.rs:3108— FunctionTooLong — lore_revision::stage::stage_link_paths_from_parent_revision runs 258 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 158 over it, 2.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::commit::commit_with_metadata_in_operation lore-revision/src/commit.rs:560— FunctionTooLong — lore_revision::commit::commit_with_metadata_in_operation runs 250 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 150 over it, 2.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::stage::stage_directory lore-revision/src/stage.rs:1378— FunctionTooLong — lore_revision::stage::stage_directory runs 246 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 146 over it, 2.46× 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:1169— FunctionTooLong — lore_revision::state::os_diff::diff_filesystem_directory_walk runs 230 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 130 over it, 2.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_client::cli::commands::repository::handle_repository_status lore-client/src/cli/commands/repository.rs:513— FunctionTooLong — lore_client::cli::commands::repository::handle_repository_status runs 220 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 120 over it, 2.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::stage::stage_filesystem_path lore-revision/src/stage.rs:369— FunctionTooLong — lore_revision::stage::stage_filesystem_path runs 218 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::commit::commit_link_only lore-revision/src/commit.rs:1079— FunctionTooLong — lore_revision::commit::commit_link_only runs 217 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: lore_revision::commit::commit_directory lore-revision/src/commit.rs:1921— FunctionTooLong — lore_revision::commit::commit_directory runs 206 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 106 over it, 2.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.
FileTooLong: src/state.rs lore-revision/src/state.rs— FileTooLong — 5363 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 73 free functions. The bar is 500 significant lines; this is 4863 over it, 10.73× 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 — 3263 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: LocalImmutableStore (4 blocks, 314-4562). The bar is 500 significant lines; this is 2763 over it, 6.53× 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 — 3245 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 2745 over it, 6.49× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/commit.rs lore-revision/src/commit.rs— FileTooLong — 3049 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 44 free functions. The bar is 500 significant lines; this is 2549 over it, 6.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/branch.rs lore-revision/src/branch.rs— FileTooLong — 2579 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 82 free functions. The bar is 500 significant lines; this is 2079 over it, 5.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/stage.rs lore-revision/src/stage.rs— FileTooLong — 2530 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 2030 over it, 5.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/repository.rs lore-revision/src/repository.rs— FileTooLong — 2352 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 1852 over it, 4.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/interface.rs lore/src/interface.rs— FileTooLong — 2232 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 304 free functions. The bar is 500 significant lines; this is 1732 over it, 4.46× 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 — 1807 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 1307 over it, 3.61× 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 — 1802 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 1302 over it, 3.60× 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 — 1739 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 1239 over it, 3.48× 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 — 1649 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 1149 over it, 3.30× 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 — 1431 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 43 free functions. The bar is 500 significant lines; this is 931 over it, 2.86× 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 — 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: repository/clone.rs lore-revision/src/repository/clone.rs— FileTooLong — 1404 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 904 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: src/write.rs lore-storage/src/write.rs— FileTooLong — 1364 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 43 free functions. The bar is 500 significant lines; this is 864 over it, 2.73× 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 — 1341 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, 533-2179). The bar is 500 significant lines; this is 841 over it, 2.68× 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: commands/repository.rs lore-client/src/cli/commands/repository.rs— FileTooLong — 1215 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 715 over it, 2.43× 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 — 1213 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 713 over it, 2.43× 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 — 1210 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 710 over it, 2.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/read.rs lore-storage/src/read.rs— FileTooLong — 1188 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 688 over it, 2.38× 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 — 1184 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 684 over it, 2.37× 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/revision.rs lore-revision/src/revision.rs— FileTooLong — 1180 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 680 over it, 2.36× 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 — 1179 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 679 over it, 2.36× 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 — 1136 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 636 over it, 2.27× 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.
lore_revision::stage::stage_node_from_metadata (cyclomatic 57) lore-revision/src/stage.rs:1949— lore_revision::stage::stage_node_from_metadata has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lore_revision::revision::sync::sync (cyclomatic 55) lore-revision/src/revision/sync.rs:418— lore_revision::revision::sync::sync has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent 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_file_merge (cyclomatic 53) lore-revision/src/fs/realize.rs:2175— lore_revision::fs::realize::realize_file_merge has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent 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:327— 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::status::status (cyclomatic 49) lore-revision/src/repository/status.rs:1365— lore_revision::repository::status::status 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::branch::push::collect_fragments_and_push (cyclomatic 46) lore-revision/src/branch/push.rs:704— lore_revision::branch::push::collect_fragments_and_push has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent 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::verify_filesystem (cyclomatic 41) lore-revision/src/fs/realize.rs:571— lore_revision::fs::realize::verify_filesystem 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_revision::stage::stage_from_parent_revision_in_operation (cyclomatic 39) lore-revision/src/stage.rs:2575— 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::repository::load_and_connect_with_token (cyclomatic 38) lore-revision/src/repository.rs:2105— lore_revision::repository::load_and_connect_with_token has cyclomatic complexity 38 (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::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 35) lore-revision/src/file/unstage.rs:916— lore_revision::file::unstage::unstage_node 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::commit::commit_with_metadata_in_operation (cyclomatic 31) lore-revision/src/commit.rs:560— lore_revision::commit::commit_with_metadata_in_operation has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lore_revision::file::stage::stage_move (cyclomatic 30) lore-revision/src/file/stage.rs:1168— lore_revision::file::stage::stage_move 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_revision::stage::stage_filesystem_path (cyclomatic 29) lore-revision/src/stage.rs:369— lore_revision::stage::stage_filesystem_path 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:916— 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::stage::stage_directory (cyclomatic 27) lore-revision/src/stage.rs:1378— lore_revision::stage::stage_directory has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lore_revision::repository::branch_switch_target (cyclomatic 26) lore-revision/src/repository.rs:2993— 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::state::os_diff::diff_filesystem_directory_walk (cyclomatic 26) lore-revision/src/state/os_diff.rs:1169— lore_revision::state::os_diff::diff_filesystem_directory_walk 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::immutable::cache_through (cyclomatic 26) lore-revision/src/immutable.rs:574— lore_revision::immutable::cache_through has cyclomatic complexity 26 (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::stage::stage_link_paths_from_parent_revision (cyclomatic 24) lore-revision/src/stage.rs:3108— 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::state::collect_new_fragments (cyclomatic 23) lore-revision/src/state.rs:7484— lore_revision::state::collect_new_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::commit::commit_directory (cyclomatic 22) lore-revision/src/commit.rs:1921— lore_revision::commit::commit_directory has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lore_revision::repository::layer_branch_switch (cyclomatic 22) lore-revision/src/repository.rs:3257— 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::fs::realize::realize_change_modify_add (cyclomatic 22) lore-revision/src/fs/realize.rs:1764— 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.
Hotspot: lore-revision/src/stage.rs lore-revision/src/stage.rs:1949— lore-revision/src/stage.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in lore_revision::stage::stage_node_from_metadata at line 1949. 2 of those changes were fix/bug commits, and the other 43 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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:744— lore-revision/src/state.rs changed 78 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in State::serialize at line 744. 5 of those changes were fix/bug commits, and the other 73 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/fs/realize.rs lore-revision/src/fs/realize.rs:2175— lore-revision/src/fs/realize.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in lore_revision::fs::realize::realize_file_merge at line 2175. 2 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/revision/sync.rs lore-revision/src/revision/sync.rs:418— lore-revision/src/revision/sync.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in lore_revision::revision::sync::sync at line 418. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/repository.rs lore-revision/src/repository.rs:2105— lore-revision/src/repository.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in lore_revision::repository::load_and_connect_with_token at line 2105. 2 of those changes were fix/bug commits, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-revision/src/repository/status.rs lore-revision/src/repository/status.rs:1365— lore-revision/src/repository/status.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in lore_revision::repository::status::status at line 1365. 3 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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:560— lore-revision/src/commit.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in lore_revision::commit::commit_with_metadata_in_operation at line 560. 1 of those changes was a fix/bug commit, and the other 28 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-revision/src/file/stage.rs lore-revision/src/file/stage.rs:1168— lore-revision/src/file/stage.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in lore_revision::file::stage::stage_move at line 1168. 1 of those changes was a fix/bug commit, and the other 28 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-server/src/server.rs lore-server/src/server.rs:1870— lore-server/src/server.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in lore_server::server::async_main at line 1870. 2 of those changes were fix/bug commits, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/file/unstage.rs lore-revision/src/file/unstage.rs:916— lore-revision/src/file/unstage.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in lore_revision::file::unstage::unstage_node at line 916. 1 of those changes was a fix/bug commit, and the other 22 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-revision/src/revision.rs lore-revision/src/revision.rs:327— lore-revision/src/revision.rs changed 16 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 327. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-storage/src/local/immutable_store.rs lore-storage/src/local/immutable_store.rs:2230— lore-storage/src/local/immutable_store.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in LocalImmutableStore::evict_group_sized at line 2230. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/branch/push.rs lore-revision/src/branch/push.rs:704— lore-revision/src/branch/push.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in lore_revision::branch::push::collect_fragments_and_push at line 704. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +00:00' --full-history --no-merges -- lore-revision/src/branch/push.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:539— lore-revision/src/repository/clone.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in lore_revision::repository::clone::process_block_item at line 539. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-storage/src/write.rs lore-storage/src/write.rs:1044— lore-storage/src/write.rs changed 19 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 1044. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/immutable.rs lore-revision/src/immutable.rs:574— lore-revision/src/immutable.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in lore_revision::immutable::cache_through at line 574. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/branch/merge.rs lore-revision/src/branch/merge.rs:445— lore-revision/src/branch/merge.rs changed 22 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 445. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-revision/src/state/diff.rs lore-revision/src/state/diff.rs:916— lore-revision/src/state/diff.rs changed 16 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 916. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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:2758— lore-revision/src/branch.rs changed 29 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 2758. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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/repository.rs lore-client/src/cli/commands/repository.rs:513— lore-client/src/cli/commands/repository.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in lore_client::cli::commands::repository::handle_repository_status at line 513. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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:1199— lore-revision/src/file/reset.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in lore_revision::file::reset::reset_walk_path at line 1199. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-client/src/cli/commands/branch.rs lore-client/src/cli/commands/branch.rs:798— lore-client/src/cli/commands/branch.rs changed 13 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 798. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-revision/src/link/add.rs lore-revision/src/link/add.rs:44— lore-revision/src/link/add.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in lore_revision::link::add::add at line 44. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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-revision/src/util/fs.rs lore-revision/src/util/fs.rs:372— lore-revision/src/util/fs.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in lore_revision::util::fs::filesystem_path_and_info at line 372. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +00:00' --full-history --no-merges -- lore-revision/src/util/fs.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lore-transport/src/connection.rs lore-transport/src/connection.rs:317— lore-transport/src/connection.rs changed 10 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 317. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 07:34:20 +00:00' --until='2026-09-29 07:34:20 +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.
Duplicated block (10 lines × 2) lore/src/file.rs:452— lore/src/file.rs:452-461 | lore/src/revision.rs:574-583 — 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-client/src/cli/commands/file.rs:1677— lore-client/src/cli/commands/file.rs:1677-1686 | lore-client/src/cli/commands/file.rs:1730-1739 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) lore-revision/src/branch/merge.rs:3394— lore-revision/src/branch/merge.rs:3394-3403 | lore-revision/src/branch/merge.rs:3879-3888 — both copies are in the same file, so extract the block into 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:4647— lore-revision/src/branch/merge.rs:4647-4656 | lore-revision/src/revision/restore.rs:522-531 — before extracting anything, compare `lore-revision/src/branch/merge.rs` and `lore-revision/src/revision/restore.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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:1252— lore-revision/src/commit.rs:1252-1262 | 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/file/dirty.rs:1157— lore-revision/src/file/dirty.rs:1157-1166 | lore-revision/src/file/dirty.rs:1369-1378 — both copies are in the same file, so extract the block into 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/file/dirty.rs:1254— lore-revision/src/file/dirty.rs:1254-1263 | lore-revision/src/file/stage.rs:1423-1432 — 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-revision/src/fs/realize.rs:2518— lore-revision/src/fs/realize.rs:2518-2527 | lore-revision/src/fs/realize.rs:2578-2587 — both copies are in the same file, so extract the block into 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/repository/clone.rs:848— lore-revision/src/repository/clone.rs:848-857 | lore-revision/src/repository/create.rs:217-226 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) lore-revision/src/repository/info.rs:130— lore-revision/src/repository/info.rs:130-139 | lore-revision/src/repository/info.rs:175-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 (10 lines × 2) lore-revision/src/state.rs:1444— lore-revision/src/state.rs:1444-1453 | lore-revision/src/state.rs:1798-1807 — both copies are in the same file, so extract the block into 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:1489— lore-revision/src/state.rs:1489-1498 | lore-revision/src/state.rs:1526-1535 — both copies are in the same file, so extract the block into 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:5264— lore-revision/src/state.rs:5264-5273 | lore-revision/src/state.rs:5374-5383 — both copies are in the same file, so extract the block into 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:228— lore-server/src/store/replica.rs:228-237 | lore-server/src/store/replicated_store.rs:256-265 — 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-storage/src/read.rs:283— lore-storage/src/read.rs:283-292 | lore-storage/src/read.rs:1434-1443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (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:606— lore-transport/src/connection.rs:606-615 | lore-transport/src/connection.rs:640-649 — both copies are in the same file, so extract the block into 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-transport/src/grpc/mod.rs:484— lore-transport/src/grpc/mod.rs:484-493 | lore-transport/src/grpc/mod.rs:519-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) lore-transport/src/grpc/storage_client.rs:1174— lore-transport/src/grpc/storage_client.rs:1174-1183 | lore-transport/src/grpc/storage_client.rs:1222-1231 — both copies are in the same file, so extract the block into 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:413— lore/src/file.rs:413-422 | lore/src/revision.rs:543-552 — 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/src/storage/put_file.rs:147— lore/src/storage/put_file.rs:147-157 | lore/src/storage/put_file_resolved.rs:166-176 — 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-revision/src/branch/merge.rs:4459— lore-revision/src/branch/merge.rs:4459-4469 | 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 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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:4497— lore-revision/src/branch/merge.rs:4497-4507 | 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 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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:2685— lore-revision/src/commit.rs:2685-2695 | lore-revision/src/commit.rs:2737-2747 — both copies are in the same file, so extract the block into 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/file/stage.rs:704— lore-revision/src/file/stage.rs:704-717 | lore-revision/src/metadata/set.rs:417-427 — 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-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 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (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:567— lore-revision/src/revision.rs:567-577 | lore-revision/src/revision.rs:612-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) lore-revision/src/state.rs:4178— lore-revision/src/state.rs:4178-4188 | lore-revision/src/state.rs:4253-4263 — both copies are in the same file, so extract the block into 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:6105— lore-revision/src/state.rs:6105-6115 | lore-revision/src/state.rs:6117-6127 — both copies are in the same file, so extract the block into 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:7178— lore-revision/src/state.rs:7178-7188 | lore-revision/src/state.rs:7202-7212 — both copies are in the same file, so extract the block into 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 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
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:558-568 — 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-server/src/quic/stream_handler.rs:617— lore-server/src/quic/stream_handler.rs:617-627 | lore-transport/src/quic/response_reader.rs:250-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.
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-storage/src/defragment.rs:755— lore-storage/src/defragment.rs:755-765 | lore-storage/src/defragment.rs:1314-1326 — both copies are in the same file, so extract the block into 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-telemetry/src/metrics/grpc_tower_layer.rs:87— lore-telemetry/src/metrics/grpc_tower_layer.rs:87-97 | lore-telemetry/src/metrics/http_tower_layer.rs:85-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) lore-transport/src/auth/exchange.rs:135— lore-transport/src/auth/exchange.rs:135-145 | lore-transport/src/auth/exchange.rs:311-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) lore-transport/src/grpc/storage_client.rs:959— lore-transport/src/grpc/storage_client.rs:959-969 | lore-transport/src/grpc/storage_client.rs:1043-1053 — both copies are in the same file, so extract the block into 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:1088— lore-transport/src/quic/client.rs:1088-1098 | lore-transport/src/quic/client.rs:1116-1126 — both copies are in the same file, so extract the block into 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/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.
Duplicated block (11 lines × 2) lore-server/src/grpc/revision/v1/service.rs:245— lore-server/src/grpc/revision/v1/service.rs:245-255 | lore-server/src/grpc/revision_service.rs:328-338 — 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 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) lore-server/src/grpc/revision/v1/service.rs:260— lore-server/src/grpc/revision/v1/service.rs:260-270 | lore-server/src/grpc/revision_service.rs:343-353 — 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 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) lore/src/storage/mutable_compare_and_swap.rs:144— lore/src/storage/mutable_compare_and_swap.rs:144-156 | lore/src/storage/mutable_load.rs:137-147 — 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/src/branch.rs:1671— lore/src/branch.rs:1671-1684 | lore/src/repository.rs:1279-1292 — 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/src/call.rs:71— lore/src/call.rs:71-84 | lore/src/call.rs:184-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) lore-client/src/cli/commands/file.rs:1050— lore-client/src/cli/commands/file.rs:1050-1063 | lore-client/src/cli/commands/revision.rs:2376-2389 — 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:1028— lore-client/src/cli/commands/repository.rs:1028-1041 | lore-client/src/cli/commands/revision.rs:1481-1494 — 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:1141— lore-client/src/cli/commands/repository.rs:1141-1154 | lore-client/src/cli/commands/repository.rs:1305-1318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) lore-client/src/cli/commands/revision.rs:981— lore-client/src/cli/commands/revision.rs:981-994 | lore-client/src/cli/commands/revision.rs:1114-1127 — both copies are in the same file, so extract the block into 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:1770— lore-client/src/cli/commands/revision.rs:1770-1783 | lore-client/src/cli/commands/revision.rs:2066-2079 — both copies are in the same file, so extract the block into 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:4196— lore-revision/src/branch/merge.rs:4196-4209 | lore-revision/src/branch/merge.rs:4547-4560 — both copies are in the same file, so extract the block into 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:1728— lore-revision/src/link.rs:1728-1741 | 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/repository.rs:3756— lore-revision/src/repository.rs:3756-3769 | 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/diff.rs:1447— lore-revision/src/state/diff.rs:1447-1460 | lore-revision/src/state/diff.rs:1471-1484 — both copies are in the same file, so extract the block into 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:3808— lore-revision/src/state.rs:3808-3821 | lore-revision/src/state.rs:3883-3896 — both copies are in the same file, so extract the block into 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/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 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
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-server/src/store/replica.rs:270— lore-server/src/store/replica.rs:270-283 | lore-server/src/store/replicated_store.rs:295-308 — 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-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/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-storage/src/local/immutable_store.rs:836— lore-storage/src/local/immutable_store.rs:836-849 | lore-storage/src/local/mutable_store.rs:510-523 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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-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:275— lore-server/src/grpc/revision/v1/service.rs:275-288 | lore-server/src/grpc/revision_service.rs:373-386 — 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 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) lore-server/src/quic/storage_service.rs:541— lore-server/src/quic/storage_service.rs:541-554 | lore-server/src/quic/storage_service_v4.rs:457-470 — 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/revision/v1/revision_list.rs:302— lore-server/src/grpc/revision/v1/revision_list.rs:302-318 | lore-server/src/grpc/revision/v1/revision_list.rs:328-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) lore/src/storage/remote.rs:54— lore/src/storage/remote.rs:54-65 | lore/src/storage/remote.rs:73-84 — both copies are in the same file, so extract the block into 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-aws/src/dynamodb.rs:361— lore-aws/src/dynamodb.rs:361-372 | lore-aws/src/dynamodb.rs:570-581 — both copies are in the same file, so extract the block into 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:1287— lore-client/src/cli/commands/revision.rs:1287-1298 | lore-client/src/cli/commands/revision.rs:1348-1359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) lore-revision/src/branch/merge.rs:3974— lore-revision/src/branch/merge.rs:3974-3985 | lore-revision/src/branch/merge.rs:4000-4011 — both copies are in the same file, so extract the block into 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/commit.rs:3405— lore-revision/src/commit.rs:3405-3416 | lore-revision/src/commit.rs:3501-3512 — both copies are in the same file, so extract the block into 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:1369— lore-revision/src/file/reset.rs:1369-1380 | lore-revision/src/file/reset.rs:1509-1520 — both copies are in the same file, so extract the block into 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:44— lore-revision/src/metadata/clear.rs:44-55 | lore-revision/src/metadata/clear.rs:99-110 — both copies are in the same file, so extract the block into 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/repository.rs:981— lore-revision/src/repository.rs:981-992 | lore-revision/src/repository.rs:1028-1039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) lore-revision/src/state/diff.rs:689— lore-revision/src/state/diff.rs:689-700 | lore-revision/src/state/diff.rs:782-793 — both copies are in the same file, so extract the block into 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:207— lore-revision/src/state.rs:207-218 | lore-revision/src/state.rs:298-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) lore-revision/src/store/remote.rs:90— lore-revision/src/store/remote.rs:90-101 | lore-revision/src/store/remote.rs:323-334 — both copies are in the same file, so extract the block into 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/store/replica.rs:311— lore-server/src/store/replica.rs:311-322 | lore-server/src/store/replica.rs:359-370 — both copies are in the same file, so extract the block into 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-storage/src/local/immutable_store.rs:4411— lore-storage/src/local/immutable_store.rs:4411-4422 | lore-storage/src/local/immutable_store.rs:4429-4440 — both copies are in the same file, so extract the block into 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/mutable_store.rs:1319— lore-storage/src/local/mutable_store.rs:1319-1330 | lore-storage/src/local/mutable_store.rs:1460-1471 — both copies are in the same file, so extract the block into 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-transport/src/grpc/storage_client.rs:1187— lore-transport/src/grpc/storage_client.rs:1187-1198 | lore-transport/src/grpc/storage_client.rs:1235-1246 — both copies are in the same file, so extract the block into 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:178— lore-server/src/grpc/repository/v1/service.rs:178-189 | lore-server/src/grpc/repository_service.rs:142-153 — 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:194— lore-server/src/grpc/repository/v1/service.rs:194-205 | lore-server/src/grpc/repository_service.rs:158-169 — 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/file/dirty.rs:246— lore-revision/src/file/dirty.rs:246-257 | lore-revision/src/file/dirty.rs:368-380 — both copies are in the same file, so extract the block into 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:120— lore-revision/src/branch/create.rs:120-132 | lore-revision/src/branch/create.rs:258-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) lore-revision/src/revision.rs:966— lore-revision/src/revision.rs:966-977 | lore-revision/src/revision.rs:1082-1094 — both copies are in the same file, so extract the block into 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 (9 lines × 2) lore/src/dependency.rs:82— lore/src/dependency.rs:82-90 | lore/src/dependency.rs:195-203 — both copies are in the same file, so extract the block into 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:93— lore/src/dependency.rs:93-101 | lore/src/dependency.rs:206-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 (9 lines × 2) lore/src/revision_tree/delete.rs:181— lore/src/revision_tree/delete.rs:181-189 | lore/src/revision_tree/modify.rs:173-181 — 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-aws/src/store/immutable_store.rs:1092— lore-aws/src/store/immutable_store.rs:1092-1100 | lore-aws/src/store/immutable_store.rs:1155-1163 — both copies are in the same file, so extract the block into 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:994— lore-io/src/iocp.rs:994-1002 | lore-io/src/uring.rs:950-958 — 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/merge.rs:2280— lore-revision/src/branch/merge.rs:2280-2288 | lore-revision/src/branch/merge.rs:3205-3213 — both copies are in the same file, so extract the block into 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:2163— lore-revision/src/branch.rs:2163-2171 | lore-revision/src/branch.rs:2242-2250 — both copies are in the same file, so extract the block into 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/metadata/set.rs:157— lore-revision/src/metadata/set.rs:157-165 | lore-revision/src/metadata/set.rs:425-433 — both copies are in the same file, so extract the block into 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/repository/clone.rs:1608— lore-revision/src/repository/clone.rs:1608-1616 | lore-revision/src/repository/clone.rs:1623-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 (9 lines × 2) lore-revision/src/repository.rs:1086— lore-revision/src/repository.rs:1086-1094 | lore-revision/src/repository.rs:1191-1199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) lore-revision/src/state.rs:3393— lore-revision/src/state.rs:3393-3401 | lore-revision/src/state.rs:3414-3422 — both copies are in the same file, so extract the block into 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:10242— lore-revision/src/state.rs:10242-10250 | lore-revision/src/state.rs:10252-10260 — both copies are in the same file, so extract the block into 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-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-storage/src/conformance.rs:303— lore-storage/src/conformance.rs:303-311 | 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:954— lore-storage/src/local/immutable_store.rs:954-962 | lore-storage/src/local/mutable_store.rs:590-598 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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/local/immutable_store.rs:4954— lore-storage/src/local/immutable_store.rs:4954-4962 | lore-storage/src/local/mutable_store.rs:1660-1668 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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-storage/src/read.rs:607— lore-storage/src/read.rs:607-615 | lore-storage/src/read.rs:854-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 (9 lines × 2) lore-telemetry/src/metrics/grpc_tower_layer.rs:129— lore-telemetry/src/metrics/grpc_tower_layer.rs:129-137 | lore-telemetry/src/metrics/http_tower_layer.rs:127-135 — 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-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-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 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) lore-revision/src/state/diff.rs:442— lore-revision/src/state/diff.rs:442-450 | lore-revision/src/state/os_diff.rs:2262-2270 — 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-aws/src/store/immutable_store.rs:1072— lore-aws/src/store/immutable_store.rs:1072-1079 | lore-aws/src/store/immutable_store.rs:1132-1139 — both copies are in the same file, so extract the block into 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:1303— lore-client/src/cli/commands/revision.rs:1303-1311 | lore-client/src/cli/commands/revision.rs:1364-1371 — both copies are in the same file, so extract the block into 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:3313— lore-revision/src/branch/merge.rs:3313-3320 | lore-revision/src/branch/merge.rs:3512-3519 — both copies are in the same file, so extract the block into 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:2266— lore-revision/src/fs/realize.rs:2266-2275 | lore-revision/src/fs/realize.rs:2366-2373 — both copies are in the same file, so extract the block into 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:680— lore-revision/src/metadata.rs:680-687 | lore-revision/src/metadata.rs:719-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) lore-revision/src/repository.rs:1077— lore-revision/src/repository.rs:1077-1084 | lore-revision/src/repository.rs:1182-1189 — both copies are in the same file, so extract the block into 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/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-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/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:233-240 — 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/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/handlers/repository_create.rs:161— lore-server/src/grpc/handlers/repository_create.rs:161-170 | lore-server/src/grpc/repository/v1/repository_create.rs:235-242 — 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/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_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-storage/src/fragment_engine.rs:139— lore-storage/src/fragment_engine.rs:139-146 | lore-storage/src/fragment_engine.rs:567-574 — both copies are in the same file, so extract the block into 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:2001— lore-storage/src/local/immutable_store.rs:2001-2008 | lore-storage/src/local/mutable_store.rs:1351-1358 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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:918— lore-transport/src/grpc/storage_client.rs:918-925 | lore-transport/src/grpc/storage_client.rs:1002-1009 — both copies are in the same file, so extract the block into 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/src/revision_tree/handle.rs:267— lore/src/revision_tree/handle.rs:267-274 | lore/src/storage/handle.rs:95-102 — `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/grpc/environment/v1/service.rs:91— lore-server/src/grpc/environment/v1/service.rs:91-98 | 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/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/protocol/replication_store/copy.rs:84— lore-server/src/protocol/replication_store/copy.rs:84-91 | lore-server/src/protocol/replication_store/obliterate.rs:97-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) lore-revision/src/revision/sync.rs:477— lore-revision/src/revision/sync.rs:477-484 | lore-revision/src/revision/sync.rs:1076-1083 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) lore-revision/src/commit.rs:798— lore-revision/src/commit.rs:798-805 | lore-revision/src/commit.rs:2770-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 (8 lines × 2) lore-revision/src/file/dirty.rs:709— lore-revision/src/file/dirty.rs:709-716 | lore-revision/src/file/dirty.rs:741-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 (8 lines × 2) lore-revision/src/state.rs:2445— lore-revision/src/state.rs:2445-2452 | lore-revision/src/state.rs:2588-2595 — both copies are in the same file, so extract the block into 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:198— lore/src/revision_tree/delete.rs:198-204 | lore/src/revision_tree/modify.rs:183-189 — 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) 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-client/src/cli/commands/revision.rs:916— lore-client/src/cli/commands/revision.rs:916-922 | lore-client/src/cli/commands/revision.rs:1047-1053 — both copies are in the same file, so extract the block into 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:974— lore-client/src/cli/commands/revision.rs:974-980 | lore-client/src/cli/commands/revision.rs:1107-1113 — both copies are in the same file, so extract the block into 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:1004— lore-client/src/cli/commands/revision.rs:1004-1010 | lore-client/src/cli/commands/revision.rs:1137-1144 — both copies are in the same file, so extract the block into 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:2723— lore-revision/src/commit.rs:2723-2730 | lore-revision/src/commit.rs:3120-3126 — both copies are in the same file, so extract the block into 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:568— lore-revision/src/file/stage.rs:568-574 | lore-revision/src/repository/status.rs:1388-1396 — 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/state.rs:249— lore-revision/src/state.rs:249-257 | lore-revision/src/state.rs:347-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) lore-revision/src/state.rs:3413— lore-revision/src/state.rs:3413-3419 | lore-revision/src/state.rs:6218-6225 — both copies are in the same file, so extract the block into 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/store/mutable.rs:130— lore-revision/src/store/mutable.rs:130-136 | lore-revision/src/store/mutable.rs:177-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 (7 lines × 2) lore-revision/src/util/path.rs:693— lore-revision/src/util/path.rs:693-699 | lore-revision/src/util/path.rs:722-728 — both copies are in the same file, so extract the block into 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:1478— lore-revision/src/state/os_diff.rs:1478-1484 | lore-revision/src/state/os_diff.rs:1580-1586 — both copies are in the same file, so extract the block into 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/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-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:537-543 — 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:44— lore-server/src/protocol/storage/mutable_cas.rs:44-50 | 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-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-storage/src/local/immutable_store.rs:709— lore-storage/src/local/immutable_store.rs:709-715 | lore-storage/src/local/mutable_store.rs:393-399 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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/mutable_store.rs:1273— lore-storage/src/local/mutable_store.rs:1273-1279 | lore-storage/src/local/mutable_store.rs:1410-1416 — both copies are in the same file, so extract the block into 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-transport/src/grpc/storage_client.rs:708— lore-transport/src/grpc/storage_client.rs:708-714 | lore-transport/src/grpc/storage_client.rs:771-777 — both copies are in the same file, so extract the block into 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-client/src/cli/commands/branch.rs:1756— lore-client/src/cli/commands/branch.rs:1756-1762 | lore-client/src/cli/commands/repository.rs:1664-1670 — 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:388— lore-storage/src/local/fan_out.rs:388-397 | lore-storage/src/local/immutable_store/info.rs:69-75 — 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:665— lore-client/src/cli/commands/repository.rs:665-671 | lore-client/src/cli/commands/repository.rs:730-736 — both copies are in the same file, so extract the block into 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:658— lore-revision/src/commit.rs:658-664 | lore-revision/src/commit.rs:1171-1177 — both copies are in the same file, so extract the block into 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.
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/file/diff.rs:308— lore-revision/src/file/diff.rs:308-322 | lore-revision/src/file/diff.rs:449-463 — both copies are in the same file, so extract the block into 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:508— lore-revision/src/file/diff.rs:508-522 | lore-revision/src/file/diff.rs:656-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) lore-revision/src/fs/realize.rs:301— lore-revision/src/fs/realize.rs:301-315 | lore-revision/src/fs/realize.rs:323-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 (15 lines × 2) lore-revision/src/fs/realize.rs:2421— lore-revision/src/fs/realize.rs:2421-2435 | lore-revision/src/fs/realize.rs:2529-2543 — both copies are in the same file, so extract the block into 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:449— lore-revision/src/metadata.rs:449-463 | lore-revision/src/metadata.rs:483-497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) lore-revision/src/node.rs:1318— lore-revision/src/node.rs:1318-1332 | lore-revision/src/node.rs:1342-1356 — both copies are in the same file, so extract the block into 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:934— lore-revision/src/stage.rs:934-948 | lore-revision/src/stage.rs:960-974 — both copies are in the same file, so extract the block into 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:225— lore-revision/src/state.rs:225-240 | lore-revision/src/state.rs:329-343 — both copies are in the same file, so extract the block into 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:898— lore-revision/src/state.rs:898-912 | lore-revision/src/state.rs:990-1004 — both copies are in the same file, so extract the block into 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:149— lore-revision/src/state/dump.rs:149-163 | lore-revision/src/state/dump.rs:166-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
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/state/os_diff.rs:1521— lore-revision/src/state/os_diff.rs:1521-1535 | lore-revision/src/state/os_diff.rs:1700-1714 — both copies are in the same file, so extract the block into 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/revision/v1/service.rs:226— lore-server/src/grpc/revision/v1/service.rs:226-240 | lore-server/src/grpc/revision_service.rs:201-215 — 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 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (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/mutable_store.rs:1111— lore-storage/src/local/mutable_store.rs:1111-1125 | lore-storage/src/local/mutable_store.rs:1174-1190 — both copies are in the same file, so extract the block into 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/immutable_store.rs:4809— lore-storage/src/local/immutable_store.rs:4809-4823 | lore-storage/src/local/immutable_store.rs:4867-4883 — both copies are in the same file, so extract the block into 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:3184— lore-revision/src/state.rs:3184-3198 | lore-revision/src/state.rs:3280-3295 — both copies are in the same file, so extract the block into 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:240— lore-server/src/grpc/storage/v1/get_resolved.rs:240-254 | lore-server/src/grpc/storage/v1/put_resolved.rs:277-291 — 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:465— lore-storage/src/conformance.rs:465-479 | lore-storage/src/conformance.rs:863-877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
lore_storage::local::immutable_store::flush_locked_group (cognitive 83) lore-storage/src/local/immutable_store.rs:4706— lore_storage::local::immutable_store::flush_locked_group has cognitive complexity 83 (threshold 15). Drivers by points: if/else 24 (58 pts), boolean chains 11, loops 3 (9 pts), match/switch 2 (5 pts) (nesting depth added 43). 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 47) lore-storage/src/write.rs:1044— lore_storage::write::leader_body has cognitive complexity 47 (threshold 15). Drivers by points: if/else 26 (38 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_storage::read::load_fragment (cognitive 33) lore-storage/src/read.rs:217— lore_storage::read::load_fragment has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_storage::write::compare_previous_chunks (cognitive 32) lore-storage/src/write.rs:2084— 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:477— 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:1167— 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:487— 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 24) lore-storage/src/local/immutable_store.rs:450— lore_storage::local::immutable_store::detect_any_older_immutable_bucket has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_storage::read::resolve_root (cognitive 23) lore-storage/src/read.rs:1398— lore_storage::read::resolve_root has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_storage::read::read_content_into_buffer (cognitive 22) lore-storage/src/read.rs:712— lore_storage::read::read_content_into_buffer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_storage::fs_util::unlink_recursive (cognitive 22) lore-storage/src/fs_util.rs:30— 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::immutable_store::oodle_migration::migrate_bucket (cognitive 21) lore-storage/src/local/immutable_store/oodle_migration.rs:64— lore_storage::local::immutable_store::oodle_migration::migrate_bucket has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_storage::defragment::read_defragment (cognitive 20) lore-storage/src/defragment.rs:1210— lore_storage::defragment::read_defragment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 5 (6 pts), boolean chains 3 (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::mutable_store::maybe_fan_out_mutable_group (cognitive 20) lore-storage/src/local/mutable_store.rs:1640— 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::compress::decompress_into (cognitive 18) lore-storage/src/compress.rs:691— 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:822— 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::local::immutable_store::maybe_fan_out_immutable_group (cognitive 18) lore-storage/src/local/immutable_store.rs:4939— 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 17) lore-storage/src/read.rs:159— lore_storage::read::remote_get_retry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 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.
lore_storage::write::file_matches (cognitive 16) lore-storage/src/write.rs:1635— lore_storage::write::file_matches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MethodTooLong: State.serialize lore-revision/src/state.rs:744— MethodTooLong — serialize runs 260 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 160 over it, 2.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LocalImmutableStore.store lore-storage/src/local/immutable_store.rs:1676— MethodTooLong — store runs 204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StorageServiceV4.run_request_handler lore-server/src/quic/storage_service_v4.rs:178— 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 lore-storage/src/local/immutable_store.rs:4286— MethodTooLong — verify_fragment runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GrpcServerBuilder.with_jwt_verifier lore-server/src/grpc/server.rs:656— MethodTooLong — with_jwt_verifier runs 178 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 78 over it, 1.78× 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: LocalMutableStore.flush_all lore-storage/src/local/mutable_store.rs:986— MethodTooLong — flush_all runs 173 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 73 over it, 1.73× 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.new lore-storage/src/local/immutable_store.rs:1031— MethodTooLong — new runs 159 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 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LocalImmutableStore.evict_group_sized lore-storage/src/local/immutable_store.rs:2230— MethodTooLong — evict_group_sized runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
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:3956— MethodTooLong — verify runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StreamHandler.handle_stream lore-server/src/quic/stream_handler.rs:502— MethodTooLong — handle_stream runs 124 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 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: State.move_node lore-revision/src/state.rs:2692— 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: LocalMutableStore.new lore-storage/src/local/mutable_store.rs:715— MethodTooLong — new 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: State.block_deserialize lore-revision/src/state.rs:1367— MethodTooLong — block_deserialize runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: 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:524— 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_packfiles lore-storage/src/local/immutable_store.rs:2657— MethodTooLong — compact_packfiles 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:2821— MethodTooLong — compact_group_packfiles runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DynamoDbLockStore.unlock_resources lore-aws/src/store/lock_store.rs:571— MethodTooLong — unlock_resources 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.
Duplicated block (16 lines × 2) lore-client/src/cli/commands/auth.rs:486— lore-client/src/cli/commands/auth.rs:486-501 | 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:1655— lore-client/src/cli/commands/branch.rs:1655-1670 | lore-client/src/cli/commands/repository.rs:1559-1574 — 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:1736— lore-client/src/cli/commands/branch.rs:1736-1751 | lore-client/src/cli/commands/repository.rs:1644-1659 — 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:4442— lore-revision/src/branch/merge.rs:4442-4457 | 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 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire 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/diff.rs:166— lore-revision/src/diff.rs:166-181 | lore-revision/src/repository/status.rs:1203-1218 — 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/file/dirty.rs:1235— lore-revision/src/file/dirty.rs:1235-1250 | lore-revision/src/fs/realize.rs:2023-2038 — 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:2711— lore-revision/src/stage.rs:2711-2726 | lore-revision/src/stage.rs:2972-2987 — both copies are in the same file, so extract the block into 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:2854— lore-revision/src/stage.rs:2854-2869 | lore-revision/src/stage.rs:3016-3031 — both copies are in the same file, so extract the block into 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/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-storage/src/read.rs:422— lore-storage/src/read.rs:422-437 | lore-storage/src/read.rs:492-507 — both copies are in the same file, so extract the block into 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:971— lore-transport/src/grpc/storage_client.rs:971-986 | lore-transport/src/grpc/storage_client.rs:1055-1070 — both copies are in the same file, so extract the block into 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-storage/src/read.rs:1029— lore-storage/src/read.rs:1029-1044 | lore-storage/src/read.rs:1613-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 (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:239— lore-server/src/store/replica.rs:239-254 | lore-server/src/store/replicated_store.rs:272-287 — 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.
Duplicated block (13 lines × 2) lore-client/src/cli/commands/repository.rs:1730— lore-client/src/cli/commands/repository.rs:1730-1742 | lore-client/src/cli/commands/repository.rs:1765-1777 — both copies are in the same file, so extract the block into 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/auth/login.rs:186— lore-revision/src/auth/login.rs:186-198 | lore-revision/src/auth/login.rs:267-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 (13 lines × 2) lore-revision/src/branch/merge.rs:4252— lore-revision/src/branch/merge.rs:4252-4264 | lore-revision/src/branch/merge.rs:4609-4621 — both copies are in the same file, so extract the block into 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:1341— lore-revision/src/file/dirty.rs:1341-1353 | lore-revision/src/file/dirty.rs:1424-1436 — both copies are in the same file, so extract the block into 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 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) lore-revision/src/state.rs:1615— lore-revision/src/state.rs:1615-1627 | lore-revision/src/state.rs:1808-1820 — both copies are in the same file, so extract the block into 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/state.rs:7847— lore-revision/src/state.rs:7847-7859 | lore-revision/src/state.rs:7865-7877 — both copies are in the same file, so extract the block into 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/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-storage/src/fragment_engine.rs:102— lore-storage/src/fragment_engine.rs:102-114 | lore-storage/src/fragment_engine.rs:553-565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) lore-storage/src/local/immutable_store.rs:1126— lore-storage/src/local/immutable_store.rs:1126-1138 | lore-storage/src/local/mutable_store.rs:806-818 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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:110— lore-transport/src/auth/exchange.rs:110-122 | lore-transport/src/auth/exchange.rs:281-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) lore-server/src/grpc/revision/v1/revision_list.rs:167— lore-server/src/grpc/revision/v1/revision_list.rs:167-179 | 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:3755— lore-revision/src/repository.rs:3755-3767 | lore-revision/src/repository/list.rs:28-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) lore/src/dependency.rs:401— lore/src/dependency.rs:401-413 | lore/src/dependency.rs:439-451 — both copies are in the same file, so extract the block into 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.
lore_server::server::async_main (cognitive 38) lore-server/src/server.rs:1870— lore_server::server::async_main has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 7, loops 2 (3 pts), match/switch 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
lore_server::grpc::revision::v1::revision_list::walk_revisions (cognitive 37) lore-server/src/grpc/revision/v1/revision_list.rs:485— 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::handlers::branch_push::push (cognitive 26) lore-server/src/grpc/handlers/branch_push.rs:286— lore_server::grpc::handlers::branch_push::push has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_server::grpc::revision::v1::revision_list::resolve_start (cognitive 22) lore-server/src/grpc/revision/v1/revision_list.rs:263— 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:447— 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::repository_create::repository_create (cognitive 19) lore-server/src/grpc/handlers/repository_create.rs:150— lore_server::grpc::handlers::repository_create::repository_create has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 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::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::branch_push::verify_fragments (cognitive 18) lore-server/src/grpc/handlers/branch_push.rs:757— lore_server::grpc::handlers::branch_push::verify_fragments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 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::repository_delete::repository_delete (cognitive 18) lore-server/src/grpc/handlers/repository_delete.rs:85— lore_server::grpc::handlers::repository_delete::repository_delete has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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::repository::v1::repository_delete::handler (cognitive 17) lore-server/src/grpc/repository/v1/repository_delete.rs:41— lore_server::grpc::repository::v1::repository_delete::handler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
lore_server::grpc::repository::v1::repository_create::repository_create_inner (cognitive 17) lore-server/src/grpc/repository/v1/repository_create.rs:224— lore_server::grpc::repository::v1::repository_create::repository_create_inner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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:1701— 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.
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::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.
LocalImmutableStore::store (cognitive 78) lore-storage/src/local/immutable_store.rs:1676— LocalImmutableStore::store has cognitive complexity 78 (threshold 15). Drivers by points: if/else 32 (61 pts), boolean chains 12, loops 3 (5 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalImmutableStore::verify (cognitive 73) lore-storage/src/local/immutable_store.rs:3956— LocalImmutableStore::verify has cognitive complexity 73 (threshold 15). Drivers by points: if/else 15 (51 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 (cognitive 67) lore-storage/src/local/immutable_store.rs:4286— LocalImmutableStore::verify_fragment has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (45 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::evict_group_sized (cognitive 62) lore-storage/src/local/immutable_store.rs:2230— LocalImmutableStore::evict_group_sized has cognitive complexity 62 (threshold 15). Drivers by points: if/else 21 (47 pts), loops 8 (13 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalImmutableStore::group_verify_store (cognitive 41) lore-storage/src/local/immutable_store.rs:2979— 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:2468— LocalImmutableStore::evict_oldest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (30 pts), loops 3 (5 pts), boolean chains 3 (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::new (cognitive 31) lore-storage/src/local/immutable_store.rs:1031— LocalImmutableStore::new has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 7, loops 3 (5 pts), 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.
LocalImmutableStore::compact_bucket_packfile_impl (cognitive 30) lore-storage/src/local/immutable_store.rs:3113— LocalImmutableStore::compact_bucket_packfile_impl has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (9 pts), loops 4 (7 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.
LocalImmutableStore::lookup (cognitive 29) lore-storage/src/local/immutable_store.rs:1519— 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::compact_group_packfiles (cognitive 24) lore-storage/src/local/immutable_store.rs:2821— LocalImmutableStore::compact_group_packfiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalImmutableStore::deserialize_all_buckets (cognitive 22) lore-storage/src/local/immutable_store.rs:1447— LocalImmutableStore::deserialize_all_buckets has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 5 (10 pts), boolean chains 1 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LocalImmutableStore::compact_packfiles (cognitive 22) lore-storage/src/local/immutable_store.rs:2657— LocalImmutableStore::compact_packfiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LocalImmutableStore::find (cognitive 21) lore-storage/src/local/immutable_store.rs:1987— LocalImmutableStore::find has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalImmutableStore::put (cognitive 19) lore-storage/src/local/immutable_store.rs:3699— LocalImmutableStore::put has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, 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:1629— 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×13
Members sharing a duplicated core (4 members, 50+ identical tokens) lore/src/revision_tree/add.rs:883— lore/src/revision_tree/add.rs:883-893 | lore/src/revision_tree/delete.rs:566-575 | lore/src/revision_tree/modify.rs:366-375 | lore/src/revision_tree/move_node.rs:688-697 — 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/branch.rs:1008— lore-client/src/cli/commands/branch.rs:1008-1079 | lore-client/src/cli/commands/branch.rs:1081-1142 | lore-client/src/cli/commands/revision.rs:1647-1705 | lore-client/src/cli/commands/revision.rs:1707-1783 — 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:1121— lore-client/src/cli/commands/file.rs:1121-1188 | lore-client/src/cli/commands/file.rs:1190-1238 | lore-client/src/cli/commands/file.rs:1252-1292 | lore-client/src/cli/commands/file.rs:1313-1370 — 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-credential/src/token_store.rs:208— lore-credential/src/token_store.rs:208-257 | lore-credential/src/token_store.rs:545-592 | lore-credential/src/token_store.rs:777-809 | lore-credential/src/token_store.rs:862-894 — 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:3103— lore-revision/src/branch/merge.rs:3103-3147 | lore-revision/src/branch/merge.rs:3820-3915 | lore-revision/src/revision/cherry_pick.rs:297-341 | lore-revision/src/revision/revert.rs:277-317 — 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:661— lore-revision/src/metadata.rs:661-697 | lore-revision/src/metadata.rs:699-737 | lore-revision/src/metadata.rs:893-1017 | lore-revision/src/metadata.rs:1120-1152 — 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/protocol/replication_store/get.rs:49— lore-server/src/protocol/replication_store/get.rs:49-58 | 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:71-104 — 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-storage/src/conformance.rs:507— lore-storage/src/conformance.rs:507-572 | lore-storage/src/conformance.rs:704-739 | lore-storage/src/conformance.rs:751-786 | lore-storage/src/conformance.rs:967-1005 — 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/local/immutable_store.rs:1683— lore-storage/src/local/immutable_store.rs:1683-1982 | lore-storage/src/local/immutable_store.rs:2087-2194 | lore-storage/src/local/immutable_store.rs:3408-3437 | lore-storage/src/local/immutable_store.rs:4202-4282 — 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:916— lore-transport/src/grpc/storage_client.rs:916-994 | lore-transport/src/grpc/storage_client.rs:1000-1078 | lore-transport/src/grpc/storage_client.rs:1083-1120 | lore-transport/src/grpc/storage_client.rs:1128-1165 — 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.
lore_client::cli::commands::repository::handle_repository_status (cognitive 73) lore-client/src/cli/commands/repository.rs:513— lore_client::cli::commands::repository::handle_repository_status has cognitive complexity 73 (threshold 15). Drivers by points: if/else 37 (60 pts), loops 4 (8 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:674— 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_link_messages (cognitive 37) lore-client/src/cli/commands/revision.rs:907— lore_client::cli::commands::revision::resolve_link_messages has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (9 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (lore_client::cli::commands::revision::resolve_layer_messages) 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_client::cli::commands::revision::resolve_layer_messages (cognitive 37) lore-client/src/cli/commands/revision.rs:1039— lore_client::cli::commands::revision::resolve_layer_messages has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (9 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (lore_client::cli::commands::revision::resolve_link_messages) 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_client::cli::commands::branch::handle_branch_push (cognitive 30) lore-client/src/cli/commands/branch.rs:798— 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:1397— 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:568— 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::handle_revision_commit (cognitive 20) lore-client/src/cli/commands/revision.rs:1179— 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:624— 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:1354— 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:833— 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:1156— 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.
Duplicated block (5 lines × 2) lore/src/storage/get.rs:319— lore/src/storage/get.rs:319-323 | lore/src/storage/get_resolved.rs:303-307 — 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-revision/src/diff.rs:64— lore-revision/src/diff.rs:64-68 | lore-revision/src/diff.rs:155-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) lore-revision/src/file/stage.rs:961— lore-revision/src/file/stage.rs:961-966 | lore-revision/src/link.rs:1718-1722 — 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:3654— lore-revision/src/repository.rs:3654-3661 | lore-revision/src/repository.rs:3673-3677 — both copies are in the same file, so extract the block into 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/storage/copy.rs:43— lore-server/src/protocol/storage/copy.rs:43-47 | lore-server/src/protocol/storage/copy.rs:62-66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) lore-transport/src/grpc/repository_client.rs:153— lore-transport/src/grpc/repository_client.rs:153-157 | lore-transport/src/grpc/revision_client.rs:133-137 — before extracting anything, compare `lore-transport/src/grpc/repository_client.rs` and `lore-transport/src/grpc/revision_client.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 (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:904-908 — 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:522— lore-storage/src/local/immutable_store.rs:522-526 | lore-storage/src/local/mutable_store.rs:268-272 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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:1689— lore-client/src/cli/commands/file.rs:1689-1693 | lore-client/src/cli/commands/file.rs:1742-1746 — both copies are in the same file, so extract the block into 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:1722— lore-revision/src/commit.rs:1722-1726 | lore-revision/src/commit.rs:4227-4231 — both copies are in the same file, so extract the block into 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:1146— lore-revision/src/file/dirty.rs:1146-1150 | lore-revision/src/file/dirty.rs:1362-1366 — both copies are in the same file, so extract the block into 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:381— lore-storage/src/local/fan_out.rs:381-385 | lore-storage/src/local/immutable_store/info.rs:62-66 — 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.
ClassTooLong: State lore-revision/src/state.rs:385— ClassTooLong — 2378 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 122 methods, 3 blocks, lines 385-4420. The bar is 400 significant lines; this is 1978 over it, 5.95× 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: LocalImmutableStore lore-storage/src/local/immutable_store.rs:314— ClassTooLong — 2343 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 35 methods, 4 blocks, lines 314-4562. The bar is 400 significant lines; this is 1943 over it, 5.86× 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:533— ClassTooLong — 1041 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 533-2179. The bar is 400 significant lines; this is 641 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LocalMutableStore lore-storage/src/local/mutable_store.rs:190— ClassTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 3 blocks, lines 190-1631. The bar is 400 significant lines; this is 209 over it, 1.52× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CompositeStore lore-revision/src/store/composite.rs:438— ClassTooLong — 599 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, 3 blocks, lines 438-1405. The bar is 400 significant lines; this is 199 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StorageService lore-transport/src/grpc/storage_client.rs:411— ClassTooLong — 578 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 411-1262. The bar is 400 significant lines; this is 178 over it, 1.45× 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:301— ClassTooLong — 457 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 301-1157. The bar is 400 significant lines; this is 57 over it, 1.14× 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 — 446 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-809. The bar is 400 significant lines; this is 46 over it, 1.12× 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:61— ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 5 blocks, lines 61-687. The bar is 400 significant lines; this is 29 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.
Duplicated block (20 lines × 2) lore-revision/src/branch/merge.rs:3279— lore-revision/src/branch/merge.rs:3279-3298 | lore-revision/src/stage.rs:2688-2707 — 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/branch/merge.rs:4229— lore-revision/src/branch/merge.rs:4229-4248 | lore-revision/src/branch/merge.rs:4581-4600 — both copies are in the same file, so extract the block into 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/file/diff.rs:478— lore-revision/src/file/diff.rs:478-497 | lore-revision/src/file/diff.rs:728-747 — both copies are in the same file, so extract the block into 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:328-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 (20 lines × 2) lore-revision/src/stage.rs:1468— lore-revision/src/stage.rs:1468-1487 | lore-revision/src/stage.rs:1612-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 (20 lines × 2) lore-revision/src/state.rs:7360— lore-revision/src/state.rs:7360-7379 | lore-revision/src/state.rs:7390-7409 — both copies are in the same file, so extract the block into 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/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-server/src/grpc/handlers/branch_create.rs:34— lore-server/src/grpc/handlers/branch_create.rs:34-53 | lore-server/src/grpc/revision/v1/branch_create.rs:36-55 — 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-storage/src/read.rs:415— lore-storage/src/read.rs:415-434 | lore-storage/src/read.rs:897-916 — both copies are in the same file, so extract the block into 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/revision/cherry_pick.rs:190— lore-revision/src/revision/cherry_pick.rs:190-209 | lore-revision/src/revision/revert.rs:185-205 — 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.
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/branch/push.rs:777— lore-revision/src/branch/push.rs:777-783 | lore-revision/src/branch/push.rs:874-879 — both copies are in the same file, so extract the block into 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:602— lore-revision/src/file/reset.rs:602-607 | lore-revision/src/file/reset.rs:792-797 — both copies are in the same file, so extract the block into 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:714— lore-revision/src/metadata.rs:714-719 | lore-revision/src/metadata.rs:1128-1133 — both copies are in the same file, so extract the block into 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:37— lore-server/src/protocol/storage/mutable_cas.rs:37-42 | 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:712— lore-storage/src/compress.rs:712-717 | lore-storage/src/compress.rs:1126-1131 — both copies are in the same file, so extract the block into 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:123— lore-storage/src/defragment.rs:123-129 | lore-storage/src/defragment.rs:504-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.
Duplicated block (6 lines × 2) lore/src/revision_tree/handle.rs:247— lore/src/revision_tree/handle.rs:247-252 | lore/src/storage/handle.rs:56-61 — `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:296— lore/src/revision_tree/handle.rs:296-303 | lore/src/storage/handle.rs:123-128 — `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-server/src/grpc/mod.rs:346— lore-server/src/grpc/mod.rs:346-351 | lore-server/src/http/mod.rs:28-33 — 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.
LocalImmutableStore::store (cyclomatic 44) lore-storage/src/local/immutable_store.rs:1676— LocalImmutableStore::store 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.
LocalImmutableStore::verify_fragment (cyclomatic 40) lore-storage/src/local/immutable_store.rs:4286— LocalImmutableStore::verify_fragment has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalImmutableStore::evict_group_sized (cyclomatic 31) lore-storage/src/local/immutable_store.rs:2230— LocalImmutableStore::evict_group_sized has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalImmutableStore::verify (cyclomatic 25) lore-storage/src/local/immutable_store.rs:3956— LocalImmutableStore::verify 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.
LocalImmutableStore::new (cyclomatic 24) lore-storage/src/local/immutable_store.rs:1031— LocalImmutableStore::new has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LocalImmutableStore::evict_oldest (cyclomatic 21) lore-storage/src/local/immutable_store.rs:2468— LocalImmutableStore::evict_oldest 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.
LocalImmutableStore::put (cyclomatic 18) lore-storage/src/local/immutable_store.rs:3699— LocalImmutableStore::put has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LocalImmutableStore::compact_packfiles (cyclomatic 16) lore-storage/src/local/immutable_store.rs:2657— LocalImmutableStore::compact_packfiles 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.
Duplicated block (17 lines × 2) lore-client/src/cli/commands/revision.rs:956— lore-client/src/cli/commands/revision.rs:956-972 | lore-client/src/cli/commands/revision.rs:1089-1105 — both copies are in the same file, so extract the block into 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:3354— lore-revision/src/branch/merge.rs:3354-3370 | lore-revision/src/branch/merge.rs:3567-3583 — both copies are in the same file, so extract the block into 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:4211— lore-revision/src/branch/merge.rs:4211-4227 | lore-revision/src/branch/merge.rs:4562-4578 — both copies are in the same file, so extract the block into 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:702— lore-revision/src/file/info.rs:702-718 | lore-revision/src/file/info.rs:796-812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) lore-revision/src/metadata/clear.rs:60— lore-revision/src/metadata/clear.rs:60-76 | lore-revision/src/metadata/clear.rs:150-166 — both copies are in the same file, so extract the block into 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/state.rs:877— lore-revision/src/state.rs:877-893 | lore-revision/src/state.rs:969-985 — both copies are in the same file, so extract the block into 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-transport/src/grpc/repository_client.rs:165— lore-transport/src/grpc/repository_client.rs:165-181 | lore-transport/src/grpc/revision_client.rs:141-157 — before extracting anything, compare `lore-transport/src/grpc/repository_client.rs` and `lore-transport/src/grpc/revision_client.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 (17 lines × 2) lore-revision/src/branch/merge.rs:3336— lore-revision/src/branch/merge.rs:3336-3352 | lore-revision/src/branch/merge.rs:3549-3565 — both copies are in the same file, so extract the block into 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.
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-credential/src/token_store.rs:558— lore-credential/src/token_store.rs:558-571 | lore-credential/src/token_store.rs:867-881 — both copies are in the same file, so extract the block into 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:131— lore-revision/src/file/obliterate.rs:131-145 | 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-server/src/grpc/handlers/repository_delete.rs:46— lore-server/src/grpc/handlers/repository_delete.rs:46-60 | lore-server/src/grpc/repository/v1/repository_delete.rs:48-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14–15 lines × 2) lore-storage/src/compress.rs:700— lore-storage/src/compress.rs:700-714 | lore-storage/src/compress.rs:831-844 — both copies are in the same file, so extract the block into 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-storage/src/local/immutable_store.rs:1712— lore-storage/src/local/immutable_store.rs:1712-1725 | lore-storage/src/local/immutable_store.rs:2094-2108 — both copies are in the same file, so extract the block into 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:456— lore-transport/src/auth/exchange.rs:456-470 | lore-transport/src/auth/exchange.rs:624-637 — both copies are in the same file, so extract the block into 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 × 3) lore/src/branch.rs:1667— lore/src/branch.rs:1667-1677 | lore/src/repository.rs:1275-1285 | lore/src/revision.rs:567-577 — 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-client/src/cli/commands/auth.rs:482— lore-client/src/cli/commands/auth.rs:482-492 | lore-client/src/cli/commands/lock.rs:317-327 | lore-client/src/cli/commands/revision.rs:2569-2579 — 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:1144— lore-client/src/cli/commands/file.rs:1144-1154 | lore-client/src/cli/commands/file.rs:1193-1203 | lore-client/src/cli/commands/file.rs:1335-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.
Duplicated block (11 lines × 3) lore-client/src/cli/commands/file.rs:1144— lore-client/src/cli/commands/file.rs:1144-1154 | lore-client/src/cli/commands/file.rs:1279-1289 | lore-client/src/cli/commands/file.rs:1335-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.
Duplicated block (11 lines × 3) lore-revision/src/link.rs:1727— lore-revision/src/link.rs:1727-1737 | 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:127— lore-revision/src/lock/file/acquire.rs:127-137 | lore-revision/src/lock/file/release.rs:131-141 | lore-revision/src/lock/file/status.rs:132-142 — 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:297— lore-revision/src/metadata/branch.rs:297-307 | lore-revision/src/metadata/repository.rs:286-296 | 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 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) lore-storage/src/defragment.rs:755— lore-storage/src/defragment.rs:755-765 | lore-storage/src/defragment.rs:1032-1042 | lore-storage/src/defragment.rs:1314-1326 — 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.
Low cohesion: StorageClient (LCOM4 15) lore-transport/src/quic/storage_service/client.rs:61— StorageClient's methods fall into 15 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 15 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: 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:441— 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:93— 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: 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.
lore_transport::quic::response_reader::read_response (cognitive 146) lore-transport/src/quic/response_reader.rs:95— lore_transport::quic::response_reader::read_response has cognitive complexity 146 (threshold 15). Drivers by points: if/else 36 (134 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 103). 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_transport::connection::connect_impl (cognitive 55) lore-transport/src/connection.rs:317— 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::client::connect_happy_eyeballs (cognitive 25) lore-transport/src/quic/client.rs:842— 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::quic::client::reconnect (cognitive 21) lore-transport/src/quic/client.rs:966— 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_custom_resource (cognitive 20) lore-transport/src/auth/exchange.rs:271— lore_transport::auth::exchange::exchange_custom_resource 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.
lore_transport::auth::exchange::exchange (cognitive 19) lore-transport/src/auth/exchange.rs:100— lore_transport::auth::exchange::exchange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (19 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 18) lore-transport/src/auth/exchange.rs:498— lore_transport::auth::exchange::auth_exchange_for_identity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 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.
State::serialize (cognitive 64) lore-revision/src/state.rs:744— State::serialize has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (45 pts), loops 6 (12 pts), match/switch 2 (7 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.
State::block_deserialize (cognitive 44) lore-revision/src/state.rs:1367— State::block_deserialize has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (42 pts), boolean chains 1, match/switch 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::collect_dirty_paths (cognitive 30) lore-revision/src/state.rs:3435— State::collect_dirty_paths has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 3, loops 2 (3 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.
State::move_node (cognitive 28) lore-revision/src/state.rs:2692— 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.
State::block_file_metadata_load (cognitive 21) lore-revision/src/state.rs:1731— State::block_file_metadata_load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::block_file_metadata_cache (cognitive 17) lore-revision/src/state.rs:1567— State::block_file_metadata_cache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::node_add (cognitive 17) lore-revision/src/state.rs:2047— State::node_add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: State lore-revision/src/state.rs:385— TooManyMethods — 122 methods. The bar is 30 methods; this is 92 over it, 4.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: Metadata lore-revision/src/metadata.rs:301— 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: RepositoryContext lore-revision/src/repository.rs:633— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.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: Node lore-revision/src/node.rs:336— 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: LocalImmutableStore lore-storage/src/local/immutable_store.rs:314— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IocpDriver lore-io/src/iocp.rs:293— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IoDriver lore-io/src/driver.rs:150— 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.
Duplicated block (18 lines × 2) lore-io/src/psync.rs:640— lore-io/src/psync.rs:640-657 | 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:4265— lore-revision/src/branch/merge.rs:4265-4282 | lore-revision/src/branch/merge.rs:4628-4645 — both copies are in the same file, so extract the block into 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/metadata.rs:662— lore-revision/src/metadata.rs:662-679 | lore-revision/src/metadata.rs:700-717 — both copies are in the same file, so extract the block into 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-server/src/quic/stream_handler.rs:545— lore-server/src/quic/stream_handler.rs:545-562 | lore-transport/src/quic/response_reader.rs:156-173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18 lines × 2) lore-transport/src/grpc/repository_client.rs:223— lore-transport/src/grpc/repository_client.rs:223-240 | lore-transport/src/grpc/revision_client.rs:364-381 — before extracting anything, compare `lore-transport/src/grpc/repository_client.rs` and `lore-transport/src/grpc/revision_client.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 (18 lines × 2) lore-transport/src/grpc/storage_client.rs:933— lore-transport/src/grpc/storage_client.rs:933-950 | lore-transport/src/grpc/storage_client.rs:1017-1034 — both copies are in the same file, so extract the block into 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 × 3) lore-client/src/cli/commands/file.rs:822— lore-client/src/cli/commands/file.rs:822-831 | lore-client/src/cli/commands/file.rs:1057-1066 | lore-client/src/cli/commands/revision.rs:2383-2392 — 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:1616— lore-revision/src/repository.rs:1616-1625 | lore-revision/src/repository.rs:1872-1881 | lore-revision/src/repository.rs:1958-1967 — 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-revision/src/store/remote.rs:61— lore-revision/src/store/remote.rs:61-70 | lore-revision/src/store/remote.rs:91-100 | lore-revision/src/store/remote.rs:324-333 — 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:94— lore-server/src/protocol/replication_store/get.rs:94-103 | lore-server/src/protocol/replication_store/get_metadata.rs:92-101 | lore-server/src/protocol/replication_store/query.rs:137-146 — 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-revision/src/file/dirty.rs:402— lore-revision/src/file/dirty.rs:402-413 | lore-revision/src/file/dirty.rs:1332-1341 | lore-revision/src/file/dirty.rs:1415-1424 — 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: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.
lore_client::cli::commands::repository::handle_repository_status (cyclomatic 41) lore-client/src/cli/commands/repository.rs:513— lore_client::cli::commands::repository::handle_repository_status 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_client::cli::commands::branch::handle_branch_push (cyclomatic 30) lore-client/src/cli/commands/branch.rs:798— 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:674— 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:1179— 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.
lore_client::cli::commands::revision::resolve_link_messages (cyclomatic 17) lore-client/src/cli/commands/revision.rs:907— lore_client::cli::commands::revision::resolve_link_messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (lore_client::cli::commands::revision::resolve_layer_messages) 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_client::cli::commands::revision::resolve_layer_messages (cyclomatic 17) lore-client/src/cli/commands/revision.rs:1039— lore_client::cli::commands::revision::resolve_layer_messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (lore_client::cli::commands::revision::resolve_link_messages) 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::local::immutable_store::flush_locked_group (cyclomatic 40) lore-storage/src/local/immutable_store.rs:4706— lore_storage::local::immutable_store::flush_locked_group has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
lore_storage::write::leader_body (cyclomatic 29) lore-storage/src/write.rs:1044— 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::read::load_fragment (cyclomatic 18) lore-storage/src/read.rs:217— lore_storage::read::load_fragment 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.
lore_storage::read::read_content_into_buffer (cyclomatic 17) lore-storage/src/read.rs:712— lore_storage::read::read_content_into_buffer 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.
lore_storage::defragment::walk_intermediate_level (cyclomatic 16) lore-storage/src/defragment.rs:487— 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::defragment::read_defragment (cyclomatic 16) lore-storage/src/defragment.rs:1210— lore_storage::defragment::read_defragment 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.
Duplicated block (19 lines × 2) lore-aws/src/store/immutable_store.rs:1409— lore-aws/src/store/immutable_store.rs:1409-1427 | lore-aws/src/store/immutable_store.rs:1649-1667 — both copies are in the same file, so extract the block into 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:1061— lore-client/src/cli/commands/branch.rs:1061-1079 | lore-client/src/cli/commands/revision.rs:1687-1705 — 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:1707— lore-client/src/cli/commands/branch.rs:1707-1725 | lore-client/src/cli/commands/repository.rs:1613-1631 — 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/commit.rs:1961— lore-revision/src/commit.rs:1961-1979 | lore-revision/src/commit.rs:3139-3157 — both copies are in the same file, so extract the block into 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-storage/src/local/mutable_store.rs:1280— lore-storage/src/local/mutable_store.rs:1280-1298 | lore-storage/src/local/mutable_store.rs:1417-1435 — both copies are in the same file, so extract the block into 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-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.
Duplicated block (8 lines × 3) lore/src/branch.rs:1659— lore/src/branch.rs:1659-1666 | lore/src/repository.rs:1267-1274 | lore/src/revision.rs:559-566 — 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-credential/src/token_store.rs:559— lore-credential/src/token_store.rs:559-566 | lore-credential/src/token_store.rs:782-789 | lore-credential/src/token_store.rs:868-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.
Duplicated block (8 lines × 3) lore-credential/src/token_store.rs:654— lore-credential/src/token_store.rs:654-661 | lore-credential/src/token_store.rs:709-716 | lore-credential/src/token_store.rs:738-745 — 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-revision/src/branch/merge.rs:3159— lore-revision/src/branch/merge.rs:3159-3166 | lore-revision/src/stage.rs:2688-2695 | lore-revision/src/stage.rs:3130-3137 — 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:575— lore-transport/src/connection.rs:575-582 | lore-transport/src/connection.rs:606-613 | lore-transport/src/connection.rs:640-647 — 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-transport/src/auth/mod.rs:80— lore-transport/src/auth/mod.rs:80-87 | lore-transport/src/auth/mod.rs:127-134 | lore-transport/src/connection.rs:68-75 — 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/commit.rs:1793— lore-revision/src/commit.rs:1793-1799 | lore-revision/src/commit.rs:2947-2953 | lore-revision/src/file/unstage.rs:539-545 — 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/commit.rs:2046— lore-revision/src/commit.rs:2046-2052 | lore-revision/src/commit.rs:2459-2465 | lore-revision/src/fs/realize.rs:2119-2125 — 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/repository.rs:1090— lore-revision/src/repository.rs:1090-1096 | lore-revision/src/repository.rs:1163-1169 | lore-revision/src/repository.rs:1195-1201 — 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:2721— lore-revision/src/stage.rs:2721-2727 | lore-revision/src/stage.rs:2766-2772 | lore-revision/src/stage.rs:2982-2988 — 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/state.rs:1428— lore-revision/src/state.rs:1428-1434 | lore-revision/src/state.rs:1475-1481 | lore-revision/src/state.rs:1514-1520 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) lore-transport/src/quic/storage_service/client.rs:366— lore-transport/src/quic/storage_service/client.rs:366-372 | lore-transport/src/quic/storage_service/client.rs:416-422 | lore-transport/src/quic/storage_service/client.rs:470-476 — 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.
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.
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-integration-tests/tests/storage_test.rs:6058— // 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-revision/tests/state.rs:352— // 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:369— // 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.
lore::revision_tree::move_node::plan_entries (cognitive 51) lore/src/revision_tree/move_node.rs:345— 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:472— 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:172— 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:272— 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:106— 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.
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/src/revision_tree/add.rs:476— lore/src/revision_tree/add.rs:476-630 | lore/src/revision_tree/delete.rs:176-259 | lore/src/revision_tree/metadata_clear.rs:129-141 | lore/src/revision_tree/metadata_set.rs:160-193 | lore/src/revision_tree/modify.rs:168-223 — 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/branch.rs:624— lore-client/src/cli/commands/branch.rs:624-728 | lore-client/src/cli/commands/link.rs:279-333 | lore-client/src/cli/commands/link.rs:335-378 | lore-client/src/cli/commands/revision.rs:568-672 | lore-client/src/cli/commands/revision.rs:674-822 — 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:1515— lore-client/src/cli/commands/file.rs:1515-1550 | lore-client/src/cli/commands/file.rs:1552-1592 | lore-client/src/cli/commands/file.rs:1594-1660 | lore-client/src/cli/commands/link.rs:113-182 | lore-client/src/cli/commands/link.rs:184-215 — 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-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:119-186 | lore-server/src/grpc/thinclient/v1/revision_tree.rs:58-116 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (15 lines × 3) lore-client/src/cli/commands/branch.rs:992— lore-client/src/cli/commands/branch.rs:992-1006 | lore-client/src/cli/commands/revision.rs:1852-1866 | lore-client/src/cli/commands/revision.rs:2144-2158 — 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:1197— lore-client/src/cli/commands/branch.rs:1197-1211 | lore-client/src/cli/commands/revision.rs:1941-1955 | lore-client/src/cli/commands/revision.rs:2223-2237 — 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:1144— lore-revision/src/file/stage.rs:1144-1158 | lore-revision/src/file/stage.rs:1542-1556 | lore-revision/src/stage.rs:3082-3096 — 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:2801— lore-revision/src/branch.rs:2801-2815 | lore-revision/src/branch.rs:2847-2861 | lore-revision/src/branch.rs:2885-2899 — 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-client/src/cli/commands/branch.rs:639— lore-client/src/cli/commands/branch.rs:639-647 | lore-client/src/cli/commands/link.rs:296-304 | lore-client/src/cli/commands/revision.rs:713-721 — 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-credential/src/token_store.rs:209— lore-credential/src/token_store.rs:209-217 | lore-credential/src/token_store.rs:558-566 | lore-credential/src/token_store.rs:867-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.
Duplicated block (9 lines × 3) lore-client/src/cli/commands/auth.rs:131— lore-client/src/cli/commands/auth.rs:131-143 | lore-client/src/cli/commands/auth.rs:336-344 | lore-client/src/cli/commands/auth.rs:359-371 — 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/local/immutable_store.rs:3540— lore-storage/src/local/immutable_store.rs:3540-3548 | lore-storage/src/local/immutable_store.rs:3587-3596 | lore-storage/src/local/immutable_store.rs:3640-3650 — 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.
Duplicated block (7 lines × 4) lore-client/src/cli/commands/branch.rs:1706— lore-client/src/cli/commands/branch.rs:1706-1712 | lore-client/src/cli/commands/file.rs:1049-1055 | lore-client/src/cli/commands/repository.rs:1612-1618 | lore-client/src/cli/commands/revision.rs:2375-2381 — 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-revision/src/commit.rs:2457— lore-revision/src/commit.rs:2457-2463 | lore-revision/src/fs/realize.rs:2114-2120 | lore-server/src/server.rs:2144-2150 | lore-server/src/server.rs:2249-2255 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (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:917— lore-transport/src/grpc/storage_client.rs:917-923 | lore-transport/src/grpc/storage_client.rs:1001-1007 | lore-transport/src/grpc/storage_client.rs:1084-1090 | lore-transport/src/grpc/storage_client.rs:1129-1135 — 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:1144— lore-revision/src/file/stage.rs:1144-1150 | lore-revision/src/file/stage.rs:1542-1548 | lore-revision/src/stage.rs:3082-3088 | lore-revision/src/stage.rs:3440-3446 — 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.
lore_server::server::async_main (cyclomatic 29) lore-server/src/server.rs:1870— lore_server::server::async_main has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
lore_server::grpc::revision::v1::revision_list::walk_revisions (cyclomatic 19) lore-server/src/grpc/revision/v1/revision_list.rs:485— 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:447— 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.
lore_server::grpc::handlers::branch_push::push (cyclomatic 16) lore-server/src/grpc/handlers/branch_push.rs:286— lore_server::grpc::handlers::branch_push::push 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.
CompositeStore::query (cognitive 26) lore-revision/src/store/composite.rs:931— 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:808— 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:526— 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::get_from_remotes (cognitive 20) lore-revision/src/store/composite.rs:719— 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.
Duplicated block (26 lines × 2) lore-revision/src/branch.rs:2786— lore-revision/src/branch.rs:2786-2811 | lore-revision/src/branch.rs:2870-2895 — both copies are in the same file, so extract the block into 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-revision/src/link/add.rs:417— lore-revision/src/link/add.rs:417-442 | lore-revision/src/link/update.rs:207-232 — 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 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 2) lore-server/src/grpc/handlers/repository_create.rs:122— lore-server/src/grpc/handlers/repository_create.rs:122-147 | lore-server/src/grpc/repository/v1/repository_create.rs:196-221 — 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:797— lore-storage/src/local/immutable_store.rs:797-822 | lore-storage/src/local/mutable_store.rs:472-497 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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/src/repository.rs:490— lore/src/repository.rs:490-510 | lore/src/repository.rs:554-574 — both copies are in the same file, so extract the block into 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/fs/realize.rs:2399— lore-revision/src/fs/realize.rs:2399-2419 | lore-revision/src/fs/realize.rs:2518-2538 — both copies are in the same file, so extract the block into 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:298— lore-revision/src/metadata/branch.rs:298-318 | lore-revision/src/metadata/repository.rs:287-307 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) lore-transport/src/grpc/storage_client.rs:1085— lore-transport/src/grpc/storage_client.rs:1085-1105 | lore-transport/src/grpc/storage_client.rs:1130-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 (18–19 lines × 2) lore-revision/src/commit.rs:3385— lore-revision/src/commit.rs:3385-3403 | lore-revision/src/commit.rs:3538-3555 — both copies are in the same file, so extract the block into 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/file/reset.rs:1382— lore-revision/src/file/reset.rs:1382-1399 | lore-revision/src/file/reset.rs:1522-1540 — both copies are in the same file, so extract the block into 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:2774— lore-revision/src/stage.rs:2774-2791 | lore-revision/src/stage.rs:3293-3311 — both copies are in the same file, so extract the block into 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:3356— lore-revision/src/stage.rs:3356-3373 | lore-revision/src/stage.rs:3402-3420 — both copies are in the same file, so extract the block into 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 × 3) lore/src/call.rs:92— lore/src/call.rs:92-105 | lore/src/call.rs:153-166 | lore/src/call.rs:205-218 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 3) lore-revision/src/branch/merge.rs:3285— lore-revision/src/branch/merge.rs:3285-3298 | lore-revision/src/branch/merge.rs:3725-3739 | lore-revision/src/stage.rs:2694-2707 — 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-storage/src/read.rs:421— lore-storage/src/read.rs:421-434 | lore-storage/src/read.rs:491-504 | lore-storage/src/read.rs:903-916 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 3) lore-server/src/grpc/forwarded_repository/v1/repository_create.rs:27— lore-server/src/grpc/forwarded_repository/v1/repository_create.rs:27-40 | 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.
Duplicated block (13–14 lines × 2) lore-aws/src/dynamodb.rs:313— lore-aws/src/dynamodb.rs:313-326 | lore-aws/src/dynamodb.rs:544-556 — both copies are in the same file, so extract the block into 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-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:1654— lore-revision/src/branch/merge.rs:1654-1667 | lore-revision/src/branch/merge.rs:2791-2803 — both copies are in the same file, so extract the block into 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:3381— lore-revision/src/commit.rs:3381-3393 | lore-revision/src/commit.rs:3454-3467 — both copies are in the same file, so extract the block into 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 × 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:575— lore-client/src/cli/commands/revision.rs:575-580 | lore-client/src/cli/commands/revision.rs:697-702 | lore-client/src/cli/commands/revision.rs:1332-1338 — 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:707— lore-transport/src/grpc/storage_client.rs:707-712 | lore-transport/src/grpc/storage_client.rs:739-744 | lore-transport/src/grpc/storage_client.rs:770-775 — 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:234-239 — 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.
lore::revision_tree::move_node::plan_entries (cyclomatic 28) lore/src/revision_tree/move_node.rs:345— 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:472— 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:172— 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.
State::serialize (cyclomatic 25) lore-revision/src/state.rs:744— State::serialize 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.
State::move_node (cyclomatic 25) lore-revision/src/state.rs:2692— 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 23) lore-revision/src/state.rs:1367— State::block_deserialize 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.
LocalMutableStore::list (cognitive 76) lore-storage/src/local/mutable_store.rs:1477— LocalMutableStore::list has cognitive complexity 76 (threshold 15). Drivers by points: if/else 13 (53 pts), loops 5 (21 pts), boolean chains 2 (nesting depth added 56). Of this number, 67 points are the body's own statements and 9 belong to one function item inside it that branches. 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::new (cognitive 26) lore-storage/src/local/mutable_store.rs:715— LocalMutableStore::new has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (5 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalMutableStore::load (cognitive 22) lore-storage/src/local/mutable_store.rs:1335— 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.
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 vulnerability · ×3
Change coupling: interface.rs ↔ command.rs lore/src/interface.rs— `lore/src/interface.rs` and `lore/src/remote/command.rs` change together 91% of the time (10 of the 11 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 10 shared commits counted here, the most recent 3 are `b1dedcd4` lore-capi: Expose the branch latest listing as a C API entry point; `98afb207` lore-capi: Expose repository delete as a C API entry point; `d04595e1` lore-client: add link info command — run `git show` on any of them.
Change coupling: mod.rs ↔ stage.rs lore-revision/src/fs/os/mod.rs— `lore-revision/src/fs/os/mod.rs` and `lore-revision/src/stage.rs` change together 64% of the time (14 of the 22 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 `5a6804bf` lore-revision: Rename operation named properly and added tests in os …; `a03e294b` lore-revision: Derive the case variations a directory holds from its …; `c640418b` lore-revision: read directories through the filesystem provider — run `git show` on any of them.
Change coupling: mod.rs ↔ realize.rs lore-revision/src/fs/os/mod.rs— `lore-revision/src/fs/os/mod.rs` and `lore-revision/src/fs/realize.rs` change together 59% of the time (13 of the 22 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 13 shared commits counted here, the most recent 3 are `d8484098` lore-revision: Change file system provider operation trait to have a …; `5a6804bf` lore-revision: Rename operation named properly and added tests in os …; `220a3286` lore-revision: Stream the filesystem diff instead of collecting to a Vec — run `git show` on any of them.
Near-duplicate member pair (42 shared lines) lore-revision/src/branch/merge.rs:3266— lore-revision/src/branch/merge.rs:3266-3434 | lore-revision/src/branch/merge.rs:3511-3607 — 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:3161— lore-revision/src/state.rs:3161-3218 | lore-revision/src/state.rs:3259-3314 — 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:81— lore/src/dependency.rs:81-148 | lore/src/dependency.rs:194-257 — 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· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (6 members, 50+ identical tokens) lore-revision/src/commit.rs:1719— lore-revision/src/commit.rs:1719-1857 | lore-revision/src/commit.rs:1938-2187 | lore-revision/src/commit.rs:2451-2513 | lore-revision/src/commit.rs:2861-3091 | lore-revision/src/fs/realize.rs:2110-2172 | lore-server/src/server.rs:1870-2448 — 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:145— lore-server/src/grpc/storage/v1/copy.rs:145-226 | 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:131-258 | lore-server/src/grpc/storage/v1/put.rs:112-183 | lore-server/src/grpc/storage/v1/put_resolved.rs:168-295 — 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/handlers/branch_create.rs:68— lore-server/src/grpc/handlers/branch_create.rs:68-154 | 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.
Duplicated block (23 lines × 2) lore-revision/src/branch/merge.rs:2396— lore-revision/src/branch/merge.rs:2396-2418 | lore-revision/src/branch/merge.rs:2431-2453 — both copies are in the same file, so extract the block into 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/fs/realize.rs:1588— lore-revision/src/fs/realize.rs:1588-1610 | lore-revision/src/fs/realize.rs:2145-2167 — both copies are in the same file, so extract the block into 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:400— lore-revision/src/metadata/branch.rs:400-422 | lore-revision/src/metadata/repository.rs:387-409 — before extracting anything, compare `lore-revision/src/metadata/branch.rs` and `lore-revision/src/metadata/repository.rs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (22 lines × 2) lore-client/src/cli/commands/revision.rs:2428— lore-client/src/cli/commands/revision.rs:2428-2449 | lore-client/src/cli/commands/revision.rs:2455-2476 — both copies are in the same file, so extract the block into 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:684— lore-io/src/psync.rs:684-705 | 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:179— lore-storage/src/read.rs:179-200 | lore-storage/src/read.rs:1820-1841 — both copies are in the same file, so extract the block into 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-revision/src/stage.rs:2877— lore-revision/src/stage.rs:2877-2896 | lore-revision/src/stage.rs:2949-2967 — both copies are in the same file, so extract the block into 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:62— lore-server/src/grpc/handlers/repository_create.rs:62-81 | 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:5006— lore-storage/src/local/immutable_store.rs:5006-5024 | lore-storage/src/local/mutable_store.rs:1711-1730 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17–18 lines × 2) lore-revision/src/repository/clone.rs:581— lore-revision/src/repository/clone.rs:581-598 | lore-revision/src/repository/clone.rs:706-722 — both copies are in the same file, so extract the block into 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:3201— lore-revision/src/state.rs:3201-3218 | lore-revision/src/state.rs:3298-3314 — both copies are in the same file, so extract the block into 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:105— lore-transport/src/grpc/mod.rs:105-121 | lore-transport/src/grpc/mod.rs:158-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) lore-io/src/iocp.rs:529— lore-io/src/iocp.rs:529-541 | lore-io/src/iocp.rs:568-579 — both copies are in the same file, so extract the block into 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:1524— lore-revision/src/stage.rs:1524-1536 | lore-revision/src/stage.rs:1637-1648 — both copies are in the same file, so extract the block into 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:3225— lore-revision/src/state.rs:3225-3237 | lore-revision/src/state.rs:3322-3333 — both copies are in the same file, so extract the block into 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-client/src/cli/commands/link.rs:124— lore-client/src/cli/commands/link.rs:124-133 | lore-client/src/cli/commands/repository.rs:1042-1052 — 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:716— lore-revision/src/file/dirty.rs:716-726 | lore-revision/src/file/reset.rs:1352-1361 — 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 (8–9 lines × 2) lore/src/revision_tree/metadata_clear.rs:131— lore/src/revision_tree/metadata_clear.rs:131-138 | lore/src/revision_tree/metadata_set.rs:164-172 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8–9 lines × 2) lore-storage/src/local/immutable_store.rs:1999— lore-storage/src/local/immutable_store.rs:1999-2007 | lore-storage/src/local/immutable_store.rs:4309-4316 — both copies are in the same file, so extract the block into 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-storage/src/local/immutable_store.rs:4965— lore-storage/src/local/immutable_store.rs:4965-4973 | lore-storage/src/local/mutable_store.rs:1674-1681 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 4) lore/src/revision_tree/add.rs:885— lore/src/revision_tree/add.rs:885-890 | lore/src/revision_tree/delete.rs:567-572 | lore/src/revision_tree/modify.rs:367-372 | lore/src/revision_tree/move_node.rs:689-694 — 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 (6 lines × 4) lore-revision/src/file/stage.rs:1417— lore-revision/src/file/stage.rs:1417-1422 | lore-revision/src/stage.rs:2721-2726 | lore-revision/src/stage.rs:2766-2771 | lore-revision/src/stage.rs:2982-2987 — 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:50— lore-server/src/protocol/replication_store/get.rs:50-55 | 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:72-77 — 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.
lore_transport::quic::response_reader::read_response (cyclomatic 32) lore-transport/src/quic/response_reader.rs:95— lore_transport::quic::response_reader::read_response 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_transport::connection::connect_impl (cyclomatic 25) lore-transport/src/connection.rs:317— 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.
LocalMutableStore::list (cyclomatic 19) lore-storage/src/local/mutable_store.rs:1477— LocalMutableStore::list has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalMutableStore::new (cyclomatic 16) lore-storage/src/local/mutable_store.rs:715— LocalMutableStore::new 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.
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.
StreamHandler::handle_stream (cognitive 78) lore-server/src/quic/stream_handler.rs:502— StreamHandler::handle_stream has cognitive complexity 78 (threshold 15). Drivers by points: if/else 21 (69 pts), loops 3 (6 pts), match/switch 1 (3 pts) (nesting depth added 53). 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.
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.
lore_io::uring::reaper_loop (cognitive 20) lore-io/src/uring.rs:888— 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:917— 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.
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:24— TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×2
Duplicated block (30 lines × 2) lore-revision/src/branch/merge.rs:4293— lore-revision/src/branch/merge.rs:4293-4322 | lore-revision/src/branch/merge.rs:4674-4703 — both copies are in the same file, so extract the block into 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.
Duplicated block (17 lines × 3) lore-revision/src/link/add.rs:423— lore-revision/src/link/add.rs:423-439 | lore-revision/src/link/remove.rs:154-170 | lore-revision/src/link/update.rs:213-229 — 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 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 3) lore-transport/src/connection.rs:1133— lore-transport/src/connection.rs:1133-1149 | lore-transport/src/connection.rs:1166-1182 | lore-transport/src/connection.rs:1189-1205 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16–17 lines × 2) lore-revision/src/branch/merge.rs:3725— lore-revision/src/branch/merge.rs:3725-3741 | lore-revision/src/stage.rs:2694-2709 — 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:3592— lore-storage/src/local/immutable_store.rs:3592-3608 | lore-storage/src/local/immutable_store.rs:3646-3661 — both copies are in the same file, so extract the block into 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:404— lore-revision/src/repository/verify.rs:404-418 | lore-revision/src/repository/verify.rs:552-568 — both copies are in the same file, so extract the block into 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-server/src/grpc/handlers/branch_push.rs:90— lore-server/src/grpc/handlers/branch_push.rs:90-106 | lore-server/src/grpc/revision/v1/branch_push.rs:72-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 (13 lines × 4) lore-client/src/cli/commands/file.rs:976— lore-client/src/cli/commands/file.rs:976-988 | lore-client/src/cli/commands/file.rs:995-1007 | lore-client/src/cli/commands/revision.rs:2311-2323 | lore-client/src/cli/commands/revision.rs:2329-2341 — 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:212— lore-server/src/grpc/storage/v1/copy.rs:212-224 | 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.
Duplicated block (12 lines × 3) lore-client/src/cli/commands/branch.rs:1019— lore-client/src/cli/commands/branch.rs:1019-1030 | lore-client/src/cli/commands/branch.rs:1088-1099 | lore-client/src/cli/commands/revision.rs:1729-1740 — 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:1128— lore-client/src/cli/commands/branch.rs:1128-1139 | lore-client/src/cli/commands/revision.rs:1769-1780 | lore-client/src/cli/commands/revision.rs:2065-2076 — 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 (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.
Duplicated block (9–10 lines × 2) lore-revision/src/state.rs:3162— lore-revision/src/state.rs:3162-3170 | lore-revision/src/state.rs:3260-3269 — both copies are in the same file, so extract the block into 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:4944— lore-storage/src/local/immutable_store.rs:4944-4952 | lore-storage/src/local/mutable_store.rs:1646-1655 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 3) lore-revision/src/store/remote.rs:58— lore-revision/src/store/remote.rs:58-66 | lore/src/storage/remote.rs:54-61 | lore/src/storage/remote.rs:73-80 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8–9 lines × 3) lore-storage/src/conformance.rs:509— lore-storage/src/conformance.rs:509-517 | lore-storage/src/conformance.rs:720-727 | lore-storage/src/conformance.rs:753-760 — 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–8 lines × 4) lore-storage/src/conformance.rs:511— lore-storage/src/conformance.rs:511-518 | lore-storage/src/conformance.rs:722-728 | lore-storage/src/conformance.rs:755-761 | lore-storage/src/conformance.rs:971-977 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–8 lines × 4) lore-storage/src/local/immutable_store.rs:1711— lore-storage/src/local/immutable_store.rs:1711-1718 | lore-storage/src/local/immutable_store.rs:2093-2100 | lore-storage/src/local/immutable_store.rs:3414-3420 | lore-storage/src/local/immutable_store.rs:4217-4224 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6–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:696— lore-storage/src/local/immutable_store.rs:696-702 | lore-storage/src/local/mutable_store.rs:380-385 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) lore-client/src/cli/commands/file.rs:1682— lore-client/src/cli/commands/file.rs:1682-1686 | lore-client/src/cli/commands/file.rs:1735-1739 | lore-client/src/cli/commands/file.rs:1780-1784 — 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:713— lore-revision/src/metadata.rs:713-717 | lore-revision/src/metadata.rs:913-917 | lore-revision/src/metadata.rs:1127-1131 — 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.
Off the main sequence: lore-io — lore-io: abstractness 0.13, instability 0.00, distance 0.88 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: lore-base — lore-base: abstractness 0.06, instability 0.18, distance 0.76 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
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.
StorageServiceV4::run_request_handler (cyclomatic 23) lore-server/src/quic/storage_service_v4.rs:178— 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.
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.
JwkServiceImpl::fetch_new_keys (cyclomatic 20) lore-server/src/auth/jwk.rs:524— 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.
StreamHandler::handle_stream (cyclomatic 20) lore-server/src/quic/stream_handler.rs:502— StreamHandler::handle_stream 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.
RevisionMetadata::from_metadata (cyclomatic 18) lore-revision/src/revision.rs:85— 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.
CompositeStore::query (cyclomatic 17) lore-revision/src/store/composite.rs:931— 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.
PackStore::resume (cyclomatic 16) lore-storage/src/packstore.rs:165— PackStore::resume 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.
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.
PackStore::resume (cognitive 37) lore-storage/src/packstore.rs:165— PackStore::resume has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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.
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.
JwkServiceImpl::fetch_new_keys (cognitive 29) lore-server/src/auth/jwk.rs:524— 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.
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.
TaskQueue::new (cognitive 25) lore-revision/src/util/task_queue.rs:147— 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.
DependencyData::deserialize (cognitive 24) lore-revision/src/dependency/mod.rs:432— 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.
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.
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.
StorageConnector::session_pool (cognitive 19) lore-transport/src/session.rs:514— StorageConnector::session_pool has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), match/switch 2, 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.
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.
FilterInstance::step (cognitive 18) lore-revision/src/filter.rs:1039— 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.
Connect::handle_auth (cognitive 18) lore-server/src/protocol/storage/connect.rs:60— Connect::handle_auth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RepositoryService::list (cognitive 18) lore-transport/src/grpc/repository_client.rs:142— 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.
RevisionService::branch_list (cognitive 18) lore-transport/src/grpc/revision_client.rs:116— RevisionService::branch_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.
StorageServiceV4::run_request_handler (cognitive 16) lore-server/src/quic/storage_service_v4.rs:178— 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.
TelemetryInitializer::from_config (cognitive 16) lore-server/src/telemetry/mod.rs:103— 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.
EnvironmentConfig::from (cognitive 16) lore-transport/src/grpc/environment_client.rs:20— 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.
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.
D22 · Internal API Consistency· Inconsistent return type for getter vs setter. The setter accepts u16, but the getter returns u64. This is likely a bug or unnecessary widening, as UDP payload sizes fit in u16. · ×1
Inconsistent return type for getter vs setter. The setter accepts u16, but the getter returns u64. This is likely a bug or unnecessary widening, as UDP payload sizes fit in u16. — Change the return type of `get_max_udp_payload_size` to `u16` to match the setter and the domain constraint. (signatures: EndpointConfig.get_max_udp_payload_size(): u64 | EndpointConfig.max_udp_payload_size(value: u16): Result)
D22 · Internal API Consistency· Inconsistent naming for key update operations. `force_key_update` and `initiate_key_update` appear to do the same thing (triggering a key update), with only the verb 'force' vs 'initiate' distinguishing them. This creates ambiguity about whether one is synchronous/asynchronous or has different side effects. · ×1
Inconsistent naming for key update operations. `force_key_update` and `initiate_key_update` appear to do the same thing (triggering a key update), with only the verb 'force' vs 'initiate' distinguishing them. This creates ambiguity about whether one is synchronous/asynchronous or has different side effects. — Remove one of the methods. If they are identical, keep `initiate_key_update` as it is more standard. If they differ, clarify the distinction in naming (e.g., `force_key_update` vs `schedule_key_update`). Given the context, they likely overlap. (signatures: Connection.ping() | Connection.force_key_update() | Connection.initiate_key_update())
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:1675— lore-client/src/cli/commands/branch.rs:1675-1725 | lore-client/src/cli/commands/file.rs:1013-1066 | lore-client/src/cli/commands/repository.rs:1582-1631 | lore-client/src/cli/commands/revision.rs:2347-2392 — 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.
Near-duplicate member pair (132 shared lines) lore-transport/src/auth/exchange.rs:107— lore-transport/src/auth/exchange.rs:107-260 | lore-transport/src/auth/exchange.rs:278-435 — 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.
Near-duplicate member pair (112 shared lines) lore-revision/src/branch/merge.rs:4165— lore-revision/src/branch/merge.rs:4165-4322 | lore-revision/src/branch/merge.rs:4333-4703 — These two members are variants of one another: 112 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 (103 shared lines) lore-storage/src/compress.rs:695— lore-storage/src/compress.rs:695-820 | lore-storage/src/compress.rs:826-944 — 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.
Near-duplicate member pair (66 shared lines) lore-client/src/cli/commands/revision.rs:910— lore-client/src/cli/commands/revision.rs:910-1037 | lore-client/src/cli/commands/revision.rs:1042-1177 — These two members are variants of one another: 66 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (57 shared lines) lore-storage/src/local/immutable_store.rs:4943— lore-storage/src/local/immutable_store.rs:4943-5024 | lore-storage/src/local/mutable_store.rs:1645-1730 — These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (54 shared lines) lore-revision/src/revision/cherry_pick.rs:147— lore-revision/src/revision/cherry_pick.rs:147-268 | lore-revision/src/revision/revert.rs:143-255 — 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.
Near-duplicate member pair (43 shared lines) lore-revision/src/link/remove.rs:39— lore-revision/src/link/remove.rs:39-179 | lore-revision/src/link/update.rs:34-238 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (62 lines × 2) lore-storage/src/compress.rs:746— lore-storage/src/compress.rs:746-807 | lore-storage/src/compress.rs:876-937 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (55–57 lines × 2) lore-transport/src/auth/exchange.rs:150— lore-transport/src/auth/exchange.rs:150-206 | lore-transport/src/auth/exchange.rs:327-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (53 lines × 2) lore-transport/src/auth/exchange.rs:208— lore-transport/src/auth/exchange.rs:208-260 | lore-transport/src/auth/exchange.rs:383-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (46–47 lines × 2) lore-revision/src/commit.rs:1787— lore-revision/src/commit.rs:1787-1833 | lore-revision/src/commit.rs:2942-2987 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (39–41 lines × 2) lore-server/src/grpc/handlers/repository_create.rs:268— lore-server/src/grpc/handlers/repository_create.rs:268-308 | lore-server/src/grpc/repository/v1/repository_create.rs:318-356 — 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 (40 lines × 2) lore-revision/src/util/fs.rs:559— lore-revision/src/util/fs.rs:559-598 | lore-revision/src/util/fs.rs:686-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 (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.
Duplicated block (33 lines × 2) lore-server/src/grpc/revision/v1/service.rs:96— lore-server/src/grpc/revision/v1/service.rs:96-128 | lore-server/src/grpc/revision_service.rs:79-111 — 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 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (28–32 lines × 2) lore-transport/src/auth/exchange.rs:506— lore-transport/src/auth/exchange.rs:506-537 | lore-transport/src/auth/exchange.rs:667-694 — both copies are in the same file, so extract the block into 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–28 lines × 2) lore-storage/src/read.rs:441— lore-storage/src/read.rs:441-468 | lore-storage/src/read.rs:1878-1900 — both copies are in the same file, so extract the block into 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–27 lines × 3) lore-revision/src/state.rs:7591— lore-revision/src/state.rs:7591-7616 | lore-revision/src/state.rs:7653-7678 | lore-revision/src/state.rs:7689-7715 — 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 (21–27 lines × 2) lore-server/src/grpc/handlers/branch_push.rs:117— lore-server/src/grpc/handlers/branch_push.rs:117-137 | lore-server/src/grpc/revision/v1/branch_push.rs:96-122 — 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 (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.
Duplicated block (27 lines × 2) lore-storage/src/compress.rs:716— lore-storage/src/compress.rs:716-742 | lore-storage/src/compress.rs:846-872 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (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:175-200 — 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 (23–26 lines × 2) lore-revision/src/dependency/mod.rs:701— lore-revision/src/dependency/mod.rs:701-723 | lore-revision/src/metadata/set.rs:241-266 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (25–26 lines × 2) lore-revision/src/state.rs:5619— lore-revision/src/state.rs:5619-5643 | lore-revision/src/state.rs:5645-5670 — both copies are in the same file, so extract the block into 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–25 lines × 4) lore-client/src/cli/commands/branch.rs:1680— lore-client/src/cli/commands/branch.rs:1680-1702 | lore-client/src/cli/commands/file.rs:1017-1041 | lore-client/src/cli/commands/repository.rs:1587-1609 | lore-client/src/cli/commands/revision.rs:2350-2372 — 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 (25 lines × 2) lore-transport/src/quic/storage_service/client.rs:357— lore-transport/src/quic/storage_service/client.rs:357-381 | lore-transport/src/quic/storage_service/client.rs:461-485 — both copies are in the same file, so extract the block into 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:116— lore/src/dependency.rs:116-139 | lore/src/dependency.rs:225-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20–24 lines × 2) lore-revision/src/revision/cherry_pick.rs:164— lore-revision/src/revision/cherry_pick.rs:164-183 | lore-revision/src/revision/revert.rs:155-178 — 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.
Duplicated block (22–24 lines × 2) lore-storage/src/packstore.rs:453— lore-storage/src/packstore.rs:453-474 | lore-storage/src/packstore.rs:506-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19–23 lines × 2) lore-revision/src/branch.rs:2185— lore-revision/src/branch.rs:2185-2203 | lore-revision/src/branch.rs:2264-2286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22–23 lines × 2) 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.
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:146-167 — 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 (15–22 lines × 3) lore-storage/src/read.rs:447— lore-storage/src/read.rs:447-468 | lore-storage/src/read.rs:524-545 | lore-storage/src/read.rs:1886-1900 — 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 (20–22 lines × 2) lore-revision/src/util/fs.rs:522— lore-revision/src/util/fs.rs:522-541 | lore-revision/src/util/fs.rs:643-664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19–21 lines × 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.
Duplicated block (18–20 lines × 3) lore-revision/src/branch/merge.rs:2368— lore-revision/src/branch/merge.rs:2368-2385 | lore-revision/src/branch/merge.rs:2399-2418 | lore-revision/src/branch/merge.rs:2434-2453 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (17–19 lines × 2) lore-server/src/cache/revision.rs:152— lore-server/src/cache/revision.rs:152-170 | lore-server/src/cache/revision.rs:206-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (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.
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.
Duplicated block (16–18 lines × 2) lore-revision/src/util/fs.rs:543— lore-revision/src/util/fs.rs:543-558 | lore-revision/src/util/fs.rs:667-684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–17 lines × 6) lore-server/src/grpc/storage/v1/copy.rs:150— lore-server/src/grpc/storage/v1/copy.rs:150-164 | 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:133-148 | lore-server/src/grpc/storage/v1/put.rs:114-130 | lore-server/src/grpc/storage/v1/put_resolved.rs:170-185 — 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 (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.
Duplicated block (15–16 lines × 4) lore-revision/src/branch/merge.rs:2370— lore-revision/src/branch/merge.rs:2370-2384 | lore-revision/src/branch/merge.rs:2401-2416 | lore-revision/src/branch/merge.rs:2436-2451 | lore-revision/src/branch/merge.rs:4189-4203 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–16 lines × 2) lore/src/revision_tree/handle.rs:209— lore/src/revision_tree/handle.rs:209-221 | lore/src/storage/store.rs:256-271 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15–16 lines × 2) lore-revision/src/fs/realize.rs:2551— lore-revision/src/fs/realize.rs:2551-2565 | lore-revision/src/fs/realize.rs:2618-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 (14–16 lines × 2) lore-transport/src/quic/response_reader.rs:230— lore-transport/src/quic/response_reader.rs:230-245 | lore-transport/src/quic/response_reader.rs:275-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
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.
Duplicated block (14 lines × 5) lore-client/src/cli/commands/file.rs:1537— lore-client/src/cli/commands/file.rs:1537-1550 | lore-client/src/cli/commands/file.rs:1579-1592 | lore-client/src/cli/commands/file.rs:1647-1660 | lore-client/src/cli/commands/link.rs:169-182 | lore-client/src/cli/commands/link.rs:202-215 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11–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.
Duplicated block (13–14 lines × 3) lore-client/src/cli/commands/branch.rs:639— lore-client/src/cli/commands/branch.rs:639-651 | lore-client/src/cli/commands/revision.rs:586-599 | lore-client/src/cli/commands/revision.rs:713-726 — 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–14 lines × 2) lore-revision/src/layer.rs:1125— lore-revision/src/layer.rs:1125-1136 | lore-revision/src/layer.rs:1149-1162 — both copies are in the same file, so extract the block into 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 × 3) lore-client/src/cli/commands/branch.rs:1542— lore-client/src/cli/commands/branch.rs:1542-1554 | lore-client/src/cli/commands/branch.rs:1569-1581 | lore-client/src/cli/commands/branch.rs:1600-1612 — 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–13 lines × 2) lore-storage/src/local/immutable_store.rs:4990— lore-storage/src/local/immutable_store.rs:4990-5000 | lore-storage/src/local/mutable_store.rs:1696-1708 — 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 13 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10–12 lines × 11) lore-client/src/cli/commands/branch.rs:1221— lore-client/src/cli/commands/branch.rs:1221-1230 | lore-client/src/cli/commands/branch.rs:1243-1252 | lore-client/src/cli/commands/branch.rs:1262-1271 | lore-client/src/cli/commands/branch.rs:1737-1748 | lore-client/src/cli/commands/repository.rs:1645-1656 | lore-client/src/cli/commands/revision.rs:1876-1885 | lore-client/src/cli/commands/revision.rs:1965-1974 | lore-client/src/cli/commands/revision.rs:1988-1997 | lore-client/src/cli/commands/revision.rs:2165-2174 | lore-client/src/cli/commands/revision.rs:2247-2256 | lore-client/src/cli/commands/revision.rs:2269-2278 — 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 (11–12 lines × 4) lore-client/src/cli/commands/branch.rs:1663— lore-client/src/cli/commands/branch.rs:1663-1673 | lore-client/src/cli/commands/repository.rs:1567-1577 | lore-client/src/cli/commands/revision.rs:1771-1782 | lore-client/src/cli/commands/revision.rs:2067-2078 — 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 (11–12 lines × 3) lore-server/src/grpc/handlers/branch_create.rs:88— lore-server/src/grpc/handlers/branch_create.rs:88-99 | 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.
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 (10–12 lines × 2) lore-storage/src/write.rs:450— lore-storage/src/write.rs:450-461 | lore-storage/src/write.rs:472-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 (10–11 lines × 4) lore-revision/src/util/fs.rs:532— lore-revision/src/util/fs.rs:532-541 | lore-revision/src/util/fs.rs:570-579 | lore-revision/src/util/fs.rs:655-665 | lore-revision/src/util/fs.rs:697-706 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–11 lines × 2) lore-revision/src/file/dirty.rs:947— lore-revision/src/file/dirty.rs:947-957 | lore-revision/src/state/os_diff.rs:70-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 (8–11 lines × 2) lore-revision/src/link/add.rs:105— lore-revision/src/link/add.rs:105-115 | lore-revision/src/link/add.rs:140-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 29) lore-client/src/cli/commands/branch.rs:612— lore-client/src/cli/commands/branch.rs:612-622 | lore-client/src/cli/commands/branch.rs:786-796 | lore-client/src/cli/commands/branch.rs:1132-1142 | lore-client/src/cli/commands/branch.rs:1223-1233 | lore-client/src/cli/commands/branch.rs:1245-1255 | lore-client/src/cli/commands/branch.rs:1264-1274 | lore-client/src/cli/commands/branch.rs:1302-1312 | lore-client/src/cli/commands/branch.rs:1520-1530 | lore-client/src/cli/commands/branch.rs:1547-1557 | lore-client/src/cli/commands/branch.rs:1574-1584 | lore-client/src/cli/commands/branch.rs:1605-1615 | lore-client/src/cli/commands/branch.rs:1636-1646 | lore-client/src/cli/commands/file.rs:958-968 | lore-client/src/cli/commands/file.rs:981-990 | lore-client/src/cli/commands/repository.rs:1085-1095 | lore-client/src/cli/commands/repository.rs:1383-1393 | lore-client/src/cli/commands/repository.rs:1806-1816 | lore-client/src/cli/commands/revision.rs:1600-1610 | lore-client/src/cli/commands/revision.rs:1635-1645 | lore-client/src/cli/commands/revision.rs:1808-1818 | lore-client/src/cli/commands/revision.rs:1878-1888 | lore-client/src/cli/commands/revision.rs:1967-1977 | lore-client/src/cli/commands/revision.rs:1990-2000 | lore-client/src/cli/commands/revision.rs:2104-2114 | lore-client/src/cli/commands/revision.rs:2167-2177 | lore-client/src/cli/commands/revision.rs:2249-2259 | lore-client/src/cli/commands/revision.rs:2271-2281 | lore-client/src/cli/commands/revision.rs:2294-2304 | lore-client/src/cli/commands/revision.rs:2316-2325 — 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 (10 lines × 6) lore-server/src/quic/storage_service.rs:87— lore-server/src/quic/storage_service.rs:87-96 | lore-server/src/quic/storage_service.rs:100-109 | lore-server/src/quic/storage_service.rs:113-122 | lore-server/src/quic/storage_service.rs:150-159 | lore-server/src/quic/storage_service.rs:199-208 | lore-server/src/quic/storage_service.rs:212-221 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–10 lines × 4) lore-revision/src/link/add.rs:249— lore-revision/src/link/add.rs:249-257 | 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 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (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.
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.
Duplicated block (9 lines × 4) lore-client/src/cli/commands/branch.rs:1022— lore-client/src/cli/commands/branch.rs:1022-1030 | lore-client/src/cli/commands/branch.rs:1091-1099 | lore-client/src/cli/commands/revision.rs:1650-1658 | lore-client/src/cli/commands/revision.rs:1732-1740 — 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 (6–9 lines × 3) lore-revision/src/file/dirty.rs:148— lore-revision/src/file/dirty.rs:148-153 | lore-revision/src/file/dirty.rs:1156-1164 | lore-revision/src/file/dirty.rs:1368-1376 — 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 × 4) lore-revision/src/commit.rs:1746— lore-revision/src/commit.rs:1746-1753 | lore-revision/src/commit.rs:2039-2046 | lore-revision/src/commit.rs:2110-2117 | lore-revision/src/commit.rs:2905-2912 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–8 lines × 2) lore-revision/src/state.rs:5717— lore-revision/src/state.rs:5717-5724 | lore-revision/src/state.rs:5726-5732 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (4–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:121-127 | lore-server/src/grpc/thinclient/v1/revision_tree.rs:60-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
Duplicated block (5–6 lines × 6) lore-server/src/grpc/handlers/branch_create.rs:69— lore-server/src/grpc/handlers/branch_create.rs:69-74 | 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.
Duplicated block (5–6 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:160-165 | 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.
Duplicated block (5 lines × 5) lore/src/revision_tree/add.rs:482— lore/src/revision_tree/add.rs:482-486 | lore/src/revision_tree/delete.rs:181-185 | lore/src/revision_tree/metadata_clear.rs:131-135 | lore/src/revision_tree/metadata_set.rs:164-168 | lore/src/revision_tree/modify.rs:173-177 — 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 (5 lines × 4) lore-revision/src/branch/merge.rs:3104— lore-revision/src/branch/merge.rs:3104-3111 | lore-revision/src/branch/merge.rs:3821-3825 | lore-revision/src/revision/cherry_pick.rs:298-305 | lore-revision/src/revision/revert.rs:278-282 — 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.
Duplicated block (10 lines × 5) lore/src/branch.rs:908— lore/src/branch.rs:908-917 | lore/src/branch.rs:1438-1447 | lore/src/link.rs:75-84 | lore/src/link.rs:157-166 | lore/src/link.rs:339-348 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (7 lines × 7) lore/src/revision_tree/add.rs:138— lore/src/revision_tree/add.rs:138-144 | lore/src/revision_tree/delete.rs:118-124 | lore/src/revision_tree/metadata_clear.rs:103-109 | lore/src/revision_tree/metadata_get.rs:123-129 | lore/src/revision_tree/metadata_set.rs:120-126 | lore/src/revision_tree/modify.rs:123-129 | lore/src/revision_tree/move_node.rs:133-139 — 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 (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/revision/v1/branch_create.rs:102-114 | lore-server/src/grpc/revision/v1/branch_delete.rs:76-88 | lore-server/src/grpc/revision/v1/branch_get.rs:58-70 | 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.
Duplicated block (11 lines × 8) lore-server/src/quic/storage_service.rs:73— lore-server/src/quic/storage_service.rs:73-83 | lore-server/src/quic/storage_service.rs:124-134 | lore-server/src/quic/storage_service.rs:136-146 | lore-server/src/quic/storage_service.rs:161-171 | lore-server/src/quic/storage_service.rs:173-183 | lore-server/src/quic/storage_service.rs:185-195 | lore-server/src/quic/storage_service.rs:225-235 | lore-server/src/quic/storage_service.rs:237-247 — 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 59 significant file(s) lose their only recent owner: lore-revision/src/stage.rs, lore-storage/src/defragment.rs, lore/src/revision_tree/move_node.rs, lore/src/revision_tree/delete.rs, lore-revision/src/fs/filesystem_provider.rs, lore-aws/src/store/lock_store.rs, lore-revision/src/filter.rs, lore-server/src/hooks/dispatch.rs (+51 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 20 significant file(s) lose their only recent owner: lore-server/src/quic/replication_store_service/client.rs, lore-storage/src/mutable_conformance.rs, lore-server/src/quic/replication_store_service/client_container.rs, lore-server/src/grpc/forwarded_requests.rs, lore-server/src/grpc/revision/v1/service.rs, lore-revision/src/dependency/resolve.rs, lore-server/src/quic/replication_store_service.rs, lore-server/src/grpc/forwarded_revision/v1/branch_create.rs (+12 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 5 significant file(s) lose their only recent owner: lore-server/src/authnz/repository_authorizer.rs, lore-server/src/grpc/lock_service.rs, lore-server/src/protocol/storage/connect.rs, lore-server/src/grpc/revision_service.rs, lore-credential/src/util.rs. Pair on, review, or document these before any departure.
README/code drift — README omits the lore-aws repository (and its AWS integration) — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
README/code drift — README omits the lore-base/native project — reported by the model that read the README against this repository; no term search was run for this one, so nothing here has been checked against the tree. Treat it as a reading to confirm, not as a measured contradiction: verify it against the code before acting on it, and if the footprint it describes does exist, this row is wrong.
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 (86 single-owned of 508 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 508 of the 694 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
Documentation: contradicts the code docs/developing/doc-standards/tools/README.md— The linter tooling table lists Vale (prose), markdownlint (structural), and lychee (links) with config locations, but the referenced Vale .vale.ini is a local file not shared by the repo root's .vale.ini. Ensure all three tools are installed on the CI host so the pre-publish script runs without requiring local installation.
Split lore-revision — A sprawling revision-system project whose 25 namespaces are all parts of the same persistent-storage subsystem. Suggested: split into storage/revision, branch, file, repository, and util
D28 · Secrets (history)· Rotate the exposed credentials · ×1
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.
No AppArmor/SELinux confinement — Workloads declare no AppArmor or SELinux profile. A mandatory-access-control profile confines what a compromised container can touch on the host, complementing seccomp's syscall filter.
Logging is not universal — Only 11/13 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `lore-transport`.
Outdated: anyhow — `anyhow` is locked at 1.0.103 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1.0.103"` requirement declared in contrib/aws-migrate-0.9.0/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
Outdated: aws-config — `aws-config` is locked at 1.8.17 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1.8.12"` requirement declared in lore-aws/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-config` and commit the updated REDACTED.
Outdated: aws-sdk-dynamodb — `aws-sdk-dynamodb` is locked at 1.112.0 but 1.128.0 is the current stable release on crates.io, and it already satisfies the `"1.103.0"` requirement declared in lore-aws/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-sdk-dynamodb` and commit the updated REDACTED.
Outdated: aws-sdk-s3 — `aws-sdk-s3` is locked at 1.133.0 but 1.150.0 is the current stable release on crates.io, and it already satisfies the `"1.121.0"` requirement declared in lore-aws/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-sdk-s3` and commit the updated REDACTED.
Outdated: aws-smithy-http-client — `aws-smithy-http-client` is locked at 1.1.12 but 1.4.2 is the current stable release on crates.io, and it already satisfies the `"1.1.1"` requirement declared in lore-aws/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-smithy-http-client` and commit the updated REDACTED.
Outdated: aws-smithy-runtime-api — `aws-smithy-runtime-api` is locked at 1.12.1 but 1.18.0 is the current stable release on crates.io, and it already satisfies the `"1.11.3"` requirement declared in lore-aws/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-smithy-runtime-api` and commit the updated REDACTED.
Outdated: aws-smithy-types — `aws-smithy-types` is locked at 1.4.8 but 1.8.1 is the current stable release on crates.io, and it already satisfies the `"1.4.3"` requirement declared in lore-aws/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-smithy-types` and commit the updated REDACTED.
Outdated: aws-types — `aws-types` is locked at 1.3.16 but 1.6.0 is the current stable release on crates.io, and it already satisfies the `"1.3.11"` requirement declared in lore-aws/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p aws-types` and commit the updated REDACTED.
Outdated: cc — `cc` is locked at 1.2.62 but 1.5.1 is the current stable release on crates.io, and it already satisfies the `"1.2.32"` requirement declared in lore-base/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cc` and commit the updated REDACTED.
Outdated: clap — `clap` is locked at 4.6.1 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.5.47"` requirement declared in contrib/aws-migrate-0.9.0/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
Outdated: clap_complete — `clap_complete` is locked at 4.6.5 but 4.6.11 is the current stable release on crates.io, and it already satisfies the `"4.5.47"` requirement declared in lore-client/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap_complete` and commit the updated REDACTED.
Outdated: glob — `glob` is locked at 0.3.3 but 0.3.4 is the current stable release on crates.io, and it already satisfies the `"0.3.2"` requirement declared in lore-capi/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p glob` and commit the updated REDACTED.
Outdated: open — `open` is locked at 5.3.5 but 5.4.4 is the current stable release on crates.io, and it already satisfies the `"5.3.2"` requirement declared in lore-revision/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p open` and commit the updated REDACTED.
Outdated: regex — `regex` is locked at 1.12.3 but 1.13.1 is the current stable release on crates.io, and it already satisfies the `"1.11.1"` requirement declared in lore-capi/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p regex` and commit the updated REDACTED.
Outdated: tokio — `tokio` is locked at 1.52.3 but 1.53.1 is the current stable release on crates.io, and it already satisfies the `"1.47.1"` requirement declared in contrib/aws-migrate-0.9.0/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` 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.
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.
runtime-hardening: not applicable — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a0ec2a-ad3f-7339-acbf-21cb82ac71cd · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 33 · Warnings: 1344 · Recommendations: 28 · Info: 15 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 29-09-2026 @ 07:56 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.