Public report — riak_kv, published 2 Oct 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.12 (frozen) · verify this surveyFiledcd_c890b11e91334330ac4255cd992d1455
Filed 25 September 2026, 05:08 UTC
Public
Medium · 70,411 LoC · 2 projects · rebuild ~0.5 person-years · weakest lens: Event-Driven (48%)
Findings by grade
19 critical272 serious24 minor20 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
2 October 2026, 16:48 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 ▸
302findings with an exact file:lineof 315 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
56/120dimensions across the health lenses70411 LoC · 2 projects — wide & deep
The system holds an adequate standing with an overall health score of 59%, indicating a workable asset that carries real operational risk. While the core code is clean and well-structured, the foundation is uneven, with specific areas threatening delivery speed and reliability. This is not a fragile system, but it is one that requires focused attention to prevent future outages and slow down feature development.
The value at stake is moderate, with a rebuild effort estimated at half a person-year and a cost of approximately €76,000. The codebase is substantial, containing over 70,000 lines of production logic, yet it lacks significant boilerplate, suggesting a high concentration of custom business rules. This density means that changes ripple further than they might in a more modular system, making architectural integrity critical for maintaining velocity.
The primary risk lies in the event-driven architecture, which scored poorly at 48%. This weakness creates a high potential for deadlock and blocking behavior, directly impacting system reliability and user experience. Synchronous calls and blocking sleeps within message handlers are the main culprits, introducing latency and fragility that can cascade into broader outages. Addressing this is the highest-leverage move, as it decouples processes and stabilizes the core operational model.
A secondary concern is the gap in production readiness, particularly around disaster recovery and release safety. While backups exist, there is no documented, tested restore procedure, leaving the business exposed to significant downtime in a crisis. Additionally, release protection rules are not visible, risking the deployment of unvetted builds. These gaps threaten security exposure and business continuity, requiring immediate documentation and process hardening.
Despite these risks, the system boasts genuine strengths in code health and architecture, both scoring high at 88%. The code is maintainable, and the structural design is sound, providing a solid base for remediation. The team can pick up the work without a steep learning curve, and the logical flow is clear. This balance allows for targeted fixes without a complete overhaul.
Focus first on removing synchronous peer round-trips and blocking sleeps from OTP message handlers. This single action offers the most protection against operational failure and improves delivery speed by eliminating deadlocks. Once the event-driven layer is stabilized, address the disaster recovery documentation and release safety controls to secure the system’s long-term viability.
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.
0.8× (at 59% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~0.5 person-years of build effort (about ~€76,000 to rebuild). Its weakest lens is Event-Driven at 48% — 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 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~0.5 person-years to rebuild), and its weakest lens is Event-Driven at 48%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Event-Driven first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
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
A03:2021 — Injection
17
High / Critical
A02:2021 — Cryptographic Failures
2
High / Critical
Roadmap
First, eliminate synchronous calls and blocking sleeps in OTP handlers to prevent deadlocks and ensure temporal decoupling. Second, secure the deployment pipeline by verifying reviewer approvals and using draft releases to prevent bad builds from reaching users. Third, establish a tested disaster recovery plan with documented RTO and RPO targets rather than relying solely on backups. Fourth, ensure event-replay determinism by injecting all time and random values at event creation time. Finally, organize architecture decision records under a consistent directory structure for better discoverability.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with riak_kv_bucket.erl, riak_kv_put_fsm.erl, riak_kv_wm_aaefold.erl.
Explicit Debt: XxxComment repeated across 11 files
src/riak_kv_ensemble_backend.erl
6.0
Mixed
Explicit Debt: TodoComment
src/riak_kv_app.erl
6.0
Mixed
Explicit Debt: TodoComment
src/riak_kv_get_fsm.erl
6.0
Mixed
Explicit Debt: TodoComment
src/riak_client.erl
6.0
Mixed
Explicit Debt: TodoComment
eqc/ec_eqc.erl
6.0
Mixed
Explicit Debt: TodoComment
eqc/backend_eqc.erl
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 — 19
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 — 272
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 — 24
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 20
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. 51 of 56 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 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 — 56 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, 302 of 315 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 (.erl) 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 (`rebar3 do eunit --cover, cover` (or covertool for Cobertura 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 (`rebar3 do eunit --cover, cover` (or covertool for Cobertura 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. Test source is present (.erl) and this repository declares a rebar3 project (repository root, 74 test files), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a rebar.config / erlang.mk DEPS (Hex), but the licence verdict published here was taken over its gem dependencies. Nothing was read about its Rebar dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (src/riak_kv.app.src), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
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.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and JavaScript/TypeScript source only, and this repository's Erlang is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and JavaScript/TypeScript source only, and this repository's Erlang is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
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.
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 reads C# syntax, and TypeScript source only, and no C# was loaded and no TypeScript was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 reads C# syntax, and JavaScript/TypeScript source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript makes a request an AbortSignal can cancel (fetch, axios, ky, ofetch), so there is nothing to judge, 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.
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 reads C# syntax, and Java source only, and no C# was loaded, and this repository's TypeScript/JavaScript is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 reads C# syntax, and Java and Rust source only, and no C# was loaded, no Java or Rust was found, and this repository's Erlang, JavaScript is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 reads C# syntax, and PHP, Java, Kotlin, Python, Ruby and Scala source only, and no C# was loaded and no PHP, Java, Kotlin, Python, Ruby or Scala was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript source only, and no C# was loaded, and this repository's JavaScript/TypeScript makes no call through a named logger, 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.
X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. X7 measured the part of this repository it reads (C#, Python, TypeScript/JavaScript, Rust, Go, Java, Kotlin and PHP), and its Erlang source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.
Repo exclusion declarations (.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.
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.
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.
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.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: 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 (5): D19, D20, D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
27 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was riak_kv_pb_aaefold.process at 67. A further 10 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 riak_kv_stat.do_update at 84 — they are counted neither in the figure above nor in this dimension's score. 6 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: src/riak_kv_stat.erl (riak_kv_stat.do_update at 84), src/riak_kv_wm_json.erl (riak_kv_wm_json.escape at 35), src/riak_kv_mapred_filters.erl (riak_kv_mapred_filters.resolve_name at 25), src/riak_kv_index_hashtree.erl (riak_kv_index_hashtree.handle_call at 18), src/riak_kv_requests.erl (riak_kv_requests.request_type at 18), and 1 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 22 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 27 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with riak_kv_pb_aaefold.process (cyclomatic 67), riak_kv_pb_object.process (cyclomatic 61), riak_kv_vnode.handle_aaefold (cyclomatic 42). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 27 together lifts Cyclomatic Complexity from 6.4 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
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.
+ 21 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 30 down to 30 or less in Cognitive Complexity — start with riak_kv_pb_object.process (cognitive 54), riak_kv_query_server.handle_info (cognitive 36). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 6.7 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes6.8 / 10Adequate✓ 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.
Resolve the 39 FileTooLong finding(s) in God Classes — start with riak_kv_vnode.erl, riak_object.erl, riak_kv_ttaaefs_manager.erl. — One of this dimension's main actionable groups (39 warning-level).
Resolve the 8 TooManyFunctions finding(s) in God Classes — start with replrtq_snk_eqc.erl, replrtq_eqc.erl, riak_kv_crdt.erl. — One of this dimension's main actionable groups (8 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.
105 duplicated block group(s) detected. A further 5 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 40 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 16 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with riak_kv_multi_backend.erl (5), riak_kv_wm_counter.erl (2), riak_client.erl. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 11 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with riak_kv_multi_backend.erl (2), riak_kv_query_server.erl (2), riak_kv_vnode.erl (2). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 10 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with eraser_eqc.erl, riak_kv_clusteraae_fsm.erl, riak_kv_get_fsm.erl. — One of this dimension's main actionable groups (10 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
What to do
Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
1 outdated direct gem(s), 0 pinning defect(s). 3 declaration(s) graded against rubygems.org, 2 of them against a version resolved in a committed Gemfile.lock. 1 declaration(s) carry a requirement that EXCLUDES the current release; that is a deliberate constraint (a supported-version ceiling or a held-back CI pin) and is counted, not charged. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Outdated: jekyll-relative-links
✓ 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 38 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 38 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a rebar.config / erlang.mk DEPS (Hex), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
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.
10 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/riak_object.erl. Counted over 96 of the 163 production source files in this repository: 26 are under the ~2,400-byte size floor this dimension measures over, and the remaining 41 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 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.
66 deducted task-comment markers across 70411 LoC (0.1/KLoC) → score 9.8. 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 · ×54eqc/riak_object_dvv_statem.erl:6
XxxComment repeated across 11 filessrc/riak_kv_wm_query.erl:234
XxxCommentsrc/riak_kv_mapred_term.erl:162
What to do
Resolve the 54 TodoComment finding(s) in Explicit Debt — start with ec_eqc.erl (6), riak_client.erl (5), riak_kv_ensemble_backend.erl (4). — One of this dimension's main actionable groups (54 warning-level).
Resolve the 1 XxxComment repeated across 11 files finding(s) in Explicit Debt — start with riak_kv_wm_query.erl. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with riak_kv_mapred_term.erl. — One of this dimension's main actionable groups (1 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.
The repository's root README and the two architecture/Docs markdown files form a complete documentation set: the root gives an overview of Riak KV with OTP version support, a quick start, and a clipped Quick Docs section; BuildAndScaleClusterGuide.md covers building and scaling a cluster in two parts (choosing infrastructure, nodes, load-balancing) plus forming-and-expanding-a-riak-cluster sub-sections and the full initial design decisions outline; InstallAndStartGuide.md provides OTP version mappings, install/OTP steps, and a clipped package-deployment section; ObjectAPI.md and QueryAPI.md are long API guides with detailed transport considerations, supported fold types, and example requests; all documents are well-structured and cover their scope. The OpenRiak documentation is comprehensive and well-structured for a distributed key-value store project: the root README (docs/index.md) gives an overview of what Riak is, its purpose, and why it matters in mission-critical environments while also linking to a detailed replication guide. The ReplicationGuide.md covers both legacy riak_repl and NextGen AAE solutions with three-stage replication, plus architecture/Docs markdown files on topics like the ring distribution, eventual consistency, anti-entropy, and node diversity. RiakTheoryGuide.md explains the underlying theory behind vnodes, rings, and data distribution; ReapErase.md describes Reaper and Eraser processes for tombstone management; and NextGenREPL.md covers replication history, queues/workers, reconciliation, and configuration options. The outline is complete across all documents. The repository's README files are strong and well-organized. The root README gives a high-level overview of what the project is (strongly consistent Riak operations via riak_ensemble) and where to find deeper documentation (riak_ensemble repo, developer docs). The two architecture/design documents cover Sync On Write and Smarter Coordinator Selection with Vnode Queue Soft Limits in depth, each with an outline that lists every section present in the visible text. All four outlined sections are present: Overview; Managing Ensembles; Consistent operations; Ensemble backend implementation; Anti-entropy on consistent data; Stats; Status command; Known issues for Strong Consistency; Background; The Solution; Notes on Implementation; Notes on Flushing for Sync On Write; Coordinated Puts; Picking a Coordinator; Vnode Proxies, Queues, and Overload; Picking a Coordinator II; Results; Todo; Why do queues build up?; Future Work; Summary; UPDATE 2018/06/20 17:00:17 Caveat! for Soft Limit. The visible text is clipped mid-sentence in each, so the absence of an outline section (e.g., a missing 'anti-entropy' or 'stats') cannot be flagged as missing; all present sections are verified.
Documentation: no installation or build instructionsdocs/index.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 1 ADR(s) individually; mean quality 8.0/10 (consistently complete and clear). 0 flagged with a specific gap.
What to do
Improve ADR Quality — currently 8.0/10. — Evaluated 1 ADR(s) individually; mean quality 8.0/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.
1 of 2 build units (Bundler, rebar3) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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, 16 high, 1 medium, 0 low. 16 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.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
No action in Static Analysis (SAST) — all 16 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 (16 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.
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.
83 of 137 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/riak_kv_bucket.erl. Counted over 137 of the 163 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3src/riak_kv_bucket.erl
Dormant codebase
What to do
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with riak_kv_bucket.erl, riak_kv_put_fsm.erl, riak_kv_wm_aaefold.erl. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Change coupling finding(s) in Change Coupling — start with riak_kv_pb_counter.erl, riak_kv_pb_object.erl. — One of this dimension's main actionable groups (2 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 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 3 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.
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.
Other · Event-Driven — Whether event handlers stay asynchronous (no blocking remote HTTP/gRPC calls awaited inside a handler).
Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.
`riak_kv_2i_aae` clause `wait_for_index_scan/4#425` blocks the process on a synchronous `timer:sleep` while handling a message — the process is blocked (holding its mailbox) until a peer replies or the sleep elapses. That couples this handler in real time to another process being up and fast, and a mutual call can DEADLOCK. To decouple, move the delay off the hot path (a `state_timeout`/`send_after` self-message, or do the settle in a spawned worker). — src/riak_kv_2i_aae.erl:414
What to do
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
Do you agree with this assessment?
ES1 · Fold determinism4.9 / 10Weak✓ Tool-verified
Other · Event Sourcing — Whether the event-sourcing replay fold reconstructs state purely from the event (no wall clock, UUID or randomness) so replay is reproducible.
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.
`riak_kv_tictacaae_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold. — src/riak_kv_tictacaae_cli.erl:865
`riak_kv_vnode_status_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold. — src/riak_kv_vnode_status_cli.erl:113
What to do
Keep the event-replay reducer pure — move every clock/UUID/random into the event at raise-time and read it back in the fold.
Other · Event Sourcing — Whether persisted events stay immutable (never rewritten in place).
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 an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 6 of 18 project(s) that lack one — worth up to 0.7 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
1 ADR-shaped document(s) detected by content — `docs/InitialDesignDecisions.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
What to do
Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
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.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
What to do
The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ 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).
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
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.
X31 Test-only surface in a production module — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: 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 — 60 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: the BEAM has no dependency-injection container — state lives in processes, and no process is handed an instance whose lifetime another one scopes; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — Not applicable: Erlang processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
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 — ~1030 lines of test source are present (.erl) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .erl suite was found but not re-run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — none of 1 ADRs are conformance-checkable — unverifiable.
D27 Navigability — symbol resolution incomplete — navigability not assessed
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Not applicable — this OTP build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.erl) 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 its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (199 value object(s))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files were read — this check reads C# and JavaScript/TypeScript, and neither was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Erlang, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
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 (`rebar3 do eunit --cover, cover` (or covertool for Cobertura 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, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Benchmark discipline was not assessed: this repository is written in Erlang, whose benchmark frameworks this check does not search yet. That is a gap in the analyzer's language reach, not a finding about your code.
PF2 Allocation hygiene — Not applicable: Erlang runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
PF3 Async & latency hygiene — Not applicable: Erlang has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
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.
X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — 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 asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not 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
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Erlang processes share no heap: a value sent to another process arrives as a copy, so no collection is reachable from two processes at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — 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
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
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
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 applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Erlang has no null: every variable is bound, absence is a value you pattern-match (`undefined`, `nil`, the error tuples), and there is no static type checker whose null warning could be turned on or off. Plain JavaScript carries no type annotations and commits no tsconfig, so it states no null-typed discipline for this check to grade: there is nothing here that switches null checking on or off, and TypeScript (or `// @ts-check`) is how a repository acquires one — advice, not a defect this card measures. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Nondeterministic fold: riak_kv_tictacaae_cli src/riak_kv_tictacaae_cli.erl:865— `riak_kv_tictacaae_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold.
Nondeterministic fold: riak_kv_vnode_status_cli src/riak_kv_vnode_status_cli.erl:113— `riak_kv_vnode_status_cli`'s event-replay reducer reads a wall clock / randomness / a peer process / persistence while reconstructing aggregate state — replaying the same events would rebuild DIFFERENT state each run. A fold must be a pure function of (state, event); stamp the timestamp/id into the event at raise-time and read it back in the fold.
TodoComment eqc/riak_object_dvv_statem.erl:6— %% TODO DVV disabled? Get, interleave writes, Put — 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 eqc/put_fsm_eqc.erl:32— %% TODO: Would like to clean up the expected result code and make it dependent — 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 eqc/get_fsm_eqc.erl:33— %% TODO: — 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 eqc/ec_eqc.erl:33— %% TODO: — 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 src/riak_kv_query_server.erl:35— %% TODO: — 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 src/riak_kv_clusteraae_fsm.erl:633— %% TODO: — 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 eqc/fsm_eqc_vnode.erl:278— %% TODO: The riak_kv_vnode code should be refactored to expose this function — 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 eqc/fsm_eqc_util.erl:46— %% TODO: use some unfortunate partition counts (1, 50, etc.) — 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 eqc/fsm_eqc_util.erl:90— %% TODO: The above oneof() should really be the below list(), but — 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 eqc/ec_eqc.erl:205— %% Todo, stop overloading Result — 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 eqc/ec_eqc.erl:224— %% TODO: Check if _Result matches expected values — 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 eqc/ec_eqc.erl:256— %% TODO: Work out what should be here. — 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 eqc/ec_eqc.erl:541— %% TODO: Find a way to make the update priority different from the get — 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 eqc/ec_eqc.erl:759— %% TODO, find some way to make putcore wait on the response from the local vnode. — 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 eqc/backend_eqc.erl:277— %% TODO: Don't throw away the index's value, check it! — 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 eqc/backend_eqc.erl:333— %% TODO: Refine model to check for received messages — 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 include/riak_kv_vnode.hrl:11— %% TODO: investigate whether it *can* be deleted — 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 src/riak_kv_yessir_backend.erl:104— %% TODO list: — 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 src/riak_kv_wm_utils.erl:264— % TODO: what log level(s) here? — 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 src/riak_kv_wm_utils.erl:395— %% TODO Remove Legacy extractor prop in future version — 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 src/riak_kv_w1c_worker.erl:189— % TODO use riak_kv_put_core here instead — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `% REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/riak_kv_vnode.erl:381— % TODO: Case statement not required in 3.4 — 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 src/riak_kv_tictacaae_repairs.erl:60— % TODO: warn -> warning in 3.4 — 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 src/riak_kv_tictacaae_repairs.erl:61— % TODO: should fix the log_levels not log_level issue too — 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 src/riak_kv_stat_bc.erl:237— %% TODO generalise for riak_core_stat_q — 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.
FileTooLong: src/riak_kv_vnode.erl src/riak_kv_vnode.erl— FileTooLong — 4042 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 216 functions. The bar is 500 significant lines; this is 3542 over it, 8.08× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_object.erl src/riak_object.erl— FileTooLong — 1917 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 140 functions. The bar is 500 significant lines; this is 1417 over it, 3.83× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_ttaaefs_manager.erl src/riak_kv_ttaaefs_manager.erl— FileTooLong — 1729 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 63 functions. The bar is 500 significant lines; this is 1229 over it, 3.46× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_wm_object.erl src/riak_kv_wm_object.erl— FileTooLong — 1304 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 63 functions. The bar is 500 significant lines; this is 804 over it, 2.61× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_put_fsm.erl src/riak_kv_put_fsm.erl— FileTooLong — 1155 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 68 functions. The bar is 500 significant lines; this is 655 over it, 2.31× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_bucket.erl src/riak_kv_bucket.erl— FileTooLong — 1085 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 37 functions. The bar is 500 significant lines; this is 585 over it, 2.17× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_stat.erl src/riak_kv_stat.erl— FileTooLong — 1071 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 43 functions. The bar is 500 significant lines; this is 571 over it, 2.14× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_wm_aaefold.erl src/riak_kv_wm_aaefold.erl— FileTooLong — 942 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 38 functions. The bar is 500 significant lines; this is 442 over it, 1.88× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_index_hashtree.erl src/riak_kv_index_hashtree.erl— FileTooLong — 931 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 94 functions. The bar is 500 significant lines; this is 431 over it, 1.86× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_wm_query.erl src/riak_kv_wm_query.erl— FileTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 414 over it, 1.83× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_entropy_manager.erl src/riak_kv_entropy_manager.erl— FileTooLong — 910 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 89 functions. The bar is 500 significant lines; this is 410 over it, 1.82× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_replrtq_src.erl src/riak_kv_replrtq_src.erl— FileTooLong — 898 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 398 over it, 1.80× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_eleveldb_backend.erl src/riak_kv_eleveldb_backend.erl— FileTooLong — 885 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 47 functions. The bar is 500 significant lines; this is 385 over it, 1.77× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_tictacaae_cli.erl src/riak_kv_tictacaae_cli.erl— FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 72 functions. The bar is 500 significant lines; this is 354 over it, 1.71× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_query.erl src/riak_kv_query.erl— FileTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 321 over it, 1.64× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_bitcask_backend.erl src/riak_kv_bitcask_backend.erl— FileTooLong — 803 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 50 functions. The bar is 500 significant lines; this is 303 over it, 1.61× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_get_fsm.erl src/riak_kv_get_fsm.erl— FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 41 functions. The bar is 500 significant lines; this is 302 over it, 1.60× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_client.erl src/riak_client.erl— FileTooLong — 796 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 95 functions. The bar is 500 significant lines; this is 296 over it, 1.59× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_replrtq_snk.erl src/riak_kv_replrtq_snk.erl— FileTooLong — 791 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 44 functions. The bar is 500 significant lines; this is 291 over it, 1.58× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_wm_json.erl src/riak_kv_wm_json.erl— FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 77 functions. The bar is 500 significant lines; this is 269 over it, 1.54× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: eqc/ec_eqc.erl eqc/ec_eqc.erl— FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 249 over it, 1.50× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_leveled_backend.erl src/riak_kv_leveled_backend.erl— FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 33 functions. The bar is 500 significant lines; this is 249 over it, 1.50× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_clusteraae_fsm.erl src/riak_kv_clusteraae_fsm.erl— FileTooLong — 735 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 235 over it, 1.47× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_console.erl src/riak_kv_console.erl— FileTooLong — 732 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 53 functions. The bar is 500 significant lines; this is 232 over it, 1.46× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
FileTooLong: src/riak_kv_token_manager.erl src/riak_kv_token_manager.erl— FileTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 201 over it, 1.40× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
Duplicated block (5 lines × 2) src/riak_client.erl:1119— src/riak_client.erl:1119-1123 | src/riak_client.erl:1139-1143 — both copies are in the same file, so extract the block into 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) src/riak_kv_ensemble_console.erl:472— src/riak_kv_ensemble_console.erl:472-476 | src/riak_kv_ensemble_console.erl:500-504 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/riak_kv_get_fsm.erl:856— src/riak_kv_get_fsm.erl:856-860 | src/riak_kv_put_fsm.erl:990-995 — 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) src/riak_kv_stat.erl:480— src/riak_kv_stat.erl:480-484 | src/riak_kv_stat.erl:496-500 — both copies are in the same file, so extract the block into 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) src/riak_kv_wm_counter.erl:246— src/riak_kv_wm_counter.erl:246-250 | src/riak_kv_wm_crdt.erl:230-234 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/riak_kv_wm_json.erl:880— src/riak_kv_wm_json.erl:880-884 | src/riak_kv_wm_json.erl:923-927 — both copies are in the same file, so extract the block into 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) src/riak_kv_multi_backend.erl:368— src/riak_kv_multi_backend.erl:368-372 | src/riak_kv_multi_prefix_backend.erl:398-402 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:394— src/riak_kv_multi_backend.erl:394-398 | src/riak_kv_multi_prefix_backend.erl:424-428 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:405— src/riak_kv_multi_backend.erl:405-409 | src/riak_kv_multi_prefix_backend.erl:435-439 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:426— src/riak_kv_multi_backend.erl:426-430 | src/riak_kv_multi_prefix_backend.erl:456-460 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/riak_kv_multi_backend.erl:476— src/riak_kv_multi_backend.erl:476-480 | src/riak_kv_multi_prefix_backend.erl:506-510 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/riak_kv_wm_aaefold.erl:160— src/riak_kv_wm_aaefold.erl:160-164 | src/riak_kv_wm_query.erl:192-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 (5 lines × 2) src/riak_kv_wm_buckets.erl:78— src/riak_kv_wm_buckets.erl:78-84 | src/riak_kv_wm_object.erl:334-338 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_object.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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) src/riak_kv_wm_counter.erl:276— src/riak_kv_wm_counter.erl:276-280 | src/riak_kv_wm_crdt.erl:436-440 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/riak_kv_pb_csbucket.erl:104— src/riak_kv_pb_csbucket.erl:104-108 | src/riak_kv_pb_index.erl:222-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 (5 lines × 2) src/riak_kv_pb_object.erl:571— src/riak_kv_pb_object.erl:571-575 | src/riak_kv_wm_queue.erl:406-410 — 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) src/riak_kv_multi_backend.erl:450— src/riak_kv_multi_backend.erl:450-458 | src/riak_kv_multi_prefix_backend.erl:480-488 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/riak_kv_pb_aaefold.erl:143— src/riak_kv_pb_aaefold.erl:143-151 | src/riak_kv_pb_aaefold.erl:223-231 — both copies are in the same file, so extract the block into 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) src/riak_kv_query_server.erl:319— src/riak_kv_query_server.erl:319-327 | src/riak_kv_query_server.erl:380-388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/riak_kv_query_server.erl:412— src/riak_kv_query_server.erl:412-420 | src/riak_kv_query_server.erl: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) src/riak_kv_tictacaae_cli.erl:757— src/riak_kv_tictacaae_cli.erl:757-765 | src/riak_kv_tictacaae_cli.erl:798-806 — both copies are in the same file, so extract the block into 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) src/riak_kv_vnode.erl:2912— src/riak_kv_vnode.erl:2912-2920 | src/riak_kv_vnode.erl:2961-2969 — both copies are in the same file, so extract the block into 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) src/riak_kv_vnode.erl:2931— src/riak_kv_vnode.erl:2931-2939 | src/riak_kv_vnode.erl:2949-2957 — both copies are in the same file, so extract the block into 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) src/riak_kv_wm_buckets.erl:129— src/riak_kv_wm_buckets.erl:129-137 | src/riak_kv_wm_index.erl:145-153 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_index.erl` 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 (9 lines × 2) src/riak_kv_multi_backend.erl:512— src/riak_kv_multi_backend.erl:512-520 | src/riak_kv_multi_prefix_backend.erl:544-552 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/riak_kv_wm_object.erl:1634— src/riak_kv_wm_object.erl:1634-1642 | src/riak_kv_wm_utils.erl:217-225 — 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) eqc/eraser_eqc.erl:100— eqc/eraser_eqc.erl:100-108 | eqc/reaper_eqc.erl:91-99 — 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) eqc/eraser_eqc.erl:112— eqc/eraser_eqc.erl:112-117 | eqc/reaper_eqc.erl:103-108 — 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) src/riak_kv_clusteraae_fsm.erl:526— src/riak_kv_clusteraae_fsm.erl:526-531 | src/riak_kv_hotbackup_fsm.erl:111-116 — 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) src/riak_kv_get_fsm.erl:203— src/riak_kv_get_fsm.erl:203-208 | src/riak_kv_put_fsm.erl:300-305 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) src/riak_kv_mapred_json.erl:240— src/riak_kv_mapred_json.erl:240-245 | src/riak_kv_mapred_term.erl:93-98 — 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) src/riak_kv_replrtq_snk.erl:740— src/riak_kv_replrtq_snk.erl:740-745 | src/riak_kv_replrtq_snk.erl:750-755 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/riak_kv_wm_bucket_type.erl:199— src/riak_kv_wm_bucket_type.erl:199-204 | src/riak_kv_wm_props.erl:216-221 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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) src/riak_kv_multi_backend.erl:557— src/riak_kv_multi_backend.erl:557-562 | src/riak_kv_multi_prefix_backend.erl:588-593 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/riak_kv_pb_index.erl:200— src/riak_kv_pb_index.erl:200-205 | src/riak_kv_wm_index.erl:552-557 — 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) src/riak_kv_ttaaefs_manager.erl:1480— src/riak_kv_ttaaefs_manager.erl:1480-1485 | src/riak_kv_ttaaefs_manager.erl:1504-1510 — both copies are in the same file, so extract the block into 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) eqc/replrtq_eqc.erl:162— eqc/replrtq_eqc.erl:162-167 | eqc/replrtq_eqc.erl:221-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.
TooManyFunctions: replrtq_snk_eqc eqc/replrtq_snk_eqc.erl:13— TooManyFunctions — 77 functions. The bar is 30 functions; this is 47 over it, 2.57× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: replrtq_eqc eqc/replrtq_eqc.erl:31— TooManyFunctions — 73 functions. The bar is 30 functions; this is 43 over it, 2.43× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: riak_kv_crdt src/riak_kv_crdt.erl:23— TooManyFunctions — 53 functions. The bar is 30 functions; this is 23 over it, 1.77× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: riak_kv_multi_prefix_backend src/riak_kv_multi_prefix_backend.erl:73— TooManyFunctions — 41 functions. The bar is 30 functions; this is 11 over it, 1.37× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: riak_kv_requests src/riak_kv_requests.erl:22— TooManyFunctions — 39 functions. The bar is 30 functions; this is 9 over it, 1.30× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: riak_kv_mapred_filters src/riak_kv_mapred_filters.erl:22— TooManyFunctions — 35 functions. The bar is 30 functions; this is 5 over it, 1.17× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: riak_kv_wm_crdt src/riak_kv_wm_crdt.erl:122— TooManyFunctions — 33 functions. The bar is 30 functions; this is 3 over it, 1.10× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: riak_kv_yessir_backend src/riak_kv_yessir_backend.erl:118— TooManyFunctions — 32 functions. The bar is 30 functions; this is 2 over it, 1.07× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
Duplicated block (8 lines × 2) src/riak_kv_bitcask_backend.erl:346— src/riak_kv_bitcask_backend.erl:346-353 | src/riak_kv_bitcask_backend.erl:388-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/riak_kv_multi_backend.erl:231— src/riak_kv_multi_backend.erl:231-238 | src/riak_kv_multi_prefix_backend.erl:268-275 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/riak_kv_multi_backend.erl:247— src/riak_kv_multi_backend.erl:247-254 | src/riak_kv_multi_prefix_backend.erl:284-291 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/riak_kv_multi_backend.erl:279— src/riak_kv_multi_backend.erl:279-286 | src/riak_kv_multi_prefix_backend.erl:317-324 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/riak_kv_multi_backend.erl:500— src/riak_kv_multi_backend.erl:500-507 | src/riak_kv_multi_prefix_backend.erl:532-539 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/riak_kv_query_server.erl:367— src/riak_kv_query_server.erl:367-374 | src/riak_kv_query_server.erl:380-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/riak_kv_tictacaae_cli.erl:178— src/riak_kv_tictacaae_cli.erl:178-185 | src/riak_kv_tictacaae_cli.erl:219-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 (8 lines × 2) src/riak_kv_multi_backend.erl:383— src/riak_kv_multi_backend.erl:383-390 | src/riak_kv_multi_prefix_backend.erl:413-420 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/riak_kv_pb_aaefold.erl:113— src/riak_kv_pb_aaefold.erl:113-124 | src/riak_kv_pb_aaefold.erl:169-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 (12 lines × 2) src/riak_kv_vnode.erl:3667— src/riak_kv_vnode.erl:3667-3678 | src/riak_kv_vnode.erl:3687-3698 — both copies are in the same file, so extract the block into 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) src/riak_kv_wm_aaefold.erl:912— src/riak_kv_wm_aaefold.erl:912-923 | src/riak_kv_wm_index.erl:501-512 — 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) src/riak_kv_wm_counter.erl:408— src/riak_kv_wm_counter.erl:408-419 | src/riak_kv_wm_object.erl:1719-1730 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_object.erl` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/riak_kv_multi_backend.erl:207— src/riak_kv_multi_backend.erl:207-218 | src/riak_kv_multi_prefix_backend.erl:244-255 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/riak_kv_query_filebuffer.erl:326— src/riak_kv_query_filebuffer.erl:326-337 | src/riak_kv_query_server.erl:551-562 — 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) src/riak_kv_delete.erl:135— src/riak_kv_delete.erl:135-144 | src/riak_kv_delete.erl:174-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/riak_kv_multi_backend.erl:415— src/riak_kv_multi_backend.erl:415-424 | src/riak_kv_multi_prefix_backend.erl:445-454 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/riak_kv_wm_counter.erl:189— src/riak_kv_wm_counter.erl:189-198 | src/riak_kv_wm_props.erl:179-188 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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) src/riak_kv_wm_counter.erl:259— src/riak_kv_wm_counter.erl:259-268 | src/riak_kv_wm_crdt.erl:241-250 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) src/riak_kv_tictacaae_cli.erl:408— src/riak_kv_tictacaae_cli.erl:408-417 | src/riak_kv_vnode_status_cli.erl:175-184 — 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) src/riak_kv_ttaaefs_manager.erl:1470— src/riak_kv_ttaaefs_manager.erl:1470-1476 | src/riak_kv_ttaaefs_manager.erl:1480-1486 — both copies are in the same file, so extract the block into 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) src/riak_kv_get_fsm.erl:770— src/riak_kv_get_fsm.erl:770-776 | src/riak_kv_put_fsm.erl:949-955 — 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) src/riak_kv_wm_bucket_type.erl:91— src/riak_kv_wm_bucket_type.erl:91-97 | src/riak_kv_wm_props.erl:109-115 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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) src/riak_kv_get_core.erl:317— src/riak_kv_get_core.erl:317-323 | src/riak_kv_put_core.erl:168-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) src/riak_kv_wm_buckets.erl:155— src/riak_kv_wm_buckets.erl:155-161 | src/riak_kv_wm_keylist.erl:163-169 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) src/riak_kv_multi_backend.erl:231— src/riak_kv_multi_backend.erl:231-240 | src/riak_kv_multi_backend.erl:247-256 | src/riak_kv_multi_prefix_backend.erl:268-277 | src/riak_kv_multi_prefix_backend.erl:284-293 — 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) src/riak_kv_multi_backend.erl:264— src/riak_kv_multi_backend.erl:264-273 | src/riak_kv_multi_backend.erl:279-288 | src/riak_kv_multi_prefix_backend.erl:302-311 | src/riak_kv_multi_prefix_backend.erl:317-326 — 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) src/riak_kv_wm_aaefold.erl:458— src/riak_kv_wm_aaefold.erl:458-484 | src/riak_kv_wm_aaefold.erl:488-515 | src/riak_kv_wm_aaefold.erl:519-546 | src/riak_kv_wm_aaefold.erl:641-668 — 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) src/riak_kv_wm_buckets.erl:129— src/riak_kv_wm_buckets.erl:129-152 | src/riak_kv_wm_index.erl:145-171 | src/riak_kv_wm_keylist.erl:136-160 | src/riak_kv_wm_query.erl:251-275 — 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.
Duplicated block (14 lines × 2) src/riak_kv_multi_backend.erl:461— src/riak_kv_multi_backend.erl:461-474 | src/riak_kv_multi_prefix_backend.erl:491-504 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) src/riak_kv_ttaaefs_manager.erl:585— src/riak_kv_ttaaefs_manager.erl:585-598 | src/riak_kv_ttaaefs_manager.erl:621-634 — both copies are in the same file, so extract the block into 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) src/riak_kv_wm_counter.erl:261— src/riak_kv_wm_counter.erl:261-274 | src/riak_kv_wm_object.erl:693-706 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_object.erl` 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. If that is what happened, the fix is to keep one copy and have the other call 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) src/riak_kv_multi_backend.erl:114— src/riak_kv_multi_backend.erl:114-124 | src/riak_kv_multi_prefix_backend.erl:130-140 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/riak_kv_multi_backend.erl:636— src/riak_kv_multi_backend.erl:636-646 | src/riak_kv_multi_prefix_backend.erl:642-652 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/riak_kv_console.erl:144— src/riak_kv_console.erl:144-154 | src/riak_kv_console.erl:168-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Change coupling: riak_kv_pb_counter.erl ↔ riak_kv_wm_counter.erl src/riak_kv_pb_counter.erl— `src/riak_kv_pb_counter.erl` and `src/riak_kv_wm_counter.erl` change together 70% of the time (16 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `0622729f` Nhse 034 orkv.i57 fixcapability (#26); `328f2b94` Stop use of riak_client not as M:F; `11ad7c20` Update API to allow node_confirms per request — run `git show` on any of them.
Change coupling: riak_kv_pb_object.erl ↔ riak_kv_wm_queue.erl src/riak_kv_pb_object.erl— `src/riak_kv_pb_object.erl` and `src/riak_kv_wm_queue.erl` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `89222225` Nhse develop d30upd (#15); `5c4c8da4` Mas i1788 reconcileapi (#1792); `328f2b94` Stop use of riak_client not as M:F — run `git show` on any of them.
Duplicated block (18 lines × 2) src/riak_kv_multi_backend.erl:346— src/riak_kv_multi_backend.erl:346-363 | src/riak_kv_multi_prefix_backend.erl:376-393 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) src/riak_kv_vnode.erl:2282— src/riak_kv_vnode.erl:2282-2299 | src/riak_kv_vnode.erl:2312-2329 — both copies are in the same file, so extract the block into 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) src/riak_kv_multi_backend.erl:432— src/riak_kv_multi_backend.erl:432-448 | src/riak_kv_multi_prefix_backend.erl:462-478 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) src/riak_kv_wm_buckets.erl:188— src/riak_kv_wm_buckets.erl:188-204 | src/riak_kv_wm_keylist.erl:197-213 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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) src/riak_kv_wm_bucket_type.erl:132— src/riak_kv_wm_bucket_type.erl:132-139 | src/riak_kv_wm_counter.erl:173-180 | src/riak_kv_wm_props.erl:159-166 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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) src/riak_kv_eraser.erl:135— src/riak_kv_eraser.erl:135-142 | src/riak_kv_reader.erl:112-119 | src/riak_kv_reaper.erl:158-165 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (7 lines × 4) src/riak_kv_multi_backend.erl:234— src/riak_kv_multi_backend.erl:234-240 | src/riak_kv_multi_backend.erl:250-256 | src/riak_kv_multi_prefix_backend.erl:271-277 | src/riak_kv_multi_prefix_backend.erl:287-293 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) src/riak_kv_multi_backend.erl:267— src/riak_kv_multi_backend.erl:267-273 | src/riak_kv_multi_backend.erl:282-288 | src/riak_kv_multi_prefix_backend.erl:305-311 | src/riak_kv_multi_prefix_backend.erl:320-326 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
riak_kv_pb_aaefold.process (cyclomatic 67) src/riak_kv_pb_aaefold.erl:74— riak_kv_pb_aaefold.process has cyclomatic complexity 67 (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.
riak_kv_pb_object.process (cyclomatic 61) src/riak_kv_pb_object.erl:112— riak_kv_pb_object.process has cyclomatic complexity 61 (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.
riak_kv_vnode.handle_aaefold (cyclomatic 42) src/riak_kv_vnode.erl:2076— riak_kv_vnode.handle_aaefold has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_query_server.handle_info (cyclomatic 37) src/riak_kv_query_server.erl:236— riak_kv_query_server.handle_info has cyclomatic complexity 37 (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.
riak_kv_vnode.handle_info (cyclomatic 36) src/riak_kv_vnode.erl:2891— riak_kv_vnode.handle_info has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_eleveldb_backend.fold_keys_fun (cyclomatic 32) src/riak_kv_eleveldb_backend.erl:745— riak_kv_eleveldb_backend.fold_keys_fun has cyclomatic complexity 32 (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.
riak_kv_replrtq_src.handle_call (cyclomatic 31) src/riak_kv_replrtq_src.erl:362— riak_kv_replrtq_src.handle_call has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_wm_aaefold.validate_filter_field (cyclomatic 31) src/riak_kv_wm_aaefold.erl:780— riak_kv_wm_aaefold.validate_filter_field has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_ttaaefs_manager.handle_cast (cyclomatic 29) src/riak_kv_ttaaefs_manager.erl:514— riak_kv_ttaaefs_manager.handle_cast has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_tictacaae_cli.fold_query_arg (cyclomatic 28) src/riak_kv_tictacaae_cli.erl:827— riak_kv_tictacaae_cli.fold_query_arg has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_bucket.validate (cyclomatic 24) src/riak_kv_bucket.erl:251— riak_kv_bucket.validate has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_mapred_term.parse_inputs (cyclomatic 23) src/riak_kv_mapred_term.erl:66— riak_kv_mapred_term.parse_inputs 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.
riak_kv_mrc_pipe.send_inputs (cyclomatic 22) src/riak_kv_mrc_pipe.erl:604— riak_kv_mrc_pipe.send_inputs has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_mapred_term.get_required_permissions (cyclomatic 21) src/riak_kv_mapred_term.erl:151— riak_kv_mapred_term.get_required_permissions has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_console.repair_2i (cyclomatic 20) src/riak_kv_console.erl:640— riak_kv_console.repair_2i has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_get_core.response (cyclomatic 20) src/riak_kv_get_core.erl:253— riak_kv_get_core.response has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_put_fsm.validate (cyclomatic 19) src/riak_kv_put_fsm.erl:350— riak_kv_put_fsm.validate has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_tictacaae_cli.fold_cmd (cyclomatic 19) src/riak_kv_tictacaae_cli.erl:634— riak_kv_tictacaae_cli.fold_cmd has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_token_manager.handle_cast (cyclomatic 19) src/riak_kv_token_manager.erl:299— riak_kv_token_manager.handle_cast has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_vnode.handle_coverage_request (cyclomatic 19) src/riak_kv_vnode.erl:1901— riak_kv_vnode.handle_coverage_request has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_wm_index.malformed_request (cyclomatic 19) src/riak_kv_wm_index.erl:187— riak_kv_wm_index.malformed_request has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_clusteraae_fsm.init (cyclomatic 18) src/riak_kv_clusteraae_fsm.erl:365— riak_kv_clusteraae_fsm.init has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_clusteraae_fsm.process_results (cyclomatic 18) src/riak_kv_clusteraae_fsm.erl:439— riak_kv_clusteraae_fsm.process_results has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_query_buffer.merge (cyclomatic 18) src/riak_kv_query_buffer.erl:180— riak_kv_query_buffer.merge has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
riak_kv_wm_object.accept_doc_body (cyclomatic 18) src/riak_kv_wm_object.erl:1072— riak_kv_wm_object.accept_doc_body has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_replrtq_snk.handle_call (cyclomatic 17) src/riak_kv_replrtq_snk.erl:269— riak_kv_replrtq_snk.handle_call has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
riak_kv_wm_utils.multipart_encode_body (cyclomatic 16) src/riak_kv_wm_utils.erl:112— riak_kv_wm_utils.multipart_encode_body 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.
XxxComment repeated across 11 files src/riak_kv_wm_query.erl:234— The identical XxxComment appears in 11 files (11 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 11 independent debts. Fix the systemic cause once rather than file-by-file. Text: "%% XXX 301 may be more appropriate here, but since the http and". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
XxxComment src/riak_kv_mapred_term.erl:162— %% XXX this requires a 'blanket' mapreduce permission — 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.
riak_kv_pb_object.process (cognitive 54) src/riak_kv_pb_object.erl:112— riak_kv_pb_object.process has cognitive complexity 54 (threshold 15). Drivers by points: match/switch 31 (44 pts), loops 2 (8 pts), boolean chains 1, error handling 1 (nesting depth added 19). 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.
riak_kv_query_server.handle_info (cognitive 36) src/riak_kv_query_server.erl:236— riak_kv_query_server.handle_info has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 20 (26 pts), boolean chains 10 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_pb_aaefold.process (cognitive 29) src/riak_kv_pb_aaefold.erl:74— riak_kv_pb_aaefold.process has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 29. 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.
riak_kv_put_fsm.validate (cognitive 29) src/riak_kv_put_fsm.erl:350— riak_kv_put_fsm.validate has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 15 (24 pts), if/else 3, loops 2 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_eleveldb_backend.fold_keys_fun (cognitive 28) src/riak_kv_eleveldb_backend.erl:745— riak_kv_eleveldb_backend.fold_keys_fun has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 20 (25 pts), boolean chains 2, if/else 1 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_vnode.handle_aaefold (cognitive 26) src/riak_kv_vnode.erl:2076— riak_kv_vnode.handle_aaefold has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 20 (26 pts) (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_tictacaae_cli.fold_query_arg (cognitive 25) src/riak_kv_tictacaae_cli.erl:827— riak_kv_tictacaae_cli.fold_query_arg has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 10 (17 pts), error handling 5, loops 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_ttaaefs_manager.handle_cast (cognitive 24) src/riak_kv_ttaaefs_manager.erl:514— riak_kv_ttaaefs_manager.handle_cast has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 18 (23 pts), boolean chains 1 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_wm_query.malformed_request (cognitive 23) src/riak_kv_wm_query.erl:285— riak_kv_wm_query.malformed_request has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 9 (19 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_query.evaluate_query (cognitive 22) src/riak_kv_query.erl:557— riak_kv_query.evaluate_query has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 10 (19 pts), boolean chains 3 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_wm_object.accept_doc_body (cognitive 22) src/riak_kv_wm_object.erl:1072— riak_kv_wm_object.accept_doc_body has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 15 (21 pts), if/else 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_mrc_pipe.send_inputs (cognitive 20) src/riak_kv_mrc_pipe.erl:604— riak_kv_mrc_pipe.send_inputs has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 14 (15 pts), error handling 2, loops 1 (2 pts), boolean chains 1 (nesting depth added 2). 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.
riak_kv_mapred_json.parse_step (cognitive 19) src/riak_kv_mapred_json.erl:394— riak_kv_mapred_json.parse_step has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 12 (19 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_node_cli.node_repair_status_cmd (cognitive 18) src/riak_kv_node_cli.erl:104— riak_kv_node_cli.node_repair_status_cmd has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (11 pts), match/switch 5 (7 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
riak_kv_token_manager.handle_cast (cognitive 18) src/riak_kv_token_manager.erl:299— riak_kv_token_manager.handle_cast has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 16 (18 pts) (nesting depth added 2). 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.
riak_kv_ensemble_backend.tick (cognitive 17) src/riak_kv_ensemble_backend.erl:200— riak_kv_ensemble_backend.tick has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 5 (8 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_mapred_json.parse_query (cognitive 17) src/riak_kv_mapred_json.erl:276— riak_kv_mapred_json.parse_query has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 9 (14 pts), boolean chains 2, if/else 1 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_mapred_json.parse_request (cognitive 17) src/riak_kv_mapred_json.erl:41— riak_kv_mapred_json.parse_request has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (14 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_mrc_pipe.send_key_list (cognitive 17) src/riak_kv_mrc_pipe.erl:715— riak_kv_mrc_pipe.send_key_list has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (7 pts), loops 2 (6 pts), error handling 2 (4 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_tictacaae_cli.fold_cmd (cognitive 17) src/riak_kv_tictacaae_cli.erl:634— riak_kv_tictacaae_cli.fold_cmd has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (10 pts), match/switch 5, error handling 1 (2 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.
riak_kv_app.check_kv_health (cognitive 16) src/riak_kv_app.erl:325— riak_kv_app.check_kv_health has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 pts), match/switch 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
riak_kv_bucket.validate (cognitive 16) src/riak_kv_bucket.erl:251— riak_kv_bucket.validate has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 11, boolean chains 5. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_get_core.final_action (cognitive 16) src/riak_kv_get_core.erl:347— riak_kv_get_core.final_action has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6, loops 3 (5 pts), if/else 1 (3 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.
riak_kv_vnode.aae_update (cognitive 16) src/riak_kv_vnode.erl:4121— riak_kv_vnode.aae_update has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 11 (15 pts), boolean chains 1 (nesting depth added 4). 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.
riak_kv_vnode.handle_info (cognitive 16) src/riak_kv_vnode.erl:2891— riak_kv_vnode.handle_info has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
riak_kv_wm_query.make_query_request (cognitive 16) src/riak_kv_wm_query.erl:529— riak_kv_wm_query.make_query_request has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 9 (16 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) src/riak_kv_wm_bucket_type.erl:117— src/riak_kv_wm_bucket_type.erl:117-130 | src/riak_kv_wm_buckets.erl:112-125 | src/riak_kv_wm_counter.erl:158-171 | src/riak_kv_wm_index.erl:128-141 | src/riak_kv_wm_keylist.erl:119-132 | src/riak_kv_wm_object.erl:388-401 | src/riak_kv_wm_props.erl:144-157 | src/riak_kv_wm_query.erl:227-247 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Duplicated block (25–26 lines × 2) src/riak_kv_multi_backend.erl:530— src/riak_kv_multi_backend.erl:530-555 | src/riak_kv_multi_prefix_backend.erl:562-586 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (24 lines × 2) src/riak_kv_index_fsm.erl:271— src/riak_kv_index_fsm.erl:271-294 | src/riak_kv_query_server.erl:663-686 — 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) src/riak_kv_multi_backend.erl:149— src/riak_kv_multi_backend.erl:149-170 | src/riak_kv_multi_prefix_backend.erl:183-204 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–21 lines × 8) src/riak_kv_wm_bucket_type.erl:117— src/riak_kv_wm_bucket_type.erl:117-130 | src/riak_kv_wm_buckets.erl:112-125 | src/riak_kv_wm_counter.erl:158-171 | src/riak_kv_wm_index.erl:128-141 | src/riak_kv_wm_keylist.erl:119-132 | src/riak_kv_wm_object.erl:388-401 | src/riak_kv_wm_props.erl:144-157 | src/riak_kv_wm_query.erl:227-247 — before extracting anything, compare `src/riak_kv_wm_bucket_type.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) src/riak_kv_multi_backend.erl:615— src/riak_kv_multi_backend.erl:615-634 | src/riak_kv_multi_prefix_backend.erl:621-640 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) src/riak_kv_multi_backend.erl:186— src/riak_kv_multi_backend.erl:186-204 | src/riak_kv_multi_prefix_backend.erl:223-241 — before extracting anything, compare `src/riak_kv_multi_backend.erl` and `src/riak_kv_multi_prefix_backend.erl` as WHOLE FILES: this scan already matched 26 separate duplicated blocks between them, totalling at least 283 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 4) src/riak_kv_wm_aaefold.erl:459— src/riak_kv_wm_aaefold.erl:459-476 | src/riak_kv_wm_aaefold.erl:489-506 | src/riak_kv_wm_aaefold.erl:520-537 | src/riak_kv_wm_aaefold.erl:642-659 — 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 (17–18 lines × 2) src/riak_kv_token_manager.erl:354— src/riak_kv_token_manager.erl:354-371 | src/riak_kv_token_manager.erl:407-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 3) src/riak_kv_wm_aaefold.erl:183— src/riak_kv_wm_aaefold.erl:183-199 | src/riak_kv_wm_queue.erl:109-125 | src/riak_kv_wm_stats.erl:58-74 — 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–17 lines × 2) src/riak_kv_wm_query.erl:204— src/riak_kv_wm_query.erl:204-220 | src/riak_kv_wm_queue.erl:97-107 — 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–15 lines × 3) src/riak_kv_vnode.erl:2333— src/riak_kv_vnode.erl:2333-2342 | src/riak_kv_vnode.erl:2364-2373 | src/riak_kv_vnode.erl:2413-2427 — 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) src/riak_kv_vnode.erl:2347— src/riak_kv_vnode.erl:2347-2361 | src/riak_kv_vnode.erl:2396-2410 | src/riak_kv_vnode.erl:2449-2463 — 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–15 lines × 2) src/riak_kv_wm_bucket_type.erl:106— src/riak_kv_wm_bucket_type.erl:106-115 | src/riak_kv_wm_buckets.erl:96-110 — 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) src/riak_kv_wm_index.erl:152— src/riak_kv_wm_index.erl:152-166 | src/riak_kv_wm_query.erl:256-270 — before extracting anything, compare `src/riak_kv_wm_index.erl` and `src/riak_kv_wm_query.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 3) src/riak_kv_replrtq_src.erl:456— src/riak_kv_replrtq_src.erl:456-468 | src/riak_kv_replrtq_src.erl:483-495 | src/riak_kv_replrtq_src.erl:510-523 — 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–14 lines × 3) src/riak_kv_wm_buckets.erl:186— src/riak_kv_wm_buckets.erl:186-196 | src/riak_kv_wm_keylist.erl:195-205 | src/riak_kv_wm_object.erl:558-571 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (2–14 lines × 3) src/riak_kv_pb_aaefold.erl:107— src/riak_kv_pb_aaefold.erl:107-108 | src/riak_kv_pb_aaefold.erl:185-198 | src/riak_kv_pb_aaefold.erl:204-217 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 4) src/riak_kv_wm_buckets.erl:140— src/riak_kv_wm_buckets.erl:140-152 | src/riak_kv_wm_index.erl:159-171 | src/riak_kv_wm_keylist.erl:148-160 | src/riak_kv_wm_query.erl:263-275 — before extracting anything, compare `src/riak_kv_wm_buckets.erl` and `src/riak_kv_wm_index.erl` 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 (12–13 lines × 2) src/riak_kv_ensemble_console.erl:425— src/riak_kv_ensemble_console.erl:425-436 | src/riak_kv_ensemble_console.erl:452-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/riak_kv_pipe_index.erl:172— src/riak_kv_pipe_index.erl:172-184 | src/riak_kv_pipe_listkeys.erl:178-190 — 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–13 lines × 2) src/riak_kv_wm_counter.erl:247— src/riak_kv_wm_counter.erl:247-257 | src/riak_kv_wm_object.erl:637-649 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_object.erl` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10–11 lines × 3) src/riak_kv_wm_counter.erl:140— src/riak_kv_wm_counter.erl:140-149 | src/riak_kv_wm_keylist.erl:107-117 | src/riak_kv_wm_props.erl:132-142 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call 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–11 lines × 3) src/riak_kv_wm_aaefold.erl:171— src/riak_kv_wm_aaefold.erl:171-181 | src/riak_kv_wm_index.erl:116-126 | src/riak_kv_wm_keylist.erl:99-104 — before extracting anything, compare `src/riak_kv_wm_index.erl` and `src/riak_kv_wm_keylist.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10–11 lines × 2) src/riak_kv_wm_counter.erl:128— src/riak_kv_wm_counter.erl:128-137 | src/riak_kv_wm_props.erl:124-134 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_props.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–10 lines × 2) src/riak_kv_eleveldb_backend.erl:227— src/riak_kv_eleveldb_backend.erl:227-236 | src/riak_kv_eleveldb_backend.erl:359-366 — both copies are in the same file, so extract the block into 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) src/riak_kv_wm_counter.erl:230— src/riak_kv_wm_counter.erl:230-239 | src/riak_kv_wm_crdt.erl:212-220 — before extracting anything, compare `src/riak_kv_wm_counter.erl` and `src/riak_kv_wm_crdt.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 5) src/riak_kv_pb_aaefold.erl:256— src/riak_kv_pb_aaefold.erl:256-261 | src/riak_kv_pb_csbucket.erl:137-142 | src/riak_kv_pb_index.erl:238-243 | src/riak_kv_pb_object.erl:619-624 | src/riak_kv_wm_utils.erl:487-492 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
Duplicated block (6 lines × 3) src/riak_kv_pb_counter.erl:171— src/riak_kv_pb_counter.erl:171-176 | src/riak_kv_pb_crdt.erl:234-239 | src/riak_kv_pb_object.erl:599-604 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (6 lines × 4) src/riak_kv_clusteraae_fsm_sup.erl:51— src/riak_kv_clusteraae_fsm_sup.erl:51-57 | src/riak_kv_hotbackup_fsm_sup.erl:46-52 | src/riak_kv_index_fsm_sup.erl:51-56 | src/riak_kv_keys_fsm_sup.erl:50-55 — 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 (7 lines × 3) src/riak_kv_ensemble_console.erl:474— src/riak_kv_ensemble_console.erl:474-480 | src/riak_kv_ensemble_console.erl:483-489 | src/riak_kv_ensemble_console.erl:492-498 — 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.
Handler temporal coupling: riak_kv_2i_aae clause `wait_for_index_scan/4#425` src/riak_kv_2i_aae.erl:414— `riak_kv_2i_aae` clause `wait_for_index_scan/4#425` blocks the process on a synchronous `timer:sleep` while handling a message — the process is blocked (holding its mailbox) until a peer replies or the sleep elapses. That couples this handler in real time to another process being up and fast, and a mutual call can DEADLOCK. To decouple, move the delay off the hot path (a `state_timeout`/`send_after` self-message, or do the settle in a spawned worker).
Minor — 23 finding(s)
X31 · Test-only surface in a production module· Test-only surface in a production module · ×9
Test-only surface in a production module src/json_pp.erl:28— `json_pp:test/0` is exported unconditionally and its name IS the test marker, so the shipped module publishes a function named for the test tree. No other module in this repository calls it at any arity. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. Nothing tells the next maintainer that its only caller is a test. Wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module.
Test-only surface in a production module src/riak.erl:26— `riak:client_test/1` is exported unconditionally and its name carries a test marker at a name-segment boundary, so the shipped module publishes a function named for the test tree. No other module in this repository calls it at any arity. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. Nothing tells the next maintainer that its only caller is a test. Wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module.
Test-only surface in a production module src/riak_kv_memory_backend.erl:61— `riak_kv_memory_backend:reset/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138— `riak_kv_mrc_pipe:example/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138— `riak_kv_mrc_pipe:example_bucket/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138— `riak_kv_mrc_pipe:example_reduce/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138— `riak_kv_mrc_pipe:example_setup/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
Test-only surface in a production module src/riak_kv_mrc_pipe.erl:138— `riak_kv_mrc_pipe:example_setup/1` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
Test-only surface in a production module src/riak_kv_vnode.erl:33— `riak_kv_vnode:test_vnode/1` is exported unconditionally and its name carries a test marker at a name-segment boundary, so the shipped module publishes a function named for the test tree. No other module in this repository calls it at any arity. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. Nothing tells the next maintainer that its only caller is a test. Wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file src/riak_kv_bucket.erl— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file src/riak_kv_put_fsm.erl— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file src/riak_kv_wm_aaefold.erl— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 6 significant file(s) lose their only recent owner: src/riak_object.erl, src/riak_kv_ttaaefs_manager.erl, src/riak_kv_wm_object.erl, src/riak_kv_wm_query.erl, src/riak_kv_query.erl, src/riak_kv_util.erl. Pair on, review, or document these before any departure.
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 (10 single-owned of 96 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; 96 of the 163 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (2 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
Documentation: no installation or build instructions docs/index.md— The README does not state how to install or configure Riak. Add installation instructions for Erlang/OTP setup, riak.conf configuration, and a one-line build/run command.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (69782 LoC, 352 module-visible types across 2 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
Dormant codebase — 83 of 137 significant files have no living knowledge — the codebase as a whole is dormant, not 83 separate risks. Counted over 137 of the 163 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
M2 · Architecture documentation· ADRs not easily discoverable · ×1
ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `docs/InitialDesignDecisions.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
Outdated: jekyll-relative-links — `jekyll-relative-links` is resolved to 0.7.0 in the committed Gemfile.lock but 0.9.1 is the current release on rubygems.org, and docs/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update jekyll-relative-links` and commit the updated Gemfile.lock.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a0fd84-81db-700c-b306-3a068baace57 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 19 · Warnings: 272 · Recommendations: 23 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 02-10-2026 @ 16:48 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.