Public report — rtk, published 26 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.15 (frozen) · verify this surveyFiledcd_8de834d9a4004d389f07a25a8a7310a4
Filed 26 September 2026, 22:45 UTC
Public
Large · 116,731 LoC · rebuild ~1.1 person-years · weakest lens: Readiness (66%)
Findings by grade
48 critical546 serious18 minor42 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
26 September 2026, 22:29 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 ▸
599findings with an exact file:lineof 612 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
34/115dimensions across the health lenses116731 LoC — wide & deep
Preview (pre-1.0). This repo hasn't declared a stable release, so it's judged against a relaxed, pre-production bar.
The system holds a strong overall standing of 70%, indicating a robust asset that delivers value but carries specific operational risks. With over 116,000 lines of production code and a modest rebuild cost of approximately €160,000, the organization has significant intellectual property tied up in this codebase. The architecture and maturity are high, suggesting the structure is sound and the team understands the domain well. However, production readiness and security scores reveal gaps that could impact reliability and exposure if left unaddressed.
The most critical issue is the lack of a safety net in the release process. Currently, there is no mechanism to pause a release for human review, meaning a faulty build can reach users immediately. This creates a direct risk to customer trust and support costs. Fixing this is the highest-leverage action, requiring only a few days of engineering effort. The return on investment is substantial, as preventing even a single bad release pays for the fix within months, effectively eliminating the annual drag on productivity caused by hotfixes and rollbacks.
A secondary concern is the hidden velocity tax imposed by code quality. While the architecture is strong, the code itself carries complexity and duplication that average a low score. This acts as a tax on every change, plausibly increasing the effort required for modifications by 9% to 19%. As the team changes hundreds of thousands of lines annually, this inefficiency compounds, leading to slower delivery speeds and higher long-term maintenance costs. Addressing these quality signals will directly improve the team’s ability to ship features faster.
Despite these risks, the system’s strong architectural foundation and high maturity are genuine strengths. The team has built a stable, well-understood platform that is largely free of boilerplate noise. To maximize leverage, focus first on implementing a manual gate for releases. This single step secures the delivery pipeline and pays for itself quickly, providing a stable foundation for subsequent improvements in code quality and dependency management.
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.
589 finding(s) are new versus the previous scan (2026-08-07) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
1.0× (at 70% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~1.1 person-years of build effort (about ~€160,000 to rebuild). Its weakest lens is Readiness at 66% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 1.0× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 Flaky test finding(s) in Test Reliability.
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 91.1–546.5 engineer-days every year, paid as drag on the ~424,240 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 9–19% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 104,607 line(s) changed over a 90-day window ⇒ ~424,240/year · D1/D2/D4 code quality: averaging 4.6/10 ⇒ a 9–19% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 4.6/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 9–19% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 4.6/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
139 modules, 69 dependencies. Every dependency points down the layering — no cycles.
Showing the 40 most-connected modules; 99 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
rtk.cmds.dotnet.dotnet_cmd uses rtk.cmds.dotnet.dotnet_format_report. Changing rtk.cmds.dotnet.dotnet_format_report can break rtk.cmds.dotnet.dotnet_cmd, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→7 rtk.cmds.dotnet.dotnet_cmd depends on rtk.core.arg_tokenizer✕
Type pairs
3 distinct (type in rtk.cmds.dotnet.dotnet_cmd → type in rtk.core.arg_tokenizer) references.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
50
High / Critical
A06:2021 — Vulnerable & Outdated Components
4
Medium
Roadmap
First, implement draft releases or manual gates to prevent bad builds from reaching users, and document tested disaster recovery procedures with clear RTO and RPO targets. Next, expand Dependabot to monitor npm and maven dependencies for automatic security updates, and resolve the single flaky test to ensure reliable CI feedback. Finally, reduce cognitive complexity in key files like git_cmd.rs, diff_cmd.rs, and registry.rs to improve code maintainability.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Flaky test finding(s) in Test Reliability.
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Dependabot is configured but does not watch `npm`, `maven` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
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 — 48
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 — 546
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 — 18
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 42
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. 30 of 34 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 — 34 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, 599 of 612 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs, .rb) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or SimpleCov — `require "simplecov"` in your `spec_helper.rb`/`test_helper.rb`, which writes `coverage/.resultset.json` (or lcov via `simplecov-lcov`)) 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.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Dependency Hygiene ran out of its 5-minute budget before it had finished, so what it reports here is a floor rather than a complete count. The rows above are real and stand; what is not known is how many more there are. This is a limit of the analysis run, not a finding about this repository.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
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 (Cargo.toml), 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, 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 (go.mod, a Gemfile's ruby directive, a Dockerfile) is simply not read here yet.
AX3 Project dependency cycles — 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 which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj, Gradle and Maven builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: npm/pnpm/yarn packages and workspaces (package.json, pnpm-workspace.yaml, lerna.json); Cargo crates and workspaces (Cargo.toml). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX4 Dependency direction — 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 direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj, Gradle and Maven builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: npm/pnpm/yarn packages and workspaces (package.json, pnpm-workspace.yaml, lerna.json); Cargo crates and workspaces (Cargo.toml). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AX8 Test isolation — 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 which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj, Gradle and Maven builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. Its modules are declared as: npm/pnpm/yarn packages and workspaces (package.json, pnpm-workspace.yaml, lerna.json); Cargo crates and workspaces (Cargo.toml). A reader for that graph is the collector this check is missing. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and 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.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D13 Secret Scanning: Secret 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.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (4): D19, D20, D21, 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.
93 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was rtk::run_cli at 267. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being rtk::cmds::system::pipe_cmd::resolve_filter at 24 — they are counted neither in the figure above nor in this dimension's score.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 88 rtk finding(s) in Cyclomatic Complexity — start with git_cmd.rs (8), registry.rs (5), mod.rs (4). — One of this dimension's main actionable groups (88 warning-level).
Resolve the 1 SurefireBlock finding(s) in Cyclomatic Complexity — start with mvn_cmd.rs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 runner.run_benchmark (cyclomatic 24) finding(s) in Cyclomatic Complexity — start with runner.py. — 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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 176 rtk finding(s) in Cognitive Complexity — start with git_cmd.rs (13), diff_cmd.rs (8), registry.rs (8). — One of this dimension's main actionable groups (176 warning-level).
Resolve the 2 ClaudeProvider finding(s) in Cognitive Complexity — start with provider.rs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 DependencyState finding(s) in Cognitive Complexity — start with formatter.rs (2). — One of this dimension's main actionable groups (2 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.6 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 26 FunctionTooLong finding(s) in God Classes — start with mod.rs (3), git_cmd.rs (3), cargo_cmd.rs (3). — One of this dimension's main actionable groups (26 warning-level).
Resolve the 24 FileTooLong finding(s) in God Classes — start with main.rs, git_cmd.rs, diff_cmd.rs. — One of this dimension's main actionable groups (24 warning-level).
Resolve the 2 ClassTooLong finding(s) in God Classes — start with tracking.rs, main.rs. — 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.
120 duplicated block group(s) detected. A further 6 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 47 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 12 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with gh_cmd.rs (3), glab_cmd.rs (2), lint_cmd.rs. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 9 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with aws_cmd.rs, dotnet_cmd.rs, git_cmd.rs. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 9 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with container.rs, local_llm.rs, agents_md.rs. — One of this dimension's main actionable groups (9 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 the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
What to do
Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
4069 test methods: 3828 unit, 241 integration, 0 BDD, 0 e2e. The Rust suite contributes 4051 `#[test]` function(s) across 147 file(s) declaring at least one; its unit/integration split is Cargo's own — 27 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 18 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability8.0 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
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 206 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: src/main.rs (59×267=15753); src/cmds/git/diff_cmd.rs (34×117=3978); src/discover/registry.rs (69×49=3381) Repeated repair below the complexity floor: src/hooks/hook_cmd.rs (36 of 57 changes were fixes); src/core/utils.rs (18 of 26 changes were fixes); src/core/tracking.rs (16 of 26 changes were fixes)
Resolve the 50 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (2), main.rs, diff_cmd.rs. — One of this dimension's main actionable groups (50 warning-level).
Resolve the 22 Repeated repair finding(s) in Churn × Complexity Hotspots — start with hook_cmd.rs, utils.rs, tracking.rs. — One of this dimension's main actionable groups (22 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/core/args_utils.rs. Counted over 124 of the 157 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ 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.
5 deducted task-comment markers across 116731 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×4src/cmds/git/git_cmd.rs:854
FixmeCommentsrc/main.rs:1850
What to do
Resolve the 4 TodoComment finding(s) in Explicit Debt — start with git_cmd.rs (2), pipe_cmd.rs (2). — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with main.rs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README and the hooks/README.md are both excellent: the former gives a high-level overview of RTK as a Rust CLI proxy cutting up to 90% of bash output, its license, release badge, and links to the international documentation; the latter is an exhaustive directory README for deployed hook artifacts (12 supported agents), explaining how each hooks into RTK, what it rewrites, and the prerequisites/installation steps for every agent. The architecture/Docs markdown files are a separate design/doc tier not shown in this summary. The repository's READMEs document the src directories (analytics, cmds, core, discover, filters, hooks, learn, parser) as per their own scope rather than the root repository, with each directory having a clear overview and architecture. The root README is not shown in this summary but would cover installation, usage, contribution, and license for the top-level project.
Documentation: no project overviewREADME.md
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR QualityStrong◐ Sampled · advisory
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
Evaluated 1 ADR(s) individually; mean quality 8.0/10 (consistently complete and clear). 0 flagged with a specific gap.
What to do
Improve ADR Quality — currently 8.0/10. — Evaluated 1 ADR(s) individually; mean quality 8.0/10 (consistently complete and clear). 0 flagged with a specific gap.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
50 finding(s): 0 critical, 47 high, 3 medium, 0 low. 36 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 2 file(s) — `.claude/hooks/rtk-suggest.sh` (line 20), `scripts/benchmark.sh` (line 34, line 80, line 103) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 4 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
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 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
No action in Static Analysis (SAST) — all 36 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 (36 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/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, Go, Java and Kotlin via Maven/Gradle, 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 3 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Medium advisory (unsound) 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.
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.
1 of 124 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/learn/report.rs. Counted over 124 of the 157 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
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 the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether 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 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.
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.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
1 ADR-shaped document(s) detected by content — `docs/contributing/ARCHITECTURE.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
What to do
Move ADRs under docs/adr/ (or docs/adrs/) and name them NNNN-title.md so they're easy to find.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Dependabot is configured but does not watch `npm`, `maven` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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.
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X9 Subsumed condition operand — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 77 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 — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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 — ~7466 lines of test source are present (.rs, .rb) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — Production source is present (.py, .rb, .rs, .ts) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — none of 1 ADRs are conformance-checkable — unverifiable.
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — symbol resolution incomplete — too few calls resolved to assess navigability
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
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 — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a CS/VB/GO/SCALA/SWIFT/DART class graph, and this repository's production source is .py, .rb, .rs, .ts, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 15 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 6 value object(s)
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — 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'.
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from 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 (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
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
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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.
rtk::cmds::git::diff_cmd::condense_unified_diff_strict (cognitive 245) src/cmds/git/diff_cmd.rs:2123— rtk::cmds::git::diff_cmd::condense_unified_diff_strict has cognitive complexity 245 (threshold 15). Drivers by points: if/else 75 (201 pts), boolean chains 34, match/switch 5 (21 pts), loops 3 (5 pts) (nesting depth added 144). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (rtk::cmds::git::diff_cmd::condense_unified_diff_strict::flush) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
rtk::run_cli (cognitive 244) src/main.rs:2055— rtk::run_cli has cognitive complexity 244 (threshold 15). Drivers by points: if/else 87 (154 pts), match/switch 28 (68 pts), loops 6 (15 pts), boolean chains 7 (nesting depth added 116). Of this number, 242 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::core::stream::run_streaming (cognitive 114) src/core/stream.rs:425— rtk::core::stream::run_streaming has cognitive complexity 114 (threshold 15). Drivers by points: if/else 30 (72 pts), match/switch 9 (23 pts), loops 7 (17 pts), boolean chains 2 (nesting depth added 66). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rtk::core::runner::extract_test_summary (cognitive 96) src/core/runner.rs:876— rtk::core::runner::extract_test_summary has cognitive complexity 96 (threshold 15). Drivers by points: if/else 29 (73 pts), boolean chains 12, loops 5 (9 pts), match/switch 1 (2 pts) (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rtk::cmds::system::search::extract_pattern_path (cognitive 93) src/cmds/system/search.rs:187— rtk::cmds::system::search::extract_pattern_path has cognitive complexity 93 (threshold 15). Drivers by points: if/else 25 (66 pts), match/switch 5 (17 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 57). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rtk::hooks::init::uninstall_with_patch_mode (cognitive 88) src/hooks/init/mod.rs:844— rtk::hooks::init::uninstall_with_patch_mode has cognitive complexity 88 (threshold 15). Drivers by points: if/else 47 (79 pts), loops 4 (9 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::system::format_cmd::filter_black_output (cognitive 84) src/cmds/system/format_cmd.rs:142— rtk::cmds::system::format_cmd::filter_black_output has cognitive complexity 84 (threshold 15). Drivers by points: if/else 20 (52 pts), loops 6 (20 pts), boolean chains 12 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::scala::sbt_cmd::filter_sbt_test (cognitive 81) src/cmds/scala/sbt_cmd.rs:189— rtk::cmds::scala::sbt_cmd::filter_sbt_test has cognitive complexity 81 (threshold 15). Drivers by points: if/else 31 (65 pts), loops 6 (11 pts), boolean chains 5 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rtk::discover::lexer::tokenize_inner (cognitive 81) src/discover/lexer.rs:100— rtk::discover::lexer::tokenize_inner has cognitive complexity 81 (threshold 15). Drivers by points: if/else 25 (61 pts), boolean chains 9, loops 3 (9 pts), match/switch 1 (2 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::rust::cargo_cmd::filter_cargo_clippy (cognitive 78) src/cmds/rust/cargo_cmd.rs:1279— rtk::cmds::rust::cargo_cmd::filter_cargo_clippy has cognitive complexity 78 (threshold 15). Drivers by points: if/else 28 (59 pts), boolean chains 10, loops 5 (9 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::rust::cargo_cmd::filter_cargo_install (cognitive 75) src/cmds/rust/cargo_cmd.rs:441— rtk::cmds::rust::cargo_cmd::filter_cargo_install has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (62 pts), boolean chains 9, loops 3 (4 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::go::go_cmd::filter_go_test_json (cognitive 71) src/cmds/go/go_cmd.rs:294— rtk::cmds::go::go_cmd::filter_go_test_json has cognitive complexity 71 (threshold 15). Drivers by points: if/else 19 (46 pts), loops 8 (13 pts), boolean chains 6, match/switch 3 (6 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::discover::run (cognitive 69) src/discover/mod.rs:258— rtk::discover::run has cognitive complexity 69 (threshold 15). Drivers by points: if/else 18 (46 pts), match/switch 6 (15 pts), loops 4 (8 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::discover::registry::rewrite_segment_inner (cognitive 69) src/discover/registry.rs:1619— rtk::discover::registry::rewrite_segment_inner has cognitive complexity 69 (threshold 15). Drivers by points: if/else 33 (53 pts), boolean chains 11, loops 3, match/switch 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::hooks::init::show_claude_config (cognitive 66) src/hooks/init/mod.rs:1428— rtk::hooks::init::show_claude_config has cognitive complexity 66 (threshold 15). Drivers by points: if/else 42 (59 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::system::search::run (cognitive 65) src/cmds/system/search.rs:678— rtk::cmds::system::search::run has cognitive complexity 65 (threshold 15). Drivers by points: if/else 30 (47 pts), boolean chains 11, loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::rust::cargo_cmd::filter_cargo_nextest (cognitive 64) src/cmds/rust/cargo_cmd.rs:633— rtk::cmds::rust::cargo_cmd::filter_cargo_nextest has cognitive complexity 64 (threshold 15). Drivers by points: if/else 28 (54 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::rust::cargo_cmd::filter_cargo_test (cognitive 62) src/cmds/rust/cargo_cmd.rs:1139— rtk::cmds::rust::cargo_cmd::filter_cargo_test has cognitive complexity 62 (threshold 15). Drivers by points: if/else 22 (41 pts), boolean chains 11, loops 6 (10 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::core::arg_tokenizer::tokenize_scan (cognitive 61) src/core/arg_tokenizer.rs:366— rtk::core::arg_tokenizer::tokenize_scan has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (46 pts), match/switch 1 (6 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
rtk::cmds::git::git_cmd::compact_diff (cognitive 60) src/cmds/git/git_cmd.rs:1373— rtk::cmds::git::git_cmd::compact_diff has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (54 pts), boolean chains 5, loops 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::analytics::gain::run (cognitive 58) src/analytics/gain.rs:15— rtk::analytics::gain::run has cognitive complexity 58 (threshold 15). Drivers by points: if/else 23 (38 pts), boolean chains 7, loops 2 (7 pts), match/switch 3 (6 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::dotnet::dotnet_trx::parse_trx_content (cognitive 56) src/cmds/dotnet/dotnet_trx.rs:207— rtk::cmds::dotnet::dotnet_trx::parse_trx_content has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (38 pts), match/switch 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::python::mypy_cmd::filter_mypy_output (cognitive 56) src/cmds/python/mypy_cmd.rs:54— rtk::cmds::python::mypy_cmd::filter_mypy_output has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (33 pts), loops 8 (16 pts), boolean chains 7 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::dotnet::binlog::parse_build_from_text (cognitive 53) src/cmds/dotnet/binlog.rs:644— rtk::cmds::dotnet::binlog::parse_build_from_text has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 6 (15 pts), boolean chains 8, match/switch 2 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::cmds::ruby::rspec_cmd::filter_rspec_text (cognitive 50) src/cmds/ruby/rspec_cmd.rs:275— rtk::cmds::ruby::rspec_cmd::filter_rspec_text has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rtk::run_cli (cyclomatic 267) src/main.rs:2055— rtk::run_cli has cyclomatic complexity 267 (threshold 15). Of this number, 266 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
rtk::cmds::git::diff_cmd::condense_unified_diff_strict (cyclomatic 117) src/cmds/git/diff_cmd.rs:2123— rtk::cmds::git::diff_cmd::condense_unified_diff_strict has cyclomatic complexity 117 (threshold 15). Of this number, 108 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::cloud::aws_cmd::run (cyclomatic 53) src/cmds/cloud/aws_cmd.rs:48— rtk::cmds::cloud::aws_cmd::run has cyclomatic complexity 53 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
rtk::core::runner::extract_test_summary (cyclomatic 51) src/core/runner.rs:876— rtk::core::runner::extract_test_summary has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::core::stream::run_streaming (cyclomatic 50) src/core/stream.rs:425— rtk::core::stream::run_streaming has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::discover::registry::rewrite_segment_inner (cyclomatic 49) src/discover/registry.rs:1619— rtk::discover::registry::rewrite_segment_inner has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::discover::lexer::tokenize_inner (cyclomatic 42) src/discover/lexer.rs:100— rtk::discover::lexer::tokenize_inner has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::hooks::init::uninstall_with_patch_mode (cyclomatic 42) src/hooks/init/mod.rs:844— rtk::hooks::init::uninstall_with_patch_mode has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::system::search::run (cyclomatic 42) src/cmds/system/search.rs:678— rtk::cmds::system::search::run has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::scala::sbt_cmd::filter_sbt_test (cyclomatic 40) src/cmds/scala/sbt_cmd.rs:189— rtk::cmds::scala::sbt_cmd::filter_sbt_test has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::rust::cargo_cmd::filter_cargo_clippy (cyclomatic 40) src/cmds/rust/cargo_cmd.rs:1279— rtk::cmds::rust::cargo_cmd::filter_cargo_clippy has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::dotnet::dotnet_trx::parse_trx_content (cyclomatic 40) src/cmds/dotnet/dotnet_trx.rs:207— rtk::cmds::dotnet::dotnet_trx::parse_trx_content has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::go::go_cmd::filter_go_test_json (cyclomatic 39) src/cmds/go/go_cmd.rs:294— rtk::cmds::go::go_cmd::filter_go_test_json has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::rust::cargo_cmd::filter_cargo_install (cyclomatic 38) src/cmds/rust/cargo_cmd.rs:441— rtk::cmds::rust::cargo_cmd::filter_cargo_install has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::rust::cargo_cmd::filter_cargo_test (cyclomatic 38) src/cmds/rust/cargo_cmd.rs:1139— rtk::cmds::rust::cargo_cmd::filter_cargo_test has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::system::search::extract_pattern_path (cyclomatic 38) src/cmds/system/search.rs:187— rtk::cmds::system::search::extract_pattern_path has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::analytics::gain::run (cyclomatic 38) src/analytics/gain.rs:15— rtk::analytics::gain::run has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::system::format_cmd::filter_black_output (cyclomatic 37) src/cmds/system/format_cmd.rs:142— rtk::cmds::system::format_cmd::filter_black_output has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::rust::cargo_cmd::filter_cargo_nextest (cyclomatic 35) src/cmds/rust/cargo_cmd.rs:633— rtk::cmds::rust::cargo_cmd::filter_cargo_nextest has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::hooks::init::show_claude_config (cyclomatic 34) src/hooks/init/mod.rs:1428— rtk::hooks::init::show_claude_config has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::php::phpt_cmd::parse (cyclomatic 33) src/cmds/php/phpt_cmd.rs:162— rtk::cmds::php::phpt_cmd::parse has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::dotnet::binlog::parse_build_from_text (cyclomatic 32) src/cmds/dotnet/binlog.rs:644— rtk::cmds::dotnet::binlog::parse_build_from_text has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::js::lint_cmd::run (cyclomatic 32) src/cmds/js/lint_cmd.rs:102— rtk::cmds::js::lint_cmd::run has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::core::toml_filter::apply_filter_with_info (cyclomatic 31) src/core/toml_filter.rs:579— rtk::core::toml_filter::apply_filter_with_info has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rtk::cmds::python::pytest_cmd::filter_pytest_output (cyclomatic 31) REDACTED:77— rtk::cmds::python::pytest_cmd::filter_pytest_output has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Hotspot: src/main.rs src/main.rs:2055— src/main.rs changed 59 times in last 90 days, max cyclomatic complexity 267 in rtk::run_cli at line 2055. 27 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/git/diff_cmd.rs src/cmds/git/diff_cmd.rs:2123— src/cmds/git/diff_cmd.rs changed 34 times in last 90 days, max cyclomatic complexity 117 in rtk::cmds::git::diff_cmd::condense_unified_diff_strict at line 2123. 24 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/git/diff_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/discover/registry.rs src/discover/registry.rs:1619— src/discover/registry.rs changed 69 times in last 90 days, max cyclomatic complexity 49 in rtk::discover::registry::rewrite_segment_inner at line 1619. 40 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/discover/registry.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/git/git_cmd.rs src/cmds/git/git_cmd.rs:1373— src/cmds/git/git_cmd.rs changed 77 times in last 90 days, max cyclomatic complexity 29 in rtk::cmds::git::git_cmd::compact_diff at line 1373. 2 of those changes were fix/bug commits, and the other 75 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/git/git_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/system/search.rs src/cmds/system/search.rs:678— src/cmds/system/search.rs changed 38 times in last 90 days, max cyclomatic complexity 42 in rtk::cmds::system::search::run at line 678. 25 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/system/search.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/rust/cargo_cmd.rs src/cmds/rust/cargo_cmd.rs:1279— src/cmds/rust/cargo_cmd.rs changed 31 times in last 90 days, max cyclomatic complexity 40 in rtk::cmds::rust::cargo_cmd::filter_cargo_clippy at line 1279. 16 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/rust/cargo_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/core/runner.rs src/core/runner.rs:876— src/core/runner.rs changed 18 times in last 90 days, max cyclomatic complexity 51 in rtk::core::runner::extract_test_summary at line 876. 14 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/runner.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/core/stream.rs src/core/stream.rs:425— src/core/stream.rs changed 17 times in last 90 days, max cyclomatic complexity 50 in rtk::core::stream::run_streaming at line 425. 13 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/stream.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/dotnet/dotnet_cmd.rs src/cmds/dotnet/dotnet_cmd.rs:1252— src/cmds/dotnet/dotnet_cmd.rs changed 36 times in last 90 days, max cyclomatic complexity 21 in rtk::cmds::dotnet::dotnet_cmd::format_test_output at line 1252. 19 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/dotnet/dotnet_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/core/arg_tokenizer.rs src/core/arg_tokenizer.rs:366— src/core/arg_tokenizer.rs changed 30 times in last 90 days, max cyclomatic complexity 23 in rtk::core::arg_tokenizer::tokenize_scan at line 366. 14 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/arg_tokenizer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/core/toml_filter.rs src/core/toml_filter.rs:579— src/core/toml_filter.rs changed 21 times in last 90 days, max cyclomatic complexity 31 in rtk::core::toml_filter::apply_filter_with_info at line 579. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/toml_filter.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/discover/lexer.rs src/discover/lexer.rs:100— src/discover/lexer.rs changed 14 times in last 90 days, max cyclomatic complexity 42 in rtk::discover::lexer::tokenize_inner at line 100. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/discover/lexer.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/analytics/gain.rs src/analytics/gain.rs:15— src/analytics/gain.rs changed 13 times in last 90 days, max cyclomatic complexity 38 in rtk::analytics::gain::run at line 15. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/analytics/gain.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/cloud/aws_cmd.rs src/cmds/cloud/aws_cmd.rs:48— src/cmds/cloud/aws_cmd.rs changed 9 times in last 90 days, max cyclomatic complexity 53 in rtk::cmds::cloud::aws_cmd::run at line 48. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/cloud/aws_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/jvm/mvn_cmd.rs src/cmds/jvm/mvn_cmd.rs:592— src/cmds/jvm/mvn_cmd.rs changed 17 times in last 90 days, max cyclomatic complexity 27 in SurefireBlock::step at line 592. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/jvm/mvn_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/scala/sbt_cmd.rs src/cmds/scala/sbt_cmd.rs:189— src/cmds/scala/sbt_cmd.rs changed 9 times in last 90 days, max cyclomatic complexity 40 in rtk::cmds::scala::sbt_cmd::filter_sbt_test at line 189. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/scala/sbt_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/core/retriever.rs src/core/retriever.rs:633— src/core/retriever.rs changed 19 times in last 90 days, max cyclomatic complexity 18 in rtk::core::retriever::run_recall at line 633. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/retriever.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/system/find_cmd.rs src/cmds/system/find_cmd.rs:622— src/cmds/system/find_cmd.rs changed 21 times in last 90 days, max cyclomatic complexity 15 in rtk::cmds::system::find_cmd::render at line 622. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/system/find_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/discover/mod.rs src/discover/mod.rs:258— src/discover/mod.rs changed 12 times in last 90 days, max cyclomatic complexity 26 in rtk::discover::run at line 258. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/discover/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/hooks/permissions.rs src/hooks/permissions.rs:71— src/hooks/permissions.rs changed 20 times in last 90 days, max cyclomatic complexity 15 in rtk::hooks::permissions::check_command_with_rules at line 71. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/hooks/permissions.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/js/lint_cmd.rs src/cmds/js/lint_cmd.rs:102— src/cmds/js/lint_cmd.rs changed 7 times in last 90 days, max cyclomatic complexity 32 in rtk::cmds::js::lint_cmd::run at line 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/js/lint_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/js/tsc_cmd.rs src/cmds/js/tsc_cmd.rs:244— src/cmds/js/tsc_cmd.rs changed 10 times in last 90 days, max cyclomatic complexity 20 in rtk::cmds::js::tsc_cmd::filter_tsc_output at line 244. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/js/tsc_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/php/phpt_cmd.rs src/cmds/php/phpt_cmd.rs:162— src/cmds/php/phpt_cmd.rs changed 6 times in last 90 days, max cyclomatic complexity 33 in rtk::cmds::php::phpt_cmd::parse at line 162. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/php/phpt_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/system/pipe_cmd.rs src/cmds/system/pipe_cmd.rs:12— src/cmds/system/pipe_cmd.rs changed 7 times in last 90 days, max cyclomatic complexity 24 in rtk::cmds::system::pipe_cmd::resolve_filter at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/system/pipe_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/cmds/go/go_cmd.rs src/cmds/go/go_cmd.rs:294— src/cmds/go/go_cmd.rs changed 4 times in last 90 days, max cyclomatic complexity 39 in rtk::cmds::go::go_cmd::filter_go_test_json at line 294. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/go/go_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FunctionTooLong: rtk::run_cli src/main.rs:2055— FunctionTooLong — rtk::run_cli runs 981 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 881 over it, 9.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::git::diff_cmd::condense_unified_diff_strict src/cmds/git/diff_cmd.rs:2123— FunctionTooLong — rtk::cmds::git::diff_cmd::condense_unified_diff_strict runs 398 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 298 over it, 3.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::analytics::gain::run src/analytics/gain.rs:15— FunctionTooLong — rtk::analytics::gain::run runs 250 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 150 over it, 2.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::discover::run src/discover/mod.rs:258— FunctionTooLong — rtk::discover::run runs 211 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 111 over it, 2.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::discover::lexer::tokenize_inner src/discover/lexer.rs:100— FunctionTooLong — rtk::discover::lexer::tokenize_inner runs 195 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::core::stream::run_streaming src/core/stream.rs:425— FunctionTooLong — rtk::core::stream::run_streaming runs 189 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::system::search::run src/cmds/system/search.rs:678— FunctionTooLong — rtk::cmds::system::search::run runs 168 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::hooks::init::uninstall_with_patch_mode src/hooks/init/mod.rs:844— FunctionTooLong — rtk::hooks::init::uninstall_with_patch_mode runs 162 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::hooks::init::show_claude_config src/hooks/init/mod.rs:1428— FunctionTooLong — rtk::hooks::init::show_claude_config runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::dotnet::binlog::parse_build_from_text src/cmds/dotnet/binlog.rs:644— FunctionTooLong — rtk::cmds::dotnet::binlog::parse_build_from_text runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::git::git_cmd::run_show src/cmds/git/git_cmd.rs:437— FunctionTooLong — rtk::cmds::git::git_cmd::run_show runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::scala::sbt_cmd::filter_sbt_test src/cmds/scala/sbt_cmd.rs:189— FunctionTooLong — rtk::cmds::scala::sbt_cmd::filter_sbt_test runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::rust::cargo_cmd::filter_cargo_nextest src/cmds/rust/cargo_cmd.rs:633— FunctionTooLong — rtk::cmds::rust::cargo_cmd::filter_cargo_nextest runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::dotnet::dotnet_trx::parse_trx_content src/cmds/dotnet/dotnet_trx.rs:207— FunctionTooLong — rtk::cmds::dotnet::dotnet_trx::parse_trx_content runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::cloud::aws_cmd::run src/cmds/cloud/aws_cmd.rs:48— FunctionTooLong — rtk::cmds::cloud::aws_cmd::run runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::system::search::extract_pattern_path src/cmds/system/search.rs:187— FunctionTooLong — rtk::cmds::system::search::extract_pattern_path runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::python::sqlfluff_cmd::render_lint_json src/cmds/python/sqlfluff_cmd.rs:161— FunctionTooLong — rtk::cmds::python::sqlfluff_cmd::render_lint_json runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::git::git_cmd::run_stash src/cmds/git/git_cmd.rs:3324— FunctionTooLong — rtk::cmds::git::git_cmd::run_stash runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::go::go_cmd::filter_go_test_json src/cmds/go/go_cmd.rs:294— FunctionTooLong — rtk::cmds::go::go_cmd::filter_go_test_json runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::rust::cargo_cmd::filter_cargo_install src/cmds/rust/cargo_cmd.rs:441— FunctionTooLong — rtk::cmds::rust::cargo_cmd::filter_cargo_install runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::git::git_cmd::compact_diff src/cmds/git/git_cmd.rs:1373— FunctionTooLong — rtk::cmds::git::git_cmd::compact_diff runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::rust::cargo_cmd::filter_cargo_clippy src/cmds/rust/cargo_cmd.rs:1279— FunctionTooLong — rtk::cmds::rust::cargo_cmd::filter_cargo_clippy runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::dotnet::dotnet_cmd::format_test_output src/cmds/dotnet/dotnet_cmd.rs:1252— FunctionTooLong — rtk::cmds::dotnet::dotnet_cmd::format_test_output runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::cmds::python::mypy_cmd::filter_mypy_output src/cmds/python/mypy_cmd.rs:54— FunctionTooLong — rtk::cmds::python::mypy_cmd::filter_mypy_output runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rtk::core::runner::extract_test_summary src/core/runner.rs:876— FunctionTooLong — rtk::core::runner::extract_test_summary runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: src/main.rs src/main.rs— FileTooLong — 2138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1638 over it, 4.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: git/git_cmd.rs src/cmds/git/git_cmd.rs— FileTooLong — 2111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 104 free functions. The bar is 500 significant lines; this is 1611 over it, 4.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: git/diff_cmd.rs src/cmds/git/diff_cmd.rs— FileTooLong — 1322 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 822 over it, 2.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: discover/registry.rs src/discover/registry.rs— FileTooLong — 1195 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 65 free functions. The bar is 500 significant lines; this is 695 over it, 2.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: init/mod.rs src/hooks/init/mod.rs— FileTooLong — 1121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 38 free functions. The bar is 500 significant lines; this is 621 over it, 2.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cloud/aws_cmd.rs src/cmds/cloud/aws_cmd.rs— FileTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 35 free functions. The bar is 500 significant lines; this is 525 over it, 2.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/tracking.rs src/core/tracking.rs— FileTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 63% of them inside a single declaration: Tracker (2 blocks, 93-1578). The bar is 500 significant lines; this is 474 over it, 1.95× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: rust/cargo_cmd.rs src/cmds/rust/cargo_cmd.rs— FileTooLong — 937 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 437 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dotnet/dotnet_cmd.rs src/cmds/dotnet/dotnet_cmd.rs— FileTooLong — 924 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 59 free functions. The bar is 500 significant lines; this is 424 over it, 1.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dotnet/binlog.rs src/cmds/dotnet/binlog.rs— FileTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 321 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: jvm/mvn_cmd.rs src/cmds/jvm/mvn_cmd.rs— FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 270 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: git/gh_cmd.rs src/cmds/git/gh_cmd.rs— FileTooLong — 736 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 44 free functions. The bar is 500 significant lines; this is 236 over it, 1.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: system/search.rs src/cmds/system/search.rs— FileTooLong — 729 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 229 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: git/glab_cmd.rs src/cmds/git/glab_cmd.rs— FileTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 39 free functions. The bar is 500 significant lines; this is 143 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: analytics/gain.rs src/analytics/gain.rs— FileTooLong — 638 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 138 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/runner.rs src/core/runner.rs— FileTooLong — 631 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 131 over it, 1.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hooks/hook_cmd.rs src/hooks/hook_cmd.rs— FileTooLong — 611 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 46 free functions. The bar is 500 significant lines; this is 111 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: init/pi.rs src/hooks/init/pi.rs— FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 106 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: analytics/cc_economics.rs src/analytics/cc_economics.rs— FileTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 81 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cloud/container.rs src/cmds/cloud/container.rs— FileTooLong — 578 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 78 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: init/codex.rs src/hooks/init/codex.rs— FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 59 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: core/retriever.rs src/core/retriever.rs— FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 35 free functions. The bar is 500 significant lines; this is 55 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: system/ctest_cmd.rs src/cmds/system/ctest_cmd.rs— FileTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 54 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: system/find_cmd.rs src/cmds/system/find_cmd.rs— FileTooLong — 550 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 50 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Repeated repair: src/hooks/hook_cmd.rs src/hooks/hook_cmd.rs:182— src/hooks/hook_cmd.rs changed 57 times in last 90 days and 36 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is rtk::hooks::hook_cmd::heal_legacy_hook_file at line 182), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): address Trae portability and partial install diagnostics”; “fix(hooks): honor audit directory override for portable Trae tests”; “fix(codex): use shared hook decisions and preserve audit reasons”; “fix(codex): adapt upstream changes and explain sandbox tracking access”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/hooks/hook_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/core/utils.rs src/core/utils.rs:449— src/core/utils.rs changed 26 times in last 90 days and 18 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is rtk::core::utils::tool_exec at line 449), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(core): quote child arguments so MSYS children receive them intact”; “fix(recall): byte-faithful --grep, cached store connection, serialized env tests”; “fix(js): correct bun and deno runtime behavior”; “fix(js): keep each caller's behavior for a missing tool”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/utils.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/core/tracking.rs src/core/tracking.rs:1581— src/core/tracking.rs changed 26 times in last 90 days and 16 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is rtk::core::tracking::categorize_command at line 1581), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(tracking): keep the user's arguments out of the telemetry command label”; “fix(tracking): align the telemetry rates with rtk gain and pin them in memory”; “fix(telemetry): let savings assertions tolerate honest negative savings”; “fix(tracking): record negative savings instead of clamping to zero”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/tracking.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/core/tee.rs src/core/tee.rs:31— src/core/tee.rs changed 19 times in last 90 days and 14 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is rtk::core::tee::tee_and_hint_with at line 31), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(recall): keep tee mode free of any sqlite artifact”; “fix(git): harden blob-show decode, metrics, recovery, and stderr (review non-blockers)”; “fix(recall): keep legacy tee always semantics, sqlite stays failure driven”; “fix(recall): hidden-lines hint reflects what recall can actually return”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/tee.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/go/golangci_cmd.rs src/cmds/go/golangci_cmd.rs:342— src/cmds/go/golangci_cmd.rs changed 23 times in last 90 days and 12 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is rtk::cmds::go::golangci_cmd::filter_golangci_json at line 342), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(git,search,go,dotnet): adapt the consumers tuned to the old parse”; “fix(dotnet,go,search): make the probes and lists say what they mean”; “fix(search,git,go): honour the engines' own flag arbitration”; “fix(git,search,go): drop the header's rival flags instead of outranking them”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/go/golangci_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/js/bun_cmd.rs src/cmds/js/bun_cmd.rs:31— src/cmds/js/bun_cmd.rs changed 15 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is rtk::cmds::js::bun_cmd::filter_bun_pkg at line 31), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(js): correct bun and deno runtime behavior”; “fix(js): run tools through the runner the user named”; “fix(js): correct bun and deno filtering, routing, and accounting”; “fix(bun): route pkg and pm ls through the core runner”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/js/bun_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/core/telemetry.rs src/core/telemetry.rs:33— src/core/telemetry.rs changed 12 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is rtk::core::telemetry::maybe_ping at line 33), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(telemetry): drop the stale >= 0 floor on the signed saved-token sums”; “fix(telemetry): let savings assertions tolerate honest negative savings”; “revert(recall): drop tee_on_success, recovery stays failure and truncation driven”; “fix(recall): review nits — literal-grep note, dead aws hint branch, doc drift, sorted families”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/telemetry.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/hooks/hook_check.rs src/hooks/hook_check.rs:26— src/hooks/hook_check.rs changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is rtk::hooks::hook_check::status at line 26), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): reach deployed hooks with the host scrub, and pin it”; “fix: scope suppress_hook_warning to missing hooks and parse the env override”; “fix(init,utils): propagate Gemini settings parse errors, add from_json_str wrapper”; “fix(security): store history db, tee logs and audit log owner-only”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/hooks/hook_check.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/system/ctest_cmd.rs src/cmds/system/ctest_cmd.rs:132— src/cmds/system/ctest_cmd.rs changed 9 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is rtk::cmds::system::ctest_cmd::dashboard_action_changes_output at line 132), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(recall): adapt upstream ctest/ls/tsc integration after rebase”; “fix(ctest): validate the summary, keep reasons and trailers intact, size the caps”; “fix(ctest): take the run total from the first result line and keep unparsed failures”; “fix(ctest): validate result lines by run total and bypass dashboard modes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/system/ctest_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/core/config.rs src/core/config.rs:339— src/core/config.rs changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is Config::migrate_legacy_tee at line 339), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: scope suppress_hook_warning to missing hooks and parse the env override”; “fix(recall): keep tee mode free of any sqlite artifact”; “fix(recall): keep legacy tee always semantics, sqlite stays failure driven”; “fix(config): single shared legacy-tee mapping for load and config recall”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/config.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/js/deno_cmd.rs src/cmds/js/deno_cmd.rs:23— src/cmds/js/deno_cmd.rs changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is rtk::cmds::js::deno_cmd::run_filtered_subcmd at line 23), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(js): correct bun and deno runtime behavior”; “fix(js): correct bun and deno filtering, routing, and accounting”; “fix(deno): route lint/check through core runner”; “fix(runner): parse current deno test output format”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/js/deno_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/hooks/integrity.rs src/hooks/integrity.rs:208— src/hooks/integrity.rs changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is rtk::hooks::integrity::report_hook_status at line 208), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(init,utils): propagate Gemini settings parse errors, add from_json_str wrapper”; “fix(security): address followup review comments on private-file hardening”; “fix(security): create data files owner-only instead of chmod after write”; “fix(init): strip UTF-8 BOM when parsing hand-edited JSON config files”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/hooks/integrity.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/php/pint_cmd.rs src/cmds/php/pint_cmd.rs:36— src/cmds/php/pint_cmd.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is rtk::cmds::php::pint_cmd::run at line 36), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ruff): bypass never_worse only for the format rtk injected”; “fmt: fix line length in pint_cmd.rs”; “fix: allow clean-run summaries to bypass never_worse guard for injected JSON”; “fix(php): default pint applied_fixers when key is absent”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/php/pint_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/hooks/mod.rs src/hooks/mod.rs:25— src/hooks/mod.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is rtk::hooks::is_rtk_hook_command at line 25), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): address Trae portability and partial install diagnostics”; “fix(codex): adapt upstream changes and explain sandbox tracking access”; “fix(hooks): address Codex integration review feedback”; “fix(hooks): route rtk hook check through the real decision”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/hooks/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/rust/runner.rs src/cmds/rust/runner.rs:13— src/cmds/rust/runner.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is rtk::cmds::rust::runner::run_err at line 13), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): answer for a program that cannot run, not just an unresolvable name”; “fix(cli)!: preserve argv boundaries in generic runners”; “fix(js): correct bun and deno filtering, routing, and accounting”; “fix(runner): parse current deno test output format”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/rust/runner.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/system/read.rs src/cmds/system/read.rs:11— src/cmds/system/read.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is rtk::cmds::system::read::run at line 11), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(read): stop the head window reading past the lines it was asked for”; “fix(read): preserve non-UTF-8 head and tail windows”; “fix(read): make head/tail rewrites faithful to the native commands”; “fix(core): decode per line, cover OEM code pages, and centralize on exec_capture”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/system/read.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/core/telemetry_cmd.rs src/core/telemetry_cmd.rs:197— src/core/telemetry_cmd.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is rtk::core::telemetry_cmd::run_forget at line 197), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(telemetry): treat an empty RTK_TELEMETRY_URL as no endpoint”; “fix(telemetry): label the missing salt by the gate that actually fired”; “fix(telemetry): distinguish "consent not given" from missing salt in status (#1656)”; “test(telemetry): move env opt-out regression test”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/core/telemetry_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/discover/report.rs src/discover/report.rs:149— src/discover/report.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is rtk::discover::report::format_text at line 149), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(discover): address /code-review max findings (correctly-scoped rerun)”; “fix(discover): address code-review findings on the prior fixup”; “fix(discover): address hook-decision-log review findings”; “fix(discover): log real hook decisions instead of guessing coverage retroactively”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/discover/report.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/hooks/decision.rs src/hooks/decision.rs:278— src/hooks/decision.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is AgentPath::lookup at line 278), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hooks): reach deployed hooks with the host scrub, and pin it”; “fix(openclaw): let the host own approval without losing RTK's gates”; “fix(codex): use shared hook decisions and preserve audit reasons”; “fix(hooks): route rtk hook check through the real decision”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/hooks/decision.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/js/npm_cmd.rs src/cmds/js/npm_cmd.rs:177— src/cmds/js/npm_cmd.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is rtk::cmds::js::npm_cmd::filter_npm_output at line 177), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(tracking): keep the user's arguments out of the telemetry command label”; “fix(js): correct bun and deno runtime behavior”; “fix(js): correct bun and deno filtering, routing, and accounting”; “fix(npm): recognize extended subcommands”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/js/npm_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/analytics/session_cmd.rs src/analytics/session_cmd.rs:62— src/analytics/session_cmd.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is rtk::analytics::session_cmd::run at line 62), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(analytics): stop counting rtk proxy as adopted rtk usage”; “fix(discover): log real hook decisions instead of guessing coverage retroactively”; “fix(analytics): floor prefix slices to char boundary instead of full-string fallback”; “fix(analytics): truncate display strings on UTF-8 char boundaries”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/analytics/session_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/cmds/php/phpstan_cmd.rs src/cmds/php/phpstan_cmd.rs:138— src/cmds/php/phpstan_cmd.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is rtk::cmds::php::phpstan_cmd::filter_phpstan_json at line 138), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(php): detect phpstan analyse after global flags; avoid duplicate format”; “fix(php): address phpstan review feedback (resolution, text fallback, path compaction)”; “fix(php): align pint/phpstan parsers with current tool schemas”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-06-28..2026-09-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-28 23:26:25 +02:00' --until='2026-09-26 23:26:25 +02:00' --full-history --no-merges -- src/cmds/php/phpstan_cmd.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Duplicated block (5 lines × 2) src/cmds/git/gh_cmd.rs:104— src/cmds/git/gh_cmd.rs:104-108 | src/cmds/git/glab_cmd.rs:109-113 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/cmds/git/gh_cmd.rs:262— src/cmds/git/gh_cmd.rs:262-266 | src/cmds/git/gh_cmd.rs:680-684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cmds/js/lint_cmd.rs:444— src/cmds/js/lint_cmd.rs:444-448 | src/cmds/python/ruff_cmd.rs:202-206 — before extracting anything, compare `src/cmds/js/lint_cmd.rs` and `src/cmds/python/ruff_cmd.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/cmds/js/tsc_cmd.rs:44— src/cmds/js/tsc_cmd.rs:44-48 | src/cmds/js/tsc_cmd.rs:52-56 — both copies are in the same file, so extract the block into 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/cmds/system/find_cmd.rs:710— src/cmds/system/find_cmd.rs:710-714 | src/hooks/hook_audit_cmd.rs:164-168 — 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/core/retriever.rs:324— src/core/retriever.rs:324-328 | src/core/retriever.rs: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/cmds/git/glab_cmd.rs:319— src/cmds/git/glab_cmd.rs:319-323 | src/cmds/git/glab_cmd.rs:549-553 — both copies are in the same file, so extract the block into 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/cmds/system/log_cmd.rs:136— src/cmds/system/log_cmd.rs:136-141 | src/cmds/system/log_cmd.rs:179-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cmds/git/gh_cmd.rs:752— src/cmds/git/gh_cmd.rs:752-756 | src/cmds/git/glab_cmd.rs:609-613 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/cmds/git/diff_cmd.rs:2430— src/cmds/git/diff_cmd.rs:2430-2434 | src/cmds/git/diff_cmd.rs:2440-2444 — both copies are in the same file, so extract the block into 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/core/telemetry.rs:510— src/core/telemetry.rs:510-514 | src/core/telemetry.rs:520-524 — both copies are in the same file, so extract the block into 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/cmds/git/glab_cmd.rs:358— src/cmds/git/glab_cmd.rs:358-362 | src/cmds/git/glab_cmd.rs:595-599 — both copies are in the same file, so extract the block into 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/cmds/cloud/aws_cmd.rs:636— src/cmds/cloud/aws_cmd.rs:636-646 | src/cmds/cloud/aws_cmd.rs:661-671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/cmds/dotnet/dotnet_cmd.rs:163— src/cmds/dotnet/dotnet_cmd.rs:163-173 | src/cmds/dotnet/dotnet_cmd.rs:193-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/cmds/git/git_cmd.rs:2546— src/cmds/git/git_cmd.rs:2546-2556 | src/cmds/git/git_cmd.rs:2997-3007 — both copies are in the same file, so extract the block into 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/cmds/js/tsc_cmd.rs:324— src/cmds/js/tsc_cmd.rs:324-334 | src/cmds/python/mypy_cmd.rs:179-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) src/core/stream.rs:615— src/core/stream.rs:615-625 | src/core/stream.rs:640-650 — both copies are in the same file, so extract the block into 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/hooks/hook_cmd.rs:273— src/hooks/hook_cmd.rs:273-283 | src/hooks/hook_cmd.rs:340-350 — both copies are in the same file, so extract the block into 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/cmds/js/playwright_cmd.rs:290— src/cmds/js/playwright_cmd.rs:290-300 | src/cmds/js/pnpm_cmd.rs:455-465 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) src/cmds/git/gh_cmd.rs:180— src/cmds/git/gh_cmd.rs:180-190 | src/cmds/git/glab_cmd.rs:249-259 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) src/cmds/js/prisma_cmd.rs:417— src/cmds/js/prisma_cmd.rs:417-427 | src/cmds/js/prisma_cmd.rs:434-444 — both copies are in the same file, so extract the block into 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/cmds/cloud/container.rs:169— src/cmds/cloud/container.rs:169-177 | src/cmds/cloud/container.rs:181-191 — both copies are in the same file, so extract the block into 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/cmds/system/local_llm.rs:207— src/cmds/system/local_llm.rs:207-215 | src/cmds/system/local_llm.rs:221-229 — both copies are in the same file, so extract the block into 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/hooks/init/agents_md.rs:125— src/hooks/init/agents_md.rs:125-133 | src/hooks/init/agents_md.rs:316-324 — both copies are in the same file, so extract the block into 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/main.rs:3310— src/main.rs:3310-3318 | src/main.rs:3332-3340 — both copies are in the same file, so extract the block into 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/hooks/init/instructions_agents.rs:26— src/hooks/init/instructions_agents.rs:26-34 | src/hooks/init/instructions_agents.rs:73-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/cmds/php/phpstan_cmd.rs:225— src/cmds/php/phpstan_cmd.rs:225-233 | src/cmds/ruby/rubocop_cmd.rs:233-241 — 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/analytics/cc_economics.rs:614— src/analytics/cc_economics.rs:614-622 | src/analytics/cc_economics.rs:645-653 — both copies are in the same file, so extract the block into 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/core/tracking.rs:1503— src/core/tracking.rs:1503-1511 | src/core/tracking.rs:1559-1567 — both copies are in the same file, so extract the block into 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/cmds/system/summary.rs:131— src/cmds/system/summary.rs:131-139 | src/cmds/system/summary.rs:181-189 — both copies are in the same file, so extract the block into 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/cmds/go/go_cmd.rs:589— src/cmds/go/go_cmd.rs:589-594 | src/cmds/go/go_cmd.rs:626-631 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/cmds/js/tsc_cmd.rs:349— src/cmds/js/tsc_cmd.rs:349-355 | src/cmds/python/mypy_cmd.rs:193-198 — 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) REDACTED:81— REDACTED:81-86 | src/cmds/ruby/rake_cmd.rs:108-113 — 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/cmds/rust/cargo_cmd.rs:1029— src/cmds/rust/cargo_cmd.rs:1029-1034 | src/cmds/rust/cargo_cmd.rs:1403-1408 — both copies are in the same file, so extract the block into 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/main.rs:3298— src/main.rs:3298-3303 | src/main.rs:3320-3325 — both copies are in the same file, so extract the block into 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/cmds/git/gh_cmd.rs:167— src/cmds/git/gh_cmd.rs:167-172 | src/cmds/git/glab_cmd.rs:219-224 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/cmds/git/git_cmd.rs:2961— src/cmds/git/git_cmd.rs:2961-2966 | src/cmds/git/git_cmd.rs:2967-2972 — both copies are in the same file, so extract the block into 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/cmds/system/ctest_cmd.rs:574— src/cmds/system/ctest_cmd.rs:574-579 | src/cmds/system/ctest_cmd.rs:785-790 — both copies are in the same file, so extract the block into 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/cmds/git/gh_cmd.rs:367— src/cmds/git/gh_cmd.rs:367-372 | src/cmds/git/gh_cmd.rs:739-744 — both copies are in the same file, so extract the block into 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/cmds/python/ruff_cmd.rs:367— src/cmds/python/ruff_cmd.rs:367-374 | src/cmds/system/format_cmd.rs:279-286 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/cmds/git/glab_cmd.rs:439— src/cmds/git/glab_cmd.rs:439-446 | src/cmds/git/glab_cmd.rs:642-649 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/cmds/git/git_cmd.rs:294— src/cmds/git/git_cmd.rs:294-305 | src/cmds/git/git_cmd.rs:489-496 — both copies are in the same file, so extract the block into 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/cmds/dotnet/dotnet_cmd.rs:1151— src/cmds/dotnet/dotnet_cmd.rs:1151-1158 | src/cmds/dotnet/dotnet_cmd.rs:1178-1185 — both copies are in the same file, so extract the block into 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/discover/registry.rs:1351— src/discover/registry.rs:1351-1358 | src/discover/registry.rs:1375-1382 — both copies are in the same file, so extract the block into 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/cmds/go/golangci_cmd.rs:389— src/cmds/go/golangci_cmd.rs:389-396 | src/cmds/js/lint_cmd.rs:302-309 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/cmds/git/gh_cmd.rs:457— src/cmds/git/gh_cmd.rs:457-464 | src/cmds/git/gh_cmd.rs:858-865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/cmds/git/gh_cmd.rs:405— src/cmds/git/gh_cmd.rs:405-418 | src/cmds/git/gh_cmd.rs:621-634 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/cmds/system/read.rs:291— src/cmds/system/read.rs:291-304 | src/core/retriever.rs:124-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) src/discover/lexer.rs:175— src/discover/lexer.rs:175-188 | src/discover/lexer.rs:214-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/hooks/init/agents_md.rs:155— src/hooks/init/agents_md.rs:155-168 | src/hooks/init/claude.rs:87-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 2) src/core/tracking.rs:987— src/core/tracking.rs:987-1001 | src/core/tracking.rs:1018-1031 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/cmds/php/paratest_cmd.rs:12— src/cmds/php/paratest_cmd.rs:12-25 | src/cmds/php/pest_cmd.rs:12-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) src/cmds/js/prisma_cmd.rs:251— src/cmds/js/prisma_cmd.rs:251-257 | src/cmds/js/prisma_cmd.rs:321-327 — both copies are in the same file, so extract the block into 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/cmds/git/glab_cmd.rs:426— src/cmds/git/glab_cmd.rs:426-433 | src/cmds/git/glab_cmd.rs:630-636 — both copies are in the same file, so extract the block into 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/cmds/system/env_cmd.rs:83— src/cmds/system/env_cmd.rs:83-89 | src/cmds/system/env_cmd.rs:90-96 — both copies are in the same file, so extract the block into 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/cmds/cloud/aws_cmd.rs:1287— src/cmds/cloud/aws_cmd.rs:1287-1293 | src/cmds/cloud/aws_cmd.rs:1331-1337 — both copies are in the same file, so extract the block into 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/cmds/cloud/container.rs:103— src/cmds/cloud/container.rs:103-109 | src/cmds/cloud/container.rs:199-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/cmds/dotnet/dotnet_cmd.rs:101— src/cmds/dotnet/dotnet_cmd.rs:101-107 | src/cmds/go/go_cmd.rs:155-161 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) src/cmds/dotnet/binlog.rs:760— src/cmds/dotnet/binlog.rs:760-771 | src/cmds/dotnet/binlog.rs:785-796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/cmds/git/gh_cmd.rs:689— src/cmds/git/gh_cmd.rs:689-700 | src/cmds/git/glab_cmd.rs:558-569 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/hooks/init/mod.rs:475— src/hooks/init/mod.rs:475-486 | src/hooks/init/mod.rs:501-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/cmds/dotnet/dotnet_trx.rs:297— src/cmds/dotnet/dotnet_trx.rs:297-308 | src/cmds/dotnet/dotnet_trx.rs:310-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/hooks/init/copilot.rs:77— src/hooks/init/copilot.rs:77-91 | src/hooks/init/copilot.rs:207-218 — both copies are in the same file, so extract the block into 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/cmds/cloud/container.rs:97— src/cmds/cloud/container.rs:97-101 | src/cmds/cloud/container.rs:169-176 | src/cmds/cloud/container.rs:181-190 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) src/cmds/js/lint_cmd.rs:330— src/cmds/js/lint_cmd.rs:330-334 | src/cmds/js/lint_cmd.rs:455-460 | src/cmds/python/ruff_cmd.rs:212-217 — before extracting anything, compare `src/cmds/js/lint_cmd.rs` and `src/cmds/python/ruff_cmd.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) src/cmds/js/lint_cmd.rs:528— src/cmds/js/lint_cmd.rs:528-532 | src/cmds/python/ruff_cmd.rs:361-365 | src/cmds/system/format_cmd.rs:273-277 — before extracting anything, compare `src/cmds/js/lint_cmd.rs` and `src/cmds/python/ruff_cmd.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) src/core/tracking.rs:1078— src/core/tracking.rs:1078-1082 | src/core/tracking.rs:1152-1156 | src/core/tracking.rs:1226-1230 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) src/main.rs:2841— src/main.rs:2841-2845 | src/main.rs:2847-2851 | src/main.rs:2854-2858 — 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.
TodoComment src/cmds/git/git_cmd.rs:854— // TODO(after #3681): replace this short-cluster walk with the ValueSpec factorization;
TodoComment src/cmds/git/git_cmd.rs:976— // TODO(after #3681): once ValueSpec factorization lands, a flag pre-filter can avoid
TodoComment src/cmds/system/pipe_cmd.rs:642— // TODO: grep pipe filter below 60% target — improve grouping — 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/cmds/system/pipe_cmd.rs:665— // TODO: find pipe filter below 60% target — improve grouping — 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.
Duplicated block (15 lines × 2) src/cmds/js/lint_cmd.rs:305— src/cmds/js/lint_cmd.rs:305-319 | src/cmds/js/lint_cmd.rs:429-443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/core/telemetry_cmd.rs:164— src/core/telemetry_cmd.rs:164-178 | src/hooks/init/mod.rs:780-794 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) src/cmds/php/ecs_cmd.rs:46— src/cmds/php/ecs_cmd.rs:46-60 | src/cmds/php/php_cmd.rs:71-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) src/hooks/init/pi.rs:568— src/hooks/init/pi.rs:568-585 | src/hooks/init/pi.rs:811-825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/cmds/git/git_cmd.rs:2438— src/cmds/git/git_cmd.rs:2438-2447 | src/cmds/git/git_cmd.rs:2469-2478 — both copies are in the same file, so extract the block into 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/cmds/system/json_cmd.rs:169— src/cmds/system/json_cmd.rs:169-178 | src/cmds/system/json_cmd.rs:257-266 — both copies are in the same file, so extract the block into 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/analytics/gain.rs:889— src/analytics/gain.rs:889-898 | src/hooks/init/mod.rs:716-725 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) src/cmds/js/lint_cmd.rs:342— src/cmds/js/lint_cmd.rs:342-351 | src/cmds/js/lint_cmd.rs:471-480 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×3
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) src/cmds/git/gh_cmd.rs:244— src/cmds/git/gh_cmd.rs:244-292 | src/cmds/git/gh_cmd.rs:670-710 | src/cmds/git/glab_cmd.rs:299-345 | src/cmds/git/glab_cmd.rs:537-580 — 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/hooks/hook_cmd.rs:63— src/hooks/hook_cmd.rs:63-92 | src/hooks/hook_cmd.rs:691-747 | src/hooks/hook_cmd.rs:802-823 | src/hooks/hook_cmd.rs:923-959 — 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/cmds/system/deps.rs:83— src/cmds/system/deps.rs:83-138 | src/cmds/system/deps.rs:181-208 | src/cmds/system/deps.rs:210-245 | src/cmds/system/deps.rs:247-289 — 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 (9 lines × 3) src/cmds/js/prisma_cmd.rs:60— src/cmds/js/prisma_cmd.rs:60-68 | src/cmds/js/prisma_cmd.rs:115-123 | src/cmds/js/prisma_cmd.rs:157-165 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) src/cmds/system/deps.rs:116— src/cmds/system/deps.rs:116-124 | src/cmds/system/deps.rs:235-243 | src/cmds/system/deps.rs:279-287 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) src/cmds/git/git_cmd.rs:339— src/cmds/git/git_cmd.rs:339-347 | src/cmds/git/git_cmd.rs:634-643 | src/cmds/git/git_cmd.rs:3153-3161 — 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.
ClaudeProvider::extract_commands (cognitive 37) src/discover/provider.rs:167— ClaudeProvider::extract_commands has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (10 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeProvider::discover_sessions_in_projects_dir (cognitive 18) src/discover/provider.rs:55— ClaudeProvider::discover_sessions_in_projects_dir has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DependencyState::format_verbose (cognitive 17) src/parser/formatter.rs:174— DependencyState::format_verbose has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DependencyState::format_compact (cognitive 16) src/parser/formatter.rs:123— DependencyState::format_compact has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassTooLong: Tracker src/core/tracking.rs:93— ClassTooLong — 617 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 2 blocks, lines 93-1578. The bar is 400 significant lines; this is 217 over it, 1.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Commands src/main.rs:93— ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (14–15 lines × 2) src/cmds/cloud/aws_cmd.rs:342— src/cmds/cloud/aws_cmd.rs:342-356 | src/cmds/cloud/aws_cmd.rs:441-454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–15 lines × 2) src/cmds/dotnet/dotnet_trx.rs:232— src/cmds/dotnet/dotnet_trx.rs:232-246 | src/cmds/dotnet/dotnet_trx.rs:272-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–9 lines × 2) src/cmds/git/gh_cmd.rs:436— src/cmds/git/gh_cmd.rs:436-443 | src/cmds/git/glab_cmd.rs:410-418 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 2) src/cmds/git/gh_cmd.rs:757— src/cmds/git/gh_cmd.rs:757-764 | src/cmds/git/glab_cmd.rs:614-622 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) src/analytics/cc_economics.rs:222— src/analytics/cc_economics.rs:222-229 | src/analytics/cc_economics.rs:260-267 | src/analytics/cc_economics.rs:289-296 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) src/cmds/git/git_cmd.rs:2546— src/cmds/git/git_cmd.rs:2546-2553 | src/cmds/git/git_cmd.rs:2997-3004 | src/cmds/git/git_cmd.rs:3134-3141 — 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/cmds/go/golangci_cmd.rs:381— src/cmds/go/golangci_cmd.rs:381-386 | src/cmds/js/lint_cmd.rs:406-411 | src/cmds/python/ruff_cmd.rs:170-175 — before extracting anything, compare `src/cmds/js/lint_cmd.rs` and `src/cmds/python/ruff_cmd.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) src/cmds/js/tsc_cmd.rs:233— src/cmds/js/tsc_cmd.rs:233-238 | src/cmds/js/tsc_cmd.rs:329-334 | src/cmds/python/mypy_cmd.rs:184-189 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 2) src/hooks/hook_cmd.rs:618— src/hooks/hook_cmd.rs:618-630 | src/hooks/hook_cmd.rs:889-901 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/cmds/js/lint_cmd.rs:357— src/cmds/js/lint_cmd.rs:357-369 | src/cmds/python/ruff_cmd.rs:134-146 — before extracting anything, compare `src/cmds/js/lint_cmd.rs` and `src/cmds/python/ruff_cmd.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
SurefireBlock::step (cyclomatic 27) src/cmds/jvm/mvn_cmd.rs:592— SurefireBlock::step has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
runner.run_benchmark (cyclomatic 24) scripts/benchmark-sessions/lib/runner.py:66— runner.run_benchmark has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClaudeProvider::extract_commands (cyclomatic 17) src/discover/provider.rs:167— ClaudeProvider::extract_commands has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TscHandler::format_summary (cyclomatic 16) src/cmds/js/tsc_cmd.rs:157— TscHandler::format_summary has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MinimalFilter::filter (cyclomatic 16) src/core/filter.rs:281— MinimalFilter::filter has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FixmeComment src/main.rs:1850— // FIXME: if filters are present, we should find out which workspaces are selected before running rtk dedicated commands — 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.
SurefireBlock::step (cognitive 42) src/cmds/jvm/mvn_cmd.rs:592— SurefireBlock::step has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 9 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TscHandler::format_summary (cognitive 35) src/cmds/js/tsc_cmd.rs:157— TscHandler::format_summary has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 4 (9 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
runner.run_benchmark (cognitive 32) scripts/benchmark-sessions/lib/runner.py:66— runner.run_benchmark has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 3 (7 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MinimalFilter::filter (cognitive 29) src/core/filter.rs:281— MinimalFilter::filter has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AggressiveFilter::filter (cognitive 24) src/core/filter.rs:368— AggressiveFilter::filter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CargoTestHandler::compute_test_summary (cognitive 21) src/cmds/rust/cargo_cmd.rs:140— CargoTestHandler::compute_test_summary has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFunctions: rtk::core::utils src/core/utils.rs:31— TooManyFunctions — 44 free functions. The bar is 30 free functions; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Tracker src/core/tracking.rs:93— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×1
D4 · Code Duplication· Near-duplicate member family (3 members, 5 shared lines) · ×1
Near-duplicate member family (3 members, 5 shared lines) src/cmds/js/lint_cmd.rs:255— src/cmds/js/lint_cmd.rs:255-351 | src/cmds/js/lint_cmd.rs:354-480 | src/cmds/python/ruff_cmd.rs:131-266 — These 3 members are variants of one another: a block of 5 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) src/cmds/python/ruff_cmd.rs:360— src/cmds/python/ruff_cmd.rs:360-374 | src/cmds/system/format_cmd.rs:272-286 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) src/cmds/cloud/aws_cmd.rs:825— src/cmds/cloud/aws_cmd.rs:825-852 | src/cmds/cloud/aws_cmd.rs:945-982 | src/cmds/cloud/aws_cmd.rs:984-1007 | src/cmds/cloud/aws_cmd.rs:1135-1187 | src/cmds/cloud/aws_cmd.rs:1238-1282 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (60–70 lines × 2) src/cmds/git/gh_cmd.rs:29— src/cmds/git/gh_cmd.rs:29-98 | src/cmds/git/glab_cmd.rs:44-103 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (41 lines × 2) src/hooks/init/copilot.rs:149— src/hooks/init/copilot.rs:149-189 | src/hooks/init/copilot.rs:277-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (31–37 lines × 2) src/cmds/jvm/mvn_cmd.rs:1505— src/cmds/jvm/mvn_cmd.rs:1505-1541 | src/cmds/jvm/mvn_cmd.rs:1623-1653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (30 lines × 2) src/cmds/git/gh_cmd.rs:133— src/cmds/git/gh_cmd.rs:133-162 | src/cmds/git/glab_cmd.rs:185-214 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (29 lines × 2) src/cmds/git/git_cmd.rs:3410— src/cmds/git/git_cmd.rs:3410-3438 | src/cmds/git/git_cmd.rs:3452-3480 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (24–28 lines × 2) src/cmds/jvm/mvn_cmd.rs:1355— src/cmds/jvm/mvn_cmd.rs:1355-1382 | src/cmds/jvm/mvn_cmd.rs:1601-1624 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (26 lines × 2) src/cmds/system/read.rs:98— src/cmds/system/read.rs:98-123 | src/cmds/system/read.rs:177-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 (25 lines × 2) src/hooks/init/claude.rs:374— src/hooks/init/claude.rs:374-398 | src/hooks/init/claude.rs:574-598 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22 lines × 2) src/cmds/system/log_cmd.rs:146— src/cmds/system/log_cmd.rs:146-167 | src/cmds/system/log_cmd.rs:188-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16–17 lines × 2) src/cmds/rust/cargo_cmd.rs:165— src/cmds/rust/cargo_cmd.rs:165-180 | src/cmds/rust/cargo_cmd.rs:1198-1214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/hooks/init/trae.rs:149— src/hooks/init/trae.rs:149-165 | src/hooks/init/trae.rs:301-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/cmds/js/pnpm_cmd.rs:315— src/cmds/js/pnpm_cmd.rs:315-330 | src/cmds/js/pnpm_cmd.rs:340-355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) src/hooks/init/instructions_agents.rs:140— src/hooks/init/instructions_agents.rs:140-155 | src/hooks/init/instructions_agents.rs:199-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–15 lines × 3) src/analytics/cc_economics.rs:202— src/analytics/cc_economics.rs:202-215 | src/analytics/cc_economics.rs:232-246 | src/analytics/cc_economics.rs:270-283 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–15 lines × 2) src/cmds/dotnet/binlog.rs:686— src/cmds/dotnet/binlog.rs:686-698 | src/cmds/dotnet/binlog.rs:1013-1027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 3) src/core/tracking.rs:1099— src/core/tracking.rs:1099-1112 | src/core/tracking.rs:1174-1187 | src/core/tracking.rs:1247-1260 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–14 lines × 2) src/analytics/cc_economics.rs:596— src/analytics/cc_economics.rs:596-608 | src/analytics/cc_economics.rs:634-647 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–14 lines × 2) src/cmds/git/gh_cmd.rs:671— src/cmds/git/gh_cmd.rs:671-682 | src/cmds/git/glab_cmd.rs:538-551 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 4) src/hooks/hook_cmd.rs:68— src/hooks/hook_cmd.rs:68-79 | src/hooks/hook_cmd.rs:694-705 | src/hooks/hook_cmd.rs:804-815 | src/hooks/hook_cmd.rs:931-942 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–12 lines × 2) src/cmds/git/gh_cmd.rs:272— src/cmds/git/gh_cmd.rs:272-283 | src/cmds/git/glab_cmd.rs:328-334 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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–12 lines × 2) src/cmds/js/lint_cmd.rs:331— src/cmds/js/lint_cmd.rs:331-339 | src/cmds/js/lint_cmd.rs:457-468 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 3) src/cmds/rust/cargo_cmd.rs:274— src/cmds/rust/cargo_cmd.rs:274-284 | src/cmds/rust/cargo_cmd.rs:306-316 | src/cmds/rust/cargo_cmd.rs:333-343 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10–11 lines × 2) src/cmds/jvm/mvn_cmd.rs:1308— src/cmds/jvm/mvn_cmd.rs:1308-1317 | src/cmds/jvm/mvn_cmd.rs:1557-1567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 4) src/cmds/git/gh_cmd.rs:276— src/cmds/git/gh_cmd.rs:276-285 | src/cmds/git/gh_cmd.rs:694-702 | src/cmds/git/glab_cmd.rs:328-336 | src/cmds/git/glab_cmd.rs:563-571 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 193 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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/discover/mod.rs:273— src/discover/mod.rs:273-281 | src/learn/mod.rs:27-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 4) src/cmds/python/ruff_cmd.rs:295— src/cmds/python/ruff_cmd.rs:295-303 | src/cmds/system/format_cmd.rs:170-178 | src/cmds/system/format_cmd.rs:183-191 | src/cmds/system/format_cmd.rs:199-207 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6–7 lines × 2) src/core/toml_filter.rs:208— src/core/toml_filter.rs:208-213 | src/core/toml_filter.rs:743-749 — both copies are in the same file, so extract the block into 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 × 4) src/cmds/system/deps.rs:118— src/cmds/system/deps.rs:118-123 | src/cmds/system/deps.rs:201-206 | src/cmds/system/deps.rs:237-242 | src/cmds/system/deps.rs:281-286 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 4) src/hooks/init/instructions_agents.rs:40— src/hooks/init/instructions_agents.rs:40-52 | src/hooks/init/instructions_agents.rs:88-100 | src/hooks/init/instructions_agents.rs:142-154 | src/hooks/init/instructions_agents.rs:201-213 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 5) src/cmds/cloud/aws_cmd.rs:827— src/cmds/cloud/aws_cmd.rs:827-833 | src/cmds/cloud/aws_cmd.rs:947-953 | src/cmds/cloud/aws_cmd.rs:986-992 | src/cmds/cloud/aws_cmd.rs:1137-1143 | src/cmds/cloud/aws_cmd.rs:1240-1246 — 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 (6 lines × 5) src/cmds/cloud/aws_cmd.rs:558— src/cmds/cloud/aws_cmd.rs:558-563 | src/cmds/cloud/aws_cmd.rs:578-583 | src/cmds/cloud/aws_cmd.rs:605-610 | src/cmds/cloud/aws_cmd.rs:634-639 | src/cmds/cloud/aws_cmd.rs:659-664 — 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.
Subsumed condition operand src/cmds/system/summary.rs:148— `lower.contains("failed")` can never decide this `||` — every value satisfying `lower.contains("failed")` also satisfies `lower.contains("fail")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/cmds/ruby/rubocop_cmd.rs:261— `t.contains("no offenses")` can never decide this `||` — every value satisfying `t.contains("no offenses")` also satisfies `t.contains("offense")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/cmds/python/mypy_cmd.rs:140— `output.contains("Success: no issues found")` can never decide this `||` — every value satisfying `output.contains("Success: no issues found")` also satisfies `output.contains("no issues found")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/cmds/jvm/mvn_cmd.rs:3660— `o.contains("MultiFailTest.second")` can never decide this `&&` — every value satisfying `o.contains("at com.example.rtk.MultiFailTest.second(MultiFailTest.java:30)")` also satisfies `o.contains("MultiFailTest.second")`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/cmds/jvm/gradlew_cmd.rs:52— `task.contains("ktlint")` can never decide this `||` — every value satisfying `task.contains("ktlint")` also satisfies `task.contains("lint")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/cmds/js/pnpm_cmd.rs:538— `line.contains("ERROR")` can never decide this `||` — every value satisfying `line.contains("ERROR")` also satisfies `line.contains("ERR")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/cmds/go/go_cmd.rs:557— `lower.contains("unexpected")` can never decide this `||` — every value satisfying `lower.contains("unexpected")` also satisfies `lower.contains("expected")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/cmds/git/glab_cmd.rs:812— `trimmed.starts_with("Running on runner-")` can never decide this `||` — every value satisfying `trimmed.starts_with("Running on runner-")` also satisfies `trimmed.starts_with("Running on ")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 3 significant file(s) lose their only recent owner: scripts/benchmark/lib/vm.ts, scripts/benchmark/lib/test.ts, scripts/benchmark/lib/report.ts. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (6 single-owned of 124 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; 124 of the 157 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
Documentation: no project overview README.md— The opening paragraph is an image caption ('High-performance CLI proxy that cuts up to 90% of the bash output your agent reads') with no description of what RTK does or its scope. Expand the overview to state what RTK is, its main value proposition (up to 90% token savings), and which directories it documents.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 1 of 124 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (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; 124 of the 157 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: src/learn/report.rs. 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.
M2 · Architecture documentation· ADRs not easily discoverable · ×1
ADRs not easily discoverable — 1 ADR-shaped document(s) detected by content — `docs/contributing/ARCHITECTURE.md`. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live — so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
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 01a0dfd6-6c6a-77bc-b28d-609d66579810 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 48 · Warnings: 546 · Recommendations: 18 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-09-2026 @ 22:29 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.