Public report of AlexsJones/llmfit, 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, 05:01 UTC · Survey ID cd_61cbef1c48fe44d7b435af813e255e65

AlexsJones/llmfit

Measured 14 November 2026, 04:57 UTC, at code version 700cfc8

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 48out of 100 At risk Up 2 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 medium codebase: 71,243 lines of product code in 6 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Accessibility, 37

Findings by how serious they are

44 critical 439 serious 45 minor

14 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:57 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.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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 ▸

64of 64 dimensions measured by tools.
511of 528 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
64dimensions across 7 lenses, read from 71,243 lines of product code in 6 projects.
Chapters

Executive summary

AlexsJones/llmfit is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back in part because it has controls that only work with a mouse. It scores 48 out of 100, which the At risk rating leaves unchanged.

Accessibility, at 37, is the weakest lens and counts most in the score. The best first steps are making the controls keyboard-usable and fixing focus, motion and contrast, each worth about 7 points. Raising Accessibility to 70 would lift the score to about 57.

Twenty-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Eight known security holes in the packages the code depends on can be used by attackers, and six secrets can leak from the build pipeline. Pinning each tool to an exact version, updating the vulnerable packages and limiting each secret to its own step would close these risks. Passing outside input through environment variables would fix the two pipeline steps that put outside input straight into a shell command, and the password or key in the code's history needs replacing, with the old one switched off. The two form fields without a label need a label.

The product code is 71,243 lines, about €70,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.
Accessibility 37 · counts for 46%Code Health 49 · counts for 25%Production Readiness 56 · counts for 14%Security and Compliance 64 · counts for 8%Maturity 68 · counts for 4%Performance 89 · counts for 2%Architecture 96 · counts for 1%

If Accessibility rose from 37 to 70, the lowest score rated Strong, the score would rise from 48 to about 57.

Code composition: what the lines of code are
Product code 94%Tests 6%
New since the last survey: 88 findings

These 88 critical or serious findings weren't in the previous survey, on 26 October 2026.

  • Cyclomatic Complexity · llmfit_core::models::merge_duplicate_entry (cyclomatic 27) llmfit-core/src/models.rs
  • Cyclomatic Complexity · llmfit_core::doctor::vulkan_memory_heap_summary (cyclomatic 22) llmfit-core/src/doctor.rs
  • Cyclomatic Complexity · llmfit::cluster_cli::interactive_init (cyclomatic 19) llmfit-tui/src/cluster_cli.rs
  • Cyclomatic Complexity · llmfit::ensure_dashboard_available (cyclomatic 17) llmfit-tui/src/main.rs
  • Cyclomatic Complexity · llmfit::run_diff (cyclomatic 16) llmfit-tui/src/main.rs
  • Cognitive Complexity · llmfit::cluster_cli::interactive_init (cognitive 47) llmfit-tui/src/cluster_cli.rs
  • Cognitive Complexity · llmfit_core::doctor::vulkan_memory_heap_summary (cognitive 31) llmfit-core/src/doctor.rs
  • Cognitive Complexity · llmfit_core::models::merge_duplicate_entry (cognitive 29) llmfit-core/src/models.rs
  • Cognitive Complexity · llmfit_core::providers::scan_hf_cache_for_mlx_in (cognitive 18) llmfit-core/src/providers.rs
  • Cognitive Complexity · Capability::infer (cognitive 17) llmfit-core/src/models.rs
  • Cognitive Complexity · llmfit::ensure_dashboard_available (cognitive 17) llmfit-tui/src/main.rs
  • Cognitive Complexity · SystemSpecs::narrowed_pcie_warnings (cognitive 16) llmfit-core/src/hardware.rs
  • Cognitive Complexity · llmfit::cluster_cli::run (cognitive 16) llmfit-tui/src/cluster_cli.rs
  • God Classes · ClassTooLong: ModelFit llmfit-core/src/fit.rs
  • God Classes · FunctionTooLong: llmfit::cluster_cli::interactive_init llmfit-tui/src/cluster_cli.rs
  • God Classes · FileTooLong: src/cluster.rs llmfit-core/src/cluster.rs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) llmfit-core/src/providers.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) llmfit-core/src/providers.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) llmfit-core/src/benchmarks.rs
  • Code Duplication · Edited copy of a member (49 corresponding lines) llmfit-tui/src/mcp_server.rs
  • Code Duplication · Edited copy of a member (55 corresponding lines) llmfit-core/src/bench.rs
  • Code Duplication · Edited copy of a member (40 corresponding lines) llmfit-core/src/providers.rs
  • Code Duplication · Edited copy of a member (32 corresponding lines) llmfit-core/src/quality.rs
  • Code Duplication · Edited copy of a member (32 corresponding lines) llmfit-core/src/providers.rs
  • Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) llmfit-tui/src/serve_api.rs
  • Code Duplication · Edited copy of a member (31 corresponding lines) llmfit-tui/src/tui_events.rs
  • Code Duplication · Edited copy of a member (28 corresponding lines) llmfit-core/src/bench.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) llmfit-core/src/bench.rs
  • Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) llmfit-tui/src/tui_app.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) llmfit-core/src/hardware.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) llmfit-core/src/cluster.rs
  • Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) llmfit-tui/src/tui_events.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) llmfit-core/src/benchmarks.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) llmfit-core/src/providers.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) llmfit-core/src/providers.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) llmfit-tui/src/cluster_cli.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) llmfit-core/src/providers.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) llmfit-core/src/hardware.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) llmfit-core/src/share.rs
  • Code Duplication · Edited copy of a member (8 corresponding lines) llmfit-core/src/share.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) llmfit-core/src/models.rs
  • Code Duplication · Edited copy of a member (8 corresponding lines) llmfit-tui/src/main.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) llmfit-tui/src/tui_app.rs
  • Code Duplication · Duplicated block (14 lines × 6) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (13 lines × 2) llmfit-core/src/hardware.rs
  • Code Duplication · Duplicated block (15 lines × 2) llmfit-core/src/quality.rs
  • Code Duplication · Duplicated block (11–12 lines × 2) llmfit-tui/src/display.rs
  • Code Duplication · Duplicated block (11 lines × 2) llmfit-core/src/providers.rs
  • Code Duplication · Duplicated block (11 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (10 lines × 8) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (9–10 lines × 3) llmfit-core/src/hardware.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-core/src/benchmarks.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-core/src/benchmarks.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-tui/src/download_history.rs
  • Code Duplication · Duplicated block (8 lines × 5) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (8 lines × 2) llmfit-core/src/share.rs
  • Code Duplication · Duplicated block (7 lines × 7) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (3–7 lines × 6) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (7 lines × 2) llmfit-tui/src/mcp_server.rs
  • Code Duplication · Duplicated block (7 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (7–8 lines × 8) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (6 lines × 2) llmfit-tui/src/tui_app.rs
  • Code Duplication · Duplicated block (8 lines × 2) llmfit-tui/src/main.rs
  • Code Duplication · Duplicated block (8 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (7 lines × 4) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (5 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (5 lines × 7) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (5 lines × 4) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Edited copy of a member (77 corresponding lines) scripts/scrape_hf_models.py
  • Code Duplication · Edited copy of a member (32 corresponding lines) scripts/validate_generation_scoring.py
  • Cohesion (LCOM4) · Low cohesion: ModelFit (LCOM4 4) llmfit-core/src/fit.rs
  • Churn × Complexity Hotspots · Hotspot: llmfit-tui/src/display.rs llmfit-tui/src/display.rs
  • Churn × Complexity Hotspots · Hotspot: llmfit-tui/src/cluster_cli.rs llmfit-tui/src/cluster_cli.rs
  • Churn × Complexity Hotspots · Hotspot: llmfit-web/src/components/DetailPanel.jsx llmfit-web/src/components/DetailPanel.jsx
  • Churn × Complexity Hotspots · Repeated repair: llmfit-core/src/cluster.rs llmfit-core/src/cluster.rs
  • Churn × Complexity Hotspots · Repeated repair: llmfit-core/src/analysis.rs llmfit-core/src/analysis.rs
  • Static Analysis (SAST) · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Large Files · llmfit-web/src/components/DetailPanel.jsx: 649 lines of code llmfit-web/src/components/DetailPanel.jsx
  • Large Files · llmfit-web/src/i18n/locales/en.js: 434 lines of code llmfit-web/src/i18n/locales/en.js
  • Large Files · llmfit-web/src/i18n/locales/zh-CN.js: 431 lines of code llmfit-web/src/i18n/locales/zh-CN.js
  • Exception handling · Swallowed exception (empty catch) llmfit-web/src/contexts/I18nContext.jsx
  • Exception handling · Swallowed exception (empty catch) llmfit-web/src/contexts/I18nContext.jsx
  • Keyboard semantics · Click handler on a non-interactive <div> llmfit-desktop/ui/index.html
  • Visual & motion safety · Low contrast colour pair in CSS (2.1:1) llmfit-web/src/styles.css

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: 80 findings

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

  • Cyclomatic Complexity · validate_generation_scoring.parse_generation (cyclomatic 62) scripts/validate_generation_scoring.py
  • Cyclomatic Complexity · scrape_hf_models.main (cyclomatic 43) scripts/scrape_hf_models.py
  • Cyclomatic Complexity · scrape_hf_models.extract_arch_metadata (cyclomatic 27) scripts/scrape_hf_models.py
  • Cyclomatic Complexity · llmfit_core::models::dedupe_hf_entries (cyclomatic 24) llmfit-core/src/models.rs
  • Cyclomatic Complexity · scrape_hf_models.discover_trending_models (cyclomatic 24) scripts/scrape_hf_models.py
  • Cyclomatic Complexity · scrape_hf_models.enrich_gguf_sources (cyclomatic 22) scripts/scrape_hf_models.py
  • Cyclomatic Complexity · validate_community_benchmarks.check_file (cyclomatic 21) scripts/validate_community_benchmarks.py
  • Cyclomatic Complexity · scrape_hf_models._process_listing (cyclomatic 20) scripts/scrape_hf_models.py
  • Cyclomatic Complexity · validate_generation_scoring.main (cyclomatic 20) scripts/validate_generation_scoring.py
  • Cyclomatic Complexity · scrape_hf_models.extract_license (cyclomatic 18) scripts/scrape_hf_models.py
  • Cyclomatic Complexity · scrape_hf_models.infer_languages (cyclomatic 16) scripts/scrape_hf_models.py
  • Cyclomatic Complexity · scrape_hf_models._build_discovered_model (cyclomatic 16) scripts/scrape_hf_models.py
  • Cognitive Complexity · validate_generation_scoring.parse_generation (cognitive 102) scripts/validate_generation_scoring.py
  • Cognitive Complexity · scrape_hf_models.main (cognitive 90) scripts/scrape_hf_models.py
  • Cognitive Complexity · scrape_hf_models.discover_trending_models (cognitive 69) scripts/scrape_hf_models.py
  • Cognitive Complexity · scrape_hf_models.enrich_gguf_sources (cognitive 57) scripts/scrape_hf_models.py
  • Cognitive Complexity · scrape_hf_models.extract_arch_metadata (cognitive 47) scripts/scrape_hf_models.py
  • Cognitive Complexity · llmfit_core::models::dedupe_hf_entries (cognitive 38) llmfit-core/src/models.rs
  • Cognitive Complexity · validate_generation_scoring.main (cognitive 33) scripts/validate_generation_scoring.py
  • Cognitive Complexity · scrape_hf_models.extract_license (cognitive 27) scripts/scrape_hf_models.py
  • Cognitive Complexity · validate_community_benchmarks.check_file (cognitive 24) scripts/validate_community_benchmarks.py
  • Cognitive Complexity · scrape_hf_models._process_listing (cognitive 22) scripts/scrape_hf_models.py
  • Cognitive Complexity · scrape_hf_models._build_discovered_model (cognitive 21) scripts/scrape_hf_models.py
  • Cognitive Complexity · scrape_hf_models.check_gguf_repo_exists (cognitive 20) scripts/scrape_hf_models.py
  • Cognitive Complexity · scrape_benchmarks.main (cognitive 19) scripts/scrape_benchmarks.py
  • Cognitive Complexity · scrape_hf_models.infer_languages (cognitive 19) scripts/scrape_hf_models.py
  • Cognitive Complexity · verify_models.main (cognitive 18) scripts/verify_models.py
  • Cognitive Complexity · llmfit_core::providers::scan_hf_cache_for_mlx (cognitive 17) llmfit-core/src/providers.rs
  • Cognitive Complexity · scrape_hf_models.detect_quant_format (cognitive 17) scripts/scrape_hf_models.py
  • God Classes · FileTooLong: scripts/scrape_hf_models.py scripts/scrape_hf_models.py
  • God Classes · FunctionTooLong: llmfit::run_bench llmfit-tui/src/main.rs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) llmfit-core/src/providers.rs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) llmfit-core/src/providers.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) llmfit-core/src/benchmarks.rs
  • Code Duplication · Duplicated block (55–56 lines × 2) llmfit-tui/src/main.rs
  • Code Duplication · Duplicated block (37 lines × 2) llmfit-tui/src/main.rs
  • Code Duplication · Duplicated block (20–26 lines × 3) llmfit-core/src/models.rs
  • Code Duplication · Duplicated block (14 lines × 6) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (13 lines × 2) llmfit-core/src/hardware.rs
  • Code Duplication · Duplicated block (13 lines × 2) llmfit-tui/src/display.rs
  • Code Duplication · Duplicated block (11–12 lines × 2) llmfit-tui/src/display.rs
  • Code Duplication · Duplicated block (10 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-core/src/benchmarks.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-core/src/benchmarks.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-tui/src/download_history.rs
  • Code Duplication · Duplicated block (8 lines × 5) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (8 lines × 2) llmfit-core/src/hardware.rs
  • Code Duplication · Duplicated block (7 lines × 7) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (3–7 lines × 6) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (7 lines × 3) llmfit-core/src/hardware.rs
  • Code Duplication · Duplicated block (6 lines × 8) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (6 lines × 2) llmfit-tui/src/tui_app.rs
  • Code Duplication · Duplicated block (5 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-tui/src/main.rs
  • Code Duplication · Duplicated block (9 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (9 lines × 3) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (8 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (5 lines × 2) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (5 lines × 7) llmfit-tui/src/tui_ui.rs
  • Code Duplication · Duplicated block (5 lines × 2) llmfit-core/src/quality.rs
  • Code Duplication · Duplicated block (12–41 lines × 2) scripts/scrape_hf_models.py
  • Code Duplication · Duplicated block (13 lines × 2) scripts/verify_models.py
  • Churn × Complexity Hotspots · Hotspot: llmfit-core/src/models.rs llmfit-core/src/models.rs
  • Secrets (history) · REDACTED: REDACTED data/Epoch Database - Notable Models.csv
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: RUSTSEC-2026-0381 REDACTED
  • Dependency Vulnerabilities · Medium advisory (unsound): RUSTSEC-2026-0386 REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: [GHSA redacted] REDACTED
  • Large Files · llmfit-web/src/components/DetailPanel.jsx: 641 lines of code llmfit-web/src/components/DetailPanel.jsx
  • Large Files · llmfit-web/src/i18n/locales/en.js: 429 lines of code llmfit-web/src/i18n/locales/en.js
  • Large Files · llmfit-web/src/i18n/locales/zh-CN.js: 426 lines of code llmfit-web/src/i18n/locales/zh-CN.js
  • Exception handling · Swallowed exception (caught, then discarded) scripts/scrape_hf_models.py
  • Exception handling · Swallowed exception (caught, then discarded) scripts/scrape_hf_models.py
  • Exception handling · Swallowed exception (caught, then discarded) scripts/verify_models.py
  • Exception handling · Swallowed exception (empty catch) llmfit-web/src/contexts/I18nContext.jsx
  • Exception handling · Swallowed exception (empty catch) llmfit-web/src/contexts/I18nContext.jsx
  • A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €70,000 · Estimate
Cost to rebuild€23,000 to €120,000, for 385 to 1,220 hours of work, about 0.5 person-years for one engineer
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.7 at a score of 48. 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.
SizeMedium: 71,243 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
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 7 points · Medium effort · Keyboard semantics
2
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Raises the score by about 7 points · Medium effort · Visual & motion safety
3
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 3 points · Medium effort · Type Safety

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.

Where the investment is most exposed · Value at risk
This code would cost about €70,000 to build again, about 0.5 person-years of work. Its weakest lens is Accessibility, at 37 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 7 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 6.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 10% on every change. The history of the code shows how much it changes: about 59,281 lines over the last 90 days, which is about 240,417 lines a year. At that pace, the extra work comes to an estimated 26.5 to 159.2 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 llmfit (Cargo) llmfit (Cargo) llmfit-core llmfit-core llmfit (Cargo)->llmfit-core llmfit (Python) llmfit (Python) llmfit-desktop llmfit-desktop llmfit-desktop->llmfit-core llmfit-web llmfit-web

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.

44 modules, with 62 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; 4 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 llmfit-desktop.ui2 llmfit-python.hatch_build3 llmfit-python.src4 llmfit-python.src.llmfit5 llmfit-web.src6 llmfit-web.src.components7 llmfit-web.src.contexts8 llmfit-web.src.hooks9 llmfit.download_history10 llmfit.filter_config11 llmfit.theme12 llmfit_core.doctor13 llmfit_core.hardware14 llmfit_core.models15 llmfit_core.providers16 llmfit_core.quality17 llmfit.events18 llmfit_core.bench19 llmfit_core.benchmarks20 llmfit_core.claim21 llmfit_core.cluster22 llmfit_core.cluster.gpu_backend_opt23 llmfit_core.update24 llmfit_desktop25 llmfit.cluster_cli26 llmfit_core.fit27 llmfit_core.share28 llmfit.serve_shared29 llmfit_core.analysis30 llmfit_core.concurrency31 llmfit_core.hwprofile32 llmfit_core.plan33 llmfit_core.storage34 llmfit35 llmfit.display36 llmfit.tui_app37 llmfit.mcp_server38 llmfit.serve_api39 llmfit.tui_events40 llmfit.tui_ui
1 llmfit-desktop.ui
2 llmfit-python.hatch_build
3 llmfit-python.src
4 llmfit-python.src.llmfit
5 llmfit-web.src
6 llmfit-web.src.components
7 llmfit-web.src.contexts
8 llmfit-web.src.hooks
9 llmfit.download_history
10 llmfit.filter_config
11 llmfit.theme
12 llmfit_core.doctor
13 llmfit_core.hardware
14 llmfit_core.models
15 llmfit_core.providers
16 llmfit_core.quality
17 llmfit.events2
18 llmfit_core.bench1
19 llmfit_core.benchmarks4
20 llmfit_core.claim1
21 llmfit_core.cluster3
22 llmfit_core.cluster.gpu_backend_opt1
23 llmfit_core.update3
24 llmfit_desktop2
25 llmfit.cluster_cli2
26 llmfit_core.fit352
27 llmfit_core.share42
28 llmfit.serve_shared14
29 llmfit_core.analysis133
30 llmfit_core.concurrency31
31 llmfit_core.hwprofile11
32 llmfit_core.plan258
33 llmfit_core.storage4
34 llmfit11111211
35 llmfit.display1311
36 llmfit.tui_app1125822411
37 llmfit.mcp_server1251
38 llmfit.serve_api21411
39 llmfit.tui_events1
40 llmfit.tui_ui122
Uses a module listed above itPart of a loopThe module itself
1 llmfit-desktop.ui2 llmfit-python.hatch_build3 llmfit-python.src4 llmfit-python.src.llmfit5 llmfit-web.src6 llmfit-web.src.components7 llmfit-web.src.contexts8 llmfit-web.src.hooks9 llmfit.download_history10 llmfit.filter_config11 llmfit.theme12 llmfit_core.doctor13 llmfit_core.hardware14 llmfit_core.models15 llmfit_core.providers16 llmfit_core.quality17 llmfit.events18 llmfit_core.bench19 llmfit_core.benchmarks20 llmfit_core.claim21 llmfit_core.cluster22 llmfit_core.cluster.gpu_backend_opt23 llmfit_core.update24 llmfit_desktop25 llmfit.cluster_cli26 llmfit_core.fit27 llmfit_core.share28 llmfit.serve_shared29 llmfit_core.analysis30 llmfit_core.concurrency31 llmfit_core.hwprofile32 llmfit_core.plan33 llmfit_core.storage34 llmfit35 llmfit.display36 llmfit.tui_app37 llmfit.mcp_server38 llmfit.serve_api39 llmfit.tui_events40 llmfit.tui_uillmfit-desktop.ui1llmfit-python.hatch_build2llmfit-python.src3llmfit-python.src.llmfit4llmfit-web.src5llmfit-web.src.components6llmfit-web.src.contexts7llmfit-web.src.hooks8llmfit.download_history9llmfit.filter_config10llmfit.theme11llmfit_core.doctor12llmfit_core.hardware13llmfit_core.models14llmfit_core.providers15llmfit_core.quality16llmfit.events17llmfit_core.bench18llmfit_core.benchmarks19llmfit_core.claim20llmfit_core.cluster21llmfit_core.cluster.gpu_backend_opt22llmfit_core.update23llmfit_desktop24llmfit.cluster_cli25llmfit_core.fit26llmfit_core.share27llmfit.serve_shared28llmfit_core.analysis29llmfit_core.concurrency30llmfit_core.hwprofile31llmfit_core.plan32llmfit_core.storage33llmfit34llmfit.display35llmfit.tui_app36llmfit.mcp_server37llmfit.serve_api38llmfit.tui_events39llmfit.tui_ui4021413132235242141333111258411111211131111258224111251214111122+4 more modules (most-connected shown)

At a glance — Code Health · 49% · Weak · gated by D2, R1 ·

At a glance — Architecture · 96% · Exemplary ·

At a glance — Maturity · 68% · Adequate · gated by M2 ·

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

At a glance — Security · 64% · Adequate · gated by D29 ·

At a glance — Accessibility · 37% · Weak · gated by AC4, AC6 ·

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 — Injection31High / Critical
A03:2025 — Software Supply Chain Failures30High / Critical
A02:2025 — Security Misconfiguration4Medium
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1; Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.

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

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+7.0 ptsMediumKeyboard semantics
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+7.0 ptsMediumVisual & motion safety
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+3.1 ptsMediumType Safety
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+2.7 ptsMediumPage structure
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.+1.1 ptsLowADR Quality
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+1.8 ptsMediumForms & labels
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+1.7 ptsMediumLarge Files
Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.+1.6 ptsMediumObservability

File quality

Per-file score 0–10 — a quality signature. Of 47 files carrying findings, judged against the Production bar: 9% slop · 85% mixed · 6% near-clean.

FileScoreBandWorst signal
REDACTED0.1SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
llmfit-core/src/fit.rs5.5MixedCyclomatic Complexity: ModelFit::analyze_inner (cyclomatic 75)
REDACTED5.6MixedIaC & Container Security: Medium IaC: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: Medium advisory (unsound): REDACTED
REDACTED6.3MixedDependency Vulnerabilities: Medium CVE: REDACTED
llmfit-core/src/hardware.rs7.0MixedCyclomatic Complexity: llmfit_core::hardware::gpu_memory_bandwidth_gbps (cyclomatic 95)
llmfit-tui/src/main.rs7.0MixedCyclomatic Complexity: llmfit::main (cyclomatic 68)
llmfit-core/src/models.rs7.0MixedCyclomatic Complexity: llmfit_core::models::parse_generation (cyclomatic 66)
llmfit-tui/src/tui_events.rs7.0MixedCyclomatic Complexity: llmfit::tui_events::handle_normal_mode (cyclomatic 65)
llmfit-tui/src/tui_app.rs7.0MixedCyclomatic Complexity: App::apply_filters (cyclomatic 55)
llmfit-tui/src/tui_ui.rs7.0MixedCyclomatic Complexity: llmfit::tui_ui::draw_bench (cyclomatic 49)
llmfit-core/src/providers.rs7.0MixedCyclomatic Complexity: LlamaCppProvider::download_gguf_paths (cyclomatic 19)
llmfit-core/src/benchmarks.rs7.0MixedCognitive Complexity: llmfit_core::benchmarks::hw_query_params (cognitive 24)
llmfit-core/src/bench.rs7.0MixedCognitive Complexity: llmfit_core::bench::discover_all_targets_at (cognitive 16)
llmfit-tui/src/serve_api.rs7.0MixedCyclomatic Complexity: llmfit::serve_api::start_download (cyclomatic 22)

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

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

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

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

Could not be resolved — 14

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 64 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, 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 — 64 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D43AC2AC3AC4AC5AC6AX10AX3AX4AX9C2M1M2M3M4P1P10P2P3P4P6P7PF1PF3R1R10R2R3R4R5R6R7R8R9S1X1X14X2X21X29X30

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, 511 of 528 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 · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1d86b-393f-7264-b525-435f4d11ab82.

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 26 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 17 test source file(s) (.py, .rs) 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.
  • D11 Test Reliability — 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. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `npm ci --ignore-scripts` in llmfit-web/ (27 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
  • 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 a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — 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 — 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. 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.
  • D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
  • AX6 Interface segregation — not measured this run — 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — 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. User interface: 17 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. Boot: crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:32768: page.goto: net::ERR_CONNECTION_REFUSED at http://127.0.0.1:32768/ Call log: - navigating to "http://127.0.0.1:32768/", waiting until "load" .
  • 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.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • 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.
  • X24 Document value interpolated into markup unescaped — 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.
  • X5 Nullable reference types — 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 and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust 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.

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.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality 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.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • 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.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • 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".
  • 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 Complexity4.8 / 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 4.8 / 10 · rule-coverage 100% · ceiling Prevented

65 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was llmfit_core::hardware::gpu_memory_bandwidth_gbps at 95. A further 9 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 llmfit_core::models::quant_bpp at 25 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: llmfit-web/src/components/FilterBar.jsx (FilterBar.FilterBar at 18). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

llmfit::main (cyclomatic 68) · ×32llmfit-tui/src/main.rs:4240
llmfit_core::hardware::gpu_memory_bandwidth_gbps (cyclomatic 95) · ×12llmfit-core/src/hardware.rs:3357
SystemSpecs::detect_all_gpus (cyclomatic 20) · ×5llmfit-core/src/hardware.rs:250
App::apply_filters (cyclomatic 55) · ×3llmfit-tui/src/tui_app.rs:1795
ModelFit::analyze_inner (cyclomatic 75)llmfit-core/src/fit.rs:566

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

What to do

  1. Bring the 7 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with llmfit_core::hardware::gpu_memory_bandwidth_gbps (cyclomatic 95), ModelFit::analyze_inner (cyclomatic 75), llmfit::main (cyclomatic 68). — 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 7 together lifts Cyclomatic Complexity from 4.8 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.3 / 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.3 / 10 · rule-coverage 100% · ceiling Prevented

95 method(s) exceeded the cognitive complexity threshold of 15; the worst was llmfit::tui_ui::draw_bench at 145.

llmfit::tui_ui::draw_bench (cognitive 145) · ×39llmfit-tui/src/tui_ui.rs:5531
llmfit_core::hardware::gpu_memory_bandwidth_gbps (cognitive 94) · ×24llmfit-core/src/hardware.rs:3357
App::apply_filters (cognitive 57) · ×8llmfit-tui/src/tui_app.rs:1795
SystemSpecs::display (cognitive 35) · ×8llmfit-core/src/hardware.rs:2835
ModelFit::analyze_inner (cognitive 132)llmfit-core/src/fit.rs:566

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

What to do

  1. Bring the 13 bodies over 60 down to 60 or less in Cognitive Complexity — start with llmfit::tui_ui::draw_bench (cognitive 145), llmfit::main (cognitive 133), ModelFit::analyze_inner (cognitive 132). — 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 13 together lifts Cognitive Complexity from 2.3 to about 4.5/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.4 / 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.4 / 10 · rule-coverage 100% · ceiling Prevented

71 god class(es) detected.

FunctionTooLong: DetailPanel.DetailPanel · ×38llmfit-web/src/components/DetailPanel.jsx:81
FileTooLong: src/tui_ui.rs · ×17llmfit-tui/src/tui_ui.rs
MethodTooLong: ModelFit.analyze_inner · ×6llmfit-core/src/fit.rs:566
ClassTooLong: App · ×5llmfit-tui/src/tui_app.rs:868
TooManyMethods: App · ×3llmfit-tui/src/tui_app.rs:868

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

What to do

  1. Resolve the 38 FunctionTooLong finding(s) in God Classes — start with tui_ui.rs (12), main.rs (5), tui_events.rs (4). — One of this dimension's main actionable groups (38 warning-level).
  2. Resolve the 17 FileTooLong finding(s) in God Classes — start with tui_ui.rs, tui_app.rs, main.rs. — One of this dimension's main actionable groups (17 warning-level).
  3. Resolve the 6 MethodTooLong finding(s) in God Classes — start with tui_app.rs (3), providers.rs (2), fit.rs. — One of this dimension's main actionable groups (6 warning-level).

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

D4 · Code Duplication8.2 / 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.2 / 10 · rule-coverage 100% · ceiling Verified

96 duplicated block group(s) detected. 4.4 % of the production lines (3,153 of 71,243) are in a reported copy. A further 32 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 6 of the 128 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (7 lines × 2) · ×11llmfit-core/src/bench.rs:203
Duplicated block (8 lines × 2) · ×9llmfit-core/src/hardware.rs:1265
Duplicated block (9 lines × 2) · ×7llmfit-core/src/benchmarks.rs:510
Duplicated block (6 lines × 2) · ×7llmfit-core/src/hardware.rs:1273
Duplicated block (11 lines × 2) · ×5llmfit-core/src/benchmarks.rs:317

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

What to do

  1. Resolve the 11 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with tui_ui.rs (7), bench.rs, claim.rs. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with tui_ui.rs (3), hardware.rs, providers.rs. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 7 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with benchmarks.rs (3), hardware.rs, download_history.rs. — One of this dimension's main actionable groups (7 warning-level).

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

D5 · Coupling8.4 / 10Strong✓ 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 8.4 / 10 · rule-coverage 100% · ceiling Prevented

5 production modules (Cargo+npm+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 4 of the 5 (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).

Off the main sequence: llmfit-core

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

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

D6 · Cohesion (LCOM4)9.6 / 10Stronggated by 1 serious finding✓ 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 9.6 / 10 · rule-coverage 100% · ceiling Verified

1 of 32 classes have LCOM4 above 3.

Low cohesion: ModelFit (LCOM4 4)llmfit-core/src/fit.rs:464

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with fit.rs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d6_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 26 tests. Measured on the JavaScript/TypeScript suite only — at least 17 test source file(s) (.py, .rs) went unread, so its test quality is unmeasured and is not in these counts.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D12 · Dependency Hygiene9.9 / 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.9 / 10 · rule-coverage 100% · ceiling Verified

2 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: rmcp · ×2

✓ On the Gold path — maintain.

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

D13 · REDACTED 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

REDACTED 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 627 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 MIT, 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 a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.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 7.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: llmfit-tui/src/main.rs (43×68=2924); llmfit-core/src/fit.rs (34×75=2550); llmfit-tui/src/tui_app.rs (13×55=715) Repeated repair below the complexity floor: llmfit-core/src/cluster.rs (14 of 22 changes were fixes); llmfit-core/src/bench.rs (6 of 7 changes were fixes); llmfit-core/src/update.rs (5 of 5 changes were fixes)

Hotspot: llmfit-tui/src/main.rs · ×12llmfit-tui/src/main.rs:4240
Repeated repair: llmfit-core/src/cluster.rs · ×6llmfit-core/src/cluster.rs:524

What to do

  1. Resolve the 12 Hotspot finding(s) in Churn × Complexity Hotspots — start with main.rs, fit.rs, tui_app.rs. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with cluster.rs, bench.rs, update.rs. — One of this dimension's main actionable groups (6 warning-level).

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

D16 · Bus Factor8.5 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

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

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

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

0 deducted task-comment markers across 71243 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.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. 18 document(s) read across 2 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

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 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundllmfit-tui/Cargo.toml:15

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_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, Python, 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)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

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

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)2.0 / 10Critical✓ 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.0 / 10 · rule-coverage 100% · ceiling Documented

31 finding(s): 0 critical, 30 high, 1 medium, 0 low. 21 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED. — One of this dimension's main actionable groups (6 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 21 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 (21 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities1.1 / 10Critical✓ 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 1.1 / 10 · rule-coverage 100% · ceiling Documented

23 finding(s): 2 critical, 6 high, 14 medium, 1 low.

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 6 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 5 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 warning-level).

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

D31 · IaC & Container Security9.7 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

4 finding(s): 0 critical, 0 high, 3 medium, 1 low.

REDACTED
REDACTED

What to do

  1. Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D34 · Knowledge Freshness10.0 / 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 39 of the 43 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.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 & Signing5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 3 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. 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).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.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.

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels7.2 / 10Strong✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — llmfit-desktop/ui/index.html:39
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — llmfit-desktop/ui/index.html:40

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure6.1 / 10Adequate✓ 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"). — index.html:1
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — index.html:1, llmfit-desktop/ui/index.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. — llmfit-web/index.html:2

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.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — llmfit-desktop/ui/index.html:74
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — llmfit-web/src/components/ModelTable.jsx:84

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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 safety1.0 / 10Critical✓ Tool-verified

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.

  • `.btn-accent` sets color: #fff on background-color: #ff9c66 — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — llmfit-web/src/styles.css:172
  • `.orb` moves (`animation: float 8s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-web/src/styles.css:84
  • `.hero-shell` moves (`animation: rise 520ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-web/src/styles.css:129
  • `.panel` moves (`animation: rise 560ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-web/src/styles.css:195
  • `.compare-panel` moves (`animation: rise 400ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-web/src/styles.css:836
  • `.modal-overlay` moves (`animation: rise 200ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-web/src/styles.css:1013
  • `.progress-fill` moves (`transition: width 300ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-web/src/styles.css:1043
  • `.mem-bar-fill` moves (`transition: width 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-desktop/ui/styles.css:221
  • `.pull-bar-fill` moves (`transition: width 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — llmfit-desktop/ui/styles.css:242

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition10.0 / 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.

C2 · Access Controls7.0 / 10Strong✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.

What to do

  • Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
M1 · Documentation (README)8.4 / 10Strong✓ 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 documentation2.0 / 10Critical✓ 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.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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 · Observability1.0 / 10Critical✓ 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.

  • No logging call was found in the 59 JavaScript/TypeScript, Rust, Python production file(s) this check read across 6 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Rust: the log and tracing crates (info!/warn!/error!, #[instrument]), slog, env_logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Adopt `tracing` with `tracing-subscriber` (JSON output) and log at meaningful points in the binaries you run.
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.

  • `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, 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. — .github/dependabot.yml:2

What to do

  • Dependabot is configured but does not watch `npm`, `uv` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ 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.

What to do

  • Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
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.

  • `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. (×3) — llmfit-core/src/share.rs:898, llmfit-core/src/share.rs:928, llmfit-core/src/share.rs:1004
  • `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. — llmfit-core/src/share.rs:995
  • `ureq::put(` 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. — llmfit-core/src/share.rs:1013

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.

R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 25 plain JS — the untyped files are llmfit-desktop/ui/app.js, llmfit-desktop/ui/i18n.js, llmfit-web/src/App.jsx, llmfit-web/src/App.test.jsx, llmfit-web/src/api.js, llmfit-web/src/api.test.js (+19 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication5.9 / 10Adequate✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • llmfit-web/src/components/ConcurrencyCard.jsx:49 · llmfit-web/src/components/StoragePanel.jsx:59 — the two spans are one implementation copied and then locally edited — 385 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — llmfit-web/src/components/ConcurrencyCard.jsx:49
  • llmfit-web/src/components/DetailPanel.jsx:286 · llmfit-web/src/components/SystemPanel.jsx:141 — the two spans are one implementation copied and then locally edited — 206 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — llmfit-web/src/components/DetailPanel.jsx:286
  • llmfit-web/src/hooks/useModels.js:14 · llmfit-web/src/hooks/useSystem.js:7 — the two spans are one implementation copied and then locally edited — 139 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — llmfit-web/src/hooks/useModels.js:14
  • llmfit-web/src/components/FilterBar.jsx:366 · llmfit-web/src/components/FilterBar.jsx:388 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — llmfit-web/src/components/FilterBar.jsx:366
  • llmfit-web/src/components/DetailPanel.jsx:396 · llmfit-web/src/components/DetailPanel.jsx:439 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — llmfit-web/src/components/DetailPanel.jsx:396
  • llmfit-web/src/components/Header.jsx:76 · llmfit-web/src/components/Header.jsx:88 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — llmfit-web/src/components/Header.jsx:76
  • llmfit-web/src/components/DetailPanel.jsx:302 · llmfit-web/src/components/DetailPanel.jsx:334 · llmfit-web/src/components/SystemPanel.jsx:170 · llmfit-web/src/components/SystemPanel.jsx:182 · +1 more site(s) not listed — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — llmfit-web/src/components/DetailPanel.jsx:302
  • llmfit-desktop/ui/i18n.js:261 · llmfit-web/src/utils.js:32 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — llmfit-desktop/ui/i18n.js:261
  • llmfit-web/src/components/StoragePanel.jsx:129 · llmfit-web/src/components/StoragePanel.jsx:138 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — llmfit-web/src/components/StoragePanel.jsx:129
  • llmfit-web/src/components/DetailPanel.jsx:450 · llmfit-web/src/components/DetailPanel.jsx:464 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — llmfit-web/src/components/DetailPanel.jsx:450

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity7.9 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • DetailPanel has cyclomatic complexity 39 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — llmfit-web/src/components/DetailPanel.jsx:81
  • SystemPanel has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — llmfit-web/src/components/SystemPanel.jsx:15
  • FilterBar has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — llmfit-web/src/components/FilterBar.jsx:71
  • buildModelsQuery has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — llmfit-web/src/api.js:48
  • applyClientFilters has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — llmfit-web/src/utils.js:184
R3 · Large Files4.5 / 10Weak✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • llmfit-web/src/components/DetailPanel.jsx has 649 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — llmfit-web/src/components/DetailPanel.jsx:1
  • llmfit-web/src/i18n/locales/en.js has 434 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — llmfit-web/src/i18n/locales/en.js:1
  • llmfit-web/src/i18n/locales/zh-CN.js has 431 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — llmfit-web/src/i18n/locales/zh-CN.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage8.6 / 10Strong✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×3) — llmfit-desktop/ui/app.js:1, llmfit-desktop/ui/i18n.js:1, llmfit-web/src/main.jsx:1

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.2 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code9.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Nothing imports this binding — it is safe to review for removal. (×6) — llmfit-web/src/api.js:1, llmfit-web/src/api.js:135, llmfit-web/src/api.js:140, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

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(` (llmfit-tui/src/serve_api.rs:386)), 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(` (llmfit-tui/src/serve_api.rs:386).
  • 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(` (llmfit-tui/src/serve_api.rs:386).

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.

X2 · Cancellation propagation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. 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 question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

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.

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.

WCAG coverage — what static analysis assessed

Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; ≈24% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 43 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
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 43 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 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.2, 2.1.4, 2.2.2, 2.3.1, 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.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 Health49%Weak — gated by D2, R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture96%ExemplaryStrongest area.
Maturity68%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness56%Adequate — gated by P2, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security64%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility37%Weak — gated by AC4, AC6Capped 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 — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 15 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 62 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; 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; 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.
  • 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. 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 — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — The runtime tier booted this repository's service, but crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:32768: page.goto: net::ERR_CONNECTION_REFUSED at http://127.0.0.1:32768/ Call log: - navigating to "http://127.0.0.1:32768/", waiting until "load" . This repository also has a user interface (17 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates) that the booted service does not serve, and this scan has no strategy that reaches it — so no WCAG success criterion was verified in a rendered page on this run. That is a gap in OUR tooling, not a finding about your application: nothing here says the interface is inaccessible. The static accessibility checks still ran.
  • AXS1 Runtime exposed surface — 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.
  • 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.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
  • 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 (4866 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust 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"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py, .rs source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • 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.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — llmfit-web/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (5 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 not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • 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.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X12 Unreachable branch — X12 reached only 13% of this repository's production lines — rust (66,138 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
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not 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 — X24 reached only 13% of this repository's production lines — rust (66,138 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • X28 Index access outside its own emptiness guard — 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 13% of this repository's production lines — rust (66,138 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.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — 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 — 44 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
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×2
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×1
  • <input> without a programmatic label llmfit-desktop/ui/index.html:39 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label llmfit-desktop/ui/index.html:40 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang index.html:1 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×1
  • Click handler on a non-interactive <div> llmfit-desktop/ui/index.html:74 — A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <tr> · ×1
  • Click handler on a non-interactive <tr> llmfit-web/src/components/ModelTable.jsx:84 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 439 finding(s)
D2 · Cognitive Complexity · llmfit · ×39
  • llmfit::tui_ui::draw_bench (cognitive 145) llmfit-tui/src/tui_ui.rs:5531 — llmfit::tui_ui::draw_bench has cognitive complexity 145 (threshold 15). Drivers by points: if/else 51 (115 pts), loops 5 (19 pts), match/switch 3 (7 pts), boolean chains 4 (nesting depth added 82). 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.
  • llmfit::main (cognitive 133) llmfit-tui/src/main.rs:4240 — llmfit::main has cognitive complexity 133 (threshold 15). Drivers by points: if/else 51 (111 pts), boolean chains 9, match/switch 3 (8 pts), loops 1 (5 pts) (nesting depth added 69). 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.
  • llmfit::tui_events::handle_mouse_at (cognitive 96) llmfit-tui/src/tui_events.rs:120 — llmfit::tui_events::handle_mouse_at has cognitive complexity 96 (threshold 15). Drivers by points: if/else 46 (79 pts), boolean chains 13, match/switch 2 (4 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.
  • llmfit::tui_ui::draw_detail (cognitive 81) llmfit-tui/src/tui_ui.rs:2213 — llmfit::tui_ui::draw_detail has cognitive complexity 81 (threshold 15). Drivers by points: if/else 44 (66 pts), loops 5 (9 pts), boolean chains 3, match/switch 2 (3 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.
  • llmfit::run_download (cognitive 73) llmfit-tui/src/main.rs:2742 — llmfit::run_download has cognitive complexity 73 (threshold 15). Drivers by points: if/else 30 (51 pts), loops 6 (17 pts), match/switch 2 (4 pts), boolean chains 1 (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.
  • llmfit::tui_events::handle_view_mouse (cognitive 69) llmfit-tui/src/tui_events.rs:765 — llmfit::tui_events::handle_view_mouse has cognitive complexity 69 (threshold 15). Drivers by points: if/else 31 (54 pts), boolean chains 10, match/switch 2 (5 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.
  • llmfit::run_hardware (cognitive 65) llmfit-tui/src/main.rs:1814 — llmfit::run_hardware has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (36 pts), match/switch 7 (15 pts), loops 5 (14 pts) (nesting depth added 37). 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.
  • llmfit::tui_ui::draw_system_bar (cognitive 65) llmfit-tui/src/tui_ui.rs:211 — llmfit::tui_ui::draw_system_bar has cognitive complexity 65 (threshold 15). Drivers by points: if/else 53 (59 pts), match/switch 2 (6 pts) (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • llmfit::run_bench (cognitive 54) llmfit-tui/src/main.rs:3540 — llmfit::run_bench has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (42 pts), match/switch 4 (7 pts), loops 2 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • llmfit::tui_ui::draw_table (cognitive 54) llmfit-tui/src/tui_ui.rs:1011 — llmfit::tui_ui::draw_table has cognitive complexity 54 (threshold 15). Drivers by points: if/else 37 (44 pts), match/switch 4 (6 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • llmfit::cluster_cli::interactive_init (cognitive 47) llmfit-tui/src/cluster_cli.rs:357 — llmfit::cluster_cli::interactive_init has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 5 (12 pts), loops 2 (6 pts), boolean chains 1 (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.
  • llmfit::tui_ui::draw_plan (cognitive 47) llmfit-tui/src/tui_ui.rs:2712 — llmfit::tui_ui::draw_plan has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (38 pts), loops 3 (8 pts), boolean chains 1 (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.
  • llmfit::tui_events::key_hint_at (cognitive 43) llmfit-tui/src/tui_events.rs:426 — llmfit::tui_events::key_hint_at has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (24 pts), match/switch 2 (9 pts), loops 3 (8 pts), boolean chains 2 (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.
  • llmfit::run_quality_bench (cognitive 42) llmfit-tui/src/main.rs:3897 — llmfit::run_quality_bench has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (31 pts), match/switch 5 (9 pts), boolean chains 1, loops 1 (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.
  • llmfit::tui_ui::draw_search_and_filters (cognitive 38) llmfit-tui/src/tui_ui.rs:563 — llmfit::tui_ui::draw_search_and_filters has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24, boolean chains 7, match/switch 4 (6 pts), loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_ui::status_keys_and_mode (cognitive 35) llmfit-tui/src/tui_ui.rs:3365 — llmfit::tui_ui::status_keys_and_mode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 3 (6 pts), boolean chains 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.
  • llmfit::tui_ui::draw_compare (cognitive 34) llmfit-tui/src/tui_ui.rs:1313 — llmfit::tui_ui::draw_compare has cognitive complexity 34 (threshold 15). Drivers by points: if/else 33, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_events::handle_popup_mouse (cognitive 33) llmfit-tui/src/tui_events.rs:572 — llmfit::tui_events::handle_popup_mouse has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (22 pts), match/switch 5 (7 pts), boolean chains 4 (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.
  • llmfit::tui_events::handle_normal_mode (cognitive 33) llmfit-tui/src/tui_events.rs:927 — llmfit::tui_events::handle_normal_mode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • llmfit::tui_ui::draw_filter_popup (cognitive 30) llmfit-tui/src/tui_ui.rs:5267 — llmfit::tui_ui::draw_filter_popup has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, boolean chains 4, match/switch 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_ui::draw_multi_compare (cognitive 28) llmfit-tui/src/tui_ui.rs:1663 — llmfit::tui_ui::draw_multi_compare has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (21 pts), boolean chains 3, loops 3, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_ui::draw_benchmarks (cognitive 28) llmfit-tui/src/tui_ui.rs:4957 — llmfit::tui_ui::draw_benchmarks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • llmfit::run_diff (cognitive 27) llmfit-tui/src/main.rs:2316 — llmfit::run_diff has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, match/switch 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.
  • llmfit::run_recommend (cognitive 27) llmfit-tui/src/main.rs:2554 — llmfit::run_recommend has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 7 (10 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • llmfit::tui_ui::draw_provider_popup (cognitive 25) llmfit-tui/src/tui_ui.rs:2978 — llmfit::tui_ui::draw_provider_popup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (23 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.
  • + 14 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×38
  • FunctionTooLong: DetailPanel.DetailPanel llmfit-web/src/components/DetailPanel.jsx:81 — FunctionTooLong — DetailPanel runs 529 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 429 over it, 5.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: llmfit::tui_ui::draw_bench llmfit-tui/src/tui_ui.rs:5531 — FunctionTooLong — llmfit::tui_ui::draw_bench runs 471 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 371 over it, 4.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: llmfit::main llmfit-tui/src/main.rs:4240 — FunctionTooLong — llmfit::main runs 393 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 293 over it, 3.93× 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: llmfit::tui_ui::draw_detail llmfit-tui/src/tui_ui.rs:2213 — FunctionTooLong — llmfit::tui_ui::draw_detail runs 337 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 237 over it, 3.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: FilterBar.FilterBar llmfit-web/src/components/FilterBar.jsx:71 — FunctionTooLong — FilterBar runs 301 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 201 over it, 3.01× 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: llmfit::tui_ui::draw_multi_compare llmfit-tui/src/tui_ui.rs:1663 — FunctionTooLong — llmfit::tui_ui::draw_multi_compare runs 249 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 149 over it, 2.49× 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: llmfit::tui_ui::draw_table llmfit-tui/src/tui_ui.rs:1011 — FunctionTooLong — llmfit::tui_ui::draw_table runs 226 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 126 over it, 2.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: StoragePanel.StoragePanel llmfit-web/src/components/StoragePanel.jsx:31 — FunctionTooLong — StoragePanel runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: llmfit::tui_ui::draw_plan llmfit-tui/src/tui_ui.rs:2712 — FunctionTooLong — llmfit::tui_ui::draw_plan runs 199 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 99 over it, 1.99× 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: llmfit::tui_events::handle_mouse_at llmfit-tui/src/tui_events.rs:120 — FunctionTooLong — llmfit::tui_events::handle_mouse_at runs 197 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 97 over it, 1.97× 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: llmfit_core::hardware::gpu_memory_bandwidth_gbps llmfit-core/src/hardware.rs:3357 — FunctionTooLong — llmfit_core::hardware::gpu_memory_bandwidth_gbps runs 194 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 94 over it, 1.94× 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: llmfit::tui_ui::draw_search_and_filters llmfit-tui/src/tui_ui.rs:563 — FunctionTooLong — llmfit::tui_ui::draw_search_and_filters runs 194 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 94 over it, 1.94× 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: llmfit::run_hardware llmfit-tui/src/main.rs:1814 — FunctionTooLong — llmfit::run_hardware runs 190 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 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: llmfit::run_download llmfit-tui/src/main.rs:2742 — FunctionTooLong — llmfit::run_download runs 184 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 84 over it, 1.84× 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: llmfit::tui_ui::draw_system_bar llmfit-tui/src/tui_ui.rs:211 — FunctionTooLong — llmfit::tui_ui::draw_system_bar runs 175 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 75 over it, 1.75× 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: llmfit::tui_ui::draw_benchmarks llmfit-tui/src/tui_ui.rs:4957 — FunctionTooLong — llmfit::tui_ui::draw_benchmarks runs 171 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 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SystemPanel.SystemPanel llmfit-web/src/components/SystemPanel.jsx:15 — FunctionTooLong — SystemPanel runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) 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: llmfit::tui_ui::draw_compare llmfit-tui/src/tui_ui.rs:1313 — FunctionTooLong — llmfit::tui_ui::draw_compare runs 152 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 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: llmfit_core::plan::estimate_model_plan_with_config llmfit-core/src/plan.rs:609 — FunctionTooLong — llmfit_core::plan::estimate_model_plan_with_config runs 149 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 49 over it, 1.49× 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: llmfit::tui_ui::draw_filter_popup llmfit-tui/src/tui_ui.rs:5267 — FunctionTooLong — llmfit::tui_ui::draw_filter_popup runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: llmfit::tui_events::handle_popup_mouse llmfit-tui/src/tui_events.rs:572 — FunctionTooLong — llmfit::tui_events::handle_popup_mouse runs 143 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 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ModelTable.ModelTable llmfit-web/src/components/ModelTable.jsx:15 — FunctionTooLong — ModelTable runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) 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: llmfit::tui_ui::status_keys_and_mode llmfit-tui/src/tui_ui.rs:3365 — FunctionTooLong — llmfit::tui_ui::status_keys_and_mode runs 134 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 34 over it, 1.34× 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: llmfit_core::fit::estimate_tps llmfit-core/src/fit.rs:2185 — FunctionTooLong — llmfit_core::fit::estimate_tps 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: llmfit_core::update::map_to_llm_model llmfit-core/src/update.rs:676 — FunctionTooLong — llmfit_core::update::map_to_llm_model 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.
  • + 13 more in this group — see findings.md.
D1 · Cyclomatic Complexity · llmfit · ×32
  • llmfit::main (cyclomatic 68) llmfit-tui/src/main.rs:4240 — llmfit::main 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.
  • llmfit::tui_events::handle_normal_mode (cyclomatic 65) llmfit-tui/src/tui_events.rs:927 — llmfit::tui_events::handle_normal_mode has cyclomatic complexity 65 (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.
  • llmfit::tui_events::handle_mouse_at (cyclomatic 62) llmfit-tui/src/tui_events.rs:120 — llmfit::tui_events::handle_mouse_at has cyclomatic complexity 62 (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.
  • llmfit::tui_ui::draw_bench (cyclomatic 49) llmfit-tui/src/tui_ui.rs:5531 — llmfit::tui_ui::draw_bench has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • llmfit::tui_events::handle_view_mouse (cyclomatic 45) llmfit-tui/src/tui_events.rs:765 — llmfit::tui_events::handle_view_mouse has cyclomatic complexity 45 (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.
  • llmfit::tui_ui::draw_detail (cyclomatic 45) llmfit-tui/src/tui_ui.rs:2213 — llmfit::tui_ui::draw_detail has cyclomatic complexity 45 (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.
  • llmfit::tui_events::handle_popup_mouse (cyclomatic 43) llmfit-tui/src/tui_events.rs:572 — llmfit::tui_events::handle_popup_mouse has cyclomatic complexity 43 (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.
  • llmfit::run_recommend (cyclomatic 40) llmfit-tui/src/main.rs:2554 — llmfit::run_recommend has cyclomatic complexity 40 (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.
  • llmfit::tui_ui::draw_table (cyclomatic 39) llmfit-tui/src/tui_ui.rs:1011 — llmfit::tui_ui::draw_table has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_ui::status_keys_and_mode (cyclomatic 38) llmfit-tui/src/tui_ui.rs:3365 — llmfit::tui_ui::status_keys_and_mode has cyclomatic complexity 38 (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.
  • llmfit::tui_ui::draw_system_bar (cyclomatic 37) llmfit-tui/src/tui_ui.rs:211 — llmfit::tui_ui::draw_system_bar has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::run_download (cyclomatic 31) llmfit-tui/src/main.rs:2742 — llmfit::run_download has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • llmfit::tui_ui::draw_search_and_filters (cyclomatic 31) llmfit-tui/src/tui_ui.rs:563 — llmfit::tui_ui::draw_search_and_filters has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_ui::draw_filter_popup (cyclomatic 30) llmfit-tui/src/tui_ui.rs:5267 — llmfit::tui_ui::draw_filter_popup has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::run_hardware (cyclomatic 29) llmfit-tui/src/main.rs:1814 — llmfit::run_hardware 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.
  • llmfit::tui_events::key_hint_at (cyclomatic 26) llmfit-tui/src/tui_events.rs:426 — llmfit::tui_events::key_hint_at has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • llmfit::run_quality_bench (cyclomatic 25) llmfit-tui/src/main.rs:3897 — llmfit::run_quality_bench has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • llmfit::run_bench (cyclomatic 24) llmfit-tui/src/main.rs:3540 — llmfit::run_bench has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • llmfit::tui_events::handle_download_manager_mode (cyclomatic 23) llmfit-tui/src/tui_events.rs:1461 — llmfit::tui_events::handle_download_manager_mode 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.
  • llmfit::tui_ui::draw (cyclomatic 23) llmfit-tui/src/tui_ui.rs:145 — llmfit::tui_ui::draw has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_ui::draw_multi_compare (cyclomatic 23) llmfit-tui/src/tui_ui.rs:1663 — llmfit::tui_ui::draw_multi_compare has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::serve_api::start_download (cyclomatic 22) llmfit-tui/src/serve_api.rs:863 — llmfit::serve_api::start_download has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • llmfit::tui_ui::draw_compare (cyclomatic 22) llmfit-tui/src/tui_ui.rs:1313 — llmfit::tui_ui::draw_compare has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_ui::draw_benchmarks (cyclomatic 22) llmfit-tui/src/tui_ui.rs:4957 — llmfit::tui_ui::draw_benchmarks has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit::tui_events::handle_selection_popup_mouse (cyclomatic 20) llmfit-tui/src/tui_events.rs:494 — llmfit::tui_events::handle_selection_popup_mouse 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. This is NOT this file's highest cyclomatic complexity: llmfit::tui_events::handle_key (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • + 7 more in this group — see findings.md.
D2 · Cognitive Complexity · llmfit_core · ×24
  • llmfit_core::hardware::gpu_memory_bandwidth_gbps (cognitive 94) llmfit-core/src/hardware.rs:3357 — llmfit_core::hardware::gpu_memory_bandwidth_gbps has cognitive complexity 94 (threshold 15). Drivers by points: if/else 93, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::models::parse_generation (cognitive 92) llmfit-core/src/models.rs:299 — llmfit_core::models::parse_generation has cognitive complexity 92 (threshold 15). Drivers by points: if/else 47 (74 pts), boolean chains 18 (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.
  • llmfit_core::hardware::estimate_vram_from_name (cognitive 65) llmfit-core/src/hardware.rs:3918 — llmfit_core::hardware::estimate_vram_from_name has cognitive complexity 65 (threshold 15). Drivers by points: if/else 62, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::models::infer_heads_from_name (cognitive 44) llmfit-core/src/models.rs:2541 — llmfit_core::models::infer_heads_from_name has cognitive complexity 44 (threshold 15). Drivers by points: if/else 36 (42 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • llmfit_core::fit::estimate_tps (cognitive 35) llmfit-core/src/fit.rs:2185 — llmfit_core::fit::estimate_tps has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 3, match/switch 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.
  • llmfit_core::fit::quality_score (cognitive 33) llmfit-core/src/fit.rs:2528 — llmfit_core::fit::quality_score has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (26 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • llmfit_core::doctor::vulkan_memory_heap_summary (cognitive 31) llmfit-core/src/doctor.rs:57 — llmfit_core::doctor::vulkan_memory_heap_summary has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 8, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • llmfit_core::storage::estimate_storage (cognitive 30) llmfit-core/src/storage.rs:144 — llmfit_core::storage::estimate_storage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 4, match/switch 1 (2 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.
  • llmfit_core::models::merge_duplicate_entry (cognitive 29) llmfit-core/src/models.rs:1901 — llmfit_core::models::merge_duplicate_entry has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (25 pts), loops 3, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • llmfit_core::update::extract_model_params (cognitive 28) llmfit-core/src/update.rs:188 — llmfit_core::update::extract_model_params has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3, boolean chains 2 (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.
  • llmfit_core::benchmarks::hw_query_params (cognitive 24) llmfit-core/src/benchmarks.rs:225 — llmfit_core::benchmarks::hw_query_params has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (24 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.
  • llmfit_core::fit::rank_models_by_fit_opts_col_dir (cognitive 22) llmfit-core/src/fit.rs:1674 — llmfit_core::fit::rank_models_by_fit_opts_col_dir has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 3 (4 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.
  • llmfit_core::plan::estimate_model_plan_with_config (cognitive 19) llmfit-core/src/plan.rs:609 — llmfit_core::plan::estimate_model_plan_with_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 7, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::providers::build_gguf_candidates (cognitive 19) llmfit-core/src/providers.rs:1881 — llmfit_core::providers::build_gguf_candidates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), 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.
  • llmfit_core::update::update_model_cache (cognitive 19) llmfit-core/src/update.rs:884 — llmfit_core::update::update_model_cache has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 2 (6 pts), loops 3 (5 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.
  • llmfit_core::providers::scan_hf_cache_for_mlx_in (cognitive 18) llmfit-core/src/providers.rs:861 — llmfit_core::providers::scan_hf_cache_for_mlx_in has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • llmfit_core::providers::split_name_and_size (cognitive 18) llmfit-core/src/providers.rs:4829 — llmfit_core::providers::split_name_and_size has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • llmfit_core::share::share_all_pending (cognitive 18) llmfit-core/src/share.rs:519 — llmfit_core::share::share_all_pending has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 5 (8 pts), match/switch 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • llmfit_core::models::apply_published_moe_active (cognitive 17) llmfit-core/src/models.rs:2277 — llmfit_core::models::apply_published_moe_active has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 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.
  • llmfit_core::providers::scan_hf_cache_for_gguf (cognitive 17) llmfit-core/src/providers.rs:915 — llmfit_core::providers::scan_hf_cache_for_gguf has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • llmfit_core::quality::run_all_tests (cognitive 17) llmfit-core/src/quality.rs:364 — llmfit_core::quality::run_all_tests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • llmfit_core::bench::discover_all_targets_at (cognitive 16) llmfit-core/src/bench.rs:762 — llmfit_core::bench::discover_all_targets_at has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), boolean chains 4, if/else 4 (nesting depth added 4). 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.
  • llmfit_core::providers::collect_gguf_files (cognitive 16) llmfit-core/src/providers.rs:1985 — llmfit_core::providers::collect_gguf_files has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • llmfit_core::update::map_to_llm_model (cognitive 16) llmfit-core/src/update.rs:676 — llmfit_core::update::map_to_llm_model has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D3 · God Classes · FileTooLong · ×17
  • FileTooLong: src/tui_ui.rs llmfit-tui/src/tui_ui.rs — FileTooLong — 4462 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 73 free functions. The bar is 500 significant lines; this is 3962 over it, 8.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: src/tui_app.rs llmfit-tui/src/tui_app.rs — FileTooLong — 3710 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: App (2 blocks, 868-5349). The bar is 500 significant lines; this is 3210 over it, 7.42× 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: src/main.rs llmfit-tui/src/main.rs — FileTooLong — 3195 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 2695 over it, 6.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: src/providers.rs llmfit-core/src/providers.rs — FileTooLong — 2682 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 123 free functions. The bar is 500 significant lines; this is 2182 over it, 5.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/hardware.rs llmfit-core/src/hardware.rs — FileTooLong — 2313 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: SystemSpecs (2 blocks, 106-2958). The bar is 500 significant lines; this is 1813 over it, 4.63× 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: src/models.rs llmfit-core/src/models.rs — FileTooLong — 1499 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 999 over it, 3.00× 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/fit.rs llmfit-core/src/fit.rs — FileTooLong — 1491 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 991 over it, 2.98× 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/tui_events.rs llmfit-tui/src/tui_events.rs — FileTooLong — 1125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 625 over it, 2.25× 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/serve_api.rs llmfit-tui/src/serve_api.rs — FileTooLong — 1010 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 510 over it, 2.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: src/display.rs llmfit-tui/src/display.rs — FileTooLong — 860 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 360 over it, 1.72× 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/share.rs llmfit-core/src/share.rs — FileTooLong — 736 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 46 free functions. The bar is 500 significant lines; this is 236 over it, 1.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/benchmarks.rs llmfit-core/src/benchmarks.rs — FileTooLong — 715 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 215 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: src/bench.rs llmfit-core/src/bench.rs — FileTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 37 free functions. The bar is 500 significant lines; this is 201 over it, 1.40× 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/update.rs llmfit-core/src/update.rs — FileTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 143 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/plan.rs llmfit-core/src/plan.rs — FileTooLong — 626 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 126 over it, 1.25× 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: components/DetailPanel.jsx llmfit-web/src/components/DetailPanel.jsx — FileTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: DetailPanel (81-687). The bar is 500 significant lines; this is 95 over it, 1.19× 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: src/cluster.rs llmfit-core/src/cluster.rs — FileTooLong — 531 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 31 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D1 · Cyclomatic Complexity · llmfit_core · ×12
  • llmfit_core::hardware::gpu_memory_bandwidth_gbps (cyclomatic 95) llmfit-core/src/hardware.rs:3357 — llmfit_core::hardware::gpu_memory_bandwidth_gbps has cyclomatic complexity 95 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::hardware::estimate_vram_from_name (cyclomatic 66) llmfit-core/src/hardware.rs:3918 — llmfit_core::hardware::estimate_vram_from_name has cyclomatic complexity 66 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::models::parse_generation (cyclomatic 66) llmfit-core/src/models.rs:299 — llmfit_core::models::parse_generation has cyclomatic complexity 66 (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.
  • llmfit_core::models::infer_heads_from_name (cyclomatic 32) llmfit-core/src/models.rs:2541 — llmfit_core::models::infer_heads_from_name has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::fit::estimate_tps (cyclomatic 29) llmfit-core/src/fit.rs:2185 — llmfit_core::fit::estimate_tps 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.
  • llmfit_core::fit::quality_score (cyclomatic 28) llmfit-core/src/fit.rs:2528 — llmfit_core::fit::quality_score has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::models::merge_duplicate_entry (cyclomatic 27) llmfit-core/src/models.rs:1901 — llmfit_core::models::merge_duplicate_entry has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::doctor::vulkan_memory_heap_summary (cyclomatic 22) llmfit-core/src/doctor.rs:57 — llmfit_core::doctor::vulkan_memory_heap_summary has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • llmfit_core::fit::rank_models_by_fit_opts_col_dir (cyclomatic 20) llmfit-core/src/fit.rs:1674 — llmfit_core::fit::rank_models_by_fit_opts_col_dir 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.
  • llmfit_core::storage::estimate_storage (cyclomatic 20) llmfit-core/src/storage.rs:144 — llmfit_core::storage::estimate_storage 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.
  • llmfit_core::plan::estimate_model_plan_with_config (cyclomatic 18) llmfit-core/src/plan.rs:609 — llmfit_core::plan::estimate_model_plan_with_config has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • llmfit_core::hardware::gpu_compute_capability (cyclomatic 16) llmfit-core/src/hardware.rs:3688 — llmfit_core::hardware::gpu_compute_capability has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D15 · Churn × Complexity Hotspots · Hotspot · ×12
  • Hotspot: llmfit-tui/src/main.rs llmfit-tui/src/main.rs:4240 — llmfit-tui/src/main.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in llmfit::main at line 4240. 26 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-tui/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: llmfit-core/src/fit.rs llmfit-core/src/fit.rs:566 — llmfit-core/src/fit.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in ModelFit::analyze_inner at line 566. 27 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/fit.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: llmfit-tui/src/tui_app.rs llmfit-tui/src/tui_app.rs:1795 — llmfit-tui/src/tui_app.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in App::apply_filters at line 1795. 9 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-tui/src/tui_app.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: scripts/scrape_hf_models.py scripts/scrape_hf_models.py:2862 — scripts/scrape_hf_models.py changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in scrape_hf_models.main at line 2862. 12 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- scripts/scrape_hf_models.py`: 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: llmfit-core/src/hardware.rs llmfit-core/src/hardware.rs:250 — llmfit-core/src/hardware.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in SystemSpecs::detect_all_gpus at line 250. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/hardware.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: llmfit-tui/src/tui_ui.rs llmfit-tui/src/tui_ui.rs:5531 — llmfit-tui/src/tui_ui.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in llmfit::tui_ui::draw_bench at line 5531. 7 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-tui/src/tui_ui.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: llmfit-tui/src/tui_events.rs llmfit-tui/src/tui_events.rs:765 — llmfit-tui/src/tui_events.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in llmfit::tui_events::handle_view_mouse at line 765. 4 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-tui/src/tui_events.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: llmfit-tui/src/display.rs llmfit-tui/src/display.rs:192 — llmfit-tui/src/display.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in llmfit::display::display_model_detail at line 192. 7 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-tui/src/display.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: llmfit-tui/src/serve_api.rs llmfit-tui/src/serve_api.rs:863 — llmfit-tui/src/serve_api.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in llmfit::serve_api::start_download at line 863. 4 of those changes were fix/bug commits, and the other 5 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-tui/src/serve_api.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: llmfit-core/src/plan.rs llmfit-core/src/plan.rs:609 — llmfit-core/src/plan.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in llmfit_core::plan::estimate_model_plan_with_config at line 609. 7 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/plan.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: llmfit-tui/src/cluster_cli.rs llmfit-tui/src/cluster_cli.rs:357 — llmfit-tui/src/cluster_cli.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in llmfit::cluster_cli::interactive_init at line 357. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-tui/src/cluster_cli.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: llmfit-web/src/components/DetailPanel.jsx llmfit-web/src/components/DetailPanel.jsx:81 — llmfit-web/src/components/DetailPanel.jsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in DetailPanel.DetailPanel at line 81. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-web/src/components/DetailPanel.jsx`: 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×11
  • Duplicated block (7 lines × 2) llmfit-core/src/bench.rs:203 — llmfit-core/src/bench.rs:203-209 | llmfit-core/src/quality.rs:208-214 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `llmfit-core/src/quality.rs:216` calls `elapsed` and `llmfit-core/src/bench.rs:211` 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 (7 lines × 2) llmfit-core/src/claim.rs:120 — llmfit-core/src/claim.rs:120-126 | llmfit-core/src/share.rs:250-256 — 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 `llmfit-core/src/claim.rs:120` 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) llmfit-tui/src/mcp_server.rs:144 — llmfit-tui/src/mcp_server.rs:144-150 | llmfit-tui/src/serve_api.rs:1230-1236 — before extracting anything, compare `llmfit-tui/src/mcp_server.rs` and `llmfit-tui/src/serve_api.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) llmfit-tui/src/tui_ui.rs:1079 — llmfit-tui/src/tui_ui.rs:1079-1085 | llmfit-tui/src/tui_ui.rs:1868-1874 — both copies are in the same file, so extract the block into 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) llmfit-tui/src/tui_ui.rs:3648 — llmfit-tui/src/tui_ui.rs:3648-3654 | llmfit-tui/src/tui_ui.rs:3672-3678 — both copies are in the same file, so extract the block into 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) llmfit-tui/src/tui_ui.rs:711 — llmfit-tui/src/tui_ui.rs:711-719 | llmfit-tui/src/tui_ui.rs:808-814 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:711` 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) llmfit-tui/src/tui_ui.rs:4026 — llmfit-tui/src/tui_ui.rs:4026-4032 | llmfit-tui/src/tui_ui.rs:4447-4454 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:4026` 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) llmfit-tui/src/tui_ui.rs:5412 — llmfit-tui/src/tui_ui.rs:5412-5418 | llmfit-tui/src/tui_ui.rs:5436-5442 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:5412` 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) llmfit-tui/src/tui_ui.rs:2836 — llmfit-tui/src/tui_ui.rs:2836-2842 | llmfit-tui/src/tui_ui.rs:2861-2867 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:2836` 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) llmfit-tui/src/tui_ui.rs:2812 — llmfit-tui/src/tui_ui.rs:2812-2818 | llmfit-tui/src/tui_ui.rs:2837-2843 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:2812` 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) llmfit-tui/src/tui_events.rs:1010 — llmfit-tui/src/tui_events.rs:1010-1016 | llmfit-tui/src/tui_events.rs:1125-1131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) llmfit-core/src/hardware.rs:1265 — llmfit-core/src/hardware.rs:1265-1272 | llmfit-core/src/hardware.rs:1300-1307 — both copies are in the same file, so extract the 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 `llmfit-core/src/hardware.rs:1265` 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) llmfit-core/src/providers.rs:597 — llmfit-core/src/providers.rs:597-604 | llmfit-core/src/providers.rs:688-695 — both copies are in the same file, so extract the 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 (8 lines × 2) llmfit-core/src/share.rs:1005 — llmfit-core/src/share.rs:1005-1012 | llmfit-core/src/share.rs:1014-1021 — both copies are in the same file, so extract the 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 `llmfit-core/src/share.rs:1005` 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) llmfit-tui/src/serve_api.rs:1287 — llmfit-tui/src/serve_api.rs:1287-1294 | llmfit-tui/src/serve_api.rs:1304-1311 — both copies are in the same file, so extract the 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 `llmfit-tui/src/serve_api.rs:1287` 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, `llmfit-tui/src/serve_api.rs:1295` calls `to_lowercase`, `contains`, `label` and `llmfit-tui/src/serve_api.rs:1312` 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 lines × 2) llmfit-tui/src/tui_ui.rs:4450 — llmfit-tui/src/tui_ui.rs:4450-4457 | llmfit-tui/src/tui_ui.rs:4569-4576 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) llmfit-tui/src/main.rs:3171 — llmfit-tui/src/main.rs:3171-3178 | llmfit-tui/src/main.rs:3203-3211 — both copies are in the same file, so extract the 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 `llmfit-tui/src/main.rs:3171` 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 × 2) llmfit-core/src/bench.rs:870 — llmfit-core/src/bench.rs:870-877 | llmfit-core/src/bench.rs:997-1004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `llmfit-core/src/bench.rs:870` 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) llmfit-tui/src/tui_ui.rs:4665 — llmfit-tui/src/tui_ui.rs:4665-4672 | llmfit-tui/src/tui_ui.rs:4716-4723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) llmfit-tui/src/tui_ui.rs:4703 — llmfit-tui/src/tui_ui.rs:4703-4710 | llmfit-tui/src/tui_ui.rs:4773-4780 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×8
  • Animation without a prefers-reduced-motion guard llmfit-web/src/styles.css:84 — `.orb` moves (`animation: float 8s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard llmfit-web/src/styles.css:129 — `.hero-shell` moves (`animation: rise 520ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard llmfit-web/src/styles.css:195 — `.panel` moves (`animation: rise 560ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard llmfit-web/src/styles.css:836 — `.compare-panel` moves (`animation: rise 400ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard llmfit-web/src/styles.css:1013 — `.modal-overlay` moves (`animation: rise 200ms var(--ease-out) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard llmfit-web/src/styles.css:1043 — `.progress-fill` moves (`transition: width 300ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard llmfit-desktop/ui/styles.css:221 — `.mem-bar-fill` moves (`transition: width 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard llmfit-desktop/ui/styles.css:242 — `.pull-bar-fill` moves (`transition: width 0.3s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D2 · Cognitive Complexity · App · ×8
  • App::apply_filters (cognitive 57) llmfit-tui/src/tui_app.rs:1795 — App::apply_filters has cognitive complexity 57 (threshold 15). Drivers by points: if/else 31 (33 pts), boolean chains 20, match/switch 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • App::with_specs_context_and_config (cognitive 22) llmfit-tui/src/tui_app.rs:1134 — App::with_specs_context_and_config has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 3, boolean chains 2, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • App::re_sort (cognitive 19) llmfit-tui/src/tui_app.rs:4317 — App::re_sort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (4 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.
  • App::tick_bench (cognitive 19) llmfit-tui/src/tui_app.rs:5283 — App::tick_bench has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::merge_local_bench_rows (cognitive 17) llmfit-tui/src/tui_app.rs:2704 — App::merge_local_bench_rows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::plan_input (cognitive 16) llmfit-tui/src/tui_app.rs:3046 — App::plan_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • App::available_download_providers (cognitive 16) llmfit-tui/src/tui_app.rs:4673 — App::available_download_providers has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. 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.
  • App::load_bench_cache (cognitive 16) llmfit-tui/src/tui_app.rs:5046 — App::load_bench_cache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SystemSpecs · ×8
  • SystemSpecs::display (cognitive 35) llmfit-core/src/hardware.rs:2835 — SystemSpecs::display has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (12 pts), loops 2 (5 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.
  • SystemSpecs::parse_nvidia_smi_extended (cognitive 31) llmfit-core/src/hardware.rs:552 — SystemSpecs::parse_nvidia_smi_extended has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 3, match/switch 1 (2 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.
  • SystemSpecs::parse_rocm_product_names (cognitive 31) llmfit-core/src/hardware.rs:894 — SystemSpecs::parse_rocm_product_names has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SystemSpecs::detect_all_gpus (cognitive 30) llmfit-core/src/hardware.rs:250 — SystemSpecs::detect_all_gpus has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SystemSpecs::detect_nvidia_gpu_sysfs_info (cognitive 29) llmfit-core/src/hardware.rs:720 — SystemSpecs::detect_nvidia_gpu_sysfs_info has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SystemSpecs::scan_amd_sysfs_cards (cognitive 27) llmfit-core/src/hardware.rs:1091 — SystemSpecs::scan_amd_sysfs_cards has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 4 (7 pts), loops 2 (4 pts), boolean chains 3 (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.
  • SystemSpecs::is_same_gpu_name (cognitive 20) llmfit-core/src/hardware.rs:2284 — SystemSpecs::is_same_gpu_name has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 9 (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.
  • SystemSpecs::narrowed_pcie_warnings (cognitive 16) llmfit-core/src/hardware.rs:2930 — SystemSpecs::narrowed_pcie_warnings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 1 (4 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) llmfit-core/src/benchmarks.rs:510 — llmfit-core/src/benchmarks.rs:510-518 | llmfit-core/src/benchmarks.rs:733-741 — both copies are in the same file, so extract the 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 `llmfit-core/src/benchmarks.rs:510` 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) llmfit-core/src/benchmarks.rs:778 — llmfit-core/src/benchmarks.rs:778-786 | llmfit-core/src/benchmarks.rs:799-807 — both copies are in the same file, so extract the 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 `llmfit-core/src/benchmarks.rs:778` 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, `llmfit-core/src/benchmarks.rs:796` calls `push`, `to_string` and `llmfit-core/src/benchmarks.rs:775` 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.
  • Duplicated block (9 lines × 2) llmfit-core/src/benchmarks.rs:818 — llmfit-core/src/benchmarks.rs:818-826 | llmfit-core/src/benchmarks.rs:1032-1040 — both copies are in the same file, so extract the 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 `llmfit-core/src/benchmarks.rs:818` 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) llmfit-core/src/hardware.rs:1503 — llmfit-core/src/hardware.rs:1503-1511 | llmfit-core/src/hardware.rs:1630-1638 — both copies are in the same file, so extract the 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 `llmfit-core/src/hardware.rs:1503` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `llmfit-core/src/hardware.rs:1512` calls `trim` and `llmfit-core/src/hardware.rs:1639` 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.
  • Duplicated block (9 lines × 2) llmfit-tui/src/download_history.rs:49 — llmfit-tui/src/download_history.rs:49-57 | llmfit-tui/src/filter_config.rs:58-66 — 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. 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 (9 lines × 2) llmfit-tui/src/tui_ui.rs:2654 — llmfit-tui/src/tui_ui.rs:2654-2662 | llmfit-tui/src/tui_ui.rs:2683-2691 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) llmfit-tui/src/mcp_server.rs:461 — llmfit-tui/src/mcp_server.rs:461-469 | llmfit-tui/src/serve_api.rs:1457-1465 — before extracting anything, compare `llmfit-tui/src/mcp_server.rs` and `llmfit-tui/src/serve_api.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×7
  • Duplicated block (6 lines × 2) llmfit-core/src/hardware.rs:1273 — llmfit-core/src/hardware.rs:1273-1278 | llmfit-core/src/hardware.rs:1288-1293 — both copies are in the same file, so extract the 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 `llmfit-core/src/hardware.rs:1273` 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) llmfit-tui/src/tui_app.rs:1422 — llmfit-tui/src/tui_app.rs:1422-1427 | llmfit-tui/src/tui_app.rs:1429-1434 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_app.rs:1422` 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) llmfit-tui/src/tui_ui.rs:1415 — llmfit-tui/src/tui_ui.rs:1415-1424 | llmfit-tui/src/tui_ui.rs:1430-1435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) llmfit-core/src/hardware.rs:2302 — llmfit-core/src/hardware.rs:2302-2307 | llmfit-core/src/hardware.rs:2317-2322 — both copies are in the same file, so extract the 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 `llmfit-core/src/hardware.rs:2302` 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 (6 lines × 2) llmfit-tui/src/download_history.rs:41 — llmfit-tui/src/download_history.rs:41-46 | llmfit-tui/src/filter_config.rs:49-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 (6 lines × 2) llmfit-tui/src/tui_ui.rs:2102 — llmfit-tui/src/tui_ui.rs:2102-2107 | llmfit-tui/src/tui_ui.rs:2109-2114 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:2102` 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 (6 lines × 2) scripts/scrape_hf_models.py:2138 — scripts/scrape_hf_models.py:2138-2143 | scripts/scrape_hf_models.py:2155-2160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D15 · Churn × Complexity Hotspots · Repeated repair · ×6
  • Repeated repair: llmfit-core/src/cluster.rs llmfit-core/src/cluster.rs:524 — llmfit-core/src/cluster.rs changed 22 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 10 (its worst body is RayEndpoint::parse at line 524), 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: v1.1.19 Framework/ROCm findings: NVFP4 routing, head backfill, cluster diff/banner/Ray backend (#1230)”; “fix(cluster): structured refusal reason, tp_size, KV replication, TP=1 and Ray discovery follow-ups (#1225)”; “fix(cluster): skip dead Ray nodes; default https:// to port 443”; “fix(cluster): name a mixed Ray node by its oldest GPU”. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/cluster.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: llmfit-core/src/bench.rs llmfit-core/src/bench.rs:762 — llmfit-core/src/bench.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 13 (its worst body is llmfit_core::bench::discover_all_targets_at at line 762), 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(bench): read OLLAMA_HOST like the Ollama provider does (#1171)”; “fix(bench): error when the requested model is not available (#1041)”; “fix(bench): ignore implausible tok/s from degenerate Ollama timings (#1042)”; “fix(bench): stop wall timer after body read in OpenAI and Ollama paths (#1037)”. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/bench.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: llmfit-core/src/update.rs llmfit-core/src/update.rs:188 — llmfit-core/src/update.rs changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is llmfit_core::update::extract_model_params 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(scraper): keep the stated context window for llama3 rope scaling (#1167)”; “fix(update): detect MoE models from config.json expert counts (#1142)”; “fix(update): read the context window from config.json (#1054)”; “fix(update): request every mapped field in the HuggingFace list expand[] (#1048)”. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/update.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: llmfit-core/src/analysis.rs llmfit-core/src/analysis.rs:144 — llmfit-core/src/analysis.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is InstalledIndex::installed_providers at line 144), 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(cluster): structured refusal reason, tp_size, KV replication, TP=1 and Ray discovery follow-ups (#1225)”; “fix: match benchmark calibration by PCIe link width (#1202)”; “fix(providers): find LM Studio models on disk, not just loaded ones (#902)”; “fix(ollama): stop a size-less family tag claiming a much larger model (#899)”. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/analysis.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: llmfit-core/src/share.rs llmfit-core/src/share.rs:519 — llmfit-core/src/share.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is llmfit_core::share::share_all_pending at line 519), 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: match benchmark calibration by PCIe link width (#1202)”; “fix(bench): ignore implausible tok/s from degenerate Ollama timings (#1042)”; “fix(bench): identify Ferrum and vLLM by endpoint owner (#994)”; “fix(share): explain a refused write to the user's own fork (#865)”. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/share.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: llmfit-core/src/benchmarks.rs llmfit-core/src/benchmarks.rs:612 — llmfit-core/src/benchmarks.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is llmfit_core::benchmarks::hardware_payload_match_grade at line 612), 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: match benchmark GPU counts (#1237)”; “fix: match benchmark calibration by PCIe link width (#1202)”; “fix(bench): ignore implausible tok/s from degenerate Ollama timings (#1042)”. 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 07:19:06 +00:00' --until='2026-11-12 07:19:06 +00:00' --full-history --no-merges -- llmfit-core/src/benchmarks.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.
D3 · God Classes · MethodTooLong · ×6
  • MethodTooLong: ModelFit.analyze_inner llmfit-core/src/fit.rs:566 — MethodTooLong — analyze_inner runs 451 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 351 over it, 4.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.with_specs_context_and_config llmfit-tui/src/tui_app.rs:1134 — MethodTooLong — with_specs_context_and_config runs 444 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 344 over it, 4.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.apply_filters llmfit-tui/src/tui_app.rs:1795 — MethodTooLong — apply_filters runs 188 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 88 over it, 1.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LlamaCppProvider.download_gguf_paths llmfit-core/src/providers.rs:1571 — MethodTooLong — download_gguf_paths runs 138 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 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.start_bench llmfit-tui/src/tui_app.rs:5133 — MethodTooLong — start_bench runs 117 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 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LmStudioProvider.start_pull llmfit-core/src/providers.rs:3058 — MethodTooLong — start_pull runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D1 · Cyclomatic Complexity · SystemSpecs · ×5
  • SystemSpecs::detect_all_gpus (cyclomatic 20) llmfit-core/src/hardware.rs:250 — SystemSpecs::detect_all_gpus 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.
  • SystemSpecs::parse_nvidia_smi_extended (cyclomatic 19) llmfit-core/src/hardware.rs:552 — SystemSpecs::parse_nvidia_smi_extended 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.
  • SystemSpecs::detect_nvidia_gpu_sysfs_info (cyclomatic 18) llmfit-core/src/hardware.rs:720 — SystemSpecs::detect_nvidia_gpu_sysfs_info 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.
  • SystemSpecs::parse_rocm_product_names (cyclomatic 18) llmfit-core/src/hardware.rs:894 — SystemSpecs::parse_rocm_product_names 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.
  • SystemSpecs::is_same_gpu_name (cyclomatic 17) llmfit-core/src/hardware.rs:2284 — SystemSpecs::is_same_gpu_name 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.
D3 · God Classes · ClassTooLong · ×5
  • ClassTooLong: App llmfit-tui/src/tui_app.rs:868 — ClassTooLong — 3120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 242 methods, 2 blocks, lines 868-5349. The bar is 400 significant lines; this is 2720 over it, 7.80× 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: SystemSpecs llmfit-core/src/hardware.rs:106 — ClassTooLong — 1631 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 83 methods, 2 blocks, lines 106-2958. The bar is 400 significant lines; this is 1231 over it, 4.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ModelFit llmfit-core/src/fit.rs:464 — ClassTooLong — 541 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 15 methods, 2 blocks, lines 464-1357. The bar is 400 significant lines; this is 141 over it, 1.35× 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: DetailPanel llmfit-web/src/components/DetailPanel.jsx:1 — ClassTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 129 over it, 1.32× 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 llmfit-tui/src/main.rs:296 — ClassTooLong — 491 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 91 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) llmfit-core/src/benchmarks.rs:317 — llmfit-core/src/benchmarks.rs:317-327 | llmfit-core/src/share.rs:131-141 — 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 `llmfit-core/src/benchmarks.rs:317` 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) llmfit-core/src/providers.rs:1076 — llmfit-core/src/providers.rs:1076-1086 | llmfit-core/src/providers.rs:2501-2511 — both copies are in the same file, so extract the 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 `llmfit-core/src/providers.rs:1076` 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, `llmfit-core/src/providers.rs:1088` calls `code`, `unwrap_or` and `llmfit-core/src/providers.rs:2513` 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.
  • Duplicated block (11 lines × 2) llmfit-core/src/update.rs:247 — llmfit-core/src/update.rs:247-257 | llmfit-core/src/update.rs:696-706 — both copies are in the same file, so extract the block into 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) llmfit-tui/src/main.rs:2360 — llmfit-tui/src/main.rs:2360-2370 | llmfit-tui/src/main.rs:2371-2381 — both copies are in the same file, so extract the block into 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) llmfit-tui/src/tui_ui.rs:3191 — llmfit-tui/src/tui_ui.rs:3191-3201 | llmfit-tui/src/tui_ui.rs:3275-3285 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:3191` 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×5
  • Outbound HTTP without resilience llmfit-core/src/share.rs:898 — `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 llmfit-core/src/share.rs:928 — `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 llmfit-core/src/share.rs:995 — `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.
  • Outbound HTTP without resilience llmfit-core/src/share.rs:1004 — `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 llmfit-core/src/share.rs:1013 — `ureq::put(` 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 (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) llmfit-core/src/providers.rs:2929 — llmfit-core/src/providers.rs:2929-2938 | llmfit-core/src/providers.rs:2992-3001 — both copies are in the same file, so extract the 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 `llmfit-core/src/providers.rs:2929` 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) llmfit-tui/src/main.rs:1546 — llmfit-tui/src/main.rs:1546-1555 | llmfit-tui/src/serve_shared.rs:5-14 — 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 `llmfit-tui/src/main.rs:1546` 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, `llmfit-tui/src/serve_shared.rs:16` calls `gpu_memory_bandwidth_gbps` and `llmfit-tui/src/main.rs:1556` 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.
  • Duplicated block (10 lines × 2) llmfit-tui/src/mcp_server.rs:175 — llmfit-tui/src/mcp_server.rs:175-184 | llmfit-tui/src/serve_api.rs:1288-1297 — before extracting anything, compare `llmfit-tui/src/mcp_server.rs` and `llmfit-tui/src/serve_api.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) llmfit-tui/src/tui_ui.rs:5333 — llmfit-tui/src/tui_ui.rs:5333-5342 | llmfit-tui/src/tui_ui.rs:5367-5376 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:5333` 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.
AC3 · Page structure · Page without a main landmark · ×3
  • Page without a main landmark index.html:1 — 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 llmfit-desktop/ui/index.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 llmfit-web/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
D1 · Cyclomatic Complexity · App · ×3
  • App::apply_filters (cyclomatic 55) llmfit-tui/src/tui_app.rs:1795 — App::apply_filters has cyclomatic complexity 55 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • App::with_specs_context_and_config (cyclomatic 27) llmfit-tui/src/tui_app.rs:1134 — App::with_specs_context_and_config has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • App::available_download_providers (cyclomatic 17) llmfit-tui/src/tui_app.rs:4673 — App::available_download_providers has cyclomatic complexity 17 (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.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: App llmfit-tui/src/tui_app.rs:868 — TooManyMethods — 242 methods. The bar is 30 methods; this is 212 over it, 8.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SystemSpecs llmfit-core/src/hardware.rs:106 — TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LlmModel llmfit-core/src/models.rs:684 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×3
  • Edited copy of a member (32 corresponding lines) llmfit-core/src/quality.rs:479 — llmfit-core/src/quality.rs:479-510 | llmfit-core/src/quality.rs:513-558 — 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.
  • Edited copy of a member (32 corresponding lines) llmfit-core/src/providers.rs:861 — llmfit-core/src/providers.rs:861-892 | llmfit-core/src/providers.rs:915-948 — 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.
  • Edited copy of a member (32 corresponding lines) scripts/validate_generation_scoring.py:189 — scripts/validate_generation_scoring.py:189-220 | scripts/validate_generation_scoring.py:224-257 — 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 · Duplicated block (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) llmfit-core/src/providers.rs:865 — llmfit-core/src/providers.rs:865-879 | llmfit-core/src/providers.rs:920-934 — both copies are in the same file, so extract the 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 `llmfit-core/src/providers.rs:865` 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. 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 (15 lines × 2) llmfit-core/src/providers.rs:2386 — llmfit-core/src/providers.rs:2386-2400 | llmfit-core/src/providers.rs:3481-3495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `llmfit-core/src/providers.rs:2382` calls `is_docker_desktop_running` and `llmfit-core/src/providers.rs:3480` 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 (15 lines × 2) llmfit-core/src/quality.rs:480 — llmfit-core/src/quality.rs:480-494 | llmfit-core/src/quality.rs:514-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `llmfit-core/src/quality.rs:480` 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 (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) llmfit-core/src/hardware.rs:687 — llmfit-core/src/hardware.rs:687-699 | llmfit-core/src/hardware.rs:1013-1025 — both copies are in the same file, so extract the 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 `llmfit-core/src/hardware.rs:687` 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) llmfit-core/src/models.rs:2569 — llmfit-core/src/models.rs:2569-2581 | llmfit-core/src/models.rs:2595-2607 — both copies are in the same file, so extract the 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 `llmfit-core/src/models.rs:2569` 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 (13 lines × 2) scripts/validate_generation_scoring.py:59 — scripts/validate_generation_scoring.py:59-71 | scripts/validate_generation_scoring.py:77-89 — both copies are in the same file, so extract the 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 (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) llmfit-core/src/providers.rs:1823 — llmfit-core/src/providers.rs:1823-1827 | llmfit-core/src/providers.rs:1830-1834 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) llmfit-tui/src/tui_ui.rs:4960 — llmfit-tui/src/tui_ui.rs:4960-4964 | llmfit-tui/src/tui_ui.rs:5207-5211 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:4960` 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) llmfit-core/src/providers.rs:1504 — llmfit-core/src/providers.rs:1504-1508 | llmfit-core/src/providers.rs:2200-2204 — both copies are in the same file, so extract the 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 `llmfit-core/src/providers.rs:1504` 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.
R4 · Test Coverage · No test reaches this file · ×3
  • No test reaches this file llmfit-desktop/ui/app.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file llmfit-desktop/ui/i18n.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file llmfit-web/src/main.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: App llmfit-tui/src/tui_app.rs:868 — TooManyFields — 181 stored fields beside 242 methods. The bar is 30 stored fields; this is 151 over it, 6.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: HfModelEntry llmfit-core/src/models.rs:1727 — TooManyFields — 32 stored fields. The bar is 30 stored fields; this is 2 over it, 1.07× 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.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) llmfit-core/src/providers.rs:60 — llmfit-core/src/providers.rs:60-76 | llmfit-core/src/providers.rs:2323-2338 | llmfit-core/src/providers.rs:2702-2717 | llmfit-core/src/providers.rs:3425-3440 | llmfit-core/src/providers.rs:3648-3663 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) llmfit-core/src/providers.rs:2378 — llmfit-core/src/providers.rs:2378-2439 | llmfit-core/src/providers.rs:2452-2480 | llmfit-core/src/providers.rs:3480-3531 | llmfit-core/src/providers.rs:3544-3565 | llmfit-core/src/providers.rs:3708-3749 — 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 (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) llmfit-core/src/bench.rs:867 — llmfit-core/src/bench.rs:867-887 | llmfit-core/src/bench.rs:994-1023 — 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) llmfit-core/src/hardware.rs:1498 — llmfit-core/src/hardware.rs:1498-1522 | llmfit-core/src/hardware.rs:1629-1649 — 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 (15 corresponding lines) · ×2
  • Edited copy of a member (15 corresponding lines) llmfit-core/src/providers.rs:595 — llmfit-core/src/providers.rs:595-609 | llmfit-core/src/providers.rs:686-700 — 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) llmfit-tui/src/cluster_cli.rs:267 — llmfit-tui/src/cluster_cli.rs:267-281 | llmfit-tui/src/cluster_cli.rs:287-303 — 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 (10 corresponding lines) · ×2
  • Edited copy of a member (10 corresponding lines) llmfit-core/src/providers.rs:814 — llmfit-core/src/providers.rs:814-824 | llmfit-core/src/providers.rs:2149-2158 — These two members are one piece of code written twice and then edited apart: 10 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 (10 corresponding lines) llmfit-core/src/share.rs:716 — llmfit-core/src/share.rs:716-725 | llmfit-tui/src/cluster_cli.rs:252-261 — These two members are one piece of code written twice and then edited apart: 10 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 (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) llmfit-core/src/share.rs:1093 — llmfit-core/src/share.rs:1093-1104 | llmfit-core/src/share.rs:1149-1156 — 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.
  • Edited copy of a member (8 corresponding lines) llmfit-tui/src/main.rs:3530 — llmfit-tui/src/main.rs:3530-3537 | llmfit-tui/src/tui_ui.rs:2002-2009 — 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 · Duplicated block (7 lines × 5) · ×2
  • Duplicated block (7 lines × 5) llmfit-core/src/providers.rs:2394 — llmfit-core/src/providers.rs:2394-2401 | llmfit-core/src/providers.rs:2460-2466 | llmfit-core/src/providers.rs:3489-3496 | llmfit-core/src/providers.rs:3552-3558 | llmfit-core/src/providers.rs:3720-3727 — 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 `llmfit-core/src/providers.rs:2394` 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, `llmfit-core/src/providers.rs:3497` calls `endpoint_has_omlx_status`, `from_millis` and `llmfit-core/src/providers.rs:2402` 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 × 5) llmfit-tui/src/tui_ui.rs:642 — llmfit-tui/src/tui_ui.rs:642-648 | llmfit-tui/src/tui_ui.rs:671-677 | llmfit-tui/src/tui_ui.rs:700-706 | llmfit-tui/src/tui_ui.rs:780-786 | llmfit-tui/src/tui_ui.rs:800-806 — 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 `llmfit-tui/src/tui_ui.rs:642` 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 (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) llmfit-core/src/benchmarks.rs:776 — llmfit-core/src/benchmarks.rs:776-782 | llmfit-core/src/benchmarks.rs:797-803 | llmfit-core/src/benchmarks.rs:816-822 | llmfit-core/src/benchmarks.rs:1030-1036 — 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, `llmfit-core/src/benchmarks.rs:796` calls `push`, `to_string` and `llmfit-core/src/benchmarks.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 (7 lines × 4) llmfit-tui/src/tui_ui.rs:3353 — llmfit-tui/src/tui_ui.rs:3353-3359 | llmfit-tui/src/tui_ui.rs:4364-4370 | llmfit-tui/src/tui_ui.rs:4486-4492 | llmfit-tui/src/tui_ui.rs:5282-5288 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `llmfit-tui/src/tui_ui.rs:3353` 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.
R10 · Code Duplication · Duplicated block with local edits (36 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (36 matched lines × 2 locations) llmfit-web/src/components/DetailPanel.jsx:286 — llmfit-web/src/components/DetailPanel.jsx:286 · llmfit-web/src/components/SystemPanel.jsx:141 — the two spans are one implementation copied and then locally edited — 206 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (36 matched lines × 2 locations) llmfit-web/src/hooks/useModels.js:14 — llmfit-web/src/hooks/useModels.js:14 · llmfit-web/src/hooks/useSystem.js:7 — the two spans are one implementation copied and then locally edited — 139 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×2
  • Duplicated block (12 lines × 2 locations) llmfit-web/src/components/DetailPanel.jsx:396 — llmfit-web/src/components/DetailPanel.jsx:396 · llmfit-web/src/components/DetailPanel.jsx:439 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (12 lines × 2 locations) llmfit-web/src/components/Header.jsx:76 — llmfit-web/src/components/Header.jsx:76 · llmfit-web/src/components/Header.jsx:88 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.1 · ×1
  • Low contrast colour pair in CSS (2.1:1) llmfit-web/src/styles.css:172 — `.btn-accent` sets color: #fff on background-color: #ff9c66 — 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · ModelFit · ×1
  • ModelFit::analyze_inner (cyclomatic 75) llmfit-core/src/fit.rs:566 — ModelFit::analyze_inner has cyclomatic complexity 75 (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 · DetailPanel.DetailPanel (cyclomatic 57) · ×1
  • DetailPanel.DetailPanel (cyclomatic 57) llmfit-web/src/components/DetailPanel.jsx:81 — DetailPanel.DetailPanel has cyclomatic complexity 57 (threshold 15). Of this number, 35 points are the body's own statements and 22 belong to 5 function items inside it that branch. 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 · utils.applyClientFilters (cyclomatic 29) · ×1
  • utils.applyClientFilters (cyclomatic 29) llmfit-web/src/utils.js:184 — utils.applyClientFilters has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body's own statements and 8 belong to 3 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · SystemPanel.SystemPanel (cyclomatic 21) · ×1
  • SystemPanel.SystemPanel (cyclomatic 21) llmfit-web/src/components/SystemPanel.jsx:15 — SystemPanel.SystemPanel has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LlamaCppProvider · ×1
  • LlamaCppProvider::download_gguf_paths (cyclomatic 19) llmfit-core/src/providers.rs:1571 — LlamaCppProvider::download_gguf_paths 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.
D1 · Cyclomatic Complexity · Capability · ×1
  • Capability::infer (cyclomatic 18) llmfit-core/src/models.rs:545 — Capability::infer has cyclomatic complexity 18 (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. This is NOT this file's highest cyclomatic complexity: llmfit_core::models::quant_bpp (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LlmModel · ×1
  • LlmModel::params_b_from_name (cyclomatic 18) llmfit-core/src/models.rs:1251 — LlmModel::params_b_from_name 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. This is NOT this file's highest cyclomatic complexity: llmfit_core::models::quant_bpp (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LmStudioProvider · ×1
  • LmStudioProvider::start_pull (cyclomatic 18) llmfit-core/src/providers.rs:3058 — LmStudioProvider::start_pull 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 · HardwareProfile · ×1
  • HardwareProfile::validate (cyclomatic 16) llmfit-core/src/hwprofile.rs:187 — HardwareProfile::validate 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 · api.buildModelsQuery (cyclomatic 16) · ×1
  • api.buildModelsQuery (cyclomatic 16) llmfit-web/src/api.js:48 — api.buildModelsQuery has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · StoragePanel.StoragePanel (cyclomatic 16) · ×1
  • StoragePanel.StoragePanel (cyclomatic 16) llmfit-web/src/components/StoragePanel.jsx:31 — StoragePanel.StoragePanel has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · ModelFit · ×1
  • ModelFit::analyze_inner (cognitive 132) llmfit-core/src/fit.rs:566 — ModelFit::analyze_inner has cognitive complexity 132 (threshold 15). Drivers by points: if/else 76 (111 pts), boolean chains 11, match/switch 6 (10 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.
D2 · Cognitive Complexity · DetailPanel.DetailPanel (cognitive 63) · ×1
  • DetailPanel.DetailPanel (cognitive 63) llmfit-web/src/components/DetailPanel.jsx:81 — DetailPanel.DetailPanel has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 25 (36 pts), boolean chains 20, if/else 5 (6 pts), error handling 1 (nesting depth added 12). Of this number, 36 points are the body's own statements and 27 belong to 5 function items inside it that branch. 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 · LmStudioProvider · ×1
  • LmStudioProvider::start_pull (cognitive 44) llmfit-core/src/providers.rs:3058 — LmStudioProvider::start_pull has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (36 pts), match/switch 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LlamaCppProvider · ×1
  • LlamaCppProvider::download_gguf_paths (cognitive 39) llmfit-core/src/providers.rs:1571 — LlamaCppProvider::download_gguf_paths has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (26 pts), match/switch 3 (7 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LlmModel · ×1
  • LlmModel::params_b_from_name (cognitive 33) llmfit-core/src/models.rs:1251 — LlmModel::params_b_from_name has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · applyClientFilters (cognitive 30) · ×1
  • applyClientFilters (cognitive 30) llmfit-web/src/utils.js:184 — applyClientFilters has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 11, ternaries 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 15 belong to 9 function literals inside it that branch. 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 · HardwareProfile · ×1
  • HardwareProfile::validate (cognitive 25) llmfit-core/src/hwprofile.rs:187 — HardwareProfile::validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OllamaProvider · ×1
  • OllamaProvider::start_pull (cognitive 24) llmfit-core/src/providers.rs:405 — OllamaProvider::start_pull has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 2 (5 pts), loops 1 (2 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · StoragePanel.StoragePanel (cognitive 24) · ×1
  • StoragePanel.StoragePanel (cognitive 24) llmfit-web/src/components/StoragePanel.jsx:31 — StoragePanel.StoragePanel has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 3 (4 pts), boolean chains 3, error handling 1 (nesting depth added 9). Of this number, 16 points are the body's own statements and 8 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.
D2 · Cognitive Complexity · SystemPanel.SystemPanel (cognitive 22) · ×1
  • SystemPanel.SystemPanel (cognitive 22) llmfit-web/src/components/SystemPanel.jsx:15 — SystemPanel.SystemPanel has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 14 (17 pts), boolean chains 3, if/else 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ConcurrencyCard.ConcurrencyCard (cognitive 20) · ×1
  • ConcurrencyCard.ConcurrencyCard (cognitive 20) llmfit-web/src/components/ConcurrencyCard.jsx:33 — ConcurrencyCard.ConcurrencyCard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 5 (6 pts), boolean chains 1, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 48, handleSubmit, a function literal at line 152). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Capability · ×1
  • Capability::infer (cognitive 17) llmfit-core/src/models.rs:545 — Capability::infer has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 5. 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.
D2 · Cognitive Complexity · api.buildModelsQuery (cognitive 17) · ×1
  • api.buildModelsQuery (cognitive 17) llmfit-web/src/api.js:48 — api.buildModelsQuery has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ModelTable.ModelTable (cognitive 17) · ×1
  • ModelTable.ModelTable (cognitive 17) llmfit-web/src/components/ModelTable.jsx:15 — ModelTable.ModelTable has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 76). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) llmfit-tui/src/theme.rs:186 — llmfit-tui/src/theme.rs:186-221 | llmfit-tui/src/theme.rs:223-258 | llmfit-tui/src/theme.rs:260-295 | llmfit-tui/src/theme.rs:297-332 | llmfit-tui/src/theme.rs:334-369 | llmfit-tui/src/theme.rs:371-407 | llmfit-tui/src/theme.rs:409-445 | llmfit-tui/src/theme.rs:447-483 | llmfit-tui/src/theme.rs:485-521 — These 9 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 9 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 9 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) llmfit-tui/src/tui_ui.rs:2978 — llmfit-tui/src/tui_ui.rs:2978-3135 | llmfit-tui/src/tui_ui.rs:3137-3219 | llmfit-tui/src/tui_ui.rs:3221-3303 | llmfit-tui/src/tui_ui.rs:3683-3753 | llmfit-tui/src/tui_ui.rs:3755-3829 | llmfit-tui/src/tui_ui.rs:3831-3910 | llmfit-tui/src/tui_ui.rs:4194-4267 | llmfit-tui/src/tui_ui.rs:4269-4343 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) llmfit-tui/src/tui_ui.rs:3305 — llmfit-tui/src/tui_ui.rs:3305-3363 | llmfit-tui/src/tui_ui.rs:4052-4076 | llmfit-tui/src/tui_ui.rs:4350-4470 | llmfit-tui/src/tui_ui.rs:4472-4594 | llmfit-tui/src/tui_ui.rs:5188-5265 | llmfit-tui/src/tui_ui.rs:5267-5484 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) llmfit-core/src/benchmarks.rs:774 — llmfit-core/src/benchmarks.rs:774-786 | llmfit-core/src/benchmarks.rs:794-807 | llmfit-core/src/benchmarks.rs:814-826 | llmfit-core/src/benchmarks.rs:1021-1040 — 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 (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) llmfit-tui/src/mcp_server.rs:292 — llmfit-tui/src/mcp_server.rs:292-340 | llmfit-tui/src/serve_api.rs:804-861 — These two members are one piece of code written twice and then edited apart: 49 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 (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) llmfit-core/src/bench.rs:347 — llmfit-core/src/bench.rs:347-403 | llmfit-core/src/quality.rs:258-312 — These two members are one piece of code written twice and then edited apart: 55 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 (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) llmfit-core/src/providers.rs:1052 — llmfit-core/src/providers.rs:1052-1102 | llmfit-core/src/providers.rs:2487-2526 — These two members are one piece of code written twice and then edited apart: 40 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, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) llmfit-tui/src/serve_api.rs:562 — llmfit-tui/src/serve_api.rs:562-585 | llmfit-tui/src/serve_api.rs:590-613 | llmfit-tui/src/serve_api.rs:619-645 — 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 copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) llmfit-tui/src/tui_events.rs:1394 — llmfit-tui/src/tui_events.rs:1394-1427 | llmfit-tui/src/tui_events.rs:1429-1459 — 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 copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) llmfit-core/src/bench.rs:159 — llmfit-core/src/bench.rs:159-186 | llmfit-core/src/bench.rs:312-339 — These two members are one piece of code written twice and then edited apart: 28 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, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) llmfit-tui/src/tui_app.rs:4487 — llmfit-tui/src/tui_app.rs:4487-4504 | llmfit-tui/src/tui_app.rs:4535-4552 | llmfit-tui/src/tui_app.rs:4554-4571 | llmfit-tui/src/tui_app.rs:4573-4590 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 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 (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) llmfit-core/src/cluster.rs:393 — llmfit-core/src/cluster.rs:393-403 | llmfit-core/src/update.rs:99-112 — 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 copies of one member (4 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 14+ corresponding lines) llmfit-tui/src/tui_events.rs:1264 — llmfit-tui/src/tui_events.rs:1264-1277 | llmfit-tui/src/tui_events.rs:1279-1292 | llmfit-tui/src/tui_events.rs:1349-1362 | llmfit-tui/src/tui_events.rs:1364-1377 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) llmfit-core/src/benchmarks.rs:315 — llmfit-core/src/benchmarks.rs:315-327 | llmfit-core/src/share.rs:129-141 — 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) · ×1
  • Edited copy of a member (18 corresponding lines) llmfit-core/src/providers.rs:790 — llmfit-core/src/providers.rs:790-808 | llmfit-core/src/providers.rs:1033-1050 — 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 (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) llmfit-core/src/hardware.rs:530 — llmfit-core/src/hardware.rs:530-543 | llmfit-core/src/hardware.rs:2065-2078 — 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 · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) llmfit-core/src/models.rs:2091 — llmfit-core/src/models.rs:2091-2104 | llmfit-core/src/models.rs:2106-2117 — 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.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×1
  • Edited copy of a member (7 corresponding lines) llmfit-tui/src/tui_app.rs:2301 — llmfit-tui/src/tui_app.rs:2301-2308 | llmfit-tui/src/tui_app.rs:2310-2316 — 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 · Duplicated block (34 lines × 9) · ×1
  • Duplicated block (34 lines × 9) llmfit-tui/src/theme.rs:188 — llmfit-tui/src/theme.rs:188-221 | llmfit-tui/src/theme.rs:225-258 | llmfit-tui/src/theme.rs:262-295 | llmfit-tui/src/theme.rs:299-332 | llmfit-tui/src/theme.rs:336-369 | llmfit-tui/src/theme.rs:374-407 | llmfit-tui/src/theme.rs:412-445 | llmfit-tui/src/theme.rs:450-483 | llmfit-tui/src/theme.rs:488-521 — all 9 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.
D4 · Code Duplication · Duplicated block (29–30 lines × 2) · ×1
  • Duplicated block (29–30 lines × 2) llmfit-tui/src/mcp_server.rs:293 — llmfit-tui/src/mcp_server.rs:293-321 | llmfit-tui/src/serve_api.rs:805-834 — before extracting anything, compare `llmfit-tui/src/mcp_server.rs` and `llmfit-tui/src/serve_api.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) llmfit-core/src/fit.rs:1475 — llmfit-core/src/fit.rs:1475-1497 | llmfit-core/src/fit.rs:1502-1524 — both copies are in the same file, so extract the 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 `llmfit-core/src/fit.rs:1475` 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 (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) llmfit-core/src/providers.rs:3250 — llmfit-core/src/providers.rs:3250-3269 | llmfit-core/src/providers.rs:3587-3606 | llmfit-core/src/providers.rs:3919-3938 — 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.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) llmfit-core/src/plan.rs:502 — llmfit-core/src/plan.rs:502-521 | llmfit-core/src/plan.rs:544-561 — both copies are in the same file, so extract the 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 `llmfit-core/src/plan.rs:502` 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–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) llmfit-tui/src/tui_ui.rs:4394 — llmfit-tui/src/tui_ui.rs:4394-4412 | llmfit-tui/src/tui_ui.rs:4546-4563 — both copies are in the same file, so extract the 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 `llmfit-tui/src/tui_ui.rs:4394` 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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) llmfit-tui/src/tui_ui.rs:5559 — llmfit-tui/src/tui_ui.rs:5559-5577 | llmfit-tui/src/tui_ui.rs:6037-6055 — both copies are in the same file, so extract the 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–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) llmfit-core/src/providers.rs:2808 — llmfit-core/src/providers.rs:2808-2823 | llmfit-core/src/providers.rs:3515-3531 — both copies are in the same file, so extract the 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 `llmfit-core/src/providers.rs:2808` 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 (15–16 lines × 5) · ×1
  • Duplicated block (15–16 lines × 5) llmfit-core/src/providers.rs:61 — llmfit-core/src/providers.rs:61-76 | llmfit-core/src/providers.rs:2324-2338 | llmfit-core/src/providers.rs:2703-2717 | llmfit-core/src/providers.rs:3426-3440 | llmfit-core/src/providers.rs:3649-3663 — 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. 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 (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) llmfit-tui/src/tui_ui.rs:631 — llmfit-tui/src/tui_ui.rs:631-646 | llmfit-tui/src/tui_ui.rs:660-675 | llmfit-tui/src/tui_ui.rs:689-704 — 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 (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) llmfit-core/src/bench.rs:352 — llmfit-core/src/bench.rs:352-367 | llmfit-core/src/quality.rs:264-276 — 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 `llmfit-core/src/bench.rs:352` 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) · ×1
  • Duplicated block (16 lines × 2) llmfit-core/src/providers.rs:2453 — llmfit-core/src/providers.rs:2453-2468 | llmfit-core/src/providers.rs:3545-3560 — both copies are in the same file, so extract the 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 (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) llmfit-tui/src/tui_ui.rs:3206 — llmfit-tui/src/tui_ui.rs:3206-3219 | llmfit-tui/src/tui_ui.rs:3290-3303 | llmfit-tui/src/tui_ui.rs:3740-3753 | llmfit-tui/src/tui_ui.rs:3816-3829 | llmfit-tui/src/tui_ui.rs:3897-3910 | llmfit-tui/src/tui_ui.rs:4330-4343 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `llmfit-tui/src/tui_ui.rs:3206` 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 (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) llmfit-core/src/hardware.rs:1274 — llmfit-core/src/hardware.rs:1274-1287 | llmfit-core/src/hardware.rs:1309-1319 — both copies are in the same file, so extract the 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 `llmfit-core/src/hardware.rs:1274` 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 (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) llmfit-core/src/providers.rs:1387 — llmfit-core/src/providers.rs:1387-1397 | llmfit-core/src/providers.rs:1417-1429 — both copies are in the same file, so extract the 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 `llmfit-core/src/providers.rs:1417` 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. 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 (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) llmfit-tui/src/display.rs:90 — llmfit-tui/src/display.rs:90-116 | llmfit-tui/src/display.rs:520-544 — both copies are in the same file, so extract the 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 `llmfit-tui/src/display.rs:90` 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 first that the copies are not typed on the same thing: the declarations holding them bind `models` to `&[LlmModel]` in one and `&[&LlmModel]` 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 (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) llmfit-core/src/providers.rs:2422 — llmfit-core/src/providers.rs:2422-2432 | llmfit-core/src/providers.rs:2810-2820 | llmfit-core/src/providers.rs:3517-3528 — 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 `llmfit-core/src/providers.rs:2422` 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, `llmfit-core/src/providers.rs:2434` calls `Some`, `split`, `next` and `llmfit-core/src/providers.rs:2821` 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 (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) llmfit-tui/src/serve_api.rs:568 — llmfit-tui/src/serve_api.rs:568-579 | llmfit-tui/src/serve_api.rs:596-607 | llmfit-tui/src/serve_api.rs:628-639 — 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 `llmfit-tui/src/serve_api.rs:568` 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 (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) llmfit-tui/src/display.rs:1040 — llmfit-tui/src/display.rs:1040-1051 | llmfit-tui/src/tui_ui.rs:2931-2941 — 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 `llmfit-tui/src/display.rs:1040` 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 (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) llmfit-tui/src/main.rs:2103 — llmfit-tui/src/main.rs:2103-2114 | llmfit-tui/src/main.rs:3246-3257 — both copies are in the same file, so extract the 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 (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) llmfit-core/src/models.rs:2549 — llmfit-core/src/models.rs:2549-2559 | llmfit-core/src/models.rs:2564-2574 | llmfit-core/src/models.rs:2579-2589 — 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 `llmfit-core/src/models.rs:2549` 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 (10 lines × 8) · ×1
  • Duplicated block (10 lines × 8) llmfit-tui/src/tui_ui.rs:3059 — llmfit-tui/src/tui_ui.rs:3059-3068 | llmfit-tui/src/tui_ui.rs:3180-3189 | llmfit-tui/src/tui_ui.rs:3264-3273 | llmfit-tui/src/tui_ui.rs:3717-3726 | llmfit-tui/src/tui_ui.rs:3793-3802 | llmfit-tui/src/tui_ui.rs:3874-3883 | llmfit-tui/src/tui_ui.rs:4232-4241 | llmfit-tui/src/tui_ui.rs:4307-4316 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `llmfit-tui/src/tui_ui.rs:3059` 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–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) llmfit-core/src/hardware.rs:450 — llmfit-core/src/hardware.rs:450-459 | llmfit-core/src/hardware.rs:812-820 | llmfit-core/src/hardware.rs:1598-1607 — 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 `llmfit-core/src/hardware.rs:450` 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 (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) llmfit-core/src/providers.rs:2211 — llmfit-core/src/providers.rs:2211-2220 | llmfit-core/src/providers.rs:2234-2241 — both copies are in the same file, so extract the 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 (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) llmfit-tui/src/tui_ui.rs:3728 — llmfit-tui/src/tui_ui.rs:3728-3735 | llmfit-tui/src/tui_ui.rs:3804-3811 | llmfit-tui/src/tui_ui.rs:3885-3892 | llmfit-tui/src/tui_ui.rs:4243-4250 | llmfit-tui/src/tui_ui.rs:4318-4325 — 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 `llmfit-tui/src/tui_ui.rs:3728` 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 (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) llmfit-tui/src/tui_ui.rs:648 — llmfit-tui/src/tui_ui.rs:648-655 | llmfit-tui/src/tui_ui.rs:677-684 | llmfit-tui/src/tui_ui.rs:706-713 — 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 `llmfit-tui/src/tui_ui.rs:648` 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 (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) llmfit-tui/src/tui_ui.rs:4357 — llmfit-tui/src/tui_ui.rs:4357-4373 | llmfit-tui/src/tui_ui.rs:4479-4495 | llmfit-tui/src/tui_ui.rs:5275-5291 — 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 (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) llmfit-core/src/update.rs:471 — llmfit-core/src/update.rs:471-478 | llmfit-core/src/update.rs:619-624 — both copies are in the same file, so extract the 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 `llmfit-core/src/update.rs:471` 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, `llmfit-core/src/update.rs:625` calls `call` and `llmfit-core/src/update.rs:479` 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) llmfit-tui/src/main.rs:2687 — llmfit-tui/src/main.rs:2687-2693 | llmfit-tui/src/main.rs:3930-3937 — both copies are in the same file, so extract the 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 `llmfit-tui/src/main.rs:2687` 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.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • Duplicated block (7 lines × 7) llmfit-tui/src/tui_ui.rs:3094 — llmfit-tui/src/tui_ui.rs:3094-3100 | llmfit-tui/src/tui_ui.rs:3206-3212 | llmfit-tui/src/tui_ui.rs:3290-3296 | llmfit-tui/src/tui_ui.rs:3740-3746 | llmfit-tui/src/tui_ui.rs:3816-3822 | llmfit-tui/src/tui_ui.rs:3897-3903 | llmfit-tui/src/tui_ui.rs:4330-4336 — all 7 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 `llmfit-tui/src/tui_ui.rs:3094` 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 (3–7 lines × 6) · ×1
  • Duplicated block (3–7 lines × 6) llmfit-tui/src/tui_ui.rs:3308 — llmfit-tui/src/tui_ui.rs:3308-3311 | llmfit-tui/src/tui_ui.rs:4056-4058 | llmfit-tui/src/tui_ui.rs:4356-4362 | llmfit-tui/src/tui_ui.rs:4478-4484 | llmfit-tui/src/tui_ui.rs:5200-5206 | llmfit-tui/src/tui_ui.rs:5274-5280 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `llmfit-tui/src/tui_ui.rs:4355` calls `saturating_sub` and `llmfit-tui/src/tui_ui.rs:3308` 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–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) llmfit-tui/src/mcp_server.rs:388 — llmfit-tui/src/mcp_server.rs:388-393 | llmfit-tui/src/serve_api.rs:328-334 — before extracting anything, compare `llmfit-tui/src/mcp_server.rs` and `llmfit-tui/src/serve_api.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 8) · ×1
  • Duplicated block (7–8 lines × 8) llmfit-tui/src/tui_ui.rs:2992 — llmfit-tui/src/tui_ui.rs:2992-2999 | llmfit-tui/src/tui_ui.rs:3149-3155 | llmfit-tui/src/tui_ui.rs:3233-3239 | llmfit-tui/src/tui_ui.rs:3690-3696 | llmfit-tui/src/tui_ui.rs:3762-3768 | llmfit-tui/src/tui_ui.rs:3843-3849 | llmfit-tui/src/tui_ui.rs:4201-4207 | llmfit-tui/src/tui_ui.rs:4276-4282 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) llmfit-tui/src/tui_ui.rs:1315 — llmfit-tui/src/tui_ui.rs:1315-1319 | llmfit-tui/src/tui_ui.rs:1665-1669 | llmfit-tui/src/tui_ui.rs:1682-1686 — 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 (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) llmfit-tui/src/tui_ui.rs:5337 — llmfit-tui/src/tui_ui.rs:5337-5345 | llmfit-tui/src/tui_ui.rs:5371-5379 | llmfit-tui/src/tui_ui.rs:5395-5403 | llmfit-tui/src/tui_ui.rs:5421-5429 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `llmfit-tui/src/tui_ui.rs:5337` 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 (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) llmfit-tui/src/tui_ui.rs:4451 — llmfit-tui/src/tui_ui.rs:4451-4457 | llmfit-tui/src/tui_ui.rs:4570-4576 | llmfit-tui/src/tui_ui.rs:5452-5458 — 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 (5 lines × 7) · ×1
  • Duplicated block (5 lines × 7) llmfit-tui/src/tui_ui.rs:3204 — llmfit-tui/src/tui_ui.rs:3204-3208 | llmfit-tui/src/tui_ui.rs:3288-3292 | llmfit-tui/src/tui_ui.rs:3738-3742 | llmfit-tui/src/tui_ui.rs:3814-3818 | llmfit-tui/src/tui_ui.rs:3895-3899 | llmfit-tui/src/tui_ui.rs:4253-4257 | llmfit-tui/src/tui_ui.rs:4328-4332 — all 7 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 after the matched lines, `llmfit-tui/src/tui_ui.rs:3209` calls `style`, `default`, `bg` and `llmfit-tui/src/tui_ui.rs:4258` 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) llmfit-tui/src/tui_ui.rs:433 — llmfit-tui/src/tui_ui.rs:433-437 | llmfit-tui/src/tui_ui.rs:1315-1319 | llmfit-tui/src/tui_ui.rs:1665-1669 | llmfit-tui/src/tui_ui.rs:1682-1686 — 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 · Edited copy of a member (77 corresponding lines) · ×1
  • Edited copy of a member (77 corresponding lines) scripts/scrape_hf_models.py:1499 — scripts/scrape_hf_models.py:1499-1584 | scripts/scrape_hf_models.py:2753-2829 — These two members are one piece of code written twice and then edited apart: 77 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 (25–57 lines × 2) · ×1
  • Duplicated block (25–57 lines × 2) scripts/scrape_hf_models.py:1523 — scripts/scrape_hf_models.py:1523-1579 | scripts/scrape_hf_models.py:2773-2797 — both copies are in the same file, so extract the 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 `scripts/scrape_hf_models.py:2773` 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.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) scripts/validate_generation_scoring.py:189 — scripts/validate_generation_scoring.py:189-218 | scripts/validate_generation_scoring.py:224-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: llmfit-core — llmfit-core: abstractness 0.01, instability 0.00, distance 0.99 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: ModelFit (LCOM4 4) llmfit-core/src/fit.rs:464 — ModelFit's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — llmfit-web/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 59 JavaScript/TypeScript, Rust, Python production file(s) this check read across 6 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger; Rust: the log and tracing crates (info!/warn!/error!, #[instrument]), slog, env_logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 25 plain JS — the untyped files are llmfit-desktop/ui/app.js, llmfit-desktop/ui/i18n.js, llmfit-web/src/App.jsx, llmfit-web/src/App.test.jsx, llmfit-web/src/api.js, llmfit-web/src/api.test.js (+19 more).
R10 · Code Duplication · Duplicated block with local edits (57 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (57 matched lines × 2 locations) llmfit-web/src/components/ConcurrencyCard.jsx:49 — llmfit-web/src/components/ConcurrencyCard.jsx:49 · llmfit-web/src/components/StoragePanel.jsx:59 — the two spans are one implementation copied and then locally edited — 385 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) llmfit-web/src/components/FilterBar.jsx:366 — llmfit-web/src/components/FilterBar.jsx:366 · llmfit-web/src/components/FilterBar.jsx:388 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (11 lines × 5 locations) · ×1
  • Duplicated block (11 lines × 5 locations) llmfit-web/src/components/DetailPanel.jsx:302 — llmfit-web/src/components/DetailPanel.jsx:302 · llmfit-web/src/components/DetailPanel.jsx:334 · llmfit-web/src/components/SystemPanel.jsx:170 · llmfit-web/src/components/SystemPanel.jsx:182 · +1 more site(s) not listed — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) llmfit-desktop/ui/i18n.js:261 — llmfit-desktop/ui/i18n.js:261 · llmfit-web/src/utils.js:32 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×1
  • Duplicated block (9 lines × 2 locations) llmfit-web/src/components/StoragePanel.jsx:129 — llmfit-web/src/components/StoragePanel.jsx:129 · llmfit-web/src/components/StoragePanel.jsx:138 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) llmfit-web/src/components/DetailPanel.jsx:450 — llmfit-web/src/components/DetailPanel.jsx:450 · llmfit-web/src/components/DetailPanel.jsx:464 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function DetailPanel (cyclomatic 39, cognitive 37) · ×1
  • Complex function DetailPanel (cyclomatic 39, cognitive 37) llmfit-web/src/components/DetailPanel.jsx:81 — DetailPanel has cyclomatic complexity 39 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function SystemPanel (cyclomatic 19, cognitive 18) · ×1
  • Complex function SystemPanel (cyclomatic 19, cognitive 18) llmfit-web/src/components/SystemPanel.jsx:15 — SystemPanel has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function FilterBar (cyclomatic 17, cognitive 16) · ×1
  • Complex function FilterBar (cyclomatic 17, cognitive 16) llmfit-web/src/components/FilterBar.jsx:71 — FilterBar has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildModelsQuery (cyclomatic 16, cognitive 17) · ×1
  • Complex function buildModelsQuery (cyclomatic 16, cognitive 17) llmfit-web/src/api.js:48 — buildModelsQuery has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function applyClientFilters (cyclomatic 15, cognitive 15) · ×1
  • Complex function applyClientFilters (cyclomatic 15, cognitive 15) llmfit-web/src/utils.js:184 — applyClientFilters has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · llmfit-web/src/components/DetailPanel.jsx · ×1
  • llmfit-web/src/components/DetailPanel.jsx: 649 lines of code llmfit-web/src/components/DetailPanel.jsx:1 — llmfit-web/src/components/DetailPanel.jsx has 649 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · llmfit-web/src/i18n/locales/en.js · ×1
  • llmfit-web/src/i18n/locales/en.js: 434 lines of code llmfit-web/src/i18n/locales/en.js:1 — llmfit-web/src/i18n/locales/en.js has 434 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · llmfit-web/src/i18n/locales/zh-CN.js · ×1
  • llmfit-web/src/i18n/locales/zh-CN.js: 431 lines of code llmfit-web/src/i18n/locales/zh-CN.js:1 — llmfit-web/src/i18n/locales/zh-CN.js has 431 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Minor — 43 finding(s)
X7 · Silent fallback defaults · Silent fallback default on Err · ×12
  • Silent fallback default on Err llmfit-core/src/hardware.rs:458 — `detect_nvidia_gpus_by_memory` 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 llmfit-core/src/hardware.rs:819 — `detect_amd_gpu_rocm_info` 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 llmfit-core/src/hardware.rs:1097 — `scan_amd_sysfs_cards` 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 llmfit-core/src/hardware.rs:1606 — `detect_gpu_windows_wmic_list` 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 llmfit-core/src/hardware.rs:2120 — `detect_macos_metal_gpus` 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 llmfit-core/src/hardware.rs:2134 — `parse_macos_metal_gpus_from_system_profiler_json` 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 llmfit-core/src/providers.rs:1392 — `search_hf_gguf` 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 llmfit-core/src/providers.rs:1424 — `list_repo_gguf_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 llmfit-core/src/doctor.rs:181 — `sysfs_drm_summary` 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 llmfit-core/src/hardware.rs:3231 — `detect_windows_registry_vram` 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 llmfit-core/src/providers.rs:3988 — `docker_mr_catalog` 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 llmfit-core/src/share.rs:380 — `read_store` 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.
X10 · Duplicated predicate · Duplicated predicate · ×4
  • Duplicated predicate llmfit-web/src/components/ConcurrencyCard.jsx:63 — `controller.signal.aborted || err?.name === 'AbortError'` appears character-identically in 2 files — llmfit-web/src/components/ConcurrencyCard.jsx, llmfit-web/src/components/StoragePanel.jsx. 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 llmfit-core/src/fit.rs:1890 — `arch.starts_with("gpt_oss") || arch.starts_with("gptoss")` appears character-identically in 2 files — llmfit-core/src/fit.rs, llmfit-core/src/models.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 llmfit-tui/src/tui_app.rs:25 — `index > 0 && !value.is_char_boundary(index)` appears character-identically in 2 files — llmfit-tui/src/tui_app.rs, llmfit-tui/src/tui_ui.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 llmfit-core/src/fit.rs:2566 — `name_lower.contains("mistral") || name_lower.contains("mixtral")` appears character-identically in 2 files — llmfit-core/src/fit.rs, llmfit-core/src/models.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.
X9 · Subsumed condition operand · Subsumed condition operand · ×4
  • Subsumed condition operand llmfit-core/src/models.rs:594 — `use_case.contains("text-to-speech")` can never decide this `||` — every value satisfying `use_case.contains("text-to-speech")` also satisfies `use_case.contains("speech")`, 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 llmfit-core/src/update.rs:279 — `lower.contains("starcoder")` can never decide this `||` — every value satisfying `lower.contains("starcoder")` also satisfies `lower.contains("code")`, 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 llmfit-core/src/update.rs:279 — `lower.contains("coder")` can never decide this `||` — every value satisfying `lower.contains("coder")` also satisfies `lower.contains("code")`, 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 llmfit-core/src/update.rs:1040 — `s.contains("1.5")` can never decide this `||` — every value satisfying `s.contains("1.5")` also satisfies `s.contains("1")`, 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.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×2
  • Silent fallback default on parse failure scripts/scrape_hf_models.py:1859 — `_load_gguf_cache` returns `{}` when `(FileNotFoundError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure scripts/scrape_hf_models.py:2225 — `_load_release_date_cache` returns `{}` when `(OSError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. 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 handler or in the docstring, and the row stops firing.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 5 significant file(s) lose their only recent owner: scripts/validate_generation_scoring.py, scripts/scrape_benchmarks.py, scripts/validate_community_benchmarks.py, scripts/verify_models.py, llmfit-core/src/task_bench.rs. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (6 single-owned of 39 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; 39 of the 43 production source files in this repository met that bar). They are anonymized user #2 (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: llmfit-core/src/concurrency.rs.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found llmfit-tui/Cargo.toml:15 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `llmfit-tui/Cargo.toml` makes this repository a deployable product (line 15).
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 `llmfit-core` (40817 LoC, 132 module-visible types across 1 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · Dependabot does not watch npm/uv · ×1
  • Dependabot does not watch npm/uv .github/dependabot.yml:2 — `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `npm`, `uv`, 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.
R7 · Dead Code · Unused export 'DEFAULT_FILTERS' · ×1
  • Unused export 'DEFAULT_FILTERS' llmfit-web/src/api.js:1 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'fetchRuntimes' · ×1
  • Unused export 'fetchRuntimes' llmfit-web/src/api.js:135 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'fetchInstalled' · ×1
  • Unused export 'fetchInstalled' llmfit-web/src/api.js:140 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'startDownload' · ×1
  • Unused export 'startDownload' llmfit-web/src/api.js:145 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'fetchDownloadStatus' · ×1
  • Unused export 'fetchDownloadStatus' llmfit-web/src/api.js:155 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'translateUseCase' · ×1
  • Unused export 'translateUseCase' llmfit-web/src/utils.js:73 — Nothing imports this binding — it is safe to review for removal.
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(` (llmfit-tui/src/serve_api.rs:386).
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(` (llmfit-tui/src/serve_api.rs:386).
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch scripts/scrape_hf_models.py:2002 — `check_gguf_repo_exists` swallows every exception into `return False` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Minor — 2 finding(s)
D12 · Dependency Hygiene · Outdated · ×2
  • Outdated: rmcp — `rmcp` is locked at 3.7.0 but 3.10.0 is the current stable release on crates.io, and it already satisfies the `"3.1"` requirement declared in llmfit-tui/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rmcp` and commit the updated REDACTED.
  • Outdated: ureq — `ureq` is locked at 3.5.0 but 3.5.2 is the current stable release on crates.io, and it already satisfies the `"3.2"` requirement declared in llmfit-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.

Appendix B — Reproduction & audit trail

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

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-2b8a1c9e84154e32b4194b4d85d124b8/history.json --exit-code 0 --source .2artifacts/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-2b8a1c9e84154e32b4194b4d85d124b8/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 .31artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .23artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .4artifacts/raw/trivy-config.json
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—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.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 01a1d86b-393f-7264-b525-435f4d11ab82 · 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