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

rtk-ai/rtk

Measured 14 November 2026, 04:10 UTC, at code version 2a786dc

CAI score 61out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change since the last survey

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

A large codebase: 181,007 lines of product code in 6 projects, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Production Readiness, 56

Findings by how serious they are

49 critical 882 serious 55 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 04:10 UTC

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

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

60of 60 dimensions measured by tools.
962of 986 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
60dimensions across 7 lenses, read from 181,007 lines of product code in 6 projects.
Chapters

Executive summary

rtk-ai/rtk falls short of our standard for production, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 61 out of 100 and is rated Adequate, and 39 of its 49 critical findings are security problems in the build pipeline and in its automatic dependency updates.

Production Readiness, at 56, is the weakest lens and counts most in the score. The best first step is turning on missing-value checks, worth about 3 points. Protecting outgoing calls with timeouts would lift Production Readiness itself, worth about 2 points. Raising Production Readiness to 70 would lift the score to about 64.

Thirty-three pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two pipeline steps install packages that can change without warning, and two secrets can leak from the build pipeline. Pinning each tool to an exact version, pinning what the pipeline installs and limiting each secret to its own step would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and passing outside input through environment variables would deal with the pipeline step that puts outside input straight into a shell command. The five pages or frames without a title need a descriptive title.

The product code is 181,007 lines, about €220,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 56 · counts for 46%Code Health 57 · counts for 25%Security and Compliance 62 · counts for 14%Accessibility 75 · counts for 8%Maturity 87 · counts for 4%Performance 89 · counts for 2%Architecture 94 · counts for 1%

If Production Readiness rose from 56 to 70, the lowest score rated Strong, the score would rise from 61 to about 64.

Code composition: what the lines of code are
Product code 90%Tests 10%
New since the last survey: 212 findings

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

  • Cyclomatic Complexity · rtk::discover::lexer::segment (cyclomatic 20) src/discover/lexer.rs
  • Cognitive Complexity · rtk::discover::lexer::segment (cognitive 31) src/discover/lexer.rs
  • Cognitive Complexity · rtk::cmds::git::git_cmd::fold_ls_tree_paths (cognitive 23) src/cmds/git/git_cmd.rs
  • Cognitive Complexity · rtk::cmds::python::ruff_cmd::route_ruff_args (cognitive 18) src/cmds/python/ruff_cmd.rs
  • God Classes · FunctionTooLong: rtk::cmds::git::git_cmd::run_log src/cmds/git/git_cmd.rs
  • God Classes · TooManyFunctions: rtk::hooks::permissions src/hooks/permissions.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/cmds/git/git_cmd.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/hooks/hook_cmd.rs
  • Code Duplication · Edited copy of a member (93 corresponding lines) proxy/src/ccr_forward.rs
  • Code Duplication · Edited copy of a member (73 corresponding lines) src/cmds/dotnet/dotnet_cmd.rs
  • Code Duplication · Edited copy of a member (100 corresponding lines) src/cmds/jvm/mvn_cmd.rs
  • Code Duplication · Edited copies of one member (3 members, 58+ corresponding lines) src/core/tracking.rs
  • Code Duplication · Edited copy of a member (38 corresponding lines) src/core/task_cmd.rs
  • Code Duplication · Edited copy of a member (44 corresponding lines) src/cmds/cloud/aws_cmd.rs
  • Code Duplication · Edited copy of a member (33 corresponding lines) src/cmds/git/gh_cmd.rs
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/core/tracking.rs
  • Code Duplication · Edited copy of a member (36 corresponding lines) proxy/src/extract.rs
  • Code Duplication · Edited copies of one member (3 members, 39+ corresponding lines) src/cmds/go/go_cmd.rs
  • Code Duplication · Edited copy of a member (36 corresponding lines) src/cmds/js/prisma_cmd.rs
  • Code Duplication · Edited copies of one member (4 members, 46+ corresponding lines) src/hooks/init/copilot.rs
  • Code Duplication · Edited copy of a member (31 corresponding lines) proxy/src/pipeline/ccr/anthropic.rs
  • Code Duplication · Edited copies of one member (3 members, 46+ corresponding lines) src/hooks/init/instructions_agents.rs
  • Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) src/cmds/cloud/aws_cmd.rs
  • Code Duplication · Edited copy of a member (32 corresponding lines) src/cmds/dotnet/dotnet_cmd.rs
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/cmds/cloud/aws_cmd.rs
  • Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) src/analytics/cc_economics.rs
  • Code Duplication · Edited copy of a member (48 corresponding lines) src/hooks/init/pi.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) src/cmds/system/local_llm.rs
  • Code Duplication · Edited copies of one member (5 members, 25+ corresponding lines) src/cmds/git/gh_cmd.rs
  • Code Duplication · Edited copy of a member (27 corresponding lines) proxy/src/pipeline/ingest_filter.rs
  • Code Duplication · Edited copy of a member (38 corresponding lines) src/hooks/init/copilot.rs
  • Code Duplication · Edited copy of a member (33 corresponding lines) src/hooks/init/mod.rs
  • Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) proxy/src/pipeline/ccr/anthropic.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/cmds/python/ruff_cmd.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/cmds/system/ctest_cmd.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/cmds/rust/runner.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) proxy/src/pipeline/ccr/anthropic.rs
  • Code Duplication · Edited copy of a member (19 corresponding lines) proxy/src/store.rs
  • Code Duplication · Edited copy of a member (26 corresponding lines) src/cmds/cloud/container.rs
  • Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) src/cmds/python/pip_cmd.rs
  • Code Duplication · Edited copy of a member (33 corresponding lines) src/cmds/js/playwright_cmd.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/analytics/gain.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) proxy/src/memory.rs
  • Code Duplication · Edited copy of a member (23 corresponding lines) proxy/src/store.rs
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/cmds/git/gh_cmd.rs
  • Code Duplication · Edited copy of a member (33 corresponding lines) src/cmds/git/git_cmd.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/analytics/gain.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) proxy/src/pipeline/ccr/mod.rs
  • Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) src/cmds/rust/cargo_cmd.rs
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/hooks/init/cursor.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/cmds/go/golangci_cmd.rs
  • Code Duplication · Edited copy of a member (30 corresponding lines) src/hooks/init/droid.rs
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/cmds/go/go_cmd.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/cmds/js/prisma_cmd.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/core/pipeline_config.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/cmds/js/bun_cmd.rs
  • Code Duplication · Edited copy of a member (26 corresponding lines) src/hooks/init/copilot.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/cmds/cloud/container.rs
  • Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) proxy/src/memory.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/cmds/system/json_cmd.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/cmds/system/local_llm.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/hooks/init/hermes.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/cmds/git/git_cmd.rs
  • Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) src/cmds/php/paratest_cmd.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/core/utils.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/analytics/gain.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/cmds/dotnet/binlog.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/cmds/git/gh_cmd.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/cmds/go/go_cmd.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/hooks/hook_cmd.rs
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) src/cmds/git/gh_cmd.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) engine/src/pipeline/resolve.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/core/tracking.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/hooks/init/codex.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/core/tracking.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/cmds/git/glab_cmd.rs
  • Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) src/analytics/cc_economics.rs
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/core/retriever.rs
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) proxy/src/pipeline/ccr/anthropic.rs
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src/cmds/cloud/container.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/hooks/hook_cmd.rs
  • Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) engine/src/strategy.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/hooks/init/droid.rs
  • Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) src/cmds/git/gh_cmd.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/cmds/dotnet/dotnet_cmd.rs
  • Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) src/cmds/git/gh_cmd.rs
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/core/retriever.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) proxy/src/service/mod.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) proxy/src/pipeline/ccr/anthropic.rs
  • Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) src/cmds/git/gt_cmd.rs
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/cmds/system/ls.rs
  • Code Duplication · Edited copy of a member (6 corresponding lines) proxy/src/pipeline/ingest_filter.rs
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/cmds/git/glab_cmd.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/cmds/git/git_cmd.rs
  • Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) engine/src/pipeline/builtins.rs
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/hooks/init/claude.rs
  • Code Duplication · Edited copy of a member (5 corresponding lines) proxy/src/pipeline/engine_methods.rs
  • Code Duplication · Duplicated block (18 lines × 2) src/hooks/init/trae.rs
  • Code Duplication · Duplicated block (16–17 lines × 2) src/cmds/dotnet/dotnet_trx.rs
  • Code Duplication · Duplicated block (16 lines × 2) src/cmds/system/read.rs

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

Fixed since the last survey: 83 findings

These 83 critical or serious findings were in the previous survey, on 25 October 2026, and are gone from this one.

  • Cyclomatic Complexity · runner.run_benchmark (cyclomatic 24) scripts/benchmark-sessions/lib/runner.py
  • Cyclomatic Complexity · rtk::discover::registry::rewrite_compound (cyclomatic 22) src/discover/registry.rs
  • Cyclomatic Complexity · rtk::cmds::python::ruff_cmd::run (cyclomatic 19) src/cmds/python/ruff_cmd.rs
  • Cyclomatic Complexity · rtk::discover::lexer::split_segments (cyclomatic 18) src/discover/lexer.rs
  • Cognitive Complexity · runner.run_benchmark (cognitive 32) scripts/benchmark-sessions/lib/runner.py
  • Cognitive Complexity · rtk::discover::lexer::split_segments (cognitive 29) src/discover/lexer.rs
  • Cognitive Complexity · rtk::cmds::python::ruff_cmd::run (cognitive 28) src/cmds/python/ruff_cmd.rs
  • Cognitive Complexity · rtk::hooks::init::claude::run_claude_md_mode_with (cognitive 17) src/hooks/init/claude.rs
  • Cognitive Complexity · rtk::cmds::system::read::run (cognitive 16) src/cmds/system/read.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/cmds/python/ruff_cmd.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/cmds/git/git_cmd.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/hooks/hook_cmd.rs
  • Code Duplication · Duplicated block (45–56 lines × 2) proxy/src/ccr_forward.rs
  • Code Duplication · Duplicated block (26 lines × 2) src/cmds/system/read.rs
  • Code Duplication · Duplicated block (17 lines × 2) src/hooks/init/trae.rs
  • Code Duplication · Duplicated block (15 lines × 2) proxy/src/ccr_forward.rs
  • Code Duplication · Duplicated block (14–15 lines × 2) src/cmds/dotnet/dotnet_trx.rs
  • Code Duplication · Duplicated block (15 lines × 2) src/core/telemetry_cmd.rs
  • Code Duplication · Duplicated block (13–14 lines × 3) src/analytics/cc_economics.rs
  • Code Duplication · Duplicated block (12 lines × 2) src/cmds/dotnet/dotnet_trx.rs
  • Code Duplication · Duplicated block (12 lines × 2) src/hooks/permissions.rs
  • Code Duplication · Duplicated block (11 lines × 3) src/cmds/rust/cargo_cmd.rs
  • Code Duplication · Duplicated block (11 lines × 3) src/core/tracking.rs
  • Code Duplication · Duplicated block (9 lines × 3) src/cmds/system/deps.rs
  • Code Duplication · Duplicated block (9 lines × 2) src/cmds/cloud/container.rs
  • Code Duplication · Duplicated block (8–9 lines × 2) src/cmds/git/gh_cmd.rs
  • Code Duplication · Duplicated block (9 lines × 2) src/lib.rs
  • Code Duplication · Duplicated block (8 lines × 2) src/cmds/git/glab_cmd.rs
  • Code Duplication · Duplicated block (8 lines × 2) src/discover/registry.rs
  • Code Duplication · Duplicated block (7 lines × 2) proxy/src/pipeline/ccr/anthropic.rs
  • Code Duplication · Duplicated block (6 lines × 4) src/cmds/system/deps.rs
  • Code Duplication · Duplicated block (6 lines × 3) proxy/src/pipeline/ccr/anthropic.rs
  • Code Duplication · Duplicated block (6 lines × 2) proxy/src/memory.rs
  • Code Duplication · Duplicated block (6 lines × 2) src/lib.rs
  • Code Duplication · Duplicated block (5 lines × 3) src/cmds/cloud/container.rs
  • Code Duplication · Duplicated block (14 lines × 2) src/core/tracking.rs
  • Code Duplication · Duplicated block (14 lines × 2) src/cmds/php/paratest_cmd.rs
  • Code Duplication · Duplicated block (8 lines × 2) src/cmds/git/git_cmd.rs
  • Code Duplication · Duplicated block (10 lines × 2) src/analytics/gain.rs
  • Code Duplication · Duplicated block (9 lines × 2) src/core/task_cmd.rs
  • Code Duplication · Duplicated block (8 lines × 2) src/cmds/dotnet/dotnet_cmd.rs
  • Code Duplication · Duplicated block (7 lines × 2) src/cmds/git/gh_cmd.rs
  • Code Duplication · Duplicated block (5 lines × 2) src/cmds/git/diff_cmd.rs
  • Code Duplication · Duplicated block (5 lines × 3) src/lib.rs
  • Code Duplication · Duplicated block (5 lines × 2) src/cmds/git/glab_cmd.rs
  • Churn × Complexity Hotspots · Hotspot: src/cmds/system/pipe_cmd.rs src/cmds/system/pipe_cmd.rs
  • Churn × Complexity Hotspots · Hotspot: src/cmds/python/mypy_cmd.rs src/cmds/python/mypy_cmd.rs
  • Churn × Complexity Hotspots · Hotspot: src/cmds/js/next_cmd.rs src/cmds/js/next_cmd.rs
  • Churn × Complexity Hotspots · Hotspot: src/core/filter.rs src/core/filter.rs
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: watchdog-mutable-job-container-image REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: watchdog-mutable-job-container-image REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: watchdog-unpinned-package-install-in-run REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium advisory (unmaintained): RUSTSEC-2024-0436 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unsound): RUSTSEC-2026-0002 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unsound): RUSTSEC-2026-0190 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unsound): RUSTSEC-2026-0253 REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: RUSTSEC-2026-0194 REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: RUSTSEC-2026-0346 REDACTED
  • Outbound HTTP resilience · Outbound HTTP without resilience src/core/pipeline_cmd.rs
  • Outbound HTTP resilience · Outbound HTTP without resilience src/core/pipeline_remote.rs
Rebuild cost: about €220,000 · Estimate
Cost to rebuild€73,000 to €370,000, for 1,219 to 3,869 hours of work, about 1.5 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 61. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 181,007 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
The findings name the configuration each number was taken from and, for the assertions, the files that hold them.
Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Raises the score by about 3 points · Medium effort · Nullable reference types
2
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Raises the score by about 2 points · Medium effort · Outbound HTTP resilience
3
Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.
Raises the score by about 2 points · Medium effort · Web-Security Posture

Diagnosis: what the measurements show together

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

Files that change often carry extra risk · Combined risk
18 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (71 files) · Code Coverage (42 files under half tested) · Bus Factor (0 files written almost entirely by one person) · The files: lib.rs, runner.rs and gain.rs
What to do: Add tests to these files and have a second person review every change to them, starting with lib.rs, runner.rs and gain.rs.
Where the investment is most exposed · Value at risk
This code would cost about €220,000 to build again, about 1.5 person-years of work. Its weakest lens is Production Readiness, at 56 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 215,170 lines over the last 90 days, which is about 872,634 lines a year. At that pace, the extra work comes to an estimated 113.7 to 682.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch @rtk-ai/rtk-rewrite rtk-rewrite rtk rtk rtk-engine rtk-engine rtk->rtk-engine rtk-plugin rtk-plugin rtk->rtk-plugin rtk-text rtk-text rtk->rtk-text rtk-engine->rtk-text rtk-plugin->rtk-engine rtk-proxy rtk-proxy rtk-proxy->rtk-engine

Architecture: which parts of the code depend on which

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

234 modules, with 234 dependencies between them. Every module uses only modules listed above it, so there are no loops.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 rtk.core.arg_tokenizer2 rtk.core.retriever3 rtk.core.stream4 rtk.core.tracking5 rtk.hooks.permissions6 rtk.llm_proxy7 rtk.parser8 rtk.parser.types9 rtk_engine.block10 rtk_proxy.config11 rtk_proxy.model12 rtk.cmds.dotnet.dotnet_cmd13 rtk.cmds.git.git_cmd14 rtk.cmds.go.golangci_cmd15 rtk.cmds.system.search16 rtk.core.config17 rtk.core.runner18 rtk.discover.lexer19 rtk.hooks.decision20 rtk_engine.harness21 rtk_engine.method22 rtk_proxy.pipeline23 rtk.discover.registry24 rtk.hooks.hook_cmd25 rtk_engine.pipeline.position26 rtk_proxy27 rtk_proxy.pipeline.ccr28 rtk_engine.pipeline.schema29 rtk_proxy.forward30 rtk.core.task_cmd31 rtk_engine.pipeline.resolve32 rtk_proxy.ccr_forward33 rtk.core.classify34 rtk.hooks.init35 rtk.hooks.posthook36 rtk_engine.pipeline.validate37 rtk_proxy.pipeline.engine_methods38 rtk.core.pipeline_config39 rtk.core.pipeline_cmd40 rtk.hooks.init.claude
1 rtk.core.arg_tokenizer
2 rtk.core.retriever
3 rtk.core.stream
4 rtk.core.tracking
5 rtk.hooks.permissions
6 rtk.llm_proxy
7 rtk.parser
8 rtk.parser.types
9 rtk_engine.block
10 rtk_proxy.config
11 rtk_proxy.model
12 rtk.cmds.dotnet.dotnet_cmd3
13 rtk.cmds.git.git_cmd321
14 rtk.cmds.go.golangci_cmd2
15 rtk.cmds.system.search311
16 rtk.core.config3
17 rtk.core.runner111
18 rtk.discover.lexer1
19 rtk.hooks.decision5
20 rtk_engine.harness4
21 rtk_engine.method1
22 rtk_proxy.pipeline4
23 rtk.discover.registry1
24 rtk.hooks.hook_cmd131
25 rtk_engine.pipeline.position21
26 rtk_proxy21
27 rtk_proxy.pipeline.ccr31
28 rtk_engine.pipeline.schema11
29 rtk_proxy.forward51
30 rtk.core.task_cmd3
31 rtk_engine.pipeline.resolve2217
32 rtk_proxy.ccr_forward1111
33 rtk.core.classify121
34 rtk.hooks.init21
35 rtk.hooks.posthook3111
36 rtk_engine.pipeline.validate11112
37 rtk_proxy.pipeline.engine_methods3211
38 rtk.core.pipeline_config1131
39 rtk.core.pipeline_cmd4211
40 rtk.hooks.init.claude21
Uses a module listed above itPart of a loopThe module itself
1 rtk.core.arg_tokenizer2 rtk.core.retriever3 rtk.core.stream4 rtk.core.tracking5 rtk.hooks.permissions6 rtk.llm_proxy7 rtk.parser8 rtk.parser.types9 rtk_engine.block10 rtk_proxy.config11 rtk_proxy.model12 rtk.cmds.dotnet.dotnet_cmd13 rtk.cmds.git.git_cmd14 rtk.cmds.go.golangci_cmd15 rtk.cmds.system.search16 rtk.core.config17 rtk.core.runner18 rtk.discover.lexer19 rtk.hooks.decision20 rtk_engine.harness21 rtk_engine.method22 rtk_proxy.pipeline23 rtk.discover.registry24 rtk.hooks.hook_cmd25 rtk_engine.pipeline.position26 rtk_proxy27 rtk_proxy.pipeline.ccr28 rtk_engine.pipeline.schema29 rtk_proxy.forward30 rtk.core.task_cmd31 rtk_engine.pipeline.resolve32 rtk_proxy.ccr_forward33 rtk.core.classify34 rtk.hooks.init35 rtk.hooks.posthook36 rtk_engine.pipeline.validate37 rtk_proxy.pipeline.engine_methods38 rtk.core.pipeline_config39 rtk.core.pipeline_cmd40 rtk.hooks.init.claudertk.core.arg_tokenizer1rtk.core.retriever2rtk.core.stream3rtk.core.tracking4rtk.hooks.permissions5rtk.llm_proxy6rtk.parser7rtk.parser.types8rtk_engine.block9rtk_proxy.config10rtk_proxy.model11rtk.cmds.dotnet.dotnet_cmd12rtk.cmds.git.git_cmd13rtk.cmds.go.golangci_cmd14rtk.cmds.system.search15rtk.core.config16rtk.core.runner17rtk.discover.lexer18rtk.hooks.decision19rtk_engine.harness20rtk_engine.method21rtk_proxy.pipeline22rtk.discover.registry23rtk.hooks.hook_cmd24rtk_engine.pipeline.position25rtk_proxy26rtk_proxy.pipeline.ccr27rtk_engine.pipeline.schema28rtk_proxy.forward29rtk.core.task_cmd30rtk_engine.pipeline.resolve31rtk_proxy.ccr_forward32rtk.core.classify33rtk.hooks.init34rtk.hooks.posthook35rtk_engine.pipeline.validate36rtk_proxy.pipeline.engine_methods37rtk.core.pipeline_config38rtk.core.pipeline_cmd39rtk.hooks.init.claude4033212311311115414113121213111513221711111212131111111232111131421121+194 more modules (most-connected shown)

At a glance — Code Health · 57% · Adequate · gated by D1, D2, X5 ·

At a glance — Architecture · 94% · Exemplary ·

At a glance — Maturity · 87% · Strong ·

At a glance — Readiness · 56% · Adequate · gated by P7 ·

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

At a glance — Accessibility · 75% · Adequate · gated by AC3 ·

At a glance — Performance · 89% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection41High / Critical
A03:2025 — Software Supply Chain Failures18Medium

Roadmap

Top priorities: The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`); Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail; Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.

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

Do thisHelpsEffortDimension
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).+3.2 ptsMediumNullable reference types
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.+2.3 ptsMediumOutbound HTTP resilience
Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.+2.1 ptsMediumWeb-Security Posture
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+1.9 ptsMediumDR & Backup
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with rtk::run_cli (cyclomatic 305).+0.9 ptsMediumCyclomatic Complexity
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.+1.5 ptsMediumDeployment & Rollback
Interpolated log message defeats structured logging+1.4 ptsMediumStructured logging
Resolve the 44 Low coverage finding(s) in Code Coverage — start with mod.rs (3), cc_economics.rs, gain.rs.+0.7 ptsMediumCode Coverage

File quality

Per-file score 0–10 — a quality signature. Of 156 files carrying findings, judged against the Production bar: 1% slop · 77% mixed · 22% near-clean.

FileScoreBandWorst signal
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
src/analytics/gain.rs5.5MixedCyclomatic Complexity: rtk::analytics::gain::run (cyclomatic 61)
src/hooks/init/mod.rs5.5MixedCyclomatic Complexity: rtk::hooks::init::uninstall_with_patch_mode (cyclomatic 44)
src/core/pipeline_cmd.rs5.5MixedCyclomatic Complexity: rtk::core::pipeline_cmd::run_add (cyclomatic 33)
src/cmds/js/lint_cmd.rs5.5MixedCyclomatic Complexity: rtk::cmds::js::lint_cmd::run (cyclomatic 32)
src/cmds/cloud/container.rs5.5MixedCyclomatic Complexity: rtk::cmds::cloud::container::format_kubectl_pods (cyclomatic 21)
src/analytics/cc_economics.rs5.5MixedCyclomatic Complexity: rtk::analytics::cc_economics::compute_totals (cyclomatic 16)
src/cmds/git/gh_cmd.rs5.5MixedCognitive Complexity: rtk::cmds::git::gh_cmd::format_pr_view (cognitive 18)
src/core/pipeline_remote.rs5.5MixedCyclomatic Complexity: rtk::core::pipeline_remote::publish_repo (cyclomatic 23)
src/cmds/js/prisma_cmd.rs5.5MixedCyclomatic Complexity: rtk::cmds::js::prisma_cmd::filter_migrate_dev (cyclomatic 20)
src/cmds/system/deps.rs5.6MixedCognitive Complexity: rtk::cmds::system::deps::summarize_gomod_str (cognitive 19)
src/hooks/init/instructions_agents.rs5.6MixedCognitive Complexity: rtk::hooks::init::instructions_agents::run_kilocode_mode_at (cognitive 19)
src/cmds/system/summary.rs5.6MixedCyclomatic Complexity: rtk::cmds::system::summary::summarize_tests (cyclomatic 16)
src/core/task_cmd.rs5.6MixedCognitive Complexity: rtk::core::task_cmd::run_task (cognitive 16)
REDACTED5.8MixedDependency Vulnerabilities: Medium CVE: REDACTED
src/cmds/system/env_cmd.rs5.9MixedCyclomatic Complexity: rtk::cmds::system::env_cmd::run (cyclomatic 27)
src/discover/mod.rs5.9MixedCyclomatic Complexity: rtk::discover::run (cyclomatic 27)
src/cmds/cloud/wget_cmd.rs5.9MixedCyclomatic Complexity: rtk::cmds::cloud::wget_cmd::extract_filename_from_output (cyclomatic 20)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 49

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

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

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

Could not be resolved — 7

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

This survey 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. All 60 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked — 60 dimensions across the health lenses
D1D2D3D4D5D6D7D8D10D11D12D13D14D15D16D17D19D20D24D26D28D29D30D34D35D36D37D43D44AC1AC3AC5AC6AX10AX3AX4AX9M1M2M3M4P1P10P2P3P4P5P6P7PF1PF3S1X1X14X21X28X29X30X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 962 of 986 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1d83f-90ed-7f3f-9b1e-62de740a9726.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. The 10 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 62 test source file(s) (.rs, .rb) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D12 Dependency Hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. Currency was graded against Maven Central, but whether an artifact is DEPRECATED is not: Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether one is UNMAINTAINED is not graded either — no registry publishes a maintenance status, and release age does not stand in for one. Two of this dimension's four signals are therefore unread on a Maven tree, and its score reflects currency alone.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We 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. Subject: 5 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • 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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity3.1 / 10Weak✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

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

124 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was rtk::run_cli at 305. A further 5 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Code::as_str at 46 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: engine/src/pipeline/diag.rs (Code::as_str at 46), engine/src/block.rs (Subject::as_str at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

rtk::run_cli (cyclomatic 305) · ×106src/lib.rs:2536
rtk_engine::pipeline::validate::validate (cyclomatic 68) · ×7engine/src/pipeline/validate.rs:53
rtk_proxy::context_analysis::analyze (cyclomatic 23) · ×5proxy/src/context_analysis.rs:125
SurefireBlock::step (cyclomatic 27)src/cmds/jvm/mvn_cmd.rs:682
SseAccumulator::feed_tool_use (cyclomatic 20)proxy/src/forward.rs:691

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with rtk::run_cli (cyclomatic 305). — Refactoring it lifts Cyclomatic Complexity from 3.1 to about 4.6/10.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

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

257 method(s) exceeded the cognitive complexity threshold of 15; the worst was rtk::run_cli at 276.

rtk::run_cli (cognitive 276) · ×210src/lib.rs:2536
rtk_proxy::context_analysis::analyze (cognitive 66) · ×16proxy/src/context_analysis.rs:125
rtk_engine::pipeline::validate::validate (cognitive 157) · ×14engine/src/pipeline/validate.rs:53
SseAccumulator::feed_tool_use (cognitive 58) · ×2proxy/src/forward.rs:691
ClaudeProvider::extract_commands (cognitive 37) · ×2src/discover/provider.rs:190

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

What to do

  1. Bring the 25 bodies over 60 down to 60 or less in Cognitive Complexity — start with rtk::run_cli (cognitive 276), rtk::cmds::git::diff_cmd::condense_unified_diff_strict (cognitive 245), rtk_engine::pipeline::validate::validate (cognitive 157). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 25 together lifts Cognitive Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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.

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

90 god class(es) detected.

FunctionTooLong: rtk::run_cli · ×44src/lib.rs:2536
FileTooLong: src/lib.rs · ×38src/lib.rs
TooManyFunctions: rtk::core::utils · ×3src/core/utils.rs:32
ClassTooLong: Tracker · ×2src/core/tracking.rs:98
TooManyFields: UsageRecordproxy/src/model.rs:224

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

What to do

  1. Resolve the 44 FunctionTooLong finding(s) in God Classes — start with mod.rs (4), pipeline_cmd.rs (4), git_cmd.rs (4). — One of this dimension's main actionable groups (44 warning-level).
  2. Resolve the 38 FileTooLong finding(s) in God Classes — start with lib.rs, git_cmd.rs, mod.rs. — One of this dimension's main actionable groups (38 warning-level).
  3. Resolve the 3 TooManyFunctions finding(s) in God Classes — start with utils.rs, mod.rs, permissions.rs. — One of this dimension's main actionable groups (3 warning-level).

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

D4 · Code Duplication8.5 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

161 duplicated block group(s) detected. 3.7 % of the production lines (6,697 of 181,007) are in a reported copy. A further 95 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (7 lines × 2) · ×17proxy/src/extract.rs:162
Duplicated block (11 lines × 2) · ×15proxy/src/pipeline/image_opt.rs:244
Duplicated block (9 lines × 2) · ×14proxy/src/memory.rs:92
Duplicated block (6 lines × 2) · ×12proxy/src/pipeline/engine_methods.rs:271
Duplicated block (8 lines × 2) · ×8proxy/src/pipeline/engine_methods.rs:243

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

What to do

  1. Resolve the 17 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with gh_cmd.rs (3), anthropic.rs (2), extract.rs. — One of this dimension's main actionable groups (17 warning-level).
  2. Resolve the 15 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with git_cmd.rs (2), image_opt.rs, gain.rs. — One of this dimension's main actionable groups (15 warning-level).
  3. Resolve the 14 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with memory.rs, store.rs, container.rs. — One of this dimension's main actionable groups (14 warning-level).

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

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

0 of 59 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

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

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

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

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

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

Detailed fixes: d7_recommendation.md.

D8 · Code Coverage9.5 / 10Stronggated by 44 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 64.3% — 44 file(s) below 50%. Measured from the Rust suite (repository root: `cargo test --workspace` instrumented over 192 production file(s), 63 test binaries and 0 doc-test binaries).

Low coverage: src/analytics/cc_economics.rs · ×44src/analytics/cc_economics.rs:1

What to do

  1. Resolve the 44 Low coverage finding(s) in Code Coverage — start with mod.rs (3), cc_economics.rs, gain.rs. — One of this dimension's main actionable groups (44 warning-level).

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

D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 10 tests. Measured on the JavaScript/TypeScript suite only — at least 62 test source file(s) (.rs, .rb) went unread, so its test quality is unmeasured and is not in these counts.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D11 · Test Reliability10.0 / 10Exemplary✓ 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.

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

0 flaky across 1 measured tier(s). Rust (repository root, 272 test files): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

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

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

6 outdated artifact(s) of 8 resolved by the build, graded against Maven Central. Whether any of these is DEPRECATED is not graded — Maven Central publishes no deprecation marker, exactly as rubygems.org does not. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Known CVEs in this graph are D30's question, read from the manifest there.

Outdated (test): org.junit.jupiter:junit-jupiter-api · ×6

✓ On the Gold path — maintain.

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

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 338 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots8.8 / 10Strong✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

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

Top hotspots: src/cmds/git/diff_cmd.rs (36×117=4212); src/lib.rs (12×305=3660); src/discover/registry.rs (73×43=3139) Repeated repair below the complexity floor: src/main.rs (39 of 73 changes were fixes); src/hooks/hook_cmd.rs (29 of 49 changes were fixes); src/core/tracking.rs (26 of 42 changes were fixes)

Repeated repair: src/main.rs · ×41src/main.rs:6
Hotspot: src/cmds/git/diff_cmd.rs · ×33src/cmds/git/diff_cmd.rs:2127

What to do

  1. Resolve the 41 Repeated repair finding(s) in Churn × Complexity Hotspots — start with main.rs, hook_cmd.rs, tracking.rs. — One of this dimension's main actionable groups (41 warning-level).
  2. Resolve the 33 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (2), diff_cmd.rs, lib.rs. — One of this dimension's main actionable groups (33 warning-level).

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

D16 · Bus Factor9.2 / 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.

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

18 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is engine/src/pipeline/validate.rs. Counted over 222 of the 268 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

3 deducted task-comment markers across 181007 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 · ×2src/cmds/system/pipe_cmd.rs:682
FixmeCommentsrc/lib.rs:2308

What to do

  1. Resolve the 2 TodoComment finding(s) in Explicit Debt — start with pipe_cmd.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with lib.rs. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D24 · Comment Value10.0 9.8 / 10Exemplary○ Nothing flagged

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 98% · ceiling Documented

0 of 43 judged comments only repeat the code they sit on (0.0 %). 2 comment(s) in another language or script were not judged.

doc comments repeat the namesscripts/benchmark/lib/vm.ts:138

✓ On the Gold path — maintain.

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

D26 · Project Cohesion6.7 / 10Adequate✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

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

1 of 6 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)2.7 / 10Weak✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

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

41 finding(s): 0 critical, 39 high, 2 medium, 0 low. 32 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 48, line 102, line 125) — 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

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

What to do

  1. 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).
  2. 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).
  3. No action in Static Analysis (SAST) — all 32 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 (32 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities8.1 / 10Strong✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 5 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
  2. 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).
  3. Resolve the 3 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).

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

D34 · Knowledge Freshness9.9 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

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

2 of 222 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 222 of the 268 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×2src/learn/report.rs:1
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.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC3 · Page structure3.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×5) — .github/assets/src/before-after.html:2, .github/assets/src/companies.html:2, .github/assets/src/go-further.html:2, …
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×5) — .github/assets/src/before-after.html:2, .github/assets/src/companies.html:2, .github/assets/src/go-further.html:2, …
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×5) — .github/assets/src/before-after.html:2, .github/assets/src/companies.html:2, .github/assets/src/go-further.html:2, …
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — .github/assets/src/rtk-pro.html:40

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AX10 · Code composition9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

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

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

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

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

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

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

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

M1 · Documentation (README)9.2 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

M2 · Architecture documentation7.0 / 10Strong✓ Tool-verified

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

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

  • 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.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability6.5 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.

What to do

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

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

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

  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `maven`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:2

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.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

  • 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.
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).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — proxy/src/main.rs:279, proxy/src/main.rs:457
  • `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — proxy/src/main.rs:305, proxy/src/main.rs:325, proxy/src/main.rs:366, …
  • `ureq::post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — src/core/classify.rs:145, src/core/task_cmd.rs:388, src/core/task_cmd.rs:390, …
  • `ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — src/llm_proxy.rs:549

What to do

  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
PF1 · Benchmark discipline8.0 / 10Strong✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

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

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

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

  • This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `axum::serve(` (proxy/src/main.rs:230).
  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (proxy/src/main.rs:230).

What to do

  • Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.
  • Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X4 · Structured logging6.9 / 10Adequate✓ Tool-verified

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

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

  • `info!` at line 172 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — proxy/src/main.rs:172
  • `info!` at line 233 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — proxy/src/main.rs:233

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 11 of 55 WCAG 2.2 Level A/AA success criteria (20%; ≈22% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 44 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 44 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health57%Adequate — gated by D1, D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture94%ExemplaryStrongest area.
Maturity87%StrongSolid.
Readiness56%Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security62%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility75%Adequate — gated by AC3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance89%StrongSolid.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 54 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.

  • AC2 Forms & labels — No form control/button found in the parsed markup — AC2 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Ruby imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no public interfaces
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — N/A — too few peers to establish a naming convention (10770 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust, TypeScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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.
  • 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.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (10 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 — no mutating command handlers or message consumers detected — idempotency check not applicable
  • 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#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 192 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • X12 Unreachable branch — X12 reached only 1% of this repository's production lines — rust (179,476 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Ruby, Python and Rust were read, and no request in it can be cancelled by a caller — a Ruby request takes no token: Net::HTTP, Faraday and async-http are stopped from outside the call (Async::Task#stop, Thread#raise, Timeout), not through a parameter; a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — X3 reached only 1% of this repository's production lines — rust (179,476 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 49 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 7 more in this group — see findings.md.
AC3 · Page structure · <html> without a lang · ×5
  • <html> without a lang .github/assets/src/before-after.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang .github/assets/src/companies.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang .github/assets/src/go-further.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang .github/assets/src/rtk-banner.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang .github/assets/src/rtk-pro.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure · Document without a <title> · ×5
  • Document without a <title> .github/assets/src/before-after.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> .github/assets/src/companies.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> .github/assets/src/go-further.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> .github/assets/src/rtk-banner.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> .github/assets/src/rtk-pro.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 882 finding(s)
D2 · Cognitive Complexity · rtk · ×210
  • rtk::run_cli (cognitive 276) src/lib.rs:2536 — rtk::run_cli has cognitive complexity 276 (threshold 15). Drivers by points: if/else 93 (164 pts), match/switch 37 (87 pts), loops 6 (15 pts), boolean chains 10 (nesting depth added 130). Of this number, 274 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::cmds::git::diff_cmd::condense_unified_diff_strict (cognitive 245) src/cmds/git/diff_cmd.rs:2127 — 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::analytics::gain::run (cognitive 118) src/analytics/gain.rs:601 — rtk::analytics::gain::run has cognitive complexity 118 (threshold 15). Drivers by points: if/else 42 (88 pts), loops 4 (13 pts), boolean chains 12, match/switch 3 (5 pts) (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::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 107) src/core/runner.rs:1208 — rtk::core::runner::extract_test_summary has cognitive complexity 107 (threshold 15). Drivers by points: if/else 33 (84 pts), boolean chains 12, loops 5 (9 pts), match/switch 1 (2 pts) (nesting depth added 56). 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 107) src/discover/lexer.rs:175 — rtk::discover::lexer::tokenize_inner has cognitive complexity 107 (threshold 15). Drivers by points: if/else 33 (81 pts), loops 4 (13 pts), boolean chains 11, match/switch 1 (2 pts) (nesting depth added 58). 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::extract_pattern_path (cognitive 93) src/cmds/system/search.rs:189 — 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 91) src/hooks/init/mod.rs:1438 — rtk::hooks::init::uninstall_with_patch_mode has cognitive complexity 91 (threshold 15). Drivers by points: if/else 48 (80 pts), loops 4 (9 pts), match/switch 1 (2 pts) (nesting depth added 38). 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::pytest_cmd::build_pytest_summary (cognitive 85) src/cmds/python/pytest_cmd.rs:227 — rtk::cmds::python::pytest_cmd::build_pytest_summary has cognitive complexity 85 (threshold 15). Drivers by points: if/else 28 (57 pts), boolean chains 12, match/switch 3 (11 pts), loops 3 (5 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk::cmds::system::format_cmd::filter_black_output (cognitive 84) src/cmds/system/format_cmd.rs:140 — 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:179 — 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::cmds::go::go_cmd::filter_go_test_json (cognitive 78) src/cmds/go/go_cmd.rs:458 — rtk::cmds::go::go_cmd::filter_go_test_json has cognitive complexity 78 (threshold 15). Drivers by points: if/else 21 (52 pts), loops 8 (13 pts), boolean chains 7, match/switch 3 (6 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk::cmds::rust::cargo_cmd::filter_cargo_clippy (cognitive 78) src/cmds/rust/cargo_cmd.rs:1315 — 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:442 — 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::hooks::init::show_claude_config (cognitive 73) src/hooks/init/mod.rs:2053 — rtk::hooks::init::show_claude_config has cognitive complexity 73 (threshold 15). Drivers by points: if/else 45 (66 pts), match/switch 3 (4 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.
  • rtk::cmds::rust::cargo_cmd::filter_cargo_nextest (cognitive 65) src/cmds/rust/cargo_cmd.rs:654 — rtk::cmds::rust::cargo_cmd::filter_cargo_nextest has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (53 pts), boolean chains 5, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk::cmds::system::search::run (cognitive 65) src/cmds/system/search.rs:680 — 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::discover::run (cognitive 64) src/discover/mod.rs:330 — rtk::discover::run has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (40 pts), match/switch 7 (16 pts), loops 4 (8 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk::cmds::rust::cargo_cmd::filter_cargo_test (cognitive 62) src/cmds/rust/cargo_cmd.rs:1175 — 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 62) src/core/arg_tokenizer.rs:472 — rtk::core::arg_tokenizer::tokenize_scan has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (43 pts), match/switch 2 (10 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • rtk::analytics::gain::run_attribution (cognitive 61) src/analytics/gain.rs:118 — rtk::analytics::gain::run_attribution has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (41 pts), loops 8 (19 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk::cmds::git::git_cmd::compact_diff (cognitive 60) src/cmds/git/git_cmd.rs:1347 — 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::cmds::python::mypy_cmd::filter_mypy_output (cognitive 56) src/cmds/python/mypy_cmd.rs:55 — 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::discover::registry::rewrite_segment_inner (cognitive 56) src/discover/registry.rs:1871 — rtk::discover::registry::rewrite_segment_inner has cognitive complexity 56 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 12, loops 2, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk::core::pipeline_cmd::run_show (cognitive 54) src/core/pipeline_cmd.rs:23 — rtk::core::pipeline_cmd::run_show has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 6 (12 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 185 more in this group — see findings.md.
D1 · Cyclomatic Complexity · rtk · ×106
  • rtk::run_cli (cyclomatic 305) src/lib.rs:2536 — rtk::run_cli has cyclomatic complexity 305 (threshold 15). Of this number, 304 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:2127 — 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::analytics::gain::run (cyclomatic 61) src/analytics/gain.rs:601 — rtk::analytics::gain::run has cyclomatic complexity 61 (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::runner::extract_test_summary (cyclomatic 54) src/core/runner.rs:1208 — rtk::core::runner::extract_test_summary has cyclomatic complexity 54 (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::cloud::aws_cmd::run (cyclomatic 52) src/cmds/cloud/aws_cmd.rs:49 — rtk::cmds::cloud::aws_cmd::run has cyclomatic complexity 52 (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::discover::lexer::tokenize_inner (cyclomatic 51) src/discover/lexer.rs:175 — rtk::discover::lexer::tokenize_inner 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::cmds::python::pytest_cmd::build_pytest_summary (cyclomatic 44) src/cmds/python/pytest_cmd.rs:227 — rtk::cmds::python::pytest_cmd::build_pytest_summary has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk::hooks::init::uninstall_with_patch_mode (cyclomatic 44) src/hooks/init/mod.rs:1438 — rtk::hooks::init::uninstall_with_patch_mode has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk::discover::registry::rewrite_segment_inner (cyclomatic 43) src/discover/registry.rs:1871 — rtk::discover::registry::rewrite_segment_inner has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk::cmds::go::go_cmd::filter_go_test_json (cyclomatic 42) src/cmds/go/go_cmd.rs:458 — rtk::cmds::go::go_cmd::filter_go_test_json 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:680 — 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::rust::cargo_cmd::filter_cargo_clippy (cyclomatic 40) src/cmds/rust/cargo_cmd.rs:1315 — 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::scala::sbt_cmd::filter_sbt_test (cyclomatic 40) src/cmds/scala/sbt_cmd.rs:179 — 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_install (cyclomatic 38) src/cmds/rust/cargo_cmd.rs:442 — 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_nextest (cyclomatic 38) src/cmds/rust/cargo_cmd.rs:654 — rtk::cmds::rust::cargo_cmd::filter_cargo_nextest 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:1175 — 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:189 — 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::cmds::system::format_cmd::filter_black_output (cyclomatic 37) src/cmds/system/format_cmd.rs:140 — 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::hooks::init::show_claude_config (cyclomatic 36) src/hooks/init/mod.rs:2053 — rtk::hooks::init::show_claude_config has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk::cmds::dotnet::dotnet_trx::parse_trx_content (cyclomatic 35) src/cmds/dotnet/dotnet_trx.rs:235 — rtk::cmds::dotnet::dotnet_trx::parse_trx_content 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::cmds::php::phpt_cmd::parse (cyclomatic 33) src/cmds/php/phpt_cmd.rs:163 — 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::core::pipeline_cmd::run_add (cyclomatic 33) src/core/pipeline_cmd.rs:554 — rtk::core::pipeline_cmd::run_add 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:647 — 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:103 — 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.
  • + 81 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×44
  • FunctionTooLong: rtk::run_cli src/lib.rs:2536 — FunctionTooLong — rtk::run_cli runs 1128 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 1028 over it, 11.28× 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:2127 — 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:601 — FunctionTooLong — rtk::analytics::gain::run runs 358 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 258 over it, 3.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_engine::pipeline::validate::validate_rule engine/src/pipeline/validate.rs:450 — FunctionTooLong — rtk_engine::pipeline::validate::validate_rule runs 269 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 169 over it, 2.69× 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_engine::pipeline::validate::validate engine/src/pipeline/validate.rs:53 — FunctionTooLong — rtk_engine::pipeline::validate::validate runs 246 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk::discover::lexer::tokenize_inner src/discover/lexer.rs:175 — FunctionTooLong — rtk::discover::lexer::tokenize_inner runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk::discover::run src/discover/mod.rs:330 — FunctionTooLong — rtk::discover::run runs 218 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk_engine::pipeline::resolve::resolve engine/src/pipeline/resolve.rs:165 — FunctionTooLong — rtk_engine::pipeline::resolve::resolve runs 206 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • 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::core::pipeline_cmd::run_add src/core/pipeline_cmd.rs:554 — FunctionTooLong — rtk::core::pipeline_cmd::run_add runs 178 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk::hooks::init::show_claude_config src/hooks/init/mod.rs:2053 — FunctionTooLong — rtk::hooks::init::show_claude_config runs 174 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 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk::cmds::system::search::run src/cmds/system/search.rs:680 — 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:1438 — FunctionTooLong — rtk::hooks::init::uninstall_with_patch_mode 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::core::pipeline_cmd::print_terminal_card src/core/pipeline_cmd.rs:1313 — FunctionTooLong — rtk::core::pipeline_cmd::print_terminal_card runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk::core::pipeline_remote::publish_repo src/core/pipeline_remote.rs:716 — FunctionTooLong — rtk::core::pipeline_remote::publish_repo runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk::analytics::gain::run_attribution src/analytics/gain.rs:118 — FunctionTooLong — rtk::analytics::gain::run_attribution 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::dotnet::binlog::parse_build_from_text src/cmds/dotnet/binlog.rs:647 — 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::rust::cargo_cmd::filter_cargo_nextest src/cmds/rust/cargo_cmd.rs:654 — FunctionTooLong — rtk::cmds::rust::cargo_cmd::filter_cargo_nextest runs 141 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 41 over it, 1.41× 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:497 — FunctionTooLong — rtk::cmds::git::git_cmd::run_show runs 137 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 37 over it, 1.37× 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_proxy::ccr_forward::synthesize_anthropic_sse proxy/src/ccr_forward.rs:408 — FunctionTooLong — rtk_proxy::ccr_forward::synthesize_anthropic_sse runs 133 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 33 over it, 1.33× 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:179 — 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::python::sqlfluff_cmd::render_lint_json src/cmds/python/sqlfluff_cmd.rs:209 — FunctionTooLong — rtk::cmds::python::sqlfluff_cmd::render_lint_json runs 127 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 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rtk::analytics::gain::run_pipeline_detail src/analytics/gain.rs:368 — FunctionTooLong — rtk::analytics::gain::run_pipeline_detail runs 126 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 26 over it, 1.26× 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::pytest_cmd::build_pytest_summary src/cmds/python/pytest_cmd.rs:227 — FunctionTooLong — rtk::cmds::python::pytest_cmd::build_pytest_summary runs 126 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 26 over it, 1.26× 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::posthook::process_shell src/hooks/posthook.rs:689 — FunctionTooLong — rtk::hooks::posthook::process_shell runs 126 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 26 over it, 1.26× 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.
  • + 19 more in this group — see findings.md.
D8 · Code Coverage · Low coverage · ×44
  • Low coverage: src/analytics/cc_economics.rs src/analytics/cc_economics.rs:1 — 36.6% line coverage (201/549).
  • Low coverage: src/analytics/gain.rs src/analytics/gain.rs:1 — 4.6% line coverage (63/1378).
  • Low coverage: src/analytics/gain_tui.rs src/analytics/gain_tui.rs:1 — 0.0% line coverage (0/409).
  • Low coverage: src/analytics/session_cmd.rs src/analytics/session_cmd.rs:1 — 21.1% line coverage (26/123).
  • Low coverage: src/cmds/cloud/container.rs src/cmds/cloud/container.rs:1 — 20.8% line coverage (138/662).
  • Low coverage: src/cmds/cloud/curl_cmd.rs src/cmds/cloud/curl_cmd.rs:1 — 38.4% line coverage (28/73).
  • Low coverage: src/cmds/cloud/wget_cmd.rs src/cmds/cloud/wget_cmd.rs:1 — 34.6% line coverage (71/205).
  • Low coverage: src/cmds/git/gh_cmd.rs src/cmds/git/gh_cmd.rs:1 — 39.5% line coverage (349/883).
  • Low coverage: src/cmds/js/deno_cmd.rs src/cmds/js/deno_cmd.rs:1 — 24.2% line coverage (16/66).
  • Low coverage: src/cmds/js/lint_cmd.rs src/cmds/js/lint_cmd.rs:1 — 47.5% line coverage (154/324).
  • Low coverage: src/cmds/js/npm_cmd.rs src/cmds/js/npm_cmd.rs:1 — 31.9% line coverage (22/69).
  • Low coverage: src/cmds/js/pnpm_cmd.rs src/cmds/js/pnpm_cmd.rs:1 — 44.9% line coverage (159/354).
  • Low coverage: src/cmds/js/prisma_cmd.rs src/cmds/js/prisma_cmd.rs:1 — 45.1% line coverage (143/317).
  • Low coverage: src/cmds/php/ecs_cmd.rs src/cmds/php/ecs_cmd.rs:1 — 43.9% line coverage (18/41).
  • Low coverage: src/cmds/php/paratest_cmd.rs src/cmds/php/paratest_cmd.rs:1 — 21.7% line coverage (5/23).
  • Low coverage: src/cmds/php/pest_cmd.rs src/cmds/php/pest_cmd.rs:1 — 0.0% line coverage (0/18).
  • Low coverage: src/cmds/php/php_cmd.rs src/cmds/php/php_cmd.rs:1 — 26.9% line coverage (18/67).
  • Low coverage: src/cmds/php/utils.rs src/cmds/php/utils.rs:1 — 19.4% line coverage (6/31).
  • Low coverage: src/cmds/python/pip_cmd.rs src/cmds/python/pip_cmd.rs:1 — 36.6% line coverage (52/142).
  • Low coverage: src/cmds/rust/runner.rs src/cmds/rust/runner.rs:1 — 0.0% line coverage (0/27).
  • Low coverage: src/cmds/system/deps.rs src/cmds/system/deps.rs:1 — 9.5% line coverage (23/241).
  • Low coverage: src/cmds/system/env_cmd.rs src/cmds/system/env_cmd.rs:1 — 32.1% line coverage (45/140).
  • Low coverage: src/cmds/system/summary.rs src/cmds/system/summary.rs:1 — 0.0% line coverage (0/230).
  • Low coverage: src/cmds/system/tree.rs src/cmds/system/tree.rs:1 — 36.5% line coverage (19/52).
  • Low coverage: src/core/pipeline_cmd.rs src/core/pipeline_cmd.rs:1 — 12.2% line coverage (203/1668).
  • + 19 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×41
  • Repeated repair: src/main.rs src/main.rs:6 — src/main.rs changed 73 times in last 90 days and 39 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is rtk::main at line 6), AT OR 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(hook): defer when a prefixed shell wrapper's script hits a deny rule”; “fix(core): keep the usage guard off RTK's own probes and argv”; “fix(tracking): store commands so they read back as the same words”; “fix(init/opencode): drop the legacy plugin, floor at 1.18.29”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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.
  • Repeated repair: src/hooks/hook_cmd.rs src/hooks/hook_cmd.rs:188 — src/hooks/hook_cmd.rs changed 49 times in last 90 days and 29 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 188), AT OR 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(hook): preserve fish-wrap decisions and reuse permission scans”; “fix(hooks): ask for a wrap only when RTK built it, and attest only where one can be”; “fix(hooks): make the fish wrap opt-in, and ask for it explicitly”; “fix(hooks): keep the fish wrap off wherever a deny rule could match”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/tracking.rs src/core/tracking.rs:1961 — src/core/tracking.rs changed 42 times in last 90 days and 26 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 1961), AT OR 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): guard configured retention cutoffs and pin config loading”; “fix(tracking): match historical passthrough suffix exactly”; “fix(gain): classify legacy passthrough timings”; “fix(gain): distinguish filtered timings from passthrough lifetimes”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/system/find_cmd.rs src/cmds/system/find_cmd.rs:152 — src/cmds/system/find_cmd.rs changed 28 times in last 90 days and 19 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::system::find_cmd::dispatch at line 152), AT OR 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): emit one trailing newline, not one on top of the output's own”; “fix(tracking): store commands so they read back as the same words”; “fix(tests): keep the test suite and the developer's environment apart”; “refactor(cli): narrow the help-flag fix to code, and read -h per 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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.
  • Repeated repair: src/cmds/go/golangci_cmd.rs src/cmds/go/golangci_cmd.rs:343 — src/cmds/go/golangci_cmd.rs changed 29 times in last 90 days and 17 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 343), AT OR 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): keep the usage guard off RTK's own probes and argv”; “fix(tracking): store commands so they read back as the same words”; “fix(core): read a usage request through the tokenizer, and catch it in capture too”; “refactor(cli): narrow the help-flag fix to code, and read -h per 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/core/utils.rs src/core/utils.rs:438 — src/core/utils.rs changed 22 times in last 90 days and 15 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 438), AT OR 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): encode sha2 digests as hex”; “fix(tests): keep the test suite and the developer's environment apart”; “fix(core): quote child arguments so MSYS children receive them intact”; “fix(recall): byte-faithful --grep, cached store connection, serialized env tests”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/hooks/decision.rs src/hooks/decision.rs:488 — src/hooks/decision.rs changed 21 times in last 90 days and 15 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 AgentPath::lookup at line 488), AT OR 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(hook): preserve fish-wrap decisions and reuse permission scans”; “fix(hooks): ask for a wrap only when RTK built it, and attest only where one can be”; “fix(hooks): make the fish wrap opt-in, and ask for it explicitly”; “fix(hooks): keep the fish wrap off wherever a deny rule could match”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/system/read.rs src/cmds/system/read.rs:13 — src/cmds/system/read.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 13 (its worst body is rtk::cmds::system::read::run at line 13), AT OR 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): route stdin through the same raw-byte gate”; “fix(read): fall back to raw bytes when a plain read is not valid UTF-8”; “fix(read): book the span that was shown, and test the booked row”; “fix(read): separate line numbers with a tab”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/js/bun_cmd.rs src/cmds/js/bun_cmd.rs:32 — src/cmds/js/bun_cmd.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 8 (its worst body is rtk::cmds::js::bun_cmd::filter_bun_pkg at line 32), AT OR 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): keep the usage guard off RTK's own probes and argv”; “fix(tracking): store commands so they read back as the same words”; “fix(cli): hand -h, --help and help to the tool each subcommand wraps”; “fix(js): correct bun and deno runtime behavior”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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: hooks/opencode/rtk.ts hooks/opencode/rtk.ts:45 — hooks/opencode/rtk.ts changed 18 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 8 (its worst body is rtk.resolveRtkPath at line 45), AT OR 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): pipeline hook rules act on Claude Code only; the shared hook core is develop's again”; “fix(hooks/opencode): judge only the rules OpenCode applies, and keep init honest”; “fix(hooks/opencode): say which RTK_DISABLED is which”; “fix(init/opencode): drop the legacy plugin, floor at 1.18.29”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- hooks/opencode/rtk.ts`: 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_cmd/claude_pipeline.rs src/hooks/hook_cmd/claude_pipeline.rs:133 — src/hooks/hook_cmd/claude_pipeline.rs changed 17 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 11 (its worst body is rtk::hooks::hook_cmd::claude_pipeline::shell_gate at line 133), AT OR 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): honour exclude_commands for a swapped program called by path”; “fix(pipeline): let an allow rule on rtk cover a swapped command”; “fix(pipeline): keep a line that runs rtk anywhere out of the swap”; “fix(pipeline): keep an excluded command out of the swap behind a wrapper”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/hooks/hook_cmd/claude_pipeline.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:375 — src/core/config.rs changed 18 times in last 90 days and 10 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 375), AT OR 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): make the fish wrap opt-in, and ask for it explicitly”; “fix(tests): keep the test suite and the developer's environment apart”; “fix(init): scope guidance to external commands”; “fix: scope suppress_hook_warning to missing hooks and parse the env override”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/git/gh_cmd.rs src/cmds/git/gh_cmd.rs:457 — src/cmds/git/gh_cmd.rs changed 16 times in last 90 days and 10 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::git::gh_cmd::format_pr_view at line 457), AT OR 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(gh): keep a lone escaped flag behind the boundary too”; “fix(gh): keep an escaped flag behind the boundary”; “fix(gh): drop rtk's own `--`, keep the user's”; “fix(gh): restore `--` over the whole subcommand region”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/cmds/git/gh_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/tee.rs src/core/tee.rs:31 — src/core/tee.rs changed 16 times in last 90 days and 10 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), AT OR 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(tests): keep the test suite and the developer's environment apart”; “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”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/core/telemetry.rs src/core/telemetry.rs:34 — src/core/telemetry.rs changed 14 times in last 90 days and 9 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 34), AT OR 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): send the classifier key and reach local hosts directly on ureq 3”; “fix(core): encode sha2 digests as hex”; “fix(deps): migrate ureq 3 API usage”; “fix(tests): keep the test suite and the developer's environment apart”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/js/deno_cmd.rs src/cmds/js/deno_cmd.rs:24 — src/cmds/js/deno_cmd.rs changed 13 times in last 90 days and 9 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 24), AT OR 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): keep the usage guard off RTK's own probes and argv”; “fix(tracking): store commands so they read back as the same words”; “fix(cli): hand -h, --help and help to the tool each subcommand wraps”; “fix(js): correct bun and deno runtime behavior”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/system/ctest_cmd.rs src/cmds/system/ctest_cmd.rs:133 — src/cmds/system/ctest_cmd.rs changed 10 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 9 (its worst body is rtk::cmds::system::ctest_cmd::dashboard_action_changes_output at line 133), AT OR 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): store commands so they read back as the same words”; “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”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/hooks/hook_check.rs src/hooks/hook_check.rs:70 — src/hooks/hook_check.rs changed 13 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 6 (its worst body is rtk::hooks::hook_check::check_and_warn at line 70), AT OR 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): preserve Claude status semantics and refine agent hook probes”; “fix(hooks): pipeline hook rules act on Claude Code only; the shared hook core is develop's again”; “fix(hooks): recognize configured agent hooks in warning check (#913)”; “fix(tests): keep the test suite and the developer's environment apart”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/rust/runner.rs src/cmds/rust/runner.rs:13 — src/cmds/rust/runner.rs changed 8 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 4 (its worst body is rtk::cmds::rust::runner::run_err at line 13), AT OR 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): keep the usage guard off RTK's own probes and argv”; “fix(tracking): store commands so they read back as the same words”; “fix(cli): answer for a program that cannot run, not just an unresolvable name”; “fix(cli)!: preserve argv boundaries in generic runners”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/hooks/init/codex.rs src/hooks/init/codex.rs:832 — src/hooks/init/codex.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 12 (its worst body is rtk::hooks::init::codex::uninstall_codex_with_paths at line 832), AT OR 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): encode sha2 digests as hex”; “fix(init): return exit code 2 when codex uninstall guard refuses hook (fixes #4164)”; “fix(hooks): preserve Claude status semantics and refine agent hook probes”; “fix(tests): keep the test suite and the developer's environment apart”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/hooks/init/codex.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:32 — src/hooks/mod.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::hooks::is_rtk_hook_command at line 32), AT OR 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): pipeline hook rules act on Claude Code only; the shared hook core is develop's again”; “fix(hooks): judge OpenCode against its own permission rules”; “fix(hooks): address Trae portability and partial install diagnostics”; “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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/php/pint_cmd.rs src/cmds/php/pint_cmd.rs:38 — src/cmds/php/pint_cmd.rs changed 8 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 8 (its worst body is rtk::cmds::php::pint_cmd::run at line 38), AT OR 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): store commands so they read back as the same words”; “fix(tests): keep the test suite and the developer's environment apart”; “fix(cli): hand -h, --help and help to the tool each subcommand wraps”; “fix(ruff): bypass never_worse only for the format rtk injected”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/core/telemetry_cmd.rs src/core/telemetry_cmd.rs:199 — src/core/telemetry_cmd.rs changed 7 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 8 (its worst body is rtk::core::telemetry_cmd::run_forget at line 199), AT OR 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): send the classifier key and reach local hosts directly on ureq 3”; “fix(deps): migrate ureq 3 API usage”; “fix(tests): keep the test suite and the developer's environment apart”; “fix(telemetry): treat an empty RTK_TELEMETRY_URL as no endpoint”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/hooks/init/opencode.rs src/hooks/init/opencode.rs:119 — src/hooks/init/opencode.rs changed 7 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 6 (its worst body is rtk::hooks::init::opencode::ensure_opencode_plugin_installed_for at line 119), AT OR 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): install the OpenCode plugin independently of agent setup”; “fix(hooks/opencode): judge only the rules OpenCode applies, and keep init honest”; “fix(init/opencode): drop the floor helper the refactor orphaned”; “fix(init/opencode): leave the plugin alone on an OpenCode that cannot load it”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/hooks/init/opencode.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/llm_proxy.rs src/llm_proxy.rs:81 — src/llm_proxy.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 7 (its worst body is rtk::llm_proxy::run at line 81), AT OR 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): send the classifier key and reach local hosts directly on ureq 3”; “fix(deps): migrate ureq 3 API usage”; “fix(init): require the rtk-proxy binary for the on-ramp, gate binary_available, name the removed base URL”; “fix(init): only offer the proxy when rtk-proxy can run, and remove its base URL on uninstall”. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/llm_proxy.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.
  • + 16 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×38
  • FileTooLong: src/lib.rs src/lib.rs — FileTooLong — 2551 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 2051 over it, 5.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: git/git_cmd.rs src/cmds/git/git_cmd.rs — FileTooLong — 2523 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 136 free functions. The bar is 500 significant lines; this is 2023 over it, 5.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: init/mod.rs src/hooks/init/mod.rs — FileTooLong — 1555 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 51 free functions. The bar is 500 significant lines; this is 1055 over it, 3.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: core/pipeline_cmd.rs src/core/pipeline_cmd.rs — FileTooLong — 1509 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 43 free functions. The bar is 500 significant lines; this is 1009 over it, 3.02× 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 — 1427 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 78 free functions. The bar is 500 significant lines; this is 927 over it, 2.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: analytics/gain.rs src/analytics/gain.rs — FileTooLong — 1331 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 831 over it, 2.66× 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 — 1325 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 825 over it, 2.65× 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 — 1237 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: Tracker (2 blocks, 98-1958). The bar is 500 significant lines; this is 737 over it, 2.47× 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: cloud/aws_cmd.rs src/cmds/cloud/aws_cmd.rs — FileTooLong — 1026 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 526 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: dotnet/dotnet_cmd.rs src/cmds/dotnet/dotnet_cmd.rs — FileTooLong — 979 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 64 free functions. The bar is 500 significant lines; this is 479 over it, 1.96× 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: rust/cargo_cmd.rs src/cmds/rust/cargo_cmd.rs — FileTooLong — 962 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 462 over it, 1.92× 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 — 835 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 335 over it, 1.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: jvm/mvn_cmd.rs src/cmds/jvm/mvn_cmd.rs — FileTooLong — 817 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 317 over it, 1.63× 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 — 816 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 316 over it, 1.63× 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 — 774 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 53 free functions. The bar is 500 significant lines; this is 274 over it, 1.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hooks/posthook.rs src/hooks/posthook.rs — FileTooLong — 753 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 253 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/harness.rs engine/src/harness.rs — FileTooLong — 751 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 251 over it, 1.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: system/search.rs src/cmds/system/search.rs — FileTooLong — 731 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 231 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 — 713 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 47 free functions. The bar is 500 significant lines; this is 213 over it, 1.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hooks/hook_cmd.rs src/hooks/hook_cmd.rs — FileTooLong — 707 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 52 free functions. The bar is 500 significant lines; this is 207 over it, 1.41× 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/pipeline_remote.rs src/core/pipeline_remote.rs — FileTooLong — 696 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 196 over it, 1.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: core/pipeline_config.rs src/core/pipeline_config.rs — FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 40 free functions. The bar is 500 significant lines; this is 174 over it, 1.35× 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: pipeline/validate.rs engine/src/pipeline/validate.rs — FileTooLong — 670 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 170 over it, 1.34× 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/claude.rs src/hooks/init/claude.rs — FileTooLong — 646 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 146 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: init/pi.rs src/hooks/init/pi.rs — FileTooLong — 619 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 119 over it, 1.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.
  • + 13 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×33
  • Hotspot: src/cmds/git/diff_cmd.rs src/cmds/git/diff_cmd.rs:2127 — src/cmds/git/diff_cmd.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 117 in rtk::cmds::git::diff_cmd::condense_unified_diff_strict at line 2127. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/lib.rs src/lib.rs:2536 — src/lib.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 305 in rtk::run_cli at line 2536. 8 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/lib.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:1871 — src/discover/registry.rs changed 73 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in rtk::discover::registry::rewrite_segment_inner at line 1871. 49 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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:2396 — src/cmds/git/git_cmd.rs changed 87 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in rtk::cmds::git::git_cmd::run_log at line 2396. 12 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/core/runner.rs src/core/runner.rs:1208 — src/core/runner.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in rtk::core::runner::extract_test_summary at line 1208. 22 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/system/search.rs src/cmds/system/search.rs:680 — src/cmds/system/search.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in rtk::cmds::system::search::run at line 680. 22 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/analytics/gain.rs src/analytics/gain.rs:601 — src/analytics/gain.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in rtk::analytics::gain::run at line 601. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/discover/lexer.rs src/discover/lexer.rs:175 — src/discover/lexer.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in rtk::discover::lexer::tokenize_inner at line 175. 12 of those changes were fix/bug commits, and the other 12 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/dotnet/dotnet_cmd.rs src/cmds/dotnet/dotnet_cmd.rs:125 — src/cmds/dotnet/dotnet_cmd.rs changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in rtk::cmds::dotnet::dotnet_cmd::run_dotnet_with_binlog at line 125. 28 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/python/pytest_cmd.rs src/cmds/python/pytest_cmd.rs:227 — src/cmds/python/pytest_cmd.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in rtk::cmds::python::pytest_cmd::build_pytest_summary at line 227. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/cmds/python/pytest_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/stream.rs src/core/stream.rs:425 — src/core/stream.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in rtk::core::stream::run_streaming at line 425. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/hooks/init/mod.rs src/hooks/init/mod.rs:1438 — src/hooks/init/mod.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in rtk::hooks::init::uninstall_with_patch_mode at line 1438. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/hooks/init/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/core/arg_tokenizer.rs src/core/arg_tokenizer.rs:472 — src/core/arg_tokenizer.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in rtk::core::arg_tokenizer::tokenize_scan at line 472. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/go/go_cmd.rs src/cmds/go/go_cmd.rs:458 — src/cmds/go/go_cmd.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in rtk::cmds::go::go_cmd::filter_go_test_json at line 458. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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.
  • Hotspot: src/discover/mod.rs src/discover/mod.rs:330 — src/discover/mod.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in rtk::discover::run at line 330. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/rust/cargo_cmd.rs src/cmds/rust/cargo_cmd.rs:654 — src/cmds/rust/cargo_cmd.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in rtk::cmds::rust::cargo_cmd::filter_cargo_nextest at line 654. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/jvm/mvn_cmd.rs src/cmds/jvm/mvn_cmd.rs:682 — src/cmds/jvm/mvn_cmd.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in SurefireBlock::step at line 682. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/hooks/permissions.rs src/hooks/permissions.rs:250 — src/hooks/permissions.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in rtk::hooks::permissions::check_command_with_rules_and_prefixes at line 250. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/core/retriever.rs src/core/retriever.rs:658 — src/core/retriever.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in rtk::core::retriever::run_recall at line 658. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/python/ruff_cmd.rs src/cmds/python/ruff_cmd.rs:263 — src/cmds/python/ruff_cmd.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in rtk::cmds::python::ruff_cmd::filter_ruff_check_json at line 263. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/cmds/python/ruff_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/lint_cmd.rs src/cmds/js/lint_cmd.rs:103 — src/cmds/js/lint_cmd.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in rtk::cmds::js::lint_cmd::run at line 103. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/python/sqlfluff_cmd.rs src/cmds/python/sqlfluff_cmd.rs:209 — src/cmds/python/sqlfluff_cmd.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in rtk::cmds::python::sqlfluff_cmd::render_lint_json at line 209. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/cmds/python/sqlfluff_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/ls.rs src/cmds/system/ls.rs:540 — src/cmds/system/ls.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in rtk::cmds::system::ls::compact_ls at line 540. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01:00' --full-history --no-merges -- src/cmds/system/ls.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:179 — src/cmds/scala/sbt_cmd.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in rtk::cmds::scala::sbt_cmd::filter_sbt_test at line 179. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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/cmds/js/tsc_cmd.rs src/cmds/js/tsc_cmd.rs:245 — src/cmds/js/tsc_cmd.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in rtk::cmds::js::tsc_cmd::filter_tsc_output at line 245. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 03:57:20 +01:00' --until='2026-11-12 03:57:20 +01: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.
  • + 8 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×17
  • Duplicated block (7 lines × 2) proxy/src/extract.rs:162 — proxy/src/extract.rs:162-168 | proxy/src/forward.rs:694-700 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/extract.rs:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) proxy/src/pipeline/cache_align.rs:79 — proxy/src/pipeline/cache_align.rs:79-85 | proxy/src/pipeline/cache_align.rs:88-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/cache_align.rs:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) proxy/src/pipeline/ccr/anthropic.rs:57 — proxy/src/pipeline/ccr/anthropic.rs:57-63 | proxy/src/pipeline/ingest_filter.rs:466-472 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ccr/anthropic.rs:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) proxy/src/pipeline/ccr/anthropic.rs:65 — proxy/src/pipeline/ccr/anthropic.rs:65-71 | proxy/src/pipeline/normalize.rs:352-358 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ccr/anthropic.rs:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • 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/core/tracking.rs:1252 — src/core/tracking.rs:1252-1258 | src/core/tracking.rs:1325-1331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/tracking.rs:1252` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/hooks/init/claude.rs:251 — src/hooks/init/claude.rs:251-257 | src/hooks/init/gemini.rs:129-135 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/claude.rs:251` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/cmds/go/go_cmd.rs:790 — src/cmds/go/go_cmd.rs:790-796 | src/cmds/go/go_cmd.rs:827-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/go/go_cmd.rs:790` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/core/pipeline_cmd.rs:492 — src/core/pipeline_cmd.rs:492-498 | src/core/pipeline_remote.rs:734-740 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/pipeline_cmd.rs:492` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/cmds/git/gh_cmd.rs:105 — src/cmds/git/gh_cmd.rs:105-111 | src/cmds/git/glab_cmd.rs:110-116 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) src/cmds/js/tsc_cmd.rs:43 — src/cmds/js/tsc_cmd.rs:43-49 | src/cmds/js/tsc_cmd.rs:51-57 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/tsc_cmd.rs:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/cmds/git/gh_cmd.rs:239 — src/cmds/git/gh_cmd.rs:239-245 | src/cmds/git/glab_cmd.rs:268-274 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) src/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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/env_cmd.rs:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/cmds/git/gh_cmd.rs:541 — src/cmds/git/gh_cmd.rs:541-547 | src/cmds/git/gh_cmd.rs:924-930 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:541` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/cmds/git/gh_cmd.rs:933` calls `unwrap_or_default` and `src/cmds/git/gh_cmd.rs:550` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) src/cmds/cloud/aws_cmd.rs:1288 — src/cmds/cloud/aws_cmd.rs:1288-1294 | src/cmds/cloud/aws_cmd.rs:1332-1338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/aws_cmd.rs:1288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/cmds/git/glab_cmd.rs:548 — src/cmds/git/glab_cmd.rs:548-554 | src/cmds/git/glab_cmd.rs:754-760 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/cmds/cloud/container.rs:104 — src/cmds/cloud/container.rs:104-110 | src/cmds/cloud/container.rs:200-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/container.rs:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · rtk_proxy · ×16
  • rtk_proxy::context_analysis::analyze (cognitive 66) proxy/src/context_analysis.rs:125 — rtk_proxy::context_analysis::analyze has cognitive complexity 66 (threshold 15). Drivers by points: if/else 7 (25 pts), match/switch 5 (25 pts), loops 4 (16 pts) (nesting depth added 50). 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_proxy::ccr_forward::run_anthropic (cognitive 42) proxy/src/ccr_forward.rs:74 — rtk_proxy::ccr_forward::run_anthropic has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 23). 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_proxy::ccr_forward::run_openai (cognitive 41) proxy/src/ccr_forward.rs:202 — rtk_proxy::ccr_forward::run_openai has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 23). 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_proxy::extract::tool_calls_from_response (cognitive 38) proxy/src/extract.rs:138 — rtk_proxy::extract::tool_calls_from_response has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 3 (9 pts), match/switch 1 (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • rtk_proxy::extract::image_count (cognitive 31) proxy/src/extract.rs:38 — rtk_proxy::extract::image_count has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::extract::tool_results_from_request (cognitive 30) proxy/src/extract.rs:205 — rtk_proxy::extract::tool_results_from_request has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (8 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::forward::relay (cognitive 30) proxy/src/forward.rs:301 — rtk_proxy::forward::relay has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 5, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::extract::count_rtk_rewrites (cognitive 23) proxy/src/extract.rs:261 — rtk_proxy::extract::count_rtk_rewrites has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::run_start (cognitive 23) proxy/src/main.rs:118 — rtk_proxy::run_start has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 4 (6 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::pipeline::normalize::strip_ansi (cognitive 23) proxy/src/pipeline/normalize.rs:122 — rtk_proxy::pipeline::normalize::strip_ansi has cognitive complexity 23 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 2 (7 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::pipeline::normalize::tool_by_id (cognitive 21) proxy/src/pipeline/normalize.rs:344 — rtk_proxy::pipeline::normalize::tool_by_id has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (6 pts) (nesting depth added 15). 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_proxy::pipeline::normalize::normalise_tool_result (cognitive 21) proxy/src/pipeline/normalize.rs:367 — rtk_proxy::pipeline::normalize::normalise_tool_result has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • rtk_proxy::pipeline::pixel_compress::draw_glyph (cognitive 20) proxy/src/pipeline/pixel_compress.rs:109 — rtk_proxy::pipeline::pixel_compress::draw_glyph has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • rtk_proxy::run_stats (cognitive 16) proxy/src/main.rs:323 — rtk_proxy::run_stats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 1 (4 pts), match/switch 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::pipeline::cache_align::has_cache_control (cognitive 16) proxy/src/pipeline/cache_align.rs:43 — rtk_proxy::pipeline::cache_align::has_cache_control has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_proxy::pipeline::ccr::openai::compress_request (cognitive 16) proxy/src/pipeline/ccr/openai.rs:64 — rtk_proxy::pipeline::ccr::openai::compress_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×15
  • Duplicated block (11 lines × 2) proxy/src/pipeline/image_opt.rs:244 — proxy/src/pipeline/image_opt.rs:244-254 | proxy/src/pipeline/pixel_compress.rs:326-336 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/image_opt.rs:244` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/analytics/gain.rs:71 — src/analytics/gain.rs:71-81 | src/analytics/gain.rs:178-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/analytics/gain.rs:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/cmds/cloud/aws_cmd.rs:637 — src/cmds/cloud/aws_cmd.rs:637-647 | src/cmds/cloud/aws_cmd.rs:662-672 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/aws_cmd.rs:637` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/cmds/dotnet/dotnet_cmd.rs:181 — src/cmds/dotnet/dotnet_cmd.rs:181-191 | src/cmds/dotnet/dotnet_cmd.rs:213-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/cmds/git/git_cmd.rs:370 — src/cmds/git/git_cmd.rs:370-380 | src/cmds/git/git_cmd.rs:4360-4370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/git_cmd.rs:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/cmds/git/git_cmd.rs:369` calls `success` and `src/cmds/git/git_cmd.rs:4359` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) src/cmds/git/git_cmd.rs:3292 — src/cmds/git/git_cmd.rs:3292-3302 | src/cmds/git/git_cmd.rs:3739-3749 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/git_cmd.rs:3292` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/cmds/js/tsc_cmd.rs:325 — src/cmds/js/tsc_cmd.rs:325-335 | src/cmds/python/mypy_cmd.rs:180-190 — 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/discover/lexer.rs:253 — src/discover/lexer.rs:253-263 | src/discover/lexer.rs:308-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/discover/lexer.rs:253` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) src/hooks/hook_cmd.rs:309 — src/hooks/hook_cmd.rs:309-319 | src/hooks/hook_cmd.rs:377-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/cmds/python/ruff_cmd.rs:526 — src/cmds/python/ruff_cmd.rs:526-536 | src/cmds/system/format_cmd.rs:274-284 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/python/ruff_cmd.rs:526` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/cmds/cloud/container.rs:760 — src/cmds/cloud/container.rs:760-772 | src/cmds/cloud/container.rs:781-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/container.rs:760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/cmds/js/playwright_cmd.rs:291 — src/cmds/js/playwright_cmd.rs:291-301 | 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/playwright_cmd.rs:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/cmds/git/gh_cmd.rs:253 — src/cmds/git/gh_cmd.rs:253-263 | src/cmds/git/glab_cmd.rs:301-311 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:253` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/prisma_cmd.rs:417` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · rtk_engine · ×14
  • rtk_engine::pipeline::validate::validate (cognitive 157) engine/src/pipeline/validate.rs:53 — rtk_engine::pipeline::validate::validate has cognitive complexity 157 (threshold 15). Drivers by points: if/else 39 (115 pts), loops 13 (27 pts), boolean chains 13, match/switch 1 (2 pts) (nesting depth added 91). 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_engine::pipeline::resolve::resolve (cognitive 115) engine/src/pipeline/resolve.rs:165 — rtk_engine::pipeline::resolve::resolve has cognitive complexity 115 (threshold 15). Drivers by points: if/else 23 (55 pts), loops 26 (50 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 62). 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_engine::pipeline::validate::validate_rule (cognitive 114) engine/src/pipeline/validate.rs:450 — rtk_engine::pipeline::validate::validate_rule has cognitive complexity 114 (threshold 15). Drivers by points: if/else 37 (79 pts), match/switch 6 (17 pts), boolean chains 14, loops 3 (4 pts) (nesting depth added 54). 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_engine::pipeline::resolve::patch_rule (cognitive 44) engine/src/pipeline/resolve.rs:607 — rtk_engine::pipeline::resolve::patch_rule has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 5 (8 pts), match/switch 2 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::pipeline::schema::parse_rule (cognitive 33) engine/src/pipeline/schema.rs:427 — rtk_engine::pipeline::schema::parse_rule has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 6 (19 pts), if/else 6 (11 pts), loops 2 (3 pts) (nesting depth added 19). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • rtk_engine::pipeline::eval::resolve_chain (cognitive 25) engine/src/pipeline/eval.rs:70 — rtk_engine::pipeline::eval::resolve_chain has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::shape::strip_ansi (cognitive 25) engine/src/shape.rs:49 — rtk_engine::shape::strip_ansi has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::harness::plan_hooks (cognitive 21) engine/src/harness.rs:855 — rtk_engine::harness::plan_hooks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (7 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.
  • rtk_engine::pipeline::schema::override_replaces_when (cognitive 21) engine/src/pipeline/schema.rs:795 — rtk_engine::pipeline::schema::override_replaces_when has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::pipeline::resolve::extends_closure (cognitive 18) engine/src/pipeline/resolve.rs:121 — rtk_engine::pipeline::resolve::extends_closure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::pipeline::schema::parse_directives (cognitive 17) engine/src/pipeline/schema.rs:569 — rtk_engine::pipeline::schema::parse_directives has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::methods::lockfile::summarize_npm (cognitive 16) engine/src/methods/lockfile.rs:86 — rtk_engine::methods::lockfile::summarize_npm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::pipeline::schema::parse (cognitive 16) engine/src/pipeline/schema.rs:205 — rtk_engine::pipeline::schema::parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rtk_engine::pipeline::schema::parse_classifier (cognitive 16) engine/src/pipeline/schema.rs:707 — rtk_engine::pipeline::schema::parse_classifier has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×14
  • Duplicated block (9 lines × 2) proxy/src/memory.rs:92 — proxy/src/memory.rs:92-100 | proxy/src/memory.rs:194-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. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/memory.rs:92` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) proxy/src/store.rs:357 — proxy/src/store.rs:357-365 | proxy/src/store.rs:419-427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/store.rs:357` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/cmds/cloud/container.rs:170 — src/cmds/cloud/container.rs:170-178 | src/cmds/cloud/container.rs:182-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/container.rs:182` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/local_llm.rs:207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/core/task_cmd.rs:555 — src/core/task_cmd.rs:555-563 | src/core/task_cmd.rs:639-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/task_cmd.rs:555` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • 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:318-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/agents_md.rs:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/hooks/init/antigravity.rs:401 — src/hooks/init/antigravity.rs:401-409 | src/hooks/init/antigravity.rs:468-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/antigravity.rs:468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/hooks/init/hermes.rs:277 — src/hooks/init/hermes.rs:277-285 | src/hooks/init/hermes.rs:386-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/hermes.rs:277` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/cmds/git/gh_cmd.rs:309 — src/cmds/git/gh_cmd.rs:309-317 | src/cmds/git/glab_cmd.rs:377-385 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/hooks/init/instructions_agents.rs:27 — src/hooks/init/instructions_agents.rs:27-35 | src/hooks/init/instructions_agents.rs:74-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/instructions_agents.rs:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) proxy/src/extract.rs:150 — proxy/src/extract.rs:150-158 | proxy/src/extract.rs:169-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/extract.rs:150` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/analytics/cc_economics.rs:600 — src/analytics/cc_economics.rs:600-608 | src/analytics/cc_economics.rs:631-639 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/analytics/cc_economics.rs:600` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/core/tracking.rs:1883 — src/core/tracking.rs:1883-1891 | src/core/tracking.rs:1939-1947 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/tracking.rs:1883` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/summary.rs:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×12
  • Duplicated block (6 lines × 2) proxy/src/pipeline/engine_methods.rs:271 — proxy/src/pipeline/engine_methods.rs:271-276 | proxy/src/pipeline/normalize.rs:380-385 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/engine_methods.rs:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/go/golangci_cmd.rs:382 — src/cmds/go/golangci_cmd.rs:382-387 | src/cmds/js/lint_cmd.rs:403-408 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/go/golangci_cmd.rs:382` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/js/tsc_cmd.rs:350 — src/cmds/js/tsc_cmd.rs:350-356 | src/cmds/python/mypy_cmd.rs:194-199 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/tsc_cmd.rs:350` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/cmds/python/mypy_cmd.rs:200` calls `is_empty` and `src/cmds/js/tsc_cmd.rs:357` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) src/cmds/python/pytest_cmd.rs:124 — src/cmds/python/pytest_cmd.rs:124-129 | src/cmds/ruby/rake_cmd.rs:109-114 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/python/pytest_cmd.rs:124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/rust/cargo_cmd.rs:1065 — src/cmds/rust/cargo_cmd.rs:1065-1070 | src/cmds/rust/cargo_cmd.rs:1439-1444 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/rust/cargo_cmd.rs:1065` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/core/retriever.rs:323 — src/core/retriever.rs:323-328 | src/core/retriever.rs:747-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/retriever.rs:323` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/git/gh_cmd.rs:362 — src/cmds/git/gh_cmd.rs:362-367 | src/cmds/git/gh_cmd.rs:761-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:362` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/git/glab_cmd.rs:438 — src/cmds/git/glab_cmd.rs:438-443 | src/cmds/git/glab_cmd.rs:675-680 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/glab_cmd.rs:438` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/dotnet/dotnet_cmd.rs:114 — src/cmds/dotnet/dotnet_cmd.rs:114-119 | src/cmds/go/go_cmd.rs:172-179 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/go/go_cmd.rs:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) src/cmds/git/git_cmd.rs:3707 — src/cmds/git/git_cmd.rs:3707-3712 | src/cmds/git/git_cmd.rs:3713-3718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/git_cmd.rs:3707` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/system/ctest_cmd.rs:575 — src/cmds/system/ctest_cmd.rs:575-580 | src/cmds/system/ctest_cmd.rs:786-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/ctest_cmd.rs:575` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/cmds/git/gh_cmd.rs:458 — src/cmds/git/gh_cmd.rs:458-463 | src/cmds/git/gh_cmd.rs:818-823 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×12
  • Outbound HTTP without resilience proxy/src/main.rs:279 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience proxy/src/main.rs:305 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience proxy/src/main.rs:325 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience proxy/src/main.rs:366 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience proxy/src/main.rs:412 — `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience proxy/src/main.rs:457 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/classify.rs:145 — `ureq::post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/task_cmd.rs:388 — `ureq::post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/task_cmd.rs:390 — `ureq::post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/telemetry.rs:159 — `ureq::post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/telemetry_cmd.rs:259 — `ureq::post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/llm_proxy.rs:549 — `ureq::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×8
  • Duplicated block (8 lines × 2) proxy/src/pipeline/engine_methods.rs:243 — proxy/src/pipeline/engine_methods.rs:243-250 | proxy/src/pipeline/normalize.rs:424-431 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/engine_methods.rs:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/cmds/git/glab_cmd.rs:558 — src/cmds/git/glab_cmd.rs:558-565 | src/cmds/git/glab_cmd.rs:764-771 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/glab_cmd.rs:558` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/core/pipeline_config.rs:571 — src/core/pipeline_config.rs:571-578 | src/hooks/posthook.rs:272-279 — 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/hooks/posthook.rs:904 — src/hooks/posthook.rs:904-911 | src/hooks/posthook.rs:924-931 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) proxy/src/pipeline/ccr/anthropic.rs:53 — proxy/src/pipeline/ccr/anthropic.rs:53-60 | proxy/src/pipeline/ccr/anthropic.rs:137-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ccr/anthropic.rs:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/cmds/git/git_cmd.rs:359 — src/cmds/git/git_cmd.rs:359-370 | src/cmds/git/git_cmd.rs:550-557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/git_cmd.rs:359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/discover/registry.rs:1402 — src/discover/registry.rs:1402-1409 | src/discover/registry.rs:1426-1433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/discover/registry.rs:1402` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/cmds/go/golangci_cmd.rs:390 — src/cmds/go/golangci_cmd.rs:390-397 | src/cmds/js/lint_cmd.rs:299-306 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/go/golangci_cmd.rs:390` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · rtk_engine · ×7
  • rtk_engine::pipeline::validate::validate (cyclomatic 68) engine/src/pipeline/validate.rs:53 — rtk_engine::pipeline::validate::validate has cyclomatic complexity 68 (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_engine::pipeline::validate::validate_rule (cyclomatic 63) engine/src/pipeline/validate.rs:450 — rtk_engine::pipeline::validate::validate_rule has cyclomatic complexity 63 (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_engine::pipeline::resolve::resolve (cyclomatic 53) engine/src/pipeline/resolve.rs:165 — rtk_engine::pipeline::resolve::resolve has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk_engine::pipeline::resolve::patch_rule (cyclomatic 29) engine/src/pipeline/resolve.rs:607 — rtk_engine::pipeline::resolve::patch_rule has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk_engine::pipeline::schema::parse_rule (cyclomatic 23) engine/src/pipeline/schema.rs:427 — rtk_engine::pipeline::schema::parse_rule has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • rtk_engine::pipeline::schema::parse (cyclomatic 19) engine/src/pipeline/schema.rs:205 — rtk_engine::pipeline::schema::parse has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • rtk_engine::pipeline::conditions::check_hook_key (cyclomatic 18) engine/src/pipeline/conditions.rs:137 — rtk_engine::pipeline::conditions::check_hook_key has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) proxy/src/main.rs:325 — proxy/src/main.rs:325-338 | proxy/src/main.rs:412-425 — both copies are in the same file, so extract the block into 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) proxy/src/pipeline/ccr/anthropic.rs:28 — proxy/src/pipeline/ccr/anthropic.rs:28-41 | proxy/src/pipeline/ccr/openai.rs:41-54 — 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/cmds/git/gh_cmd.rs:496 — src/cmds/git/gh_cmd.rs:496-509 | src/cmds/git/gh_cmd.rs:704-717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/cmds/system/read.rs:370 — src/cmds/system/read.rs:370-383 | src/core/retriever.rs:126-139 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) src/lib.rs:3958 — src/lib.rs:3958-3971 | src/lib.rs:3980-3993 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/lib.rs:3958` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • 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:68-83 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/agents_md.rs:155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/cmds/php/paratest_cmd.rs:13 — src/cmds/php/paratest_cmd.rs:13-26 | src/cmds/php/pest_cmd.rs:13-26 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/php/paratest_cmd.rs:13` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 lines × 2) proxy/src/pipeline/ingest_filter.rs:331 — proxy/src/pipeline/ingest_filter.rs:331-342 | proxy/src/pipeline/ingest_filter.rs:365-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ingest_filter.rs:365` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/cmds/dotnet/binlog.rs:763 — src/cmds/dotnet/binlog.rs:763-774 | src/cmds/dotnet/binlog.rs:788-799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/dotnet/binlog.rs:763` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/cmds/dotnet/binlog.rs:800` calls `captures_iter`, `count` and `src/cmds/dotnet/binlog.rs:775` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) src/cmds/git/gh_cmd.rs:768 — src/cmds/git/gh_cmd.rs:768-779 | src/cmds/git/glab_cmd.rs:682-693 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:768` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/hooks/init/mod.rs:618 — src/hooks/init/mod.rs:618-629 | src/hooks/init/mod.rs:644-655 — both copies are in the same file, so extract the block into 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/posthook.rs:333 — src/hooks/posthook.rs:333-344 | src/hooks/posthook.rs:396-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/posthook.rs:333` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) proxy/src/extract.rs:210 — proxy/src/extract.rs:210-221 | proxy/src/extract.rs:266-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/extract.rs:210` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/hooks/init/copilot.rs:83 — src/hooks/init/copilot.rs:83-97 | src/hooks/init/copilot.rs:213-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/copilot.rs:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×7
  • Duplicated block (5 lines × 2) src/cmds/js/lint_cmd.rs:441 — src/cmds/js/lint_cmd.rs:441-445 | src/cmds/python/ruff_cmd.rs:350-354 — 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/cmds/system/find_cmd.rs:740 — src/cmds/system/find_cmd.rs:740-744 | src/hooks/hook_audit_cmd.rs:165-169 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) src/cmds/system/log_cmd.rs:131 — src/cmds/system/log_cmd.rs:131-136 | src/cmds/system/log_cmd.rs:174-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/log_cmd.rs:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/cmds/git/diff_cmd.rs:2434 — src/cmds/git/diff_cmd.rs:2434-2438 | src/cmds/git/diff_cmd.rs:2444-2448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/diff_cmd.rs:2434` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) proxy/src/pipeline/cache_align.rs:45 — proxy/src/pipeline/cache_align.rs:45-49 | proxy/src/pipeline/cache_align.rs:50-54 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/cache_align.rs:45` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) proxy/src/pipeline/ccr/mod.rs:96 — proxy/src/pipeline/ccr/mod.rs:96-100 | proxy/src/pipeline/ccr/mod.rs:143-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ccr/mod.rs:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/core/telemetry.rs:504 — src/core/telemetry.rs:504-508 | src/core/telemetry.rs:514-518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×6
  • Duplicated block (10 lines × 2) engine/src/pipeline/conditions.rs:202 — engine/src/pipeline/conditions.rs:202-211 | engine/src/pipeline/conditions.rs:234-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) src/core/tracking.rs:1248 — src/core/tracking.rs:1248-1257 | src/core/tracking.rs:1347-1360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/tracking.rs:1248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/analytics/gain.rs:1804 — src/analytics/gain.rs:1804-1813 | src/hooks/init/mod.rs:859-868 — 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/core/task_cmd.rs:544 — src/core/task_cmd.rs:544-553 | src/core/task_cmd.rs:593-602 — both copies are in the same file, so extract the block into 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/js/lint_cmd.rs:339 — src/cmds/js/lint_cmd.rs:339-348 | src/cmds/js/lint_cmd.rs:468-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/lint_cmd.rs:339` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/cmds/php/phpstan_cmd.rs:225 — src/cmds/php/phpstan_cmd.rs:225-234 | src/cmds/ruby/rubocop_cmd.rs:233-242 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
AC3 · Page structure · Page without a main landmark · ×5
  • Page without a main landmark .github/assets/src/before-after.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark .github/assets/src/companies.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark .github/assets/src/go-further.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark .github/assets/src/rtk-banner.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark .github/assets/src/rtk-pro.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · rtk_proxy · ×5
  • rtk_proxy::context_analysis::analyze (cyclomatic 23) proxy/src/context_analysis.rs:125 — rtk_proxy::context_analysis::analyze has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • rtk_proxy::run_start (cyclomatic 21) proxy/src/main.rs:118 — rtk_proxy::run_start has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • rtk_proxy::ccr_forward::run_anthropic (cyclomatic 19) proxy/src/ccr_forward.rs:74 — rtk_proxy::ccr_forward::run_anthropic has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk_proxy::ccr_forward::run_openai (cyclomatic 18) proxy/src/ccr_forward.rs:202 — rtk_proxy::ccr_forward::run_openai has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • rtk_proxy::forward::relay (cyclomatic 16) proxy/src/forward.rs:301 — rtk_proxy::forward::relay 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×5
  • Edited copy of a member (14 corresponding lines) src/cmds/go/golangci_cmd.rs:452 — src/cmds/go/golangci_cmd.rs:452-466 | src/cmds/js/lint_cmd.rs:523-536 — These two members are one piece of code written twice and then edited apart: 14 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.
  • Edited copy of a member (14 corresponding lines) src/cmds/system/json_cmd.rs:42 — src/cmds/system/json_cmd.rs:42-57 | src/cmds/system/log_cmd.rs:26-39 — These two members are one piece of code written twice and then edited apart: 14 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.
  • Edited copy of a member (14 corresponding lines) src/hooks/hook_cmd.rs:308 — src/hooks/hook_cmd.rs:308-326 | src/hooks/hook_cmd.rs:1237-1250 — These two members are one piece of code written twice and then edited apart: 14 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.
  • Edited copy of a member (14 corresponding lines) src/cmds/git/glab_cmd.rs:597 — src/cmds/git/glab_cmd.rs:597-616 | src/cmds/git/glab_cmd.rs:1032-1045 — These two members are one piece of code written twice and then edited apart: 14 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.
  • Edited copy of a member (14 corresponding lines) src/hooks/init/droid.rs:457 — src/hooks/init/droid.rs:457-470 | src/hooks/init/trae.rs:357-371 — These two members are one piece of code written twice and then edited apart: 14 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 · Duplicated block (15 lines × 2) · ×5
  • Duplicated block (15 lines × 2) proxy/src/ccr_forward.rs:494 — proxy/src/ccr_forward.rs:494-509 | proxy/src/ccr_forward.rs:563-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) src/cmds/js/lint_cmd.rs:302 — src/cmds/js/lint_cmd.rs:302-316 | src/cmds/js/lint_cmd.rs:426-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/lint_cmd.rs:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/cmds/php/ecs_cmd.rs:47 — src/cmds/php/ecs_cmd.rs:47-61 | src/cmds/php/php_cmd.rs:72-86 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/php/ecs_cmd.rs:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/core/telemetry_cmd.rs:166 — src/core/telemetry_cmd.rs:166-180 | src/hooks/init/mod.rs:1374-1388 — 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/hooks/init/pi.rs:573 — src/hooks/init/pi.rs:573-590 | src/hooks/init/pi.rs:817-831 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/pi.rs:573` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) src/cmds/system/read.rs:62 — src/cmds/system/read.rs:62-75 | src/cmds/system/read.rs:166-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/read.rs:62` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/core/tracking.rs:1697 — src/core/tracking.rs:1697-1709 | src/core/tracking.rs:1759-1771 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/tracking.rs:1697` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/hooks/init/mod.rs:1881 — src/hooks/init/mod.rs:1881-1893 | src/hooks/init/mod.rs:1918-1930 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/mod.rs:1881` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/hooks/hook_cmd.rs:728 — src/hooks/hook_cmd.rs:728-740 | src/hooks/hook_cmd.rs:1012-1024 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/hook_cmd.rs:728` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/hooks/hook_cmd.rs:741` calls `AllowRewrite`, `Some`, `AskRewrite` and `src/hooks/hook_cmd.rs:1025` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) src/cmds/js/lint_cmd.rs:354 — src/cmds/js/lint_cmd.rs:354-366 | src/cmds/python/ruff_cmd.rs:266-278 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/lint_cmd.rs:354` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×5
  • Duplicated block (5 lines × 3) proxy/src/pipeline/ccr/anthropic.rs:56 — proxy/src/pipeline/ccr/anthropic.rs:56-60 | proxy/src/pipeline/ccr/anthropic.rs:140-144 | proxy/src/pipeline/ingest_filter.rs:465-469 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ccr/anthropic.rs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) src/cmds/cloud/container.rs:98 — src/cmds/cloud/container.rs:98-102 | src/cmds/cloud/container.rs:170-177 | src/cmds/cloud/container.rs:182-191 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/container.rs:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 3) src/cmds/js/lint_cmd.rs:525 — src/cmds/js/lint_cmd.rs:525-529 | src/cmds/python/ruff_cmd.rs:523-527 | src/cmds/system/format_cmd.rs:271-275 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/lint_cmd.rs:525` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) src/lib.rs:3481 — src/lib.rs:3481-3485 | src/lib.rs:3487-3491 | src/lib.rs:3494-3498 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/lib.rs:3492` calls `run_compile` and `src/lib.rs:3486` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) proxy/src/pipeline/ccr/mod.rs:96 — proxy/src/pipeline/ccr/mod.rs:96-100 | proxy/src/pipeline/ccr/mod.rs:118-122 | proxy/src/pipeline/ccr/mod.rs:143-147 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ccr/mod.rs:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/cmds/git/gh_cmd.rs:352 — src/cmds/git/gh_cmd.rs:352-392 | src/cmds/git/gh_cmd.rs:751-789 | src/cmds/git/glab_cmd.rs:426-464 | src/cmds/git/glab_cmd.rs:663-704 — 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/git/git_cmd.rs:330 — src/cmds/git/git_cmd.rs:330-452 | src/cmds/git/git_cmd.rs:502-786 | src/cmds/git/git_cmd.rs:3148-3233 | src/cmds/git/git_cmd.rs:3775-3916 — 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/hooks/hook_cmd.rs:69 — src/hooks/hook_cmd.rs:69-98 | src/hooks/hook_cmd.rs:800-866 | src/hooks/hook_cmd.rs:921-942 | src/hooks/hook_cmd.rs:1046-1082 — 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.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×4
  • Edited copy of a member (33 corresponding lines) src/cmds/git/gh_cmd.rs:817 — src/cmds/git/gh_cmd.rs:817-849 | src/cmds/git/glab_cmd.rs:716-748 — These two members are one piece of code written twice and then edited apart: 33 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.
  • Edited copy of a member (33 corresponding lines) src/hooks/init/mod.rs:1870 — src/hooks/init/mod.rs:1870-1902 | src/hooks/init/mod.rs:1905-1939 — These two members are one piece of code written twice and then edited apart: 33 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.
  • Edited copy of a member (33 corresponding lines) src/cmds/js/playwright_cmd.rs:91 — src/cmds/js/playwright_cmd.rs:91-123 | src/cmds/js/pnpm_cmd.rs:59-97 — These two members are one piece of code written twice and then edited apart: 33 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.
  • Edited copy of a member (33 corresponding lines) src/cmds/git/git_cmd.rs:3112 — src/cmds/git/git_cmd.rs:3112-3146 | src/cmds/js/npm_cmd.rs:178-210 — These two members are one piece of code written twice and then edited apart: 33 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 · Edited copy of a member (23 corresponding lines) · ×4
  • Edited copy of a member (23 corresponding lines) src/core/tracking.rs:1690 — src/core/tracking.rs:1690-1713 | src/core/tracking.rs:1753-1775 — These two members are one piece of code written twice and then edited apart: 23 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.
  • Edited copy of a member (23 corresponding lines) proxy/src/store.rs:283 — proxy/src/store.rs:283-305 | proxy/src/store.rs:318-344 — These two members are one piece of code written twice and then edited apart: 23 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.
  • Edited copy of a member (23 corresponding lines) src/cmds/git/gh_cmd.rs:1014 — src/cmds/git/gh_cmd.rs:1014-1036 | src/cmds/git/glab_cmd.rs:572-595 — These two members are one piece of code written twice and then edited apart: 23 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.
  • Edited copy of a member (23 corresponding lines) src/cmds/go/go_cmd.rs:96 — src/cmds/go/go_cmd.rs:96-118 | src/cmds/go/go_cmd.rs:120-142 — These two members are one piece of code written twice and then edited apart: 23 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 · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) src/cmds/python/ruff_cmd.rs:522 — src/cmds/python/ruff_cmd.rs:522-536 | src/cmds/system/format_cmd.rs:270-284 — 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.
  • Edited copy of a member (15 corresponding lines) src/cmds/js/prisma_cmd.rs:413 — src/cmds/js/prisma_cmd.rs:413-427 | src/cmds/js/prisma_cmd.rs:430-444 — 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.
  • Edited copy of a member (15 corresponding lines) src/hooks/init/hermes.rs:276 — src/hooks/init/hermes.rs:276-290 | src/hooks/init/hermes.rs:383-406 — 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.
  • Edited copy of a member (15 corresponding lines) src/core/tracking.rs:2248 — src/core/tracking.rs:2248-2262 | src/core/tracking.rs:2269-2283 — 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 · Edited copy of a member (16 corresponding lines) · ×4
  • Edited copy of a member (16 corresponding lines) src/cmds/rust/runner.rs:13 — src/cmds/rust/runner.rs:13-28 | src/cmds/rust/runner.rs:34-53 — These two members are one piece of code written twice and then edited apart: 16 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.
  • Edited copy of a member (16 corresponding lines) src/analytics/gain.rs:543 — src/analytics/gain.rs:543-558 | src/analytics/gain.rs:1343-1360 — These two members are one piece of code written twice and then edited apart: 16 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.
  • Edited copy of a member (16 corresponding lines) src/cmds/go/go_cmd.rs:190 — src/cmds/go/go_cmd.rs:190-205 | src/cmds/go/golangci_cmd.rs:180-195 — These two members are one piece of code written twice and then edited apart: 16 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.
  • Edited copy of a member (16 corresponding lines) src/cmds/dotnet/dotnet_cmd.rs:1100 — src/cmds/dotnet/dotnet_cmd.rs:1100-1116 | src/cmds/dotnet/dotnet_cmd.rs:1176-1191 — These two members are one piece of code written twice and then edited apart: 16 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 · Edited copy of a member (11 corresponding lines) · ×4
  • Edited copy of a member (11 corresponding lines) proxy/src/pipeline/ccr/mod.rs:94 — proxy/src/pipeline/ccr/mod.rs:94-104 | proxy/src/pipeline/ccr/mod.rs:141-151 — These two members are one piece of code written twice and then edited apart: 11 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.
  • Edited copy of a member (11 corresponding lines) src/cmds/dotnet/binlog.rs:260 — src/cmds/dotnet/binlog.rs:260-270 | src/cmds/dotnet/binlog.rs:272-282 — These two members are one piece of code written twice and then edited apart: 11 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.
  • Edited copy of a member (11 corresponding lines) src/core/tracking.rs:1881 — src/core/tracking.rs:1881-1891 | src/core/tracking.rs:1937-1947 — These two members are one piece of code written twice and then edited apart: 11 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.
  • Edited copy of a member (11 corresponding lines) src/hooks/hook_cmd.rs:24 — src/hooks/hook_cmd.rs:24-34 | src/hooks/hook_cmd/claude_pipeline.rs:12-22 — These two members are one piece of code written twice and then edited apart: 11 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 · Edited copy of a member (12 corresponding lines) · ×4
  • Edited copy of a member (12 corresponding lines) src/cmds/git/git_cmd.rs:2692 — src/cmds/git/git_cmd.rs:2692-2703 | src/cmds/git/git_cmd.rs:2708-2719 — These two members are one piece of code written twice and then edited apart: 12 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.
  • Edited copy of a member (12 corresponding lines) src/analytics/gain.rs:1288 — src/analytics/gain.rs:1288-1299 | src/analytics/gain.rs:1378-1389 — These two members are one piece of code written twice and then edited apart: 12 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.
  • Edited copy of a member (12 corresponding lines) engine/src/pipeline/resolve.rs:838 — engine/src/pipeline/resolve.rs:838-849 | engine/src/pipeline/resolve.rs:855-868 — These two members are one piece of code written twice and then edited apart: 12 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.
  • Edited copy of a member (12 corresponding lines) src/hooks/init/codex.rs:1001 — src/hooks/init/codex.rs:1001-1012 | src/hooks/init/cursor.rs:250-261 — These two members are one piece of code written twice and then edited apart: 12 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.
D3 · God Classes · TooManyFunctions · ×3
  • TooManyFunctions: rtk::core::utils src/core/utils.rs:32 — TooManyFunctions — 43 free functions. The bar is 30 free functions; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: rtk_proxy::pipeline::ccr proxy/src/pipeline/ccr/mod.rs:83 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyFunctions: rtk::hooks::permissions src/hooks/permissions.rs:40 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) src/core/pipeline_config.rs:344 — src/core/pipeline_config.rs:344-360 | src/core/pipeline_log.rs:53-69 — These two members are one piece of code written twice and then edited apart: 17 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.
  • Edited copy of a member (17 corresponding lines) src/core/utils.rs:200 — src/core/utils.rs:200-216 | src/core/utils.rs:221-237 — These two members are one piece of code written twice and then edited apart: 17 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.
  • Edited copy of a member (17 corresponding lines) proxy/src/pipeline/ccr/anthropic.rs:8 — proxy/src/pipeline/ccr/anthropic.rs:8-24 | proxy/src/pipeline/ccr/openai.rs:18-37 — These two members are one piece of code written twice and then edited apart: 17 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 · Duplicated block (13–14 lines × 2) · ×3
  • Duplicated block (13–14 lines × 2) src/analytics/cc_economics.rs:582 — src/analytics/cc_economics.rs:582-594 | src/analytics/cc_economics.rs:620-633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/analytics/cc_economics.rs:582` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 2) src/cmds/git/gh_cmd.rs:269 — src/cmds/git/gh_cmd.rs:269-281 | src/cmds/git/glab_cmd.rs:325-338 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13–14 lines × 2) src/cmds/git/gh_cmd.rs:831 — src/cmds/git/gh_cmd.rs:831-843 | src/cmds/git/glab_cmd.rs:731-744 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:831` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/cmds/git/gh_cmd.rs:845` calls `push_str` and `src/cmds/git/glab_cmd.rs:745` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×3
  • Duplicated block (10–14 lines × 2) src/cmds/js/lint_cmd.rs:327 — src/cmds/js/lint_cmd.rs:327-336 | src/cmds/js/lint_cmd.rs:452-465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/lint_cmd.rs:327` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–14 lines × 2) src/discover/lexer.rs:288 — src/discover/lexer.rs:288-301 | src/discover/lexer.rs:360-369 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/discover/lexer.rs:288` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–14 lines × 2) src/hooks/init/mod.rs:1019 — src/hooks/init/mod.rs:1019-1032 | src/hooks/init/mod.rs:1271-1280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment src/cmds/system/pipe_cmd.rs:682 — // 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:705 — // 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.
D2 · Cognitive Complexity · SseAccumulator · ×2
  • SseAccumulator::feed_tool_use (cognitive 58) proxy/src/forward.rs:691 — SseAccumulator::feed_tool_use has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (46 pts), loops 3 (11 pts), match/switch 1 (nesting depth added 40). 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.
  • SseAccumulator::feed_text (cognitive 24) proxy/src/forward.rs:774 — SseAccumulator::feed_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (6 pts), match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ClaudeProvider · ×2
  • ClaudeProvider::extract_commands (cognitive 37) src/discover/provider.rs:190 — 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:78 — 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.
D2 · Cognitive Complexity · DependencyState · ×2
  • 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.
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: Tracker src/core/tracking.rs:98 — ClassTooLong — 751 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 45 methods, 2 blocks, lines 98-1958. The bar is 400 significant lines; this is 351 over it, 1.88× 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/lib.rs:182 — ClassTooLong — 426 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 26 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×2
  • Edited copy of a member (38 corresponding lines) src/core/task_cmd.rs:526 — src/core/task_cmd.rs:526-567 | src/core/task_cmd.rs:573-610 — These two members are one piece of code written twice and then edited apart: 38 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.
  • Edited copy of a member (38 corresponding lines) src/hooks/init/copilot.rs:80 — src/hooks/init/copilot.rs:80-118 | src/hooks/init/copilot.rs:211-248 — These two members are one piece of code written twice and then edited apart: 38 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 · Edited copy of a member (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) proxy/src/extract.rs:205 — proxy/src/extract.rs:205-240 | proxy/src/extract.rs:261-298 — These two members are one piece of code written twice and then edited apart: 36 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.
  • Edited copy of a member (36 corresponding lines) src/cmds/js/prisma_cmd.rs:43 — src/cmds/js/prisma_cmd.rs:43-79 | src/cmds/js/prisma_cmd.rs:141-176 — These two members are one piece of code written twice and then edited apart: 36 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 · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) src/cmds/cloud/aws_cmd.rs:1285 — src/cmds/cloud/aws_cmd.rs:1285-1310 | src/cmds/cloud/aws_cmd.rs:1329-1353 — These two members are one piece of code written twice and then edited apart: 25 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.
  • Edited copy of a member (25 corresponding lines) src/hooks/init/cursor.rs:80 — src/hooks/init/cursor.rs:80-108 | src/hooks/init/droid.rs:204-228 — These two members are one piece of code written twice and then edited apart: 25 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 · Edited copy of a member (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) src/cmds/system/ctest_cmd.rs:561 — src/cmds/system/ctest_cmd.rs:561-587 | src/cmds/system/ctest_cmd.rs:778-799 — These two members are one piece of code written twice and then edited apart: 22 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.
  • Edited copy of a member (22 corresponding lines) src/analytics/gain.rs:1796 — src/analytics/gain.rs:1796-1817 | src/hooks/init/mod.rs:852-873 — These two members are one piece of code written twice and then edited apart: 22 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 · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) proxy/src/pipeline/ccr/anthropic.rs:27 — proxy/src/pipeline/ccr/anthropic.rs:27-47 | proxy/src/pipeline/ccr/openai.rs:40-60 — These two members are one piece of code written twice and then edited apart: 21 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.
  • Edited copy of a member (21 corresponding lines) src/cmds/git/gh_cmd.rs:180 — src/cmds/git/gh_cmd.rs:180-204 | src/cmds/git/glab_cmd.rs:213-233 — These two members are one piece of code written twice and then edited apart: 21 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 · Edited copy of a member (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) src/cmds/cloud/container.rs:339 — src/cmds/cloud/container.rs:339-364 | src/cmds/cloud/container.rs:520-548 — These two members are one piece of code written twice and then edited apart: 26 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.
  • Edited copy of a member (26 corresponding lines) src/hooks/init/copilot.rs:121 — src/hooks/init/copilot.rs:121-146 | src/hooks/init/copilot.rs:250-276 — These two members are one piece of code written twice and then edited apart: 26 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 · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) proxy/src/memory.rs:103 — proxy/src/memory.rs:103-122 | proxy/src/memory.rs:206-218 — These two members are one piece of code written twice and then edited apart: 13 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.
  • Edited copy of a member (13 corresponding lines) src/cmds/system/local_llm.rs:200 — src/cmds/system/local_llm.rs:200-215 | src/cmds/system/local_llm.rs:217-229 — These two members are one piece of code written twice and then edited apart: 13 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 · Edited copy of a member (18 corresponding lines) · ×2
  • Edited copy of a member (18 corresponding lines) src/cmds/js/bun_cmd.rs:153 — src/cmds/js/bun_cmd.rs:153-170 | src/cmds/js/deno_cmd.rs:24-46 — These two members are one piece of code written twice and then edited apart: 18 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.
  • Edited copy of a member (18 corresponding lines) src/cmds/cloud/container.rs:756 — src/cmds/cloud/container.rs:756-777 | src/cmds/cloud/container.rs:779-796 — These two members are one piece of code written twice and then edited apart: 18 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 · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) src/core/retriever.rs:173 — src/core/retriever.rs:173-186 | src/core/tee_file.rs:105-113 — These two members are one piece of code written twice and then edited apart: 9 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.
  • Edited copy of a member (9 corresponding lines) src/cmds/system/ls.rs:424 — src/cmds/system/ls.rs:424-432 | src/core/utils.rs:90-98 — These two members are one piece of code written twice and then edited apart: 9 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 · Edited copies of one member (4 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 5+ corresponding lines) src/cmds/git/gh_cmd.rs:1139 — src/cmds/git/gh_cmd.rs:1139-1144 | src/cmds/git/gh_cmd.rs:1146-1150 | src/cmds/git/glab_cmd.rs:1121-1125 | src/cmds/git/glab_cmd.rs:1127-1132 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 5+ corresponding lines) src/cmds/git/gt_cmd.rs:179 — src/cmds/git/gt_cmd.rs:179-183 | src/cmds/go/go_cmd.rs:50-54 | src/cmds/js/bun_cmd.rs:203-210 | src/cmds/js/deno_cmd.rs:58-62 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×2
  • Edited copy of a member (7 corresponding lines) proxy/src/service/mod.rs:67 — proxy/src/service/mod.rs:67-73 | src/llm_proxy.rs:95-101 — These two members are one piece of code written twice and then edited apart: 7 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.
  • Edited copy of a member (7 corresponding lines) src/cmds/git/git_cmd.rs:854 — src/cmds/git/git_cmd.rs:854-861 | src/cmds/jvm/mvn_cmd.rs:211-217 — These two members are one piece of code written twice and then edited apart: 7 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 · Edited copy of a member (6 corresponding lines) · ×2
  • Edited copy of a member (6 corresponding lines) proxy/src/pipeline/ingest_filter.rs:241 — proxy/src/pipeline/ingest_filter.rs:241-246 | src/core/tracking.rs:581-586 — These two members are one piece of code written twice and then edited apart: 6 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.
  • Edited copy of a member (6 corresponding lines) src/cmds/git/glab_cmd.rs:143 — src/cmds/git/glab_cmd.rs:143-148 | src/cmds/git/gt_cmd.rs:394-400 — These two members are one piece of code written twice and then edited apart: 6 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 · Edited copy of a member (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) src/hooks/init/claude.rs:887 — src/hooks/init/claude.rs:887-891 | src/hooks/init/cursor.rs:176-180 — These two members are one piece of code written twice and then edited apart: 5 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.
  • Edited copy of a member (5 corresponding lines) proxy/src/pipeline/engine_methods.rs:216 — proxy/src/pipeline/engine_methods.rs:216-220 | src/hooks/posthook.rs:105-109 — These two members are one piece of code written twice and then edited apart: 5 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 · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) src/cmds/git/gh_cmd.rs:214 — src/cmds/git/gh_cmd.rs:214-235 | src/cmds/git/glab_cmd.rs:243-264 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) src/cmds/system/log_cmd.rs:141 — src/cmds/system/log_cmd.rs:141-162 | src/cmds/system/log_cmd.rs:183-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/log_cmd.rs:141` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) src/hooks/init/trae.rs:149 — src/hooks/init/trae.rs:149-166 | src/hooks/init/trae.rs:301-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/trae.rs:149` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) src/hooks/posthook.rs:773 — src/hooks/posthook.rs:773-790 | src/hooks/posthook.rs:820-837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/posthook.rs:773` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) src/cmds/dotnet/dotnet_trx.rs:256 — src/cmds/dotnet/dotnet_trx.rs:256-272 | src/cmds/dotnet/dotnet_trx.rs:296-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/dotnet/dotnet_trx.rs:256` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–17 lines × 2) src/cmds/rust/cargo_cmd.rs:166 — src/cmds/rust/cargo_cmd.rs:166-181 | src/cmds/rust/cargo_cmd.rs:1234-1250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/rust/cargo_cmd.rs:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/pnpm_cmd.rs:315` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/cmds/system/read.rs:107 — src/cmds/system/read.rs:107-122 | src/cmds/system/read.rs:195-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) proxy/src/memory.rs:145 — proxy/src/memory.rs:145-157 | proxy/src/memory.rs:162-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/memory.rs:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) src/cmds/system/read.rs:123 — src/cmds/system/read.rs:123-135 | src/cmds/system/read.rs:213-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/system/read.rs:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) src/cmds/git/git_cmd.rs:409 — src/cmds/git/git_cmd.rs:409-420 | src/cmds/git/git_cmd.rs:700-711 | src/cmds/git/git_cmd.rs:3158-3169 | src/cmds/git/git_cmd.rs:3891-3902 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 4) src/hooks/hook_cmd.rs:74 — src/hooks/hook_cmd.rs:74-85 | src/hooks/hook_cmd.rs:808-819 | src/hooks/hook_cmd.rs:923-934 | src/hooks/hook_cmd.rs:1054-1065 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/prisma_cmd.rs:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/cmds/system/deps.rs:276` calls `is_empty`, `push_str` and `src/cmds/system/deps.rs:113` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) src/cmds/git/gh_cmd.rs:519 — src/cmds/git/gh_cmd.rs:519-526 | src/cmds/git/glab_cmd.rs:529-537 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:519` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/cmds/git/gh_cmd.rs:528` calls `push_str` and `src/cmds/git/glab_cmd.rs:538` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 2) src/discover/lexer.rs:366 — src/discover/lexer.rs:366-374 | src/discover/lexer.rs:413-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/discover/lexer.rs:366` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) src/analytics/cc_economics.rs:222 — src/analytics/cc_economics.rs:222-229 | src/analytics/cc_economics.rs:258-265 | src/analytics/cc_economics.rs:287-294 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/analytics/cc_economics.rs:222` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) src/cmds/git/git_cmd.rs:3292 — src/cmds/git/git_cmd.rs:3292-3299 | src/cmds/git/git_cmd.rs:3739-3746 | src/cmds/git/git_cmd.rs:3867-3874 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/git_cmd.rs:3292` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×1
  • Heading level jumps from h1 to h3 .github/assets/src/rtk-pro.html:40 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D1 · Cyclomatic Complexity · SurefireBlock · ×1
  • SurefireBlock::step (cyclomatic 27) src/cmds/jvm/mvn_cmd.rs:682 — 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.
D1 · Cyclomatic Complexity · SseAccumulator · ×1
  • SseAccumulator::feed_tool_use (cyclomatic 20) proxy/src/forward.rs:691 — SseAccumulator::feed_tool_use has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppState · ×1
  • AppState::new (cyclomatic 18) proxy/src/lib.rs:121 — AppState::new has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClaudeProvider · ×1
  • ClaudeProvider::extract_commands (cyclomatic 17) src/discover/provider.rs:190 — 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.
D1 · Cyclomatic Complexity · TscHandler · ×1
  • TscHandler::format_summary (cyclomatic 16) src/cmds/js/tsc_cmd.rs:158 — 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.
D1 · Cyclomatic Complexity · MinimalFilter · ×1
  • MinimalFilter::filter (cyclomatic 16) src/core/filter.rs:282 — 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.
D17 · Explicit Debt · FixmeComment · ×1
  • FixmeComment src/lib.rs:2308 — // 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.
D2 · Cognitive Complexity · SurefireBlock · ×1
  • SurefireBlock::step (cognitive 42) src/cmds/jvm/mvn_cmd.rs:682 — 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.
D2 · Cognitive Complexity · TscHandler · ×1
  • TscHandler::format_summary (cognitive 35) src/cmds/js/tsc_cmd.rs:158 — 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.
D2 · Cognitive Complexity · EngineMethodsTransform · ×1
  • EngineMethodsTransform::on_request (cognitive 32) proxy/src/pipeline/engine_methods.rs:228 — EngineMethodsTransform::on_request has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (7 pts), match/switch 1 (3 pts) (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.
D2 · Cognitive Complexity · MinimalFilter · ×1
  • MinimalFilter::filter (cognitive 29) src/core/filter.rs:282 — 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.
D2 · Cognitive Complexity · AppState · ×1
  • AppState::new (cognitive 25) proxy/src/lib.rs:121 — AppState::new has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 4 (6 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AggressiveFilter · ×1
  • AggressiveFilter::filter (cognitive 24) src/core/filter.rs:360 — 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.
D2 · Cognitive Complexity · Structural · ×1
  • Structural::kept_mask (cognitive 23) engine/src/strategy.rs:115 — Structural::kept_mask has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IcmMemory · ×1
  • IcmMemory::recall_relevant (cognitive 23) proxy/src/memory.rs:127 — IcmMemory::recall_relevant has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonSkeleton · ×1
  • JsonSkeleton::skel (cognitive 21) engine/src/strategy.rs:215 — JsonSkeleton::skel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CargoTestHandler · ×1
  • CargoTestHandler::compute_test_summary (cognitive 21) src/cmds/rust/cargo_cmd.rs:141 — 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.
D2 · Cognitive Complexity · NormalizeTransform · ×1
  • NormalizeTransform::on_request (cognitive 20) proxy/src/pipeline/normalize.rs:408 — NormalizeTransform::on_request has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFields · ×1
  • TooManyFields: UsageRecord proxy/src/model.rs:224 — TooManyFields — 49 stored fields. The bar is 30 stored fields; this is 19 over it, 1.63× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: Tracker src/core/tracking.rs:98 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · MethodTooLong · ×1
  • MethodTooLong: AppState.new proxy/src/lib.rs:121 — MethodTooLong — new 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (35 shared lines) · ×1
  • Near-duplicate member pair (35 shared lines) src/cmds/js/lint_cmd.rs:252 — src/cmds/js/lint_cmd.rs:252-348 | src/cmds/js/lint_cmd.rs:351-477 — These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) src/cmds/cloud/aws_cmd.rs:826 — src/cmds/cloud/aws_cmd.rs:826-853 | src/cmds/cloud/aws_cmd.rs:946-983 | src/cmds/cloud/aws_cmd.rs:985-1008 | src/cmds/cloud/aws_cmd.rs:1136-1188 | src/cmds/cloud/aws_cmd.rs:1239-1283 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (93 corresponding lines) · ×1
  • Edited copy of a member (93 corresponding lines) proxy/src/ccr_forward.rs:80 — proxy/src/ccr_forward.rs:80-191 | proxy/src/ccr_forward.rs:208-300 — These two members are one piece of code written twice and then edited apart: 93 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 · Edited copy of a member (73 corresponding lines) · ×1
  • Edited copy of a member (73 corresponding lines) src/cmds/dotnet/dotnet_cmd.rs:1222 — src/cmds/dotnet/dotnet_cmd.rs:1222-1302 | src/cmds/dotnet/dotnet_cmd.rs:1495-1567 — These two members are one piece of code written twice and then edited apart: 73 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 · Edited copy of a member (100 corresponding lines) · ×1
  • Edited copy of a member (100 corresponding lines) src/cmds/jvm/mvn_cmd.rs:1397 — src/cmds/jvm/mvn_cmd.rs:1397-1496 | src/cmds/jvm/mvn_cmd.rs:1646-1749 — These two members are one piece of code written twice and then edited apart: 100 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 · Edited copies of one member (3 members, 58+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 58+ corresponding lines) src/core/tracking.rs:1393 — src/core/tracking.rs:1393-1450 | src/core/tracking.rs:1475-1534 | src/core/tracking.rs:1559-1616 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 58 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) src/cmds/cloud/aws_cmd.rs:375 — src/cmds/cloud/aws_cmd.rs:375-418 | src/cmds/cloud/aws_cmd.rs:421-467 — These two members are one piece of code written twice and then edited apart: 44 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 · Edited copies of one member (3 members, 39+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 39+ corresponding lines) src/cmds/go/go_cmd.rs:769 — src/cmds/go/go_cmd.rs:769-809 | src/cmds/go/go_cmd.rs:899-937 | src/cmds/js/lint_cmd.rs:480-520 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 46+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 46+ corresponding lines) src/hooks/init/copilot.rs:149 — src/hooks/init/copilot.rs:149-195 | src/hooks/init/copilot.rs:278-323 | src/hooks/init/hermes.rs:99-155 | src/hooks/init/vibe.rs:259-310 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 46 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) proxy/src/pipeline/ccr/anthropic.rs:301 — proxy/src/pipeline/ccr/anthropic.rs:301-331 | proxy/src/pipeline/ccr/openai.rs:107-141 — These two members are one piece of code written twice and then edited apart: 31 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 · Edited copies of one member (3 members, 46+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 46+ corresponding lines) src/hooks/init/instructions_agents.rs:26 — src/hooks/init/instructions_agents.rs:26-71 | src/hooks/init/instructions_agents.rs:73-119 | src/hooks/init/instructions_agents.rs:127-178 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 46 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 26+ corresponding lines) src/cmds/cloud/aws_cmd.rs:577 — src/cmds/cloud/aws_cmd.rs:577-602 | src/cmds/cloud/aws_cmd.rs:604-631 | src/cmds/cloud/aws_cmd.rs:658-689 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) src/cmds/dotnet/dotnet_cmd.rs:92 — src/cmds/dotnet/dotnet_cmd.rs:92-123 | src/cmds/go/go_cmd.rs:144-186 — These two members are one piece of code written twice and then edited apart: 32 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 · Edited copies of one member (3 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 28+ corresponding lines) src/analytics/cc_economics.rs:201 — src/analytics/cc_economics.rs:201-229 | src/analytics/cc_economics.rs:231-265 | src/analytics/cc_economics.rs:267-294 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) src/hooks/init/pi.rs:613 — src/hooks/init/pi.rs:613-660 | src/hooks/init/pi.rs:724-771 — These two members are one piece of code written twice and then edited apart: 48 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 · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) src/cmds/system/local_llm.rs:131 — src/cmds/system/local_llm.rs:131-160 | src/cmds/system/local_llm.rs:170-198 — These two members are one piece of code written twice and then edited apart: 29 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 · Edited copies of one member (5 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 25+ corresponding lines) src/cmds/git/gh_cmd.rs:428 — src/cmds/git/gh_cmd.rs:428-455 | src/cmds/git/gh_cmd.rs:791-815 | src/cmds/git/gh_cmd.rs:911-943 | src/cmds/git/glab_cmd.rs:543-570 | src/cmds/git/glab_cmd.rs:750-776 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 25 lines, 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 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) proxy/src/pipeline/ingest_filter.rs:280 — proxy/src/pipeline/ingest_filter.rs:280-315 | proxy/src/pipeline/ingest_filter.rs:328-354 — These two members are one piece of code written twice and then edited apart: 27 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 · Edited copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) proxy/src/pipeline/ccr/anthropic.rs:51 — proxy/src/pipeline/ccr/anthropic.rs:51-73 | proxy/src/pipeline/engine_methods.rs:193-214 | proxy/src/pipeline/ingest_filter.rs:464-483 | proxy/src/pipeline/normalize.rs:344-363 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) proxy/src/store.rs:347 — proxy/src/store.rs:347-365 | proxy/src/store.rs:409-427 — These two members are one piece of code written twice and then edited apart: 19 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 · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) src/cmds/python/pip_cmd.rs:68 — src/cmds/python/pip_cmd.rs:68-94 | src/cmds/python/pip_cmd.rs:96-125 | src/cmds/python/pip_cmd.rs:127-151 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) src/cmds/rust/cargo_cmd.rs:274 — src/cmds/rust/cargo_cmd.rs:274-294 | src/cmds/rust/cargo_cmd.rs:306-326 | src/cmds/rust/cargo_cmd.rs:333-353 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) src/hooks/init/droid.rs:307 — src/hooks/init/droid.rs:307-336 | src/hooks/init/vibe.rs:222-254 — These two members are one piece of code written twice and then edited apart: 30 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 · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) proxy/src/memory.rs:87 — proxy/src/memory.rs:87-100 | proxy/src/memory.rs:189-202 | proxy/src/memory.rs:221-232 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) src/cmds/php/paratest_cmd.rs:9 — src/cmds/php/paratest_cmd.rs:9-32 | src/cmds/php/pest_cmd.rs:9-32 | src/cmds/php/phpt_cmd.rs:102-128 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) src/cmds/git/gh_cmd.rs:104 — src/cmds/git/gh_cmd.rs:104-111 | src/cmds/git/glab_cmd.rs:109-116 | src/cmds/php/artisan_cmd.rs:15-22 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) src/analytics/cc_economics.rs:528 — src/analytics/cc_economics.rs:528-540 | src/analytics/cc_economics.rs:542-554 | src/analytics/cc_economics.rs:556-568 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) proxy/src/pipeline/ccr/anthropic.rs:335 — proxy/src/pipeline/ccr/anthropic.rs:335-345 | proxy/src/pipeline/ccr/anthropic.rs:349-361 | proxy/src/pipeline/ccr/openai.rs:144-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) src/cmds/cloud/container.rs:41 — src/cmds/cloud/container.rs:41-57 | src/cmds/git/gh_cmd.rs:250-263 | src/cmds/git/glab_cmd.rs:298-311 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 9+ corresponding lines) engine/src/strategy.rs:15 — engine/src/strategy.rs:15-24 | proxy/src/pipeline/ccr/mod.rs:116-125 | proxy/src/pipeline/ccr/mod.rs:163-172 | proxy/src/pipeline/ccr/mod.rs:184-192 | proxy/src/pipeline/ccr/mod.rs:216-224 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, 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 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) src/cmds/git/gh_cmd.rs:137 — src/cmds/git/gh_cmd.rs:137-144 | src/cmds/git/gh_cmd.rs:169-176 | src/cmds/git/glab_cmd.rs:170-177 | src/cmds/git/glab_cmd.rs:181-188 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×1
  • Edited copy of a member (8 corresponding lines) src/core/retriever.rs:87 — src/core/retriever.rs:87-95 | src/hooks/init/codex.rs:50-57 — These two members are one piece of code written twice and then edited apart: 8 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 · Edited copies of one member (4 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 6+ corresponding lines) engine/src/pipeline/builtins.rs:36 — engine/src/pipeline/builtins.rs:36-41 | engine/src/registry.rs:184-189 | proxy/src/model.rs:117-123 | proxy/src/server.rs:473-479 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (60–70 lines × 2) · ×1
  • Duplicated block (60–70 lines × 2) src/cmds/git/gh_cmd.rs:32 — src/cmds/git/gh_cmd.rs:32-101 | src/cmds/git/glab_cmd.rs:47-106 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (54–65 lines × 2) · ×1
  • Duplicated block (54–65 lines × 2) proxy/src/ccr_forward.rs:90 — proxy/src/ccr_forward.rs:90-154 | proxy/src/ccr_forward.rs:215-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/ccr_forward.rs:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) src/hooks/init/copilot.rs:155 — src/hooks/init/copilot.rs:155-195 | src/hooks/init/copilot.rs:283-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/copilot.rs:155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) src/hooks/init/claude.rs:700 — src/hooks/init/claude.rs:700-738 | src/hooks/init/claude.rs:922-960 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (31–37 lines × 2) · ×1
  • Duplicated block (31–37 lines × 2) src/cmds/jvm/mvn_cmd.rs:1595 — src/cmds/jvm/mvn_cmd.rs:1595-1631 | src/cmds/jvm/mvn_cmd.rs:1713-1743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/jvm/mvn_cmd.rs:1595` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) src/cmds/git/git_cmd.rs:4143 — src/cmds/git/git_cmd.rs:4143-4171 | src/cmds/git/git_cmd.rs:4185-4213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/git_cmd.rs:4143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/cmds/git/git_cmd.rs:4182` calls `Some`, `arg` and `src/cmds/git/git_cmd.rs:4142` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (24–28 lines × 2) · ×1
  • Duplicated block (24–28 lines × 2) src/cmds/jvm/mvn_cmd.rs:1445 — src/cmds/jvm/mvn_cmd.rs:1445-1472 | src/cmds/jvm/mvn_cmd.rs:1691-1714 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/jvm/mvn_cmd.rs:1445` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) proxy/src/ccr_forward.rs:163 — proxy/src/ccr_forward.rs:163-188 | proxy/src/ccr_forward.rs:272-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/ccr_forward.rs:163` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) src/discover/lexer.rs:343 — src/discover/lexer.rs:343-365 | src/discover/lexer.rs:384-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/discover/lexer.rs:343` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–23 lines × 2) · ×1
  • Duplicated block (16–23 lines × 2) proxy/src/pipeline/ingest_filter.rs:293 — proxy/src/pipeline/ingest_filter.rs:293-315 | proxy/src/pipeline/ingest_filter.rs:339-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ingest_filter.rs:293` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) src/core/pipeline_config.rs:603 — src/core/pipeline_config.rs:603-621 | src/core/pipeline_config.rs:733-751 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) src/core/tracking.rs:1435 — src/core/tracking.rs:1435-1450 | src/core/tracking.rs:1519-1534 | src/core/tracking.rs:1601-1616 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/tracking.rs:1435` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/core/tracking.rs:1517` calls `get` and `src/core/tracking.rs:1433` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) src/cmds/cloud/aws_cmd.rs:343 — src/cmds/cloud/aws_cmd.rs:343-357 | src/cmds/cloud/aws_cmd.rs:442-455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) src/cmds/dotnet/binlog.rs:689 — src/cmds/dotnet/binlog.rs:689-701 | src/cmds/dotnet/binlog.rs:1016-1030 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/dotnet/binlog.rs:689` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) src/analytics/cc_economics.rs:202 — src/analytics/cc_economics.rs:202-215 | src/analytics/cc_economics.rs:232-244 | src/analytics/cc_economics.rs:268-281 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/analytics/cc_economics.rs:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `rtk` to `Vec<DayStats>` in one and `Vec<WeekStats>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) src/cmds/git/gh_cmd.rs:752 — src/cmds/git/gh_cmd.rs:752-763 | src/cmds/git/glab_cmd.rs:664-677 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:752` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) src/core/tracking.rs:1411 — src/core/tracking.rs:1411-1431 | src/core/tracking.rs:1494-1514 | src/core/tracking.rs:1577-1597 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/core/tracking.rs:1411` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/core/tracking.rs:1518` calls `get` and `src/core/tracking.rs:1435` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–12 lines × 2) · ×1
  • Duplicated block (7–12 lines × 2) src/cmds/git/gh_cmd.rs:372 — src/cmds/git/gh_cmd.rs:372-383 | src/cmds/git/glab_cmd.rs:447-453 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:372` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) src/cmds/rust/cargo_cmd.rs:275 — src/cmds/rust/cargo_cmd.rs:275-285 | src/cmds/rust/cargo_cmd.rs:307-317 | src/cmds/rust/cargo_cmd.rs:334-344 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) src/cmds/jvm/mvn_cmd.rs:1398 — src/cmds/jvm/mvn_cmd.rs:1398-1407 | src/cmds/jvm/mvn_cmd.rs:1647-1657 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) src/cmds/git/gh_cmd.rs:376 — src/cmds/git/gh_cmd.rs:376-385 | src/cmds/git/gh_cmd.rs:773-781 | src/cmds/git/glab_cmd.rs:447-455 | src/cmds/git/glab_cmd.rs:687-695 — before extracting anything, compare `src/cmds/git/gh_cmd.rs` and `src/cmds/git/glab_cmd.rs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/git/gh_cmd.rs:376` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) src/cmds/python/ruff_cmd.rs:457 — src/cmds/python/ruff_cmd.rs:457-465 | src/cmds/system/format_cmd.rs:168-176 | src/cmds/system/format_cmd.rs:181-189 | src/cmds/system/format_cmd.rs:197-205 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (3–8 lines × 3) · ×1
  • Duplicated block (3–8 lines × 3) proxy/src/engine_rules.rs:58 — proxy/src/engine_rules.rs:58-65 | src/core/pipeline_config.rs:119-121 | src/hooks/trust.rs:222-229 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/engine_rules.rs:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/cmds/system/deps.rs:116` calls `is_empty` and `src/cmds/system/deps.rs:198` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) proxy/src/pipeline/ccr/anthropic.rs:64 — proxy/src/pipeline/ccr/anthropic.rs:64-70 | proxy/src/pipeline/engine_methods.rs:206-212 | proxy/src/pipeline/normalize.rs:351-357 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `proxy/src/pipeline/ccr/anthropic.rs:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) src/hooks/init/instructions_agents.rs:41 — src/hooks/init/instructions_agents.rs:41-53 | src/hooks/init/instructions_agents.rs:89-101 | src/hooks/init/instructions_agents.rs:143-155 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/hooks/init/instructions_agents.rs:41` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) src/cmds/cloud/aws_cmd.rs:828 — src/cmds/cloud/aws_cmd.rs:828-834 | src/cmds/cloud/aws_cmd.rs:948-954 | src/cmds/cloud/aws_cmd.rs:987-993 | src/cmds/cloud/aws_cmd.rs:1138-1144 | src/cmds/cloud/aws_cmd.rs:1241-1247 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/aws_cmd.rs:828` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/cmds/cloud/aws_cmd.rs:1146` calls `shorten_arn` and `src/cmds/cloud/aws_cmd.rs:1249` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) src/cmds/cloud/aws_cmd.rs:559 — src/cmds/cloud/aws_cmd.rs:559-564 | src/cmds/cloud/aws_cmd.rs:579-584 | src/cmds/cloud/aws_cmd.rs:606-611 | src/cmds/cloud/aws_cmd.rs:635-640 | src/cmds/cloud/aws_cmd.rs:660-665 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/cloud/aws_cmd.rs:559` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) src/cmds/js/tsc_cmd.rs:234 — src/cmds/js/tsc_cmd.rs:234-239 | src/cmds/js/tsc_cmd.rs:330-335 | src/cmds/python/mypy_cmd.rs:185-190 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/cmds/js/tsc_cmd.rs:234` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Minor — 48 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×11
  • Duplicated predicate src/core/arg_tokenizer.rs:525 — `!rest.is_empty() && !name_part.contains('/')` appears character-identically in 2 files — src/core/arg_tokenizer.rs, src/core/arg_tokenizer/frozen.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/arg_tokenizer.rs:439 — `attached.is_none() && prefix != FlagPrefix::Slash` appears character-identically in 2 files — src/core/arg_tokenizer.rs, src/core/arg_tokenizer/frozen.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/pipeline_cmd.rs:512 — `c.is_ascii_alphanumeric() || c == '-' || c == '_'` appears character-identically in 2 files — src/core/pipeline_cmd.rs, src/core/pipeline_remote.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/hooks/decision.rs:1168 — `deny.is_empty() && ask.is_empty() && allow.is_empty()` appears character-identically in 2 files — src/hooks/decision.rs, src/hooks/permissions.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/cmds/system/deps.rs:190 — `line.is_empty() || line.starts_with('#')` appears character-identically in 2 files — src/cmds/system/deps.rs, src/discover/registry.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/runner.rs:787 — `line.starts_with(' ') || line.starts_with('\t')` appears character-identically in 2 files — src/core/runner.rs, src/core/stream.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/arg_tokenizer.rs:458 — `next.as_ref() == "--" && !self.emitted_dash_dash && !spec.claims_dash_dash` appears character-identically in 2 files — src/core/arg_tokenizer.rs, src/core/arg_tokenizer/frozen.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate engine/src/methods/grep_group.rs:44 — `parts.len() == 3 && parts[1].parse::<usize>().is_ok()` appears character-identically in 2 files — engine/src/methods/grep_group.rs, src/cmds/system/pipe_cmd.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/arg_tokenizer.rs:86 — `self.kind == TokenKind::Positional && self.linked.is_none()` appears character-identically in 2 files — src/core/arg_tokenizer.rs, src/core/arg_tokenizer/frozen.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/pipeline_cmd.rs:220 — `source.starts_with("http://") || source.starts_with("https://")` appears character-identically in 2 files — src/core/pipeline_cmd.rs, src/hooks/posthook.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/arg_tokenizer.rs:198 — `t.kind == TokenKind::Long && t.double_dash && flag_name_matches(t.text, name, dialect)` appears character-identically in 2 files — src/core/arg_tokenizer.rs, src/core/arg_tokenizer/frozen.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default on Err · ×8
  • Silent fallback default on Err proxy/src/lib.rs:117 — `http_client_with` turns every `Err` into `reqwest::Client::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err proxy/src/models.rs:146 — `family` turns every `Err` into `"other".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err proxy/src/pipeline/image_opt.rs:178 — `optimize_image_block` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/core/pipeline_config.rs:116 — `sorted_toml_files` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/core/pipeline_log.rs:127 — `read_last` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/core/telemetry.rs:526 — `detect_install_method` turns every `Err` into `"unknown"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/discover/report.rs:335 — `format_json` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/hooks/init/claude.rs:537 — `claude_hook_gaps` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
X9 · Subsumed condition operand · Subsumed condition operand · ×8
  • 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:262 — `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:141 — `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/gradlew_cmd.rs:53 — `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/jvm/mvn_cmd.rs:3848 — `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/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:759 — `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:934 — `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.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 6 significant file(s) lose their only recent owner: engine/src/pipeline/validate.rs, src/core/pipeline_config.rs, engine/src/pipeline/eval.rs, src/analytics/gain_tui.rs, proxy/src/main.rs, scripts/benchmark-sessions/lib/runner.py. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: src/core/arg_tokenizer.rs, src/core/arg_tokenizer/frozen.rs, src/core/user_dirs.rs, src/core/arg_tokenizer/differential.rs, src/core/user_env.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 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.
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file src/learn/report.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/learn/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X4 · Structured logging · Interpolated log message defeats structured logging · ×2
  • Interpolated log message defeats structured logging proxy/src/main.rs:172 — `info!` at line 172 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging proxy/src/main.rs:233 — `info!` at line 233 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 4 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 (18 single-owned of 222 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 222 of the 268 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/cmds/js/bun_cmd.rs, src/cmds/js/ng_cmd.rs, src/discover/shell_wrapper.rs, src/cmds/php/paratest_cmd.rs.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 6 project(s) overshoot their size bounds, lowering Project Cohesion to 6.7/10. The most over is `(repository root)` (154122 LoC, 317 module-visible types across 30 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 222 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, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 222 of the 268 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, src/learn/mod.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
P3 · Security & performance tooling · Dependabot does not watch npm/maven · ×1
  • Dependabot does not watch npm/maven REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, `maven`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
P4 · Deployment & Rollback · No release approval gate · ×1
  • 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.
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×1
  • No app-layer HTTPS enforcement detected — This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `axum::serve(` (proxy/src/main.rs:230).
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (proxy/src/main.rs:230).
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.
Minor — 7 finding(s)
D12 · Dependency Hygiene · Outdated (test) · ×6
  • Outdated (test): org.junit.jupiter:junit-jupiter-api — org.junit.jupiter:junit-jupiter-api 5.11.4 → 6.1.3 available.
  • Outdated (test): org.junit.platform:junit-platform-commons — org.junit.platform:junit-platform-commons 1.11.4 → 6.1.3 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-params — org.junit.jupiter:junit-jupiter-params 5.11.4 → 6.1.3 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter-engine — org.junit.jupiter:junit-jupiter-engine 5.11.4 → 6.1.3 available.
  • Outdated (test): org.junit.platform:junit-platform-engine — org.junit.platform:junit-platform-engine 1.11.4 → 6.1.3 available.
  • Outdated (test): org.junit.jupiter:junit-jupiter — org.junit.jupiter:junit-jupiter 5.11.4 → 6.1.3 available.
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names scripts/benchmark/lib/vm.ts:138 — 0 of 0 documented parameters and 1 of 19 summaries in `.` only repeat the member or parameter name (e.g. "Delete the VM" for `vmDelete`). Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fcf060ec43ec4d8eb712b9630d988556/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fcf060ec43ec4d8eb712b9630d988556/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude engine/tests/fixtures/lockfile .41artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .11artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1d83f-90ed-7f3f-9b1e-62de740a9726 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md