Public report — router, 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.18 (frozen) · verify this surveyFiledcd_c67d013cb8c7420db4f9e86e0470fee6
Filed 2 October 2026, 09:26 UTC
Public
Medium · 23,785 LoC · 1 projects · rebuild ~0.3 person-years · weakest lens: Event-Driven (45%)
Findings by grade
52 critical161 serious28 minor44 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, 09:25 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 ▸
212findings with an exact file:lineof 241 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
38/122dimensions across the health lenses23785 LoC · 1 projects — wide & deep
The system holds an adequate overall standing at 52%, reflecting a workable asset that carries significant operational risk. While the codebase is well-structured and mature, its reliance on fragile communication patterns threatens delivery speed and reliability. This is not a fragile system, but it is one where small changes can ripple unpredictably due to tight coupling.
The value at stake is moderate, with a rebuild effort estimated at roughly 0.3 person-years or €43,000. This low cost indicates the system is not a monolithic legacy burden, but rather a collection of interconnected components that are easy to modify if approached correctly. The high ratio of test code to production code suggests a strong safety net for refactoring, provided the architectural risks are addressed first.
The primary risk lies in synchronous coupling. The system relies heavily on blocking calls and synchronous round-trips between processes, which creates bottlenecks and potential deadlocks. This architectural weakness directly impacts availability and scalability, as any delay in one component stalls others. Remediation here offers the highest leverage, transforming the system from a fragile chain into a resilient, event-driven network that can handle load without degrading performance.
A secondary concern is security and operational readiness, both scoring 51%. The lack of automated dependency updates and incomplete production observability exposes the business to known vulnerabilities and makes troubleshooting difficult during outages. While the code itself is healthy, the surrounding operational practices are not yet robust enough to guarantee consistent, secure delivery in a production environment.
Strengths include excellent code health and architectural clarity, with a mature codebase that is easy for new teams to understand. The comprehensive test suite provides confidence in refactoring efforts. However, the event-driven design is underdeveloped, limiting the system’s ability to scale independently.
Focus first on decoupling synchronous calls. This single change reduces deadlock risk and improves responsiveness, offering the greatest return on effort. Addressing this will stabilize the core before tackling security hygiene. The assessment is partial, as domain modeling and performance were not measured, but the current risks are clear and actionable.
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.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.7× (at 52% 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.3 person-years of build effort (about ~€43,000 to rebuild). Its weakest lens is Event-Driven at 45% — 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.7× 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.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~0.3 person-years to rebuild), and its weakest lens is Event-Driven at 45%. 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
A05:2021 — Security Misconfiguration
35
High / Critical
A03:2021 — Injection
29
High / Critical
A02:2021 — Cryptographic Failures
3
High / Critical
A06:2021 — Vulnerable & Outdated Components
3
High / Critical
Roadmap
First, eliminate synchronous blocking and temporal coupling in OTP handlers to prevent deadlocks and ensure processes remain decoupled. Second, enforce a strict one-to-one mapping between commands and their owning handlers while reserving events for fan-out scenarios. Third, enable automated dependency review and security scanning tools to catch vulnerabilities early. Fourth, add health checks and immutable image tags to the deployment configuration to ensure reliable rollbacks. Finally, maintain a changelog to clearly record what is shipped in each release.
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.
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
Pass an explicit bound on every request — `{timeout, Ms}` in `httpc:request/4`'s HTTP options (its default is `infinity`), `{recv_timeout, Ms}` for hackney, a timeout on `gun:await/3` — and wrap dependencies that fail in a breaker (`fuse`) with back-off (`backoff`).
Per-file score 0–10 — a quality signature. Of 37 files carrying findings, judged against the Production bar: 14% slop · 67% mixed · 19% near-clean.
File
Score
Band
Worst signal
REDACTED
0.2
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
1.3
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
2.7
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.7
Slop
Dependency Vulnerabilities: High CVE: REDACTED
REDACTED
3.7
Slop
IaC & Container Security: High IaC: REDACTED
REDACTED
4.4
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
4.5
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
4.5
Mixed
IaC & Container Security: High IaC: REDACTED
REDACTED
4.5
Mixed
Secrets (history): REDACTED: REDACTED
REDACTED
5.1
Mixed
IaC & Container Security: High IaC: REDACTED
src/device/router_device_worker.erl
6.0
Mixed
Explicit Debt: TodoComment
src/apis/router_console_api.erl
6.0
Mixed
Explicit Debt: TodoComment
src/router_sc_worker.erl
6.0
Mixed
Explicit Debt: TodoComment
src/device/router_device_routing.erl
6.0
Mixed
Explicit Debt: TodoComment
src/device/router_device.erl
6.0
Mixed
Explicit Debt: TodoComment
src/channels/router_aws_channel.erl
6.0
Mixed
Explicit Debt: TodoComment
src/channels/router_iot_central_connection.erl
6.0
Mixed
Explicit Debt: TodoComment
src/decoders/router_decoder_cayenne.erl
6.5
Mixed
Explicit Debt: TodoComment
test/router_SUITE.erl
6.5
Mixed
Explicit Debt: TodoComment
src/device/router_device_devaddr.erl
6.7
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 — 52
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 — 161
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 — 28
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 44
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 34 of 38 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.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 — 38 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, 212 of 241 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.
D6 Cohesion (LCOM4) — 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.
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, 28 test files, 29 Common Test suites), 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.
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/router.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.
D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P10 Library API & versioning — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads NuGet packaging and C# public API, and npm, PyPI, crates.io, Maven/Gradle, Go module, RubyGems, Composer, SwiftPM, pub.dev and Hex package manifests only, and no .NET project and no package manifest of those ecosystems 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.
P8 Schema migrations — 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 EF Core usage in C# and the schema tooling its file scan recognises only, and no .NET project was loaded, and this repository's language is not one the scan models, 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.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript and Java source only, and no C# was loaded and no JavaScript/TypeScript or Java 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.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript and Java source only, and no C# was loaded and no JavaScript/TypeScript or Java 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.
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 and no Java or Rust 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.
X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no 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.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java or Rust 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.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X6 Hand-rolled structured-format parsing — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Python, JavaScript/TypeScript, Go, Java/Kotlin/Scala, Ruby, PHP and Rust source only, and no C# was loaded and none of those languages 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.
X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C#, Python, TypeScript/JavaScript, Rust, Go, Java and Kotlin syntax only, and no C#, Python, TypeScript/JavaScript, Rust, Go, Java or Kotlin was loaded for this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
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".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (4): D19, D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
13 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was router_device_worker.handle_cast at 69. A further 4 function(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 router_decoder_cayenne.decode_lpp at 28 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src/decoders/router_decoder_cayenne.erl (router_decoder_cayenne.decode_lpp at 28), src/device/router_device.erl (router_device.update at 18), src/grpc/router_ics_eui_worker.erl (router_ics_eui_worker.handle_cast at 17). 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.
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 router_device_worker.handle_cast (cyclomatic 69) finding(s) in Cyclomatic Complexity — start with router_device_worker.erl. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 router_console_ws_worker.handle_info (cyclomatic 36) finding(s) in Cyclomatic Complexity — start with router_console_ws_worker.erl. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 router_xor_filter_worker.handle_call (cyclomatic 28) finding(s) in Cyclomatic Complexity — start with router_xor_filter_worker.erl. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 5 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 router_device_worker.handle_cast (cognitive 90) finding(s) in Cognitive Complexity — start with router_device_worker.erl. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 router_console_ws_worker.update_device_record (cognitive 51) finding(s) in Cognitive Complexity — start with router_console_ws_worker.erl. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 router_cli_xor_filter.report_device (cognitive 25) finding(s) in Cognitive Complexity — start with router_cli_xor_filter.erl. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.1 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 8 FileTooLong finding(s) in God Classes — start with router_device_worker.erl, router_device_routing.erl, router_xor_filter_worker.erl. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 2 TooManyFunctions finding(s) in God Classes — start with router_ics_skf_worker.erl, router_cli_device_worker.erl. — One of this dimension's main actionable groups (2 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.
59 duplicated block group(s) detected. A further 3 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 32 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with router_aws_channel.erl, router_iot_central_connection.erl, router_cli_xor_filter.erl. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 4 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with router_ics_eui_worker.erl, router_device_channels_worker.erl, router_iot_central_connection.erl. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with router_console_api.erl, router_device.erl, router_cli_info.erl. — One of this dimension's main actionable groups (4 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 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.
6 outdated, 0 retired direct Hex dependencies declared by rebar3, 10 pinning defect(s). 10 of 11 Hex declarations were graded against hex.pm (0 not published there, 1 not resolved to a release by a committed `REDACTED`). A dependency declared at an EXACT version — rebar3's own idiom — is graded against the current release and its remedy is an edit to the `rebar.config` declaration, because `rebar3 upgrade` cannot move past the version the manifest names; a `~>` or bounded requirement that EXCLUDES the newest release is reported as nothing, because that bound is a deliberate constraint. A `{ref, …}`, `{tag, …}` or branch-tracked git dependency is not graded for currency at all: its version is a revision, not a Hex release. Whether any of these packages is UNMAINTAINED is not graded — hex.pm publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: a large idiomatic class of BEAM dependencies — runtime adapters, codec plugins, protocol implementations and OTP applications the release starts — is correctly declared and never referenced in source. Known CVEs in this dependency graph are D30's question.
Floating source dependency: clique · ×10
Outdated: erl_cidr · ×6
What to do
Resolve the 10 Floating source dependency finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (10 warning-level).
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
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 41 shipped Hex package(s) use a banned license. Licences were resolved from hex.pm over the packages a consumer installs — this repository's REDACTED, which is already the transitive closure a consumer installs. rebar3 writes that lock for the DEFAULT profile ONLY, so a dependency declared inside `{profiles, [{test, [{deps, […]}]}]}` has no entry in it and is excluded here for the reason the Mix arm excludes an `only: [:dev, :test]` declaration: it is not installed by anything that depends on this repository. Each licence is the one hex.pm publishes for the package's current release. A further 34 package(s) the closure reaches resolve from git, a path or a local override and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under Apache 2.0, which is its own choice and is not judged here.
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.
2 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/channels/router_aws_channel.erl. Counted over 53 of the 72 production source files in this repository: 18 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
✓ On the Gold path — maintain.
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.
34 deducted task-comment markers across 23785 LoC (0.1/KLoC) → score 9.7. 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.
Resolve the 31 TodoComment finding(s) in Explicit Debt — start with router_decoder_cayenne.erl (6), router_device_worker.erl (5), router_SUITE.erl (5). — One of this dimension's main actionable groups (31 warning-level).
Resolve the 2 XxxComment finding(s) in Explicit Debt — start with router_device_worker.erl, router_lorawan_handler_test.erl. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with router_decoder_custom_worker.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 four docs/ subdirectories form a complete documentation set: the main README covers installation, usage (docker build/run/test), production deployment, data storage warning, logs/config, CLI commands with notes, and an outline; each of the four docs is a focused README documenting specific CLI commands for devices, organizations, XOR filters, and a runbook covering once-per-new-server setup, stop/start, release install, and a full outline. The root README serves as the overview, installation, usage, and contribution guide for the repository.
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
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 1 build units (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.
2 finding(s): 0 critical, 2 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 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 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).
29 finding(s): 0 critical, 26 high, 3 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. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-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 `REDACTED` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 20 High IaC finding(s) in IaC & Container Security — start with REDACTED (7), REDACTED (6), REDACTED (4). — One of this dimension's main actionable groups (20 issue-level).
Resolve the 11 Low IaC finding(s) in IaC & Container Security — start with REDACTED (11). — One of this dimension's main actionable groups (11 recommendation-level).
Resolve the 4 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
12 of 54 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/router_xor_filter_worker.erl. Counted over 54 of the 72 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 2 Orphaned knowledge finding(s) in Knowledge Freshness — start with router_xor_filter_worker.erl, router_ics_skf_worker.erl. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Further orphaned files (smaller) 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.
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.
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.
`router_console_api` clause `handle_info/2#643` blocks the process on a synchronous outbound I/O client call (a remote HTTP request, a socket receive, or a blocking pool checkout) awaited inline 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, issue the request off the hot path — reply asynchronously and do the I/O in a throwaway spawned worker (or use the async client API), so the process keeps serving its mailbox. — src/apis/router_console_api.erl:998
`router_http_channel` clause `handle_event/2#55` blocks the process on a synchronous outbound I/O client call (a remote HTTP request, a socket receive, or a blocking pool checkout) awaited inline 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, issue the request off the hot path — reply asynchronously and do the I/O in a throwaway spawned worker (or use the async client API), so the process keeps serving its mailbox. — src/channels/router_http_channel.erl:164
`router_http_channel` clause `handle_event/2#62` blocks the process on a synchronous outbound I/O client call (a remote HTTP request, a socket receive, or a blocking pool checkout) awaited inline 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, issue the request off the hot path — reply asynchronously and do the I/O in a throwaway spawned worker (or use the async client API), so the process keeps serving its mailbox. — src/channels/router_http_channel.erl:164
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.
Other · Event-Driven — Whether commands have exactly one owning handler (no hidden fan-out).
Method: Roslyn scan (event-driven gated): command-shaped messages identified by convention; handler count per command checked for the exactly-one rule. Deterministic, hard fact.
`update` is shaped like a command (one imperative intent) but is handled synchronously by more than one module — a command should have exactly one owning handler. Split the responsibilities, or raise an EVENT after the command and let the others subscribe. (×6) — src/channels/router_aws_channel.erl:92, src/channels/router_http_channel.erl:69, src/channels/router_iot_central_channel.erl:72, …
What to do
Give each command exactly one owning handler; use events for fan-out.
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.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
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.
Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
What to do
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`hackney:post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 3 of the 4 files that make outbound calls are unbounded; the first 3 are listed. — src/apis/router_console_api.erl:229
`hackney:get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — src/channels/router_iot_central_connection.erl:299, REDACTED:243
What to do
Pass an explicit bound on every request — `{timeout, Ms}` in `httpc:request/4`'s HTTP options (its default is `infinity`), `{recv_timeout, Ms}` for hackney, a timeout on `gun:await/3` — and wrap dependencies that fail in a breaker (`fuse`) with back-off (`backoff`).
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.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 80 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.
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.
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
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 14 — a file the compose project references is missing) — env file .env not found: stat .env: no such file or directory; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~20802 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 — no ADRs to check
D27 Navigability — symbol resolution incomplete — navigability not assessed
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
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.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
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.)
D6 Cohesion (LCOM4) — D6 reads a CS/VB/GO/SCALA/SWIFT/DART/JAVA/PY/KT/TS/TSX/MTS/CTS/JS/JSX/MJS/CJS/PHP/RB/RS class graph only — this repository's production source is .erl, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
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 (457 value object(s))
ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P10 Library API & versioning — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — 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
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.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — 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
X25 Inert configuration knob — 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. 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
X28 Index access outside its own emptiness 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
X29 Per-element action decided by a fixed element — 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
X30 Support guard that admits what it rejects — 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
X31 Test-only surface in a production module — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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 analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X7 Silent fallback defaults — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge src/router_xor_filter_worker.erl— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/grpc/router_ics_skf_worker.erl— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
TodoComment src/router_sc_worker.erl:84— %% TODO: Fix force open nonce — 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/router_sc_worker.erl:142— %% TODO: Not really sure where exactly to install this handler at tbh... — 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/apis/router_console_api.erl:409— %% TODO: join_request guard never applies; see prev arm — 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 REDACTED:12— %% TODO: Replace with `uri_string:quote/1' when it get's released. — 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 REDACTED:328— %% TODO: Replace with `uri_string:quote/1' when it get's released. — 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/channels/router_iot_central_connection.erl:14— %% TODO: Replace with `uri_string:quote/1' when it get's released. — 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/channels/router_iot_central_connection.erl:535— %% TODO: Replace with `uri_string:quote/1' when it get's released. — 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/channels/router_aws_channel.erl:234— %% TODO: log more of the errors — 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/decoders/router_decoder_custom_worker.erl:223— %% TODO this eliminates any tolerance for intermittent — 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/decoders/router_decoder_cayenne.erl:57— %% TODO this should be 0 or 1 — 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/decoders/router_decoder_cayenne.erl:66— %% TODO this should be 0 or 1 — 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/decoders/router_decoder_cayenne.erl:75— %% TODO is the value MSB or LSB — 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/decoders/router_decoder_cayenne.erl:84— %% TODO is the value MSB or LSB — 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/decoders/router_decoder_cayenne.erl:103— %% TODO is the value MSB or LSB — 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/decoders/router_decoder_cayenne.erl:112— %% TODO value is 0 or 1 — 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/device/router_device_worker.erl:565— %% TODO we should really just call this once per join nonce — 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/device/router_device_worker.erl:1957— %% TODO: we need `link_adr_answer' for ADR. Suggest refactoring this. — 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/device/router_device_worker.erl:1995— %% TODO: with ADR implemented, this function, or at least its name, — 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/device/router_device_worker.erl:2321— %% TODO: when purchasing multiple packets, is the best SNR/RSSI — 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/device/router_device_worker.erl:2345— %% ToDo: Our goal is for Plan data to be retrieved from chain var — 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/device/router_device_routing.erl:1120— % TODO: I dont think we should be doing this? let the device worker decide — 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/device/router_device_devaddr.erl:113— %% TODO: Maybe make this a ets table to avoid lookups all the time — 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/device/router_device_cache.erl:138— %% TODO: improve this maybe? — 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/device/router_device.erl:320— %% TODO promote `rx_delay' out of `metadata', so metadata can — 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 test/router_ics_eui_worker_SUITE.erl:701— %% TODO: Kill single grpcbox server rather than entire app. — 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.
Floating source dependency: clique — Runtime dependency `clique` is fetched from source in rebar.config and tracks branch `develop` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: erlang_lorawan — Runtime dependency `erlang_lorawan` is fetched from source in rebar.config and tracks branch `master` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: router_utils — Runtime dependency `router_utils` is fetched from source in rebar.config and tracks branch `main` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: httpc_aws — Runtime dependency `httpc_aws` is fetched from source in rebar.config and tracks branch `master` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: erlang_v8 — Runtime dependency `erlang_v8` is fetched from source in rebar.config and tracks branch `master` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: bbmustache — Runtime dependency `bbmustache` is fetched from source in rebar.config and tracks branch `data-fun` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: iso8601 — Runtime dependency `iso8601` is fetched from source in rebar.config and tracks branch `master` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: grpcbox — Runtime dependency `grpcbox` is fetched from source in rebar.config and tracks branch `adt/immediate-sends` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: e2qc — Runtime dependency `e2qc` is fetched from source in rebar.config and tracks branch `master` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
Floating source dependency: helium_proto — Runtime dependency `helium_proto` is fetched from source in rebar.config and tracks branch `master` — the declaration pins no immutable revision, so `rebar3 upgrade` moves this dependency to code nobody reviewed. Pin it with `{tag, "v1.2.3"}` or `{ref, "<full commit SHA>"}`.
FileTooLong: device/router_device_worker.erl src/device/router_device_worker.erl— FileTooLong — 2006 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 49 functions. The bar is 500 significant lines; this is 1506 over it, 4.01× 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: device/router_device_routing.erl src/device/router_device_routing.erl— FileTooLong — 1305 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 52 functions. The bar is 500 significant lines; this is 805 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/router_xor_filter_worker.erl src/router_xor_filter_worker.erl— FileTooLong — 1223 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 59 functions. The bar is 500 significant lines; this is 723 over it, 2.45× 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: apis/router_console_api.erl src/apis/router_console_api.erl— FileTooLong — 1138 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 47 functions. The bar is 500 significant lines; this is 638 over it, 2.28× 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/router_utils.erl src/router_utils.erl— FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 42 functions. The bar is 500 significant lines; this is 362 over it, 1.72× 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: device/router_device.erl src/device/router_device.erl— FileTooLong — 752 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 62 functions. The bar is 500 significant lines; this is 252 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: device/router_device_channels_worker.erl src/device/router_device_channels_worker.erl— FileTooLong — 750 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 34 functions. The bar is 500 significant lines; this is 250 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: channels/router_aws_channel.erl src/channels/router_aws_channel.erl— FileTooLong — 563 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 63 over it, 1.13× 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 (7 lines × 2) src/channels/router_aws_channel.erl:248— src/channels/router_aws_channel.erl:248-254 | src/channels/router_mqtt_channel.erl:359-365 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_mqtt_channel.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/channels/router_iot_central_connection.erl:427— src/channels/router_iot_central_connection.erl:427-433 | src/channels/router_iot_central_connection.erl:463-469 — both copies are in the same file, so extract the block into 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/cli/router_cli_xor_filter.erl:168— src/cli/router_cli_xor_filter.erl:168-178 | src/cli/router_cli_xor_filter.erl:196-202 — both copies are in the same file, so extract the block into 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/device/router_device_channels_worker.erl:853— src/device/router_device_channels_worker.erl:853-859 | src/router_utils.erl:840-846 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/channels/router_iot_central_channel.erl:110— src/channels/router_iot_central_channel.erl:110-116 | src/channels/router_iot_hub_channel.erl:109-115 — before extracting anything, compare `src/channels/router_iot_central_channel.erl` and `src/channels/router_iot_hub_channel.erl` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/apis/router_console_api.erl:442— src/apis/router_console_api.erl:442-448 | src/apis/router_console_api.erl:1314-1320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
ED2 · Event/command shape· Command with competing owners · ×6
Command with competing owners: update src/channels/router_aws_channel.erl:92— `update` is shaped like a command (one imperative intent) but is handled synchronously by more than one module — a command should have exactly one owning handler. Split the responsibilities, or raise an EVENT after the command and let the others subscribe.
Command with competing owners: update src/channels/router_http_channel.erl:69— `update` is shaped like a command (one imperative intent) but is handled synchronously by more than one module — a command should have exactly one owning handler. Split the responsibilities, or raise an EVENT after the command and let the others subscribe.
Command with competing owners: update src/channels/router_iot_central_channel.erl:72— `update` is shaped like a command (one imperative intent) but is handled synchronously by more than one module — a command should have exactly one owning handler. Split the responsibilities, or raise an EVENT after the command and let the others subscribe.
Command with competing owners: update src/channels/router_iot_hub_channel.erl:71— `update` is shaped like a command (one imperative intent) but is handled synchronously by more than one module — a command should have exactly one owning handler. Split the responsibilities, or raise an EVENT after the command and let the others subscribe.
Command with competing owners: update src/channels/router_mqtt_channel.erl:84— `update` is shaped like a command (one imperative intent) but is handled synchronously by more than one module — a command should have exactly one owning handler. Split the responsibilities, or raise an EVENT after the command and let the others subscribe.
Command with competing owners: update src/grpc/router_ics_eui_worker.erl:144— `update` is shaped like a command (one imperative intent) but is handled synchronously by more than one module — a command should have exactly one owning handler. Split the responsibilities, or raise an EVENT after the command and let the others subscribe.
Duplicated block (8 lines × 2) src/grpc/router_ics_eui_worker.erl:186— src/grpc/router_ics_eui_worker.erl:186-193 | src/grpc/router_ics_eui_worker.erl:207-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/device/router_device_channels_worker.erl:698— src/device/router_device_channels_worker.erl:698-705 | src/device/router_device_channels_worker.erl:721-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/channels/router_iot_central_connection.erl:222— src/channels/router_iot_central_connection.erl:222-229 | REDACTED:186-193 — before extracting anything, compare `src/channels/router_iot_central_connection.erl` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/channels/router_aws_channel.erl:442— src/channels/router_aws_channel.erl:442-449 | src/channels/router_aws_channel.erl:463-470 — both copies are in the same file, so extract the block into 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/apis/router_console_api.erl:684— src/apis/router_console_api.erl:684-688 | src/apis/router_console_api.erl:722-726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/device/router_device.erl:626— src/device/router_device.erl:626-630 | src/router_xor_filter_worker.erl:684-688 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/cli/router_cli_info.erl:25— src/cli/router_cli_info.erl:25-29 | src/cli/router_cli_migration.erl:26-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) src/channels/router_iot_central_connection.erl:236— src/channels/router_iot_central_connection.erl:236-243 | REDACTED:197-201 — before extracting anything, compare `src/channels/router_iot_central_connection.erl` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/apis/router_console_ws_worker.erl:437— src/apis/router_console_ws_worker.erl:437-449 | src/device/router_device_worker.erl:392-404 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) src/channels/router_aws_channel.erl:116— src/channels/router_aws_channel.erl:116-128 | src/channels/router_mqtt_channel.erl:186-198 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_mqtt_channel.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/channels/router_aws_channel.erl:168— src/channels/router_aws_channel.erl:168-180 | src/channels/router_mqtt_channel.erl:259-271 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_mqtt_channel.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/device/router_device_routing.erl:391— src/device/router_device_routing.erl:391-400 | src/device/router_device_routing.erl:415-424 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/grpc/router_ics_eui_worker.erl:64— src/grpc/router_ics_eui_worker.erl:64-73 | src/grpc/router_ics_skf_worker.erl:91-100 — 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/router_utils.erl:229— src/router_utils.erl:229-238 | src/router_utils.erl:251-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/channels/router_mqtt_channel.erl:133— src/channels/router_mqtt_channel.erl:133-141 | src/channels/router_mqtt_channel.erl:178-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/device/router_device_devaddr.erl:262— src/device/router_device_devaddr.erl:262-270 | src/grpc/router_ics_eui_worker.erl:269-277 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) src/channels/router_iot_central_connection.erl:252— src/channels/router_iot_central_connection.erl:252-260 | REDACTED:210-218 — before extracting anything, compare `src/channels/router_iot_central_connection.erl` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/device/router_device_channels_worker.erl:862— src/device/router_device_channels_worker.erl:862-867 | src/router_utils.erl:847-853 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/device/router_device_channels_worker.erl:690— src/device/router_device_channels_worker.erl:690-695 | src/device/router_device_channels_worker.erl:713-718 — both copies are in the same file, so extract the block into 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/device/router_device.erl:648— src/device/router_device.erl:648-653 | src/router_xor_filter_worker.erl:705-710 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Handler temporal coupling: router_console_api clause `handle_info/2#643` src/apis/router_console_api.erl:998— `router_console_api` clause `handle_info/2#643` blocks the process on a synchronous outbound I/O client call (a remote HTTP request, a socket receive, or a blocking pool checkout) awaited inline 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, issue the request off the hot path — reply asynchronously and do the I/O in a throwaway spawned worker (or use the async client API), so the process keeps serving its mailbox.
Handler temporal coupling: router_http_channel clause `handle_event/2#55` src/channels/router_http_channel.erl:164— `router_http_channel` clause `handle_event/2#55` blocks the process on a synchronous outbound I/O client call (a remote HTTP request, a socket receive, or a blocking pool checkout) awaited inline 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, issue the request off the hot path — reply asynchronously and do the I/O in a throwaway spawned worker (or use the async client API), so the process keeps serving its mailbox.
Handler temporal coupling: router_http_channel clause `handle_event/2#62` src/channels/router_http_channel.erl:164— `router_http_channel` clause `handle_event/2#62` blocks the process on a synchronous outbound I/O client call (a remote HTTP request, a socket receive, or a blocking pool checkout) awaited inline 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, issue the request off the hot path — reply asynchronously and do the I/O in a throwaway spawned worker (or use the async client API), so the process keeps serving its mailbox.
Outbound HTTP without resilience src/apis/router_console_api.erl:229— `hackney:post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. 3 of the 4 files that make outbound calls are unbounded; the first 3 are listed.
Outbound HTTP without resilience src/channels/router_iot_central_connection.erl:299— `hackney:get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:243— `hackney:get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
XxxComment src/device/router_device_worker.erl:2015— %% XXX we should get this to report_status somehow, but it's a bit tricky right now — 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.
XxxComment test/router_lorawan_handler_test.erl:232— %% XXX assume AS923 form — 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.
TooManyFunctions: router_ics_skf_worker src/grpc/router_ics_skf_worker.erl:6— 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: router_cli_device_worker src/cli/router_cli_device_worker.erl:1— 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) src/channels/router_aws_channel.erl:263— src/channels/router_aws_channel.erl:263-299 | src/channels/router_iot_central_channel.erl:227-251 | src/channels/router_iot_hub_channel.erl:223-247 | src/channels/router_mqtt_channel.erl:374-410 — 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/channels/router_aws_channel.erl:302— src/channels/router_aws_channel.erl:302-335 | src/channels/router_iot_central_channel.erl:254-287 | src/channels/router_iot_hub_channel.erl:250-283 | src/channels/router_mqtt_channel.erl:413-446 — 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 (21 lines × 2) src/channels/router_iot_central_channel.erl:227— src/channels/router_iot_central_channel.erl:227-247 | src/channels/router_iot_hub_channel.erl:223-243 — before extracting anything, compare `src/channels/router_iot_central_channel.erl` and `src/channels/router_iot_hub_channel.erl` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) src/device/router_device_worker.erl:1667— src/device/router_device_worker.erl:1667-1687 | src/device/router_device_worker.erl:1718-1738 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) src/channels/router_mqtt_channel.erl:153— src/channels/router_mqtt_channel.erl:153-168 | src/channels/router_mqtt_channel.erl:209-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) src/router_sc_worker.erl:173— src/router_sc_worker.erl:173-187 | src/router_sc_worker.erl:205-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/apis/router_console_api.erl:322— src/apis/router_console_api.erl:322-332 | src/apis/router_console_api.erl:338-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/device/router_device_worker.erl:1811— src/device/router_device_worker.erl:1811-1821 | src/device/router_device_worker.erl:1897-1907 — both copies are in the same file, so extract the block into 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 × 3) src/router_utils.erl:409— src/router_utils.erl:409-415 | src/router_utils.erl:433-439 | src/router_utils.erl:459-465 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) src/apis/router_console_ws_worker.erl:157— src/apis/router_console_ws_worker.erl:157-165 | src/apis/router_console_ws_worker.erl:166-172 | src/apis/router_console_ws_worker.erl:173-179 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) src/apis/router_console_api.erl:320— src/apis/router_console_api.erl:320-325 | src/apis/router_console_api.erl:335-341 | src/apis/router_console_api.erl:414-420 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) src/apis/router_console_api.erl:1032— src/apis/router_console_api.erl:1032-1037 | src/apis/router_console_api.erl:1067-1072 | src/apis/router_console_api.erl:1105-1110 — 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.
router_device_worker.handle_cast (cyclomatic 69) src/device/router_device_worker.erl:333— router_device_worker.handle_cast has cyclomatic complexity 69 (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.
router_console_ws_worker.handle_info (cyclomatic 36) src/apis/router_console_ws_worker.erl:72— router_console_ws_worker.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.
router_xor_filter_worker.handle_call (cyclomatic 28) src/router_xor_filter_worker.erl:184— router_xor_filter_worker.handle_call 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.
router_console_ws_worker.update_device_record (cyclomatic 27) src/apis/router_console_ws_worker.erl:402— router_console_ws_worker.update_device_record has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
router_device_channels_worker.handle_info (cyclomatic 26) src/device/router_device_channels_worker.erl:347— router_device_channels_worker.handle_info has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
router_device_channels_worker.handle_cast (cyclomatic 24) src/device/router_device_channels_worker.erl:202— router_device_channels_worker.handle_cast 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.
router_xor_filter_worker.handle_info (cyclomatic 24) src/router_xor_filter_worker.erl:355— router_xor_filter_worker.handle_info 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.
router_mqtt_channel.handle_info (cyclomatic 23) src/channels/router_mqtt_channel.erl:123— router_mqtt_channel.handle_info 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.
router_cli_xor_filter.report_device (cyclomatic 21) src/cli/router_cli_xor_filter.erl:331— router_cli_xor_filter.report_device 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.
router_console_api.event (cyclomatic 20) src/apis/router_console_api.erl:277— router_console_api.event 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.
router_device_worker.handle_info (cyclomatic 17) src/device/router_device_worker.erl:1001— router_device_worker.handle_info 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.
router_device_worker.validate_frame (cyclomatic 16) src/device/router_device_worker.erl:1491— router_device_worker.validate_frame 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.
router_sc_worker.handle_info (cyclomatic 16) src/router_sc_worker.erl:164— router_sc_worker.handle_info 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.
FixmeComment src/decoders/router_decoder_custom_worker.erl:167— %% FIXME: Bringing back the retry mechanism for decoding until we have the — 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.
router_device_worker.handle_cast (cognitive 90) src/device/router_device_worker.erl:333— router_device_worker.handle_cast has cognitive complexity 90 (threshold 15). Drivers by points: error handling 14 (47 pts), match/switch 25 (43 pts) (nesting depth added 51). 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.
router_console_ws_worker.update_device_record (cognitive 51) src/apis/router_console_ws_worker.erl:402— router_console_ws_worker.update_device_record has cognitive complexity 51 (threshold 15). Drivers by points: error handling 10 (33 pts), match/switch 11 (18 pts) (nesting depth added 30). 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.
router_cli_xor_filter.report_device (cognitive 25) src/cli/router_cli_xor_filter.erl:331— router_cli_xor_filter.report_device has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 12 (15 pts), if/else 2 (6 pts), loops 2 (4 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.
router_device_channels_worker.downlink_decode (cognitive 22) src/device/router_device_channels_worker.erl:537— router_device_channels_worker.downlink_decode has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 12 (18 pts), error handling 2 (3 pts), boolean chains 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.
router_device_channels_worker.handle_info (cognitive 21) src/device/router_device_channels_worker.erl:347— router_device_channels_worker.handle_info has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 13 (20 pts), boolean chains 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.
router_console_ws_worker.handle_info (cognitive 18) src/apis/router_console_ws_worker.erl:72— router_console_ws_worker.handle_info has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 11, error handling 4 (6 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.
router_device_routing.send_to_device_worker (cognitive 18) src/device/router_device_routing.erl:1024— router_device_routing.send_to_device_worker has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 10 (18 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
router_console_api.event (cognitive 17) src/apis/router_console_api.erl:277— router_console_api.event has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 8 (13 pts), boolean chains 4 (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.
router_device.deserialize (cognitive 16) src/device/router_device.erl:318— router_device.deserialize has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 11 (16 pts) (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.
router_device_routing.packet_offer_ (cognitive 16) src/device/router_device_routing.erl:618— router_device_routing.packet_offer_ has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (16 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) src/channels/router_aws_channel.erl:78— src/channels/router_aws_channel.erl:78-90 | src/channels/router_console_channel.erl:36-48 | src/channels/router_http_channel.erl:55-67 | src/channels/router_iot_central_channel.erl:58-70 | src/channels/router_iot_hub_channel.erl:57-69 | src/channels/router_mqtt_channel.erl:70-82 | src/channels/router_no_channel.erl:36-48 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Duplicated block (36 lines × 2) src/apis/router_console_ws_worker.erl:463— src/apis/router_console_ws_worker.erl:463-498 | src/device/router_device_worker.erl:420-455 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (29 lines × 2) src/channels/router_aws_channel.erl:263— src/channels/router_aws_channel.erl:263-291 | src/channels/router_mqtt_channel.erl:374-402 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_mqtt_channel.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (25 lines × 4) src/channels/router_aws_channel.erl:302— src/channels/router_aws_channel.erl:302-326 | src/channels/router_iot_central_channel.erl:254-278 | src/channels/router_iot_hub_channel.erl:250-274 | src/channels/router_mqtt_channel.erl:413-437 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_iot_central_channel.erl` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) src/channels/router_iot_central_channel.erl:83— src/channels/router_iot_central_channel.erl:83-105 | src/channels/router_iot_hub_channel.erl:82-104 — before extracting anything, compare `src/channels/router_iot_central_channel.erl` and `src/channels/router_iot_hub_channel.erl` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21–22 lines × 2) src/router_xor_filter_worker.erl:284— src/router_xor_filter_worker.erl:284-305 | src/router_xor_filter_worker.erl:318-338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19–20 lines × 5) src/apis/router_console_api.erl:778— src/apis/router_console_api.erl:778-796 | src/apis/router_console_api.erl:809-828 | src/apis/router_console_api.erl:838-856 | src/apis/router_console_api.erl:874-893 | src/apis/router_console_api.erl:910-928 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14–20 lines × 2) src/device/router_device_worker.erl:294— src/device/router_device_worker.erl:294-313 | src/device/router_device_worker.erl:1314-1327 — both copies are in the same file, so extract the block into 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–19 lines × 2) src/channels/router_aws_channel.erl:202— src/channels/router_aws_channel.erl:202-215 | src/channels/router_mqtt_channel.erl:297-315 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_mqtt_channel.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/channels/router_iot_central_channel.erl:143— src/channels/router_iot_central_channel.erl:143-159 | src/channels/router_iot_hub_channel.erl:142-158 — before extracting anything, compare `src/channels/router_iot_central_channel.erl` and `src/channels/router_iot_hub_channel.erl` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) src/channels/router_iot_central_channel.erl:185— src/channels/router_iot_central_channel.erl:185-199 | src/channels/router_iot_hub_channel.erl:184-198 — before extracting anything, compare `src/channels/router_iot_central_channel.erl` and `src/channels/router_iot_hub_channel.erl` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 146 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–14 lines × 2) src/channels/router_aws_channel.erl:218— src/channels/router_aws_channel.erl:218-229 | src/channels/router_mqtt_channel.erl:328-341 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_mqtt_channel.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) src/channels/router_aws_channel.erl:287— src/channels/router_aws_channel.erl:287-297 | src/channels/router_iot_central_channel.erl:239-249 | src/channels/router_iot_hub_channel.erl:235-245 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_iot_central_channel.erl` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9–10 lines × 2) src/channels/router_iot_central_connection.erl:291— src/channels/router_iot_central_connection.erl:291-299 | src/channels/router_iot_central_connection.erl:344-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 6) src/channels/router_aws_channel.erl:79— src/channels/router_aws_channel.erl:79-87 | src/channels/router_console_channel.erl:37-45 | src/channels/router_iot_central_channel.erl:59-67 | src/channels/router_iot_hub_channel.erl:58-66 | src/channels/router_mqtt_channel.erl:71-79 | src/channels/router_no_channel.erl:37-45 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_iot_central_channel.erl` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) src/router_utils.erl:404— src/router_utils.erl:404-412 | src/router_utils.erl:454-462 | src/router_utils.erl:480-488 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8–9 lines × 2) src/apis/router_console_api.erl:385— src/apis/router_console_api.erl:385-393 | src/apis/router_console_api.erl:398-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6–8 lines × 2) src/channels/router_iot_central_connection.erl:538— src/channels/router_iot_central_connection.erl:538-545 | REDACTED:333-338 — before extracting anything, compare `src/channels/router_iot_central_connection.erl` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7–8 lines × 2) src/grpc/router_ics_eui_worker.erl:482— src/grpc/router_ics_eui_worker.erl:482-489 | src/grpc/router_ics_eui_worker.erl:500-506 — both copies are in the same file, so extract the block into 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 × 7) src/channels/router_aws_channel.erl:78— src/channels/router_aws_channel.erl:78-84 | src/channels/router_console_channel.erl:36-42 | src/channels/router_http_channel.erl:55-61 | src/channels/router_iot_central_channel.erl:58-64 | src/channels/router_iot_hub_channel.erl:57-63 | src/channels/router_mqtt_channel.erl:70-76 | src/channels/router_no_channel.erl:36-42 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_iot_central_channel.erl` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 4) src/router_utils.erl:376— src/router_utils.erl:376-382 | src/router_utils.erl:403-409 | src/router_utils.erl:453-459 | src/router_utils.erl:479-485 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 4) src/channels/router_aws_channel.erl:294— src/channels/router_aws_channel.erl:294-299 | src/channels/router_iot_central_channel.erl:246-251 | src/channels/router_iot_hub_channel.erl:242-247 | src/channels/router_mqtt_channel.erl:405-410 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_iot_central_channel.erl` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 2) src/device/router_device_channels_worker.erl:284— src/device/router_device_channels_worker.erl:284-296 | src/device/router_device_channels_worker.erl:312-323 — both copies are in the same file, so extract the block into 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 × 3) src/channels/router_aws_channel.erl:92— src/channels/router_aws_channel.erl:92-96 | src/channels/router_iot_central_channel.erl:72-76 | src/channels/router_iot_hub_channel.erl:71-75 — before extracting anything, compare `src/channels/router_aws_channel.erl` and `src/channels/router_iot_central_channel.erl` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: src/channels/router_aws_channel.erl, src/grpc/helium_packet_service.erl. Pair on, review, or document these before any departure.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (22076 LoC, 536 public types across 9 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 10 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/channels/router_iot_central_connection.erl, src/cli/router_cli_device_worker.erl, src/channels/router_channel_utils.erl, src/cli/router_cli_xor_filter.erl, REDACTED, src/channels/router_iot_central_channel.erl, src/channels/router_iot_hub_channel.erl, src/lora/lorawan_rxdelay.erl (and 2 more) (12 orphaned of 54 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; 54 of the 72 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety — Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Outdated: erl_cidr — `erl_cidr` is declared `"1.1.0"` in rebar.config and pinned there by the committed REDACTED, but 1.2.1 is the current stable release on hex.pm — so this repository is behind by the version it names itself. rebar3 resolves an exact requirement to that exact release, so the remedy is to raise the declaration in rebar.config and re-run `rebar3 upgrade erl_cidr`, committing the updated REDACTED.
Outdated: hackney — `hackney` is declared `"1.18.1"` in rebar.config and pinned there by the committed REDACTED, but 4.8.4 is the current stable release on hex.pm — so this repository is behind by the version it names itself. This crosses a major version. rebar3 resolves an exact requirement to that exact release, so the remedy is to raise the declaration in rebar.config and re-run `rebar3 upgrade hackney`, committing the updated REDACTED.
Outdated: meck — `meck` is declared `"0.9.2"` in rebar.config and pinned there by the committed REDACTED, but 1.2.0 is the current stable release on hex.pm — so this repository is behind by the version it names itself. This crosses a major version. rebar3 resolves an exact requirement to that exact release, so the remedy is to raise the declaration in rebar.config and re-run `rebar3 upgrade meck`, committing the updated REDACTED.
Outdated: observer_cli — `observer_cli` is declared `"1.7.1"` in rebar.config and pinned there by the committed REDACTED, but 2.0.0 is the current stable release on hex.pm — so this repository is behind by the version it names itself. This crosses a major version. rebar3 resolves an exact requirement to that exact release, so the remedy is to raise the declaration in rebar.config and re-run `rebar3 upgrade observer_cli`, committing the updated REDACTED.
Outdated: prometheus — `prometheus` is declared `"4.8.1"` in rebar.config and pinned there by the committed REDACTED, but 6.1.3 is the current stable release on hex.pm — so this repository is behind by the version it names itself. This crosses a major version. rebar3 resolves an exact requirement to that exact release, so the remedy is to raise the declaration in rebar.config and re-run `rebar3 upgrade prometheus`, committing the updated REDACTED.
Outdated: websocket_client — `websocket_client` is declared `"1.4.2"` in rebar.config and pinned there by the committed REDACTED, but 1.6.1 is the current stable release on hex.pm — so this repository is behind by the version it names itself. rebar3 resolves an exact requirement to that exact release, so the remedy is to raise the declaration in rebar.config and re-run `rebar3 upgrade websocket_client`, committing the updated REDACTED.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
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 01a0fbee-69f7-7c86-97f0-2e97a75bca97 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 52 · Warnings: 161 · Recommendations: 22 · Info: 6 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 02-10-2026 @ 09:25 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.