Public report of Crosstalk-Solutions/project-nomad, published 26 October 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.10.5). Watchdog 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, 26 October 2026, 17:32 UTC · Survey ID cd_ce641285019d460fa37f8cfd8f75d8b8

Crosstalk-Solutions/project-nomad

Measured 26 October 2026, 17:29 UTC, at code version 54ee30a

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 44out of 100 At risk Down 1 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: 68,072 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Production Readiness, 40

Findings by how serious they are

129 critical 687 serious 160 minor

10 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 17:29 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 Watchdog. It is open to any tool that implements it, and today Watchdog 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. Watchdog works 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 ▸

81of 81 dimensions measured by tools.
893of 976 findings point to an exact file and line, so you can open each one in the code. The other 83 concern the repository as a whole, such as missing documentation.
81dimensions across 7 lenses, read from 68,072 lines of product code in 2 projects.
Chapters

Executive summary

Crosstalk-Solutions/project-nomad is rated At risk because critical security findings are open. Its score is held back because two passwords or keys sit in the current code and it has uses of packages that aren't listed. It scores 44 out of 100, which the At risk rating leaves unchanged.

Production Readiness, at 40, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step is replacing the two exposed passwords or keys and switching the old ones off, worth about 4 points. Replacing the six deprecated dependencies comes next, worth about 3 points.

Twenty-nine known security holes in the packages the code depends on can be used by attackers. Seventeen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and nineteen form fields can't be read by a screen reader. Updating the vulnerable packages, pinning each tool to an exact version and labelling the form fields would close these risks. The seven pipeline steps that run downloads without checking them need each download checked against a known checksum first. The seven unsafe settings in infrastructure or container files need changing to safe values. The 13 controls that only work with a mouse need to work with the keyboard, or to become a real button.

The product code is 68,072 lines, about €67,000 to rebuild.

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

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

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Product code 89%Tests 11%
New since the last survey: 87 findings

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

Watchdog compares 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: 368 findings

These 368 critical or serious findings were in the previous survey, on 12 October 2026, and are gone from this one. The first 100 are listed here.

  • Dependency Vulnerabilities · Critical CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Critical CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High vulnerability: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) admin/database/migrations/1764912270123_create_curated_collection_resources_table.ts
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) admin/database/migrations/1769646771604_create_create_chat_sessions_table.ts
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) admin/database/migrations/1769646771604_create_create_chat_sessions_table.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) admin/inertia/components/CreatorPacksSection.tsx
  • Code Duplication · Duplicated block (16 lines × 2 locations) admin/inertia/lib/api.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) admin/inertia/pages/easy-setup/index.tsx
  • Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) admin/app/controllers/maps_controller.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) admin/app/services/rag_service.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) admin/inertia/components/CustomAppModal.tsx
  • Code Duplication · Duplicated block (15 lines × 3 locations) admin/inertia/lib/api.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) admin/inertia/lib/api.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) admin/inertia/pages/settings/apps.tsx
  • Code Duplication · Duplicated block (14 lines × 2 locations) admin/app/controllers/maps_controller.ts
  • Code Duplication · Duplicated block (14 lines × 2 locations) admin/app/services/app_auto_update_service.ts
  • Code Duplication · Duplicated block (14 lines × 2 locations) admin/app/services/app_auto_update_service.ts
  • Code Duplication · Duplicated block (14 lines × 2 locations) admin/app/validators/common.ts
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) admin/inertia/components/maps/MarkerPanel.tsx
  • Code Duplication · Duplicated block (14 lines × 3 locations) admin/inertia/components/maps/ScaleUnitSelector.tsx
  • Code Duplication · Duplicated block (14 lines × 2 locations) admin/inertia/pages/settings/models.tsx
  • Code Duplication · Duplicated block (14 lines × 2 locations) admin/inertia/pages/supply-depot.tsx
  • Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) admin/app/jobs/check_service_updates_job.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/app/jobs/download_model_job.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/app/models/service.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/app/services/container_registry_service.ts
  • Code Duplication · Duplicated block (13 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/app/services/drug_reference_service.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/app/utils/context_window.ts
  • Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) admin/app/validators/settings.ts
  • Code Duplication · Duplicated block (13 lines × 3 locations) admin/database/migrations/1768453747522_update_services_add_icon.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/database/migrations/1772000000002_add_user_modified_to_services.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/inertia/components/chat/KnowledgeBaseModal.tsx
  • Code Duplication · Duplicated block (13 lines × 2 locations) admin/inertia/lib/api.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/controllers/chats_controller.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/controllers/drug_reference_controller.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/controllers/drug_reference_controller.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/controllers/system_controller.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/jobs/run_download_job.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/services/collection_manifest_service.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/services/condition_service.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/app/utils/think_stream.ts
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) admin/database/migrations/1763499145832_update_services_table.ts
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) admin/database/migrations/1769300000001_add_powered_by_and_display_order_to_services.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/database/migrations/1772000000003_add_app_auto_update_fields_to_services.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/inertia/components/BuilderTagSelector.tsx
  • Code Duplication · Duplicated block (12 lines × 3 locations) admin/inertia/components/chat/KbPolicyPromptBanner.tsx
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/inertia/hooks/useOllamaModelDownloads.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/inertia/pages/supply-depot.tsx
  • Code Duplication · Duplicated block (12 lines × 2 locations) admin/inertia/pages/supply-depot.tsx
  • Code Duplication · Duplicated block (11 lines × 3 locations) admin/app/controllers/rag_controller.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/app/controllers/system_controller.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/app/models/drug_label.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/app/services/drug_reference_service.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/app/services/drug_reference_service.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/app/services/kiwix_library_service.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/app/validators/common.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/app/validators/curated_collections.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1763499145832_update_services_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1763499145832_update_services_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1763499145832_update_services_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1768170944482_update_services_add_installation_statuses_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1768170944482_update_services_add_installation_statuses_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1768170944482_update_services_add_installation_statuses_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1768170944482_update_services_add_installation_statuses_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1769300000001_add_powered_by_and_display_order_to_services.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1769300000001_add_powered_by_and_display_order_to_services.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/database/migrations/1769400000001_create_installed_tiers_table.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1771000000001_add_update_fields_to_services.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1776400000001_add_collection_to_kb_ingest_state.ts
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/database/migrations/1776400000001_add_collection_to_kb_ingest_state.ts
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/inertia/components/chat/KnowledgeBaseModal.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/inertia/components/inputs/Input.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/inertia/components/updates/AppAutoUpdateSection.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/inertia/components/updates/ContentAutoUpdateSection.tsx
  • Code Duplication · Duplicated block (11 lines × 3 locations) admin/inertia/pages/drug-reference/index.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/inertia/pages/settings/apps.tsx
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) admin/inertia/pages/settings/models.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) admin/inertia/pages/settings/update.tsx
  • Code Duplication · Duplicated block (10 lines × 2 locations) admin/app/controllers/conditions_controller.ts
  • Code Duplication · Duplicated block (10 lines × 2 locations) admin/app/controllers/system_controller.ts
  • Code Duplication · Duplicated block (10 lines × 3 locations) admin/app/jobs/download_model_job.ts
  • Code Duplication · Duplicated block (10 lines × 4 locations) admin/app/models/custom_library_source.ts
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 5 locations) admin/commands/app_auto_update/dry_run.ts
  • Code Duplication · Duplicated block (10 lines × 5 locations) admin/commands/auto_update/dry_run.ts
Rebuild cost: about €67,000 · Estimate
Cost to rebuild€22,000 to €110,000, for 372 to 1,180 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 44. 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: 68,072 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: Watchdog prices 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
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2).
Raises the score by about 4 points · Low effort · REDACTED Scanning
2
Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (6).
Raises the score by about 3 points · Low effort · Dependency Hygiene
3
Resolve the 1 Banned license finding(s) in License Compliance — start with REDACTED.
Raises the score by about 3 points · Low effort · License Compliance

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 €67,000 to build again, about 0.5 person-years of work. Its weakest lens is Production Readiness, at 40 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 2 REDACTED Scanning findings. 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 4.8 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 8% to 18% on every change. The history of the code shows how much it changes: about 64,812 lines over the last 90 days, which is about 262,849 lines a year. At that pace, the extra work comes to an estimated 53.2 to 319.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's 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 · 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: 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.

300 modules, with 179 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; 260 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 app.models.installed_resource2 app.models.service3 app.services.container_registry_service4 app.services.docker_service5 app.services.download_service6 app.services.ollama_service7 app.utils.image_disk_preflight8 inertia.components9 inertia.components.chat10 inertia.pages.conditions.show11 types.benchmark12 types.drug_reference13 types.ollama14 app.models.benchmark_result15 app.services16 app.services.chat_service17 app.services.collection_manifest_service18 app.services.content_auto_update_service19 app.services.rag_service20 app.services.relevance_judge_service21 app.services.system_service22 app.services.zim_service23 inertia.lib24 inertia.pages25 util26 app.controllers.chats_controller27 app.controllers.easy_setup_controller28 app.controllers.system_controller29 app.services.app_auto_update_service30 app.services.auto_update_service31 app.services.benchmark_service32 app.services.context_window_service33 app.services.creator_pack_service34 app.services.eval_corpus_service35 app.utils36 app.controllers.settings_controller37 app.services.eval_retrieval_service38 app.services.rag_pipeline_service39 app.controllers.ollama_controller40 app.services.eval_generation_service
1 app.models.installed_resource
2 app.models.service
3 app.services.container_registry_service
4 app.services.docker_service
5 app.services.download_service
6 app.services.ollama_service
7 app.utils.image_disk_preflight
8 inertia.components
9 inertia.components.chat
10 inertia.pages.conditions.show
11 types.benchmark
12 types.drug_reference
13 types.ollama
14 app.models.benchmark_result2
15 app.services1
16 app.services.chat_service1
17 app.services.collection_manifest_service1
18 app.services.content_auto_update_service211
19 app.services.rag_service11
20 app.services.relevance_judge_service1
21 app.services.system_service1
22 app.services.zim_service1
23 inertia.lib11
24 inertia.pages11
25 util5
26 app.controllers.chats_controller11
27 app.controllers.easy_setup_controller11
28 app.controllers.system_controller1111
29 app.services.app_auto_update_service211111
30 app.services.auto_update_service11121
31 app.services.benchmark_service121
32 app.services.context_window_service11
33 app.services.creator_pack_service11
34 app.services.eval_corpus_service1
35 app.utils1121
36 app.controllers.settings_controller1111
37 app.services.eval_retrieval_service111
38 app.services.rag_pipeline_service1111
39 app.controllers.ollama_controller11111
40 app.services.eval_generation_service111
Uses a module listed above itPart of a loopThe module itself
1 app.models.installed_resource2 app.models.service3 app.services.container_registry_service4 app.services.docker_service5 app.services.download_service6 app.services.ollama_service7 app.utils.image_disk_preflight8 inertia.components9 inertia.components.chat10 inertia.pages.conditions.show11 types.benchmark12 types.drug_reference13 types.ollama14 app.models.benchmark_result15 app.services16 app.services.chat_service17 app.services.collection_manifest_service18 app.services.content_auto_update_service19 app.services.rag_service20 app.services.relevance_judge_service21 app.services.system_service22 app.services.zim_service23 inertia.lib24 inertia.pages25 util26 app.controllers.chats_controller27 app.controllers.easy_setup_controller28 app.controllers.system_controller29 app.services.app_auto_update_service30 app.services.auto_update_service31 app.services.benchmark_service32 app.services.context_window_service33 app.services.creator_pack_service34 app.services.eval_corpus_service35 app.utils36 app.controllers.settings_controller37 app.services.eval_retrieval_service38 app.services.rag_pipeline_service39 app.controllers.ollama_controller40 app.services.eval_generation_serviceapp.models.installed_resource1app.models.service2app.services.container_registry_service3app.services.docker_service4app.services.download_service5app.services.ollama_service6app.utils.image_disk_preflight7inertia.components8inertia.components.chat9inertia.pages.conditions.show10types.benchmark11types.drug_reference12types.ollama13app.models.benchmark_result14app.services15app.services.chat_service16app.services.collection_manifest_service17app.services.content_auto_update_service18app.services.rag_service19app.services.relevance_judge_service20app.services.system_service21app.services.zim_service22inertia.lib23inertia.pages24util25app.controllers.chats_controller26app.controllers.easy_setup_controller27app.controllers.system_controller28app.services.app_auto_update_service29app.services.auto_update_service30app.services.benchmark_service31app.services.context_window_service32app.services.creator_pack_service33app.services.eval_corpus_service34app.utils35app.controllers.settings_controller36app.services.eval_retrieval_service37app.services.rag_pipeline_service38app.controllers.ollama_controller39app.services.eval_generation_service402111211111111111511111111211111111211211111111211111111111111111111+260 more modules (most-connected shown)

At a glance — Code Health · 45% · Weak · gated by D1, D2, X5 ·

At a glance — Architecture · 62% · Adequate · gated by D26, R9 ·

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

At a glance — Readiness · 40% · Weak · gated by D13, R4, R8, P3 ·

At a glance — Security · 44% · Weak · gated by D29, D30, D36 ·

At a glance — Accessibility · 46% · Weak · gated by AC4 ·

At a glance — Performance · 100% · Exemplary ·

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
A03:2025 — Software Supply Chain Failures51High / Critical
A05:2025 — Injection39High / Critical
A02:2025 — Security Misconfiguration15High / Critical
A07:2025 — Authentication Failures5High / Critical

Roadmap

Immediately resolve the two leaked secrets in REDACTED and the banned license in REDACTED to address critical compliance and security risks. Next, clean up the dependency landscape by removing deprecated packages from REDACTED, eliminating unused imports, and properly categorizing development-only packages. Finally, integrate a static analysis tool into the CI pipeline to automatically block security regressions before they are merged.

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

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2).+4.2 ptsLowREDACTED Scanning
Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (6).+3.4 ptsLowDependency Hygiene
Resolve the 1 Banned license finding(s) in License Compliance — start with REDACTED.+2.5 ptsLowLicense Compliance
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+2.9 ptsMediumDependency Hygiene
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.+2.3 ptsMediumSecurity & performance tooling
Add tests that import the unreached modules (directly or through their public entry).+2.2 ptsMediumTest Coverage
Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.+1.8 ptsMediumWeb-Security Posture
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion.+0.7 ptsLowProject Cohesion

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.0SlopLicense Compliance: Banned license: @openzim/libzim
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.3SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.5SlopSecrets (history): REDACTED: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
admin/app/services/zim_service.ts4.8MixedCyclomatic Complexity: ZimService.downloadRemoteSuccessCallback (cyclomatic 24)
admin/app/controllers/system_controller.ts4.9MixedCyclomatic Complexity: SystemController.updateCustomApp (cyclomatic 16)
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED
REDACTED5.1MixedIaC & Container Security: High IaC: REDACTED

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

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

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

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

Could not be resolved — 10

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 81 of 81 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 81 dimensions across the health lenses
D1D2D3D5D6D9D10D12D13D14D15D16D17D19D26D28D29D30D31D34D35D36D37D43AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX6GD1IC1M1M2M3M4P1P10P2P3P4P6PF3R1R10R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X26X27X28X29X3X30X5

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, 893 of 976 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17942-fb64-704a-b022-e34365ff9c52.

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.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.ts) and the coverage collector does support this ecosystem — it drives jest, vitest and mocha — but the test script invokes plain node, a bespoke harness the collector has no way to instrument, so no coverage was collected. Read from the manifests: `admin` has a `scripts.test` of `node ace test`. Not scored — this is a gap in the analyzer's runner coverage, not a missing .ts runner and not a defect in this repository. To have real coverage read, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — a committed report is read whatever runner produced it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.ts) and the reliability runner does support this ecosystem — it drives jest, vitest, mocha and egg-bin — but the test script invokes plain node, with no runner protocol the re-runner can drive, so per-test reliability could not be read. Read from the manifests: `admin` has a `scripts.test` of `node ace test`. Not scored — this is a gap in the analyzer's runner coverage, not a missing .ts runner and not a finding about this repository.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming 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. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published REDACTED's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `admin/app/jobs/download_drug_data_job.ts`, `admin/app/jobs/ingest_drug_data_job.ts`, `admin/app/services/eval_generation_service.ts`, `admin/types/rag.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 1 | >>> FROM node:22-slim AS base 2 | 3 | # Install bash & curl for entrypoint script compatibility, graphicsmagick for pdf2pic, and vips-dev & build-base for sharp -------------------- ERROR: failed to solve: node:22-slim: failed to resolve source metadata for docker.io/library/node:22-slim: failed to do request: Head "https://registry-1.docker.io/v2/library/node/manifests/22-slim": Forbidden; runtime evidence skipped.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). 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.
  • P1 CI/CD gates — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P2 Observability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 154 further occurrence(s) are not listed individually; the score already reflects all 194.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 194 further occurrence(s) are not listed individually; the score already reflects all 234.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 29 further occurrence(s) are not listed individually; the score already reflects all 69.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 62 further occurrence(s) are not listed individually; the score already reflects all 102.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • 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.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • 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.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

94 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was KnowledgeBaseModal.KnowledgeBaseModal at 108.

index.EasySetupWizard::renderStep5 (cyclomatic 20) · ×3admin/inertia/pages/easy-setup/index.tsx:1210
KnowledgeBaseModal.KnowledgeBaseModal (cyclomatic 108)admin/inertia/components/chat/KnowledgeBaseModal.tsx:191
index.DrugReferenceIndex (cyclomatic 106)admin/inertia/pages/drug-reference/index.tsx:162
remote-explorer.ZimRemoteExplorer (cyclomatic 88)admin/inertia/pages/settings/zim/remote-explorer.tsx:57
supply-depot.SupplyDepotPage (cyclomatic 84)admin/inertia/pages/supply-depot.tsx:93

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

What to do

  1. Bring the 6 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with KnowledgeBaseModal.KnowledgeBaseModal (cyclomatic 108), index.DrugReferenceIndex (cyclomatic 106), remote-explorer.ZimRemoteExplorer (cyclomatic 88). — 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 6 together lifts Cyclomatic Complexity from 3.2 to about 4.6/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

110 method(s) exceeded the cognitive complexity threshold of 15; the worst was index.Chat at 117.

index.Chat (cognitive 117)admin/inertia/components/chat/index.tsx:26
index.DrugReferenceIndex (cognitive 99)admin/inertia/pages/drug-reference/index.tsx:162
KnowledgeBaseModal.KnowledgeBaseModal (cognitive 95)admin/inertia/components/chat/KnowledgeBaseModal.tsx:191
remote-explorer.ZimRemoteExplorer (cognitive 82)admin/inertia/pages/settings/zim/remote-explorer.tsx:57
OllamaController.chat (cognitive 79)admin/app/controllers/ollama_controller.ts:67

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

What to do

  1. Bring the 11 bodies over 60 down to 60 or less in Cognitive Complexity — start with index.Chat (cognitive 117), index.DrugReferenceIndex (cognitive 99), KnowledgeBaseModal.KnowledgeBaseModal (cognitive 95). — 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 11 together lifts Cognitive Complexity from 2.1 to about 4.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes5.4 / 10Adequate✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

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

99 god class(es) detected.

FunctionTooLong: index.EasySetupWizard · ×46admin/inertia/pages/easy-setup/index.tsx:109
FileTooLong: services/rag_service.ts · ×19admin/app/services/rag_service.ts
MethodTooLong: DockerService.updateContainer · ×15REDACTED:1736
ClassTooLong: RagService · ×12admin/app/services/rag_service.ts:68
TooManyMethods: API · ×7admin/inertia/lib/api.ts:42

What to do

  1. Resolve the 46 FunctionTooLong finding(s) in God Classes — start with index.tsx (4), supply-depot.tsx (2), maps.tsx (2). — One of this dimension's main actionable groups (46 warning-level).
  2. Resolve the 19 FileTooLong finding(s) in God Classes — start with index.tsx (3), rag_service.ts, REDACTED. — One of this dimension's main actionable groups (19 warning-level).
  3. Resolve the 15 MethodTooLong finding(s) in God Classes — start with ingest_drug_data_job.ts (2), system_service.ts (2), rag_service.ts (2). — One of this dimension's main actionable groups (15 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

2 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.0 / 10Strong✓ 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.0 / 10 · rule-coverage 100% · ceiling Verified

9 of 104 classes have LCOM4 above 3.

Low cohesion: SystemController (LCOM4 9) · ×9admin/app/controllers/system_controller.ts:43

What to do

  1. Resolve the 9 Low cohesion finding(s) in Cohesion (LCOM4) — start with system_controller.ts, rag_controller.ts, chat_service.ts. — One of this dimension's main actionable groups (9 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

709 test methods: 709 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 709 `it`/`test` case(s) across 60 test file(s) declaring at least one; its tier split is read from package names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.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 709 tests.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D12 · Dependency Hygiene7.5 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

62 outdated direct production npm dependency(ies) of 76 graded, 0 pinning defect(s), across 1 REDACTED (1 of them the product) and 2 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 1 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: eslintREDACTED:62
Deprecated: @vavite/multibuild · ×6REDACTED:7234
Outdated (npm): @adonisjs/auth · ×62

What to do

  1. Resolve the 6 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (6). — One of this dimension's main actionable groups (6 recommendation-level).
  2. Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

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

2 secret(s) detected.

REDACTED

What to do

  1. Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

1 of 76 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 76 production dependency(ies) this repository's committed lockfile resolves, across 1 product REDACTED manifest(s). Its 24 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.

Banned license: @openzim/libzimREDACTED:89

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce License Compliance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

Top hotspots: admin/inertia/components/chat/index.tsx (10×78=780); REDACTED (18×43=774); admin/app/controllers/ollama_controller.ts (11×53=583) Repeated repair below the complexity floor: REDACTED (5 of 8 changes were fixes)

Hotspot: admin/inertia/components/chat/index.tsx · ×38admin/inertia/components/chat/index.tsx:26
Repeated repair: REDACTEDREDACTED:592

What to do

  1. Resolve the 38 Hotspot finding(s) in Churn × Complexity Hotspots — start with index.tsx (3), REDACTED, ollama_controller.ts. — One of this dimension's main actionable groups (38 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D16 · Bus Factor8.9 / 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.9 / 10 · rule-coverage 100% · ceiling Documented

26 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is admin/constants/ollama.ts. Counted over 238 of the 445 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 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 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

2 deducted task-comment markers across 68047 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×2admin/config/shield.ts:19

What to do

  1. Resolve the 2 TodoComment finding(s) in Explicit Debt — start with shield.ts (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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. 15 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D26 · Project Cohesion0.0 / 10Critical✓ 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, LLM-independent.

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

1 of 2 build units (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)8.0 / 10Adequategated by 2 critical findings✓ 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 8.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 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)0.6 / 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 0.6 / 10 · rule-coverage 100% · ceiling Documented

39 finding(s): 0 critical, 31 high, 7 medium, 1 low. 17 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 6 file(s) — `.github/scripts/finalize-release-notes.sh` (line 18, line 19), `admin/app/jobs/download_drug_data_job.ts` (line 77), `admin/app/jobs/ingest_drug_data_job.ts` (line 186), `admin/app/services/eval_generation_service.ts` (line 311), `admin/types/rag.ts` (line 188), … (+1 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 5 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities0.0 / 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.

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

40 finding(s): 3 critical, 26 high, 10 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 25 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (20), REDACTED (5). — One of this dimension's main actionable groups (25 issue-level).
  2. Resolve the 3 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D31 · IaC & Container Security6.5 / 10Adequate✓ 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 6.5 / 10 · rule-coverage 100% · ceiling Documented

15 finding(s): 2 critical, 5 high, 4 medium, 4 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

2 of 238 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is admin/app/services/countries_service.ts. Counted over 238 of the 445 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×2admin/app/services/countries_service.ts:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling8.6 / 10Strong✓ 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 8.6 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: system_controller.ts↔system.ts 91%; zim_controller.ts↔api.ts 86%; REDACTED↔services.ts 79%

Change coupling: REDACTED ↔ services.ts · ×13REDACTED:1
Change-coupling hub: system.ts → system_controller.ts, service.ts, REDACTED, routes.ts, services.ts · ×3admin/app/validators/system.ts
Change coupling clique: settings_controller.ts, kv_store.ts, models.tsxadmin/app/controllers/settings_controller.ts

What to do

  1. Resolve the 13 Change coupling finding(s) in Change Coupling — start with REDACTED (2), zim_controller.ts (2), rag_controller.ts (2). — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with system.ts, api.ts, routes.ts. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with settings_controller.ts. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

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.

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

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

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

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

AC2 · Forms & labels5.1 / 10Adequate✓ 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 no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×7) — admin/inertia/components/BuilderTagSelector.tsx:80, admin/inertia/components/BuilderTagSelector.tsx:95, admin/inertia/components/CountryPickerModal.tsx:352, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×12) — admin/inertia/components/CountryPickerModal.tsx:208, admin/inertia/components/chat/ChatInterface.tsx:302, admin/inertia/components/chat/CollectionCombobox.tsx:128, …
  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×8) — admin/inertia/components/CountryPickerModal.tsx:349, admin/inertia/components/CustomAppModal.tsx:354, admin/inertia/components/CustomAppModal.tsx:401, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×9) — admin/inertia/components/CustomAppModal.tsx:382, admin/inertia/components/CustomAppModal.tsx:429, admin/inertia/components/CustomAppModal.tsx:458, …

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 structure7.3 / 10Strong✓ 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.

  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×2) — admin/inertia/pages/settings/benchmark.tsx:686, admin/inertia/pages/settings/zim/remote-explorer.tsx:566

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.9 / 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 click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×11) — admin/inertia/components/CategoryCard.tsx:56, admin/inertia/components/CreatorPackCard.tsx:61, admin/inertia/components/CuratedCollectionCard.tsx:19, …
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. (×2) — admin/inertia/pages/maps.tsx:71, admin/inertia/pages/maps.tsx:134

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 safety4.0 / 10Weak✓ 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.

  • <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×3) — admin/inertia/components/BouncingDots.tsx:14, admin/inertia/components/BouncingDots.tsx:18, admin/inertia/components/BouncingDots.tsx:22
  • <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — admin/inertia/components/DebugInfoModal.tsx:65
  • <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×6) — admin/inertia/components/LoadingSpinner.tsx:19, admin/inertia/components/LoadingSpinner.tsx:36, admin/inertia/components/chat/ChatInterface.tsx:325, …
  • <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×3) — admin/inertia/components/StyledTable.tsx:141, admin/inertia/components/maps/ViewMapMarkerPopup.tsx:64, admin/inertia/components/maps/ViewMapMarkerPopup.tsx:72
  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — admin/inertia/components/maps/MarkerPanel.tsx:318, admin/inertia/pages/maps.tsx:82
  • <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×3) — admin/inertia/components/maps/MarkerPanel.tsx:327, admin/inertia/pages/drug-reference/index.tsx:588, admin/inertia/pages/drug-reference/index.tsx:603
  • <span> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — admin/inertia/pages/home.tsx:301
  • <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×3) — admin/inertia/pages/supply-depot.tsx:576, admin/inertia/pages/supply-depot.tsx:943, admin/inertia/pages/supply-depot.tsx:1131

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.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 122 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.1 / 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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs7.0 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `getSystemUpdateStatus` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — admin/app/controllers/system_controller.ts:125
  • `getSystemUpdateLogs` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — admin/app/controllers/system_controller.ts:138
  • `onClose` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — admin/inertia/components/drug-reference/DrugDisclaimerModal.tsx:38
  • `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. (×2) — admin/inertia/pages/drug-reference/index.tsx:888, admin/inertia/pages/drug-reference/interactions.tsx:163
  • `confirmDeleteFile` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — admin/inertia/pages/settings/maps.tsx:177, admin/inertia/pages/settings/zim/index.tsx:84
  • `confirmDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — admin/inertia/pages/settings/maps.tsx:197, admin/inertia/pages/settings/zim/remote-explorer.tsx:298
  • `confirmGlobalMapDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — admin/inertia/pages/settings/maps.tsx:231
  • `confirmCustomDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — admin/inertia/pages/settings/zim/remote-explorer.tsx:323

What to do

  • Remove the dead code that still moves this score: delete dead if(false) branches and either do the real async work or drop the async keyword from fake-async functions.
M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Add a README to the 1 of 1 project(s) that lack one — worth up to 2 pts.
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 repo is organised deliberately — src/test separation and consistent project naming.

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 README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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.

What to do

  • Run the test suite in CI via an explicit runner step (`npm test` for the toolchain this pipeline already uses) and gate merges on it.
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 model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

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

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

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

  • Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
  • `admin/util/files.ts` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/util/files.ts:25
  • `admin/util/files.ts` reports through `console.*` at line 43 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/util/files.ts:43
  • `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 76 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/apps.tsx:76
  • `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 123 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/apps.tsx:123
  • `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 148 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/apps.tsx:148
  • `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 171 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/apps.tsx:171
  • `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 200 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/apps.tsx:200
  • `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 93 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/maps.tsx:93
  • `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 118 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/maps.tsx:118
  • `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 137 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/maps.tsx:137
  • `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 150 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/maps.tsx:150
  • `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 167 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/maps.tsx:167
  • `admin/inertia/pages/settings/models.tsx` reports through `console.*` at line 150 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/models.tsx:150
  • `admin/inertia/pages/settings/models.tsx` reports through `console.*` at line 170 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/models.tsx:170
  • `admin/inertia/pages/settings/models.tsx` reports through `console.*` at line 266 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/models.tsx:266
  • `admin/inertia/pages/settings/update.tsx` reports through `console.*` at line 115 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/update.tsx:115
  • `admin/inertia/pages/settings/update.tsx` reports through `console.*` at line 207 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/update.tsx:207
  • `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 358 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/zim/remote-explorer.tsx:358
  • `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 374 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/zim/remote-explorer.tsx:374
  • `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 402 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/zim/remote-explorer.tsx:402
  • `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 445 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/settings/zim/remote-explorer.tsx:445
  • `admin/inertia/pages/easy-setup/index.tsx` reports through `console.*` at line 401 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/easy-setup/index.tsx:401
  • `admin/inertia/pages/easy-setup/index.tsx` reports through `console.*` at line 453 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/easy-setup/index.tsx:453
  • `admin/inertia/pages/easy-setup/index.tsx` reports through `console.*` at line 490 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/pages/easy-setup/index.tsx:490
  • `admin/inertia/lib/api.ts` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/lib/api.ts:65
  • `admin/inertia/lib/api.ts` reports through `console.*` at line 274 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/lib/api.ts:274
  • `admin/inertia/lib/api.ts` reports through `console.*` at line 688 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/lib/api.ts:688
  • `admin/inertia/lib/util.ts` reports through `console.*` at line 78 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/lib/util.ts:78
  • `admin/inertia/components/CountryPickerModal.tsx` reports through `console.*` at line 154 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/CountryPickerModal.tsx:154
  • `admin/inertia/components/CountryPickerModal.tsx` reports through `console.*` at line 183 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/CountryPickerModal.tsx:183
  • `admin/inertia/components/CreatorPacksSection.tsx` reports through `console.*` at line 52 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/CreatorPacksSection.tsx:52
  • `admin/inertia/components/CreatorPacksSection.tsx` reports through `console.*` at line 69 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/CreatorPacksSection.tsx:69
  • `admin/inertia/components/DownloadURLModal.tsx` reports through `console.*` at line 45 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/DownloadURLModal.tsx:45
  • `admin/inertia/components/DynamicIcon.tsx` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/DynamicIcon.tsx:19
  • `admin/inertia/components/chat/index.tsx` reports through `console.*` at line 226 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/chat/index.tsx:226
  • `admin/inertia/components/chat/index.tsx` reports through `console.*` at line 267 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/chat/index.tsx:267
  • `admin/inertia/components/chat/index.tsx` reports through `console.*` at line 297 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/chat/index.tsx:297
  • `admin/inertia/components/chat/index.tsx` reports through `console.*` at line 379 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/inertia/components/chat/index.tsx:379
  • `admin/app/services/collection_manifest_service.ts` reports through `console.*` at line 421 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — admin/app/services/collection_manifest_service.ts:421

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
  • Add OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) so requests are traceable across the system, not just health-probable.
P3 · Security & performance tooling3.0 / 10Weak✓ 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.

  • No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 14356 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `github-actions` — add that `package-ecosystem` entry 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 & Rollback10.0 / 10Exemplary✓ 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.

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.

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 the language 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 Safety10.0 / 10Exemplary✓ 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.

R10 · Code Duplication8.6 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): 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. Deterministic.

  • 9 duplicated blocks under admin/inertia/ have copies in at least two of the sibling directories components, lib, pages — 2 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — admin/inertia/components/CustomAppModal.tsx:519
  • 8 duplicated blocks under admin/commands/ have copies in at least two of the sibling directories app_auto_update, auto_update, content_auto_update, eval — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — admin/commands/auto_update/dry_run.ts:20
  • 6 duplicated blocks under admin/inertia/pages/ have copies in at least two of the sibling directories conditions, drug-reference, easy-setup, settings — 0 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — admin/inertia/pages/drug-reference/show.tsx:71
  • admin/inertia/components/ActiveDownloads.tsx:10 · admin/inertia/components/ActiveModelDownloads.tsx:11 — the two spans are one implementation copied and then locally edited — 816 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. — admin/inertia/components/ActiveDownloads.tsx:10
  • admin/inertia/components/updates/ContentAutoUpdateSection.tsx:22 · admin/inertia/components/updates/CoreAutoUpdateSection.tsx:19 — the two spans are one implementation copied and then locally edited — 528 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. — admin/inertia/components/updates/ContentAutoUpdateSection.tsx:22
  • admin/app/jobs/download_drug_data_job.ts:57 · admin/app/jobs/ingest_drug_data_job.ts:166 — the two spans are one implementation copied and then locally edited — 448 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. — admin/app/jobs/download_drug_data_job.ts:57
  • admin/app/services/app_auto_update_service.ts:117 · admin/app/services/content_auto_update_service.ts:132 — the two spans are one implementation copied and then locally edited — 423 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. — admin/app/services/app_auto_update_service.ts:117
  • admin/commands/auto_update/dry_run.ts:20 · admin/commands/content_auto_update/dry_run.ts:18 — the two spans are one implementation copied and then locally edited — 397 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. — admin/commands/auto_update/dry_run.ts:20
  • REDACTED:204 · admin/app/services/zim_service.ts:514 — 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. — REDACTED:204
  • admin/inertia/components/CustomAppModal.tsx:349 · admin/inertia/components/CustomAppModal.tsx:396 — 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. — admin/inertia/components/CustomAppModal.tsx:349
  • admin/app/validators/system.ts:24 · admin/app/validators/system.ts:162 — the two spans are one implementation copied and then locally edited — 345 tokens are still identical, in the same order in both spans, 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. — admin/app/validators/system.ts:24
  • admin/app/jobs/app_auto_update_job.ts:38 · admin/app/jobs/auto_update_job.ts:40 — the 2 copies are spread across 2 files, 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. — admin/app/jobs/app_auto_update_job.ts:38
  • admin/inertia/pages/drug-reference/index.tsx:177 · admin/inertia/pages/drug-reference/interactions.tsx:41 — the two spans are one implementation copied and then locally edited — 261 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. — admin/inertia/pages/drug-reference/index.tsx:177
  • admin/app/jobs/app_auto_update_job.ts:40 · admin/app/jobs/auto_update_job.ts:42 · admin/app/jobs/content_auto_update_job.ts:44 — the 3 copies are spread across 3 files, 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. — admin/app/jobs/app_auto_update_job.ts:40
  • admin/app/jobs/download_model_job.ts:145 · admin/app/jobs/run_download_job.ts:325 — the 2 copies are spread across 2 files, 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. — admin/app/jobs/download_model_job.ts:145
  • admin/util/conditions.ts:36 · admin/util/conditions.ts:193 — the two spans are one implementation copied and then locally edited — 279 tokens are still identical, in the same order in both spans, 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. — admin/util/conditions.ts:36
  • admin/app/jobs/check_service_updates_job.ts:102 · admin/app/jobs/check_update_job.ts:41 — the 2 copies are spread across 2 files, 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. — admin/app/jobs/check_service_updates_job.ts:102
  • admin/app/services/collection_manifest_service.ts:460 · admin/app/services/collection_manifest_service.ts:514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — admin/app/services/collection_manifest_service.ts:460
  • admin/inertia/components/KbGuardrailModal.tsx:35 · admin/inertia/components/TierSelectionModal.tsx:166 — 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. — admin/inertia/components/KbGuardrailModal.tsx:35
  • admin/commands/app_auto_update/dry_run.ts:172 · admin/commands/auto_update/dry_run.ts:245 — the 2 copies are spread across 2 files, 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. — admin/commands/app_auto_update/dry_run.ts:172
  • admin/app/services/rag_service.ts:2669 · admin/app/services/rag_service.ts:2749 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — admin/app/services/rag_service.ts:2669
  • admin/commands/app_auto_update/dry_run.ts:205 · admin/commands/auto_update/dry_run.ts:280 — the 2 copies are spread across 2 files, 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. — admin/commands/app_auto_update/dry_run.ts:205
  • admin/app/jobs/download_model_job.ts:218 · admin/app/jobs/run_download_job.ts:376 — the 2 copies are spread across 2 files, 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. — admin/app/jobs/download_model_job.ts:218
  • admin/app/utils/rag_relevance.ts:30 · admin/app/utils/response_style.ts:28 — 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. — admin/app/utils/rag_relevance.ts:30
  • admin/commands/app_auto_update/dry_run.ts:17 · admin/commands/auto_update/dry_run.ts:48 — 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. — admin/commands/app_auto_update/dry_run.ts:17
  • admin/inertia/lib/api.ts:1288 · admin/inertia/lib/api.ts:1398 — 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. — admin/inertia/lib/api.ts:1288
  • admin/inertia/pages/supply-depot.tsx:684 · admin/inertia/pages/supply-depot.tsx:717 — 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. — admin/inertia/pages/supply-depot.tsx:684
  • admin/inertia/pages/settings/maps.tsx:430 · admin/inertia/pages/settings/zim/index.tsx:225 — the 2 copies are spread across 2 files, 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. — admin/inertia/pages/settings/maps.tsx:430
  • admin/app/controllers/maps_controller.ts:154 · admin/app/controllers/zim_controller.ts:74 — the 2 copies are spread across 2 files, 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. — admin/app/controllers/maps_controller.ts:154
  • admin/app/services/condition_service.ts:295 · admin/app/services/drug_reference_service.ts:281 — the 2 copies are spread across 2 files, 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. — admin/app/services/condition_service.ts:295
  • REDACTED:1218 · REDACTED:1274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:1218
  • admin/database/migrations/1776300000001_deprecate_legacy_kolibri.ts:18 · admin/database/migrations/1776400000001_sunset_meshtastic_daemon.ts:14 — 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. — admin/database/migrations/1776300000001_deprecate_legacy_kolibri.ts:18
  • admin/inertia/components/chat/KnowledgeBaseModal.tsx:425 · admin/inertia/components/chat/KnowledgeBaseModal.tsx:443 — 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. — admin/inertia/components/chat/KnowledgeBaseModal.tsx:425
  • admin/inertia/lib/kb_file_grouping.ts:228 · admin/inertia/lib/kb_file_grouping.ts:248 — 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. — admin/inertia/lib/kb_file_grouping.ts:228
  • admin/inertia/pages/settings/zim/remote-explorer.tsx:298 · admin/inertia/pages/settings/zim/remote-explorer.tsx:323 — 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. — admin/inertia/pages/settings/zim/remote-explorer.tsx:298
  • admin/inertia/pages/supply-depot.tsx:611 · admin/inertia/pages/supply-depot.tsx:630 · admin/inertia/pages/supply-depot.tsx:649 — all 3 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. — admin/inertia/pages/supply-depot.tsx:611
  • admin/inertia/pages/supply-depot.tsx:708 · admin/inertia/pages/supply-depot.tsx:741 — 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. — admin/inertia/pages/supply-depot.tsx:708
  • admin/app/controllers/system_controller.ts:275 · admin/app/services/auto_update_service.ts:342 — 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. — admin/app/controllers/system_controller.ts:275
  • admin/app/services/download_service.ts:64 · admin/app/services/download_service.ts:81 — 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. — admin/app/services/download_service.ts:64
  • admin/database/migrations/1764912210741_create_curated_collections_table.ts:1 · admin/database/migrations/1769646771604_create_create_chat_sessions_table.ts:1 — the two spans are one implementation copied and then locally edited — 80 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. — admin/database/migrations/1764912210741_create_curated_collections_table.ts:1

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 Complexity5.0 / 10Adequate✓ 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.

  • validateSettingValue has cyclomatic complexity 58 and cognitive complexity 54; 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. — admin/app/validators/settings.ts:23
  • chat has cyclomatic complexity 57 and cognitive complexity 84; 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. — admin/app/controllers/ollama_controller.ts:67
  • AppCard has cyclomatic complexity 54 and cognitive complexity 51; 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. — admin/inertia/pages/supply-depot.tsx:853
  • getDebugInfo has cyclomatic complexity 51 and cognitive complexity 97; 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. — admin/app/services/system_service.ts:762
  • DrugReferenceIndex has cyclomatic complexity 51 and cognitive complexity 50; 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. — admin/inertia/pages/drug-reference/index.tsx:162
  • updateContainer has cyclomatic complexity 47 and cognitive complexity 59; 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. — REDACTED:1736
  • getSystemInfo has cyclomatic complexity 41 and cognitive complexity 77; 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. — admin/app/services/system_service.ts:386
  • SupplyDepotPage has cyclomatic complexity 38 and cognitive complexity 34; 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. — admin/inertia/pages/supply-depot.tsx:93
  • KnowledgeBaseModal has cyclomatic complexity 37 and cognitive complexity 29; 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. — admin/inertia/components/chat/KnowledgeBaseModal.tsx:191
  • handle has cyclomatic complexity 36 and cognitive complexity 49; 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. — admin/app/jobs/embed_file_job.ts:59
  • _createContainer has cyclomatic complexity 34 and cognitive complexity 54; 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. — REDACTED:627
  • run has cyclomatic complexity 33 and cognitive complexity 44; 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. — admin/commands/eval/retrieval.ts:75
  • getIngestStatus has cyclomatic complexity 33 and cognitive complexity 28; 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. — admin/app/services/drug_reference_service.ts:785
  • doResumableDownload has cyclomatic complexity 31 and cognitive complexity 31; 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. — admin/app/utils/downloads.ts:44
  • recreateCustomAppContainer has cyclomatic complexity 29 and cognitive complexity 43; 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. — REDACTED:2327
  • EasySetupWizard has cyclomatic complexity 27 and cognitive complexity 19; 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. — admin/inertia/pages/easy-setup/index.tsx:109
  • run has cyclomatic complexity 26 and cognitive complexity 31; 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. — admin/commands/eval/generation.ts:77
  • IngestStatus has cyclomatic complexity 26 and cognitive complexity 23; 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. — admin/inertia/components/drug-reference/IngestStatus.tsx:153
  • onComplete has cyclomatic complexity 25 and cognitive complexity 57; 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. — admin/app/jobs/run_download_job.ts:130
  • reconcileFromFilesystem has cyclomatic complexity 25 and cognitive complexity 40; 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. — admin/app/services/collection_manifest_service.ts:417

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files6.9 / 10Adequate✓ 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.

  • admin/app/services/rag_service.ts has 2500 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/rag_service.ts:1
  • REDACTED has 2210 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • admin/app/services/ollama_service.ts has 1435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/ollama_service.ts:1
  • admin/inertia/pages/easy-setup/index.tsx has 1401 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/easy-setup/index.tsx:1
  • admin/inertia/components/chat/KnowledgeBaseModal.tsx has 1294 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/components/chat/KnowledgeBaseModal.tsx:1
  • admin/inertia/lib/api.ts has 1274 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/lib/api.ts:1
  • admin/inertia/pages/supply-depot.tsx has 1093 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/supply-depot.tsx:1
  • admin/app/services/system_service.ts has 1050 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/system_service.ts:1
  • admin/app/services/zim_service.ts has 1016 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/zim_service.ts:1
  • admin/inertia/pages/settings/zim/remote-explorer.tsx has 949 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/settings/zim/remote-explorer.tsx:1
  • admin/inertia/pages/drug-reference/index.tsx has 925 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/drug-reference/index.tsx:1
  • admin/start/routes.ts has 885 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/start/routes.ts:1
  • REDACTED has 848 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • admin/app/controllers/system_controller.ts has 822 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/controllers/system_controller.ts:1
  • admin/app/services/drug_reference_service.ts has 817 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/drug_reference_service.ts:1
  • admin/app/jobs/ingest_drug_data_job.ts has 752 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/jobs/ingest_drug_data_job.ts:1
  • admin/inertia/components/chat/index.tsx has 698 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/components/chat/index.tsx:1
  • admin/inertia/pages/settings/models.tsx has 647 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/settings/models.tsx:1
  • REDACTED has 645 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • admin/app/services/content_auto_update_service.ts has 546 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/content_auto_update_service.ts:1
  • admin/app/controllers/ollama_controller.ts has 519 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/controllers/ollama_controller.ts:1
  • admin/app/services/auto_update_service.ts has 519 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/auto_update_service.ts:1
  • admin/util/drug_labels.ts has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/util/drug_labels.ts:1
  • admin/app/jobs/embed_file_job.ts has 508 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/jobs/embed_file_job.ts:1
  • admin/inertia/components/CustomAppModal.tsx has 507 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/components/CustomAppModal.tsx:1
  • admin/inertia/pages/settings/update.tsx has 506 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/settings/update.tsx:1
  • admin/inertia/components/maps/MapComponent.tsx has 480 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/components/maps/MapComponent.tsx:1
  • admin/app/services/collection_manifest_service.ts has 478 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/collection_manifest_service.ts:1
  • admin/app/services/container_registry_service.ts has 474 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/container_registry_service.ts:1
  • admin/app/services/eval_generation_service.ts has 454 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/app/services/eval_generation_service.ts:1
  • admin/inertia/pages/settings/maps.tsx has 432 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/settings/maps.tsx:1
  • admin/inertia/pages/settings/apps.tsx has 426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — admin/inertia/pages/settings/apps.tsx:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage3.5 / 10Weak✓ 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. (×40) — admin/inertia/pages/easy-setup/index.tsx:1, admin/inertia/lib/api.ts:1, admin/inertia/components/chat/KnowledgeBaseModal.tsx:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness10.0 / 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 REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code6.4 / 10Adequate✓ 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.

  • Unreachable from the 21 application, 52 tooling and 67 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×26) — REDACTED, admin/commands/eval/retrieval.ts, admin/commands/auto_update/dry_run.ts, …
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 5 in-repo import(s) from 3 other file(s) do name it (admin/app/services/eval_report_service.ts, admin/commands/eval/generation.ts, admin/commands/eval/matrix.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — admin/app/services/eval_generation_service.ts
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (admin/app/services/eval_report_service.ts, admin/commands/eval/retrieval.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — admin/app/services/eval_retrieval_service.ts
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 6 in-repo import(s) from 6 other file(s) do name it (admin/app/services/eval_generation_service.ts, admin/app/services/eval_retrieval_service.ts, admin/commands/eval/corpus.ts and 3 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — admin/app/services/eval_corpus_service.ts
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (admin/commands/eval/compare.ts, admin/commands/eval/retrieval.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — admin/app/services/eval_report_service.ts
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/commands/queue/work.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×4) — admin/app/jobs/content_auto_update_job.ts, admin/app/jobs/auto_update_job.ts, admin/app/jobs/app_auto_update_job.ts, …
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/inertia/components/MarkdocRenderer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×4) — admin/inertia/components/markdoc/Table.tsx, admin/inertia/components/markdoc/Heading.tsx, admin/inertia/components/markdoc/Image.tsx, …
  • no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (admin/commands/eval/corpus.ts, admin/commands/eval/generation.ts, admin/commands/eval/matrix.ts and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — admin/app/utils/eval/quiet.ts

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 Hygiene0.0 / 10Critical✓ 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.

  • Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED. — admin/app/utils/chat_images.ts:1
  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. (×2) — admin/inertia/components/CategoryCard.tsx:4, admin/inertia/components/BouncingDots.tsx:1
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports1.3 / 10Critical✓ 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.

  • admin/app/jobs/download_model_job.ts → admin/app/services/ollama_service.ts → admin/app/jobs/download_model_job.ts — admin/app/jobs/download_model_job.ts:5
  • admin/app/jobs/embed_file_job.ts → admin/app/services/rag_service.ts → admin/app/jobs/embed_file_job.ts — admin/app/jobs/embed_file_job.ts:4
  • admin/app/jobs/run_download_job.ts → REDACTED → admin/app/jobs/run_download_job.ts (one verified cycle inside a mutually-dependent group of 4 files) — admin/app/jobs/run_download_job.ts:8
  • admin/app/models/chat_message.ts → admin/app/models/chat_session.ts → admin/app/models/chat_message.ts — admin/app/models/chat_message.ts:4
  • admin/app/services/system_service.ts → admin/config/inertia.ts → admin/app/services/system_service.ts — admin/app/services/system_service.ts:33

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture4.0 / 10Weak✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript 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. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.

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.

  • `BENCHMARK_HMAC_SECRET` is the MAC key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — REDACTED:47
  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×2) — admin/app/services/countries_service.ts:188, REDACTED:837

What to do

  • Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.
  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `admin/app/services/countries_service.ts:188` (createHash("sha1")), `REDACTED:837` (createHash("sha1")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
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.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

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.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.9 / 10Weak✓ Tool-verified

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.

  • Only 6/40 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `refreshStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — admin/inertia/pages/drug-reference/index.tsx:387
  • `sendChatMessage` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — admin/inertia/lib/api.ts:340
  • `fetchReleases` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/auto_update_service.ts:205
  • `submitToRepository` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`. — REDACTED:299
  • `getComparisonStats` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — REDACTED:489
  • `_runAIBenchmark` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — REDACTED:952
  • `_runSingleAIInference` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`. — REDACTED:1078
  • `_preflightModelDiskSpace` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — REDACTED:1125
  • `_unloadResidentModels` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — REDACTED:1170
  • `fetchAndCacheSpec` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/collection_manifest_service.ts:50
  • `enrichWithSizes` awaits `axios.head(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.head(url, { signal })`. — admin/app/services/collection_update_service.ts:167
  • `fetchZimEntriesPage` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/kiwix_catalog_service.ts:185
  • `fetchMapListing` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/kiwix_catalog_service.ts:258
  • `downloadRemotePreflight` awaits `axios.head(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.head(url, { signal })`. — REDACTED:314
  • `getGlobalMapInfo` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — REDACTED:631
  • `_isNativeBackend` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/ollama_service.ts:268
  • `getModelInfo` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`. — admin/app/services/ollama_service.ts:891
  • `ollamaShow` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`. — admin/app/services/ollama_service.ts:938
  • `llamaProps` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/ollama_service.ts:947
  • `deleteModel` awaits `axios.delete(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.delete(url, { signal })`. — admin/app/services/ollama_service.ts:972
  • `_embedWithFallback` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`. — admin/app/services/ollama_service.ts:1094
  • `isEmbeddingGpuAccelerated` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/ollama_service.ts:1160
  • `unloadAllChatModelsExcept` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/ollama_service.ts:1204
  • `getModels` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/ollama_service.ts:1261
  • `retrieveAndRefreshModels` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/ollama_service.ts:1377
  • `getInternetStatus` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/system_service.ts:50
  • `getExternalOllamaGpuInfo` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/system_service.ts:229
  • `checkLatestVersion` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/system_service.ts:663
  • `subscribeToReleaseNotes` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`. — admin/app/services/system_service.ts:734
  • `listRemote` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/zim_service.ts:79
  • `listCatalogLanguages` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/zim_service.ts:218
  • `getWikipediaOptions` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/zim_service.ts:803
  • `browseLibraryUrl` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — admin/app/services/zim_service.ts:1062
  • `fetchManifest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — admin/app/jobs/download_drug_data_job.ts:307

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
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.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation6.0 / 10Adequate✓ Tool-verified

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `debug` at line 484 is called with an argument built by `allKeywords.join(', ')` (line 484), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — admin/app/services/rag_service.ts:484
  • `debug` at line 486 is called with an argument built by `structuralKeywords.join(', ')` (line 487), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — admin/app/services/rag_service.ts:486
  • `debug` at line 999 is called with an argument built by `keywords.join(', ')` (line 999), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — admin/app/services/rag_service.ts:999
  • `debug` at line 161 is called with an argument built by `map(c => ({ articleTitle : c.articleTitle, sectionTitle : c.sectionTitle, hierarchy : c.hierarchy, textPreview : c.te...` (line 161), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — admin/app/services/zim_extraction_service.ts:161

What to do

  • Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is JavaScript's evaluation order, not a guess — then put the construction behind the level check the logger offers (`if (logger.isLevelEnabled('debug'))` for pino and winston, `isDebugEnabled()` for log4js, the repository's own debug flag where it has one), or hand the logger the object and a format string (`logger.debug({ payload }, 'raw request')`) so the serialising happens only when the line is written. Moving the call is not the fix: it is the join/projection/stringify in the argument that is paid, wherever the call sits.
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

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

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

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

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

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

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

X3 · Exception handling5.1 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — install/nomad-translate/blocks.py:147, install/nomad-translate/proxy.py:222, admin/scripts/audit_catalog_ports.py:61, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×3) — admin/inertia/pages/supply-depot.tsx:173, admin/inertia/hooks/useTheme.ts:26, admin/inertia/hooks/useTheme.ts:36
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×29) — admin/inertia/pages/settings/update.tsx:100, admin/inertia/pages/settings/zim/remote-explorer.tsx:83, admin/inertia/pages/settings/zim/remote-explorer.tsx:266, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — admin/inertia/lib/api.ts:400, REDACTED:1129, REDACTED:1139, …

What to do

  • Swallowed exception (caught, then discarded)
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.

X5 · Nullable reference types1.9 / 10Critical✓ Tool-verified

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

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

  • This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.
  • ~1.6 `!` null assertions per 1k TypeScript source lines — 115 assertion(s) across the 73383 source line(s) of the 431 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: admin/app/services/rag_service.ts (35), admin/inertia/hooks/useBenchmarkRun.ts (8), admin/app/jobs/run_extract_pmtiles_job.ts (6). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

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

WCAG coverage — what static analysis assessed

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

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
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
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 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 Health45%Weak — gated by D1, D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture62%Adequate — gated by D26, R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity67%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness40%Weak — gated by D13, R4, R8, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security44%Weak — gated by D29, D30, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility46%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 2 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 — 17 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
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 — 48 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.

  • 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; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. 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
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — 1 | >>> FROM node:22-slim AS base 2 | 3 | # Install bash & curl for entrypoint script compatibility, graphicsmagick for pdf2pic, and vips-dev & build-base for sharp -------------------- ERROR: failed to solve: node:22-slim: failed to resolve source metadata for docker.io/library/node:22-slim: failed to do request: Head "https://registry-1.docker.io/v2/library/node/manifests/22-slim": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend 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, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D11 Test Reliability — Test reliability not included — the test script invokes plain node, no runner protocol we can drive
  • 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.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — Naming consistency is measured on C# only; Python, TypeScript not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. 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# and Visual Basic comments only — this repository's production source is .py, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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 (.ts), 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) — 4 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D4 Code Duplication — This repository's production source (.ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • 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 test script invokes plain node, which the collector cannot instrument
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • 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.
  • 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.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 129 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×25
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×12
  • <input> without a programmatic label admin/inertia/components/CountryPickerModal.tsx:208 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/components/CountryPickerModal.tsx:352 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label admin/inertia/components/chat/CollectionCombobox.tsx:128 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/components/chat/CollectionsManager.tsx:82 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label admin/inertia/components/chat/KnowledgeBaseModal.tsx:1241 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/components/maps/MapMarkerFormPopup.tsx:119 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/components/maps/MarkerPanel.tsx:318 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/pages/drug-reference/index.tsx:544 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/pages/drug-reference/interactions.tsx:228 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/pages/easy-setup/index.tsx:801 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/pages/maps.tsx:82 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label admin/inertia/pages/supply-depot.tsx:421 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×10
  • Click handler on a non-interactive <div> admin/inertia/components/CategoryCard.tsx:56 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/components/CreatorPackCard.tsx:61 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/components/CuratedCollectionCard.tsx:19 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/components/TierSelectionModal.tsx:234 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/components/WikipediaSelector.tsx:84 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/layouts/AppLayout.tsx:41 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/pages/easy-setup/index.tsx:647 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/pages/easy-setup/index.tsx:886 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/pages/easy-setup/index.tsx:1090 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> admin/inertia/providers/NotificationProvider.tsx:62 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels · <button> with no accessible text · ×9
  • <button> with no accessible text admin/inertia/components/CustomAppModal.tsx:382 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/components/CustomAppModal.tsx:429 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/components/CustomAppModal.tsx:458 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/components/StyledSidebar.tsx:106 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/components/TierSelectionModal.tsx:207 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/components/chat/KnowledgeBaseModal.tsx:569 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/components/chat/NomadMdModal.tsx:82 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/components/inputs/Switch.tsx:45 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text admin/inertia/pages/settings/update.tsx:502 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels · <label> that labels no control · ×8
  • <label> that labels no control admin/inertia/components/CountryPickerModal.tsx:349 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control admin/inertia/components/CustomAppModal.tsx:354 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control admin/inertia/components/CustomAppModal.tsx:401 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control admin/inertia/components/CustomAppModal.tsx:444 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control admin/inertia/components/CustomAppModal.tsx:475 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control admin/inertia/components/chat/KnowledgeBaseModal.tsx:1238 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control admin/inertia/pages/settings/benchmark.tsx:417 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control admin/inertia/pages/settings/zim/remote-explorer.tsx:611 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×5
  • Import cycle (2 files) admin/app/jobs/download_model_job.ts:5 — admin/app/jobs/download_model_job.ts → admin/app/services/ollama_service.ts → admin/app/jobs/download_model_job.ts
  • Import cycle (2 files) admin/app/jobs/embed_file_job.ts:4 — admin/app/jobs/embed_file_job.ts → admin/app/services/rag_service.ts → admin/app/jobs/embed_file_job.ts
  • Import cycle (2 files) admin/app/jobs/run_download_job.ts:8 — admin/app/jobs/run_download_job.ts → REDACTED → admin/app/jobs/run_download_job.ts (one verified cycle inside a mutually-dependent group of 4 files)
  • Import cycle (2 files) admin/app/models/chat_message.ts:4 — admin/app/models/chat_message.ts → admin/app/models/chat_session.ts → admin/app/models/chat_message.ts
  • Import cycle (2 files) admin/app/services/system_service.ts:33 — admin/app/services/system_service.ts → admin/config/inertia.ts → admin/app/services/system_service.ts
AC2 · Forms & labels · <select> without a programmatic label · ×4
  • <select> without a programmatic label admin/inertia/components/BuilderTagSelector.tsx:80 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label admin/inertia/components/BuilderTagSelector.tsx:95 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label admin/inertia/components/maps/MarkerPanel.tsx:327 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label admin/inertia/pages/settings/zim/remote-explorer.tsx:612 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels · <textarea> without a programmatic label · ×3
  • <textarea> without a programmatic label admin/inertia/components/DebugInfoModal.tsx:65 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <textarea> without a programmatic label admin/inertia/components/chat/ChatInterface.tsx:302 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label admin/inertia/components/maps/MapMarkerFormPopup.tsx:133 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
D30 · Dependency Vulnerabilities · Critical CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×2
  • Hover-only interaction on <div> admin/inertia/pages/maps.tsx:71 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> admin/inertia/pages/maps.tsx:134 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
D13 · REDACTED Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Critical IaC · ×2
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <tr> · ×1
  • Click handler on a non-interactive <tr> admin/inertia/pages/settings/zim/remote-explorer.tsx:877 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D14 · License Compliance · Banned license · ×1
  • Banned license: @openzim/libzim REDACTED:89 — `@openzim/libzim` 4.0.0 is published on registry.npmjs.org under `GPL-3.0`, which this policy bans, and it is a PRODUCTION dependency this repository's committed lockfile resolves — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'classnames' · ×1
  • Unlisted import 'classnames' admin/inertia/components/CategoryCard.tsx:4 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'clsx' · ×1
  • Unlisted import 'clsx' admin/inertia/components/BouncingDots.tsx:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
S1 · Web-Security Posture · Cryptographic key material is a compile-time constant · ×1
  • Cryptographic key material is a compile-time constant REDACTED:47 — `BENCHMARK_HMAC_SECRET` is the MAC key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
Serious — 687 finding(s)
D3 · God Classes · FunctionTooLong · ×46
  • FunctionTooLong: index.EasySetupWizard admin/inertia/pages/easy-setup/index.tsx:109 — FunctionTooLong — EasySetupWizard runs 1053 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 953 over it, 10.53× 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: KnowledgeBaseModal.KnowledgeBaseModal admin/inertia/components/chat/KnowledgeBaseModal.tsx:191 — FunctionTooLong — KnowledgeBaseModal runs 921 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 821 over it, 9.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: benchmark.BenchmarkPage admin/inertia/pages/settings/benchmark.tsx:30 — FunctionTooLong — BenchmarkPage runs 847 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 747 over it, 8.47× 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: supply-depot.SupplyDepotPage admin/inertia/pages/supply-depot.tsx:93 — FunctionTooLong — SupplyDepotPage runs 576 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 476 over it, 5.76× 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: index.DrugReferenceIndex admin/inertia/pages/drug-reference/index.tsx:162 — FunctionTooLong — DrugReferenceIndex runs 572 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 472 over it, 5.72× 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: index.Chat admin/inertia/components/chat/index.tsx:26 — FunctionTooLong — Chat runs 522 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 422 over it, 5.22× 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: models.ModelsPage admin/inertia/pages/settings/models.tsx:28 — FunctionTooLong — ModelsPage runs 522 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 422 over it, 5.22× 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: update.SystemUpdatePage admin/inertia/pages/settings/update.tsx:44 — FunctionTooLong — SystemUpdatePage runs 404 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 304 over it, 4.04× 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: CustomAppModal.CustomAppModal admin/inertia/components/CustomAppModal.tsx:78 — FunctionTooLong — CustomAppModal runs 390 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 290 over it, 3.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: maps.MapsManager admin/inertia/pages/settings/maps.tsx:26 — FunctionTooLong — MapsManager runs 337 significant lines (blank, comment-only and punctuation-only lines excluded) 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: apps.SettingsPage admin/inertia/pages/settings/apps.tsx:27 — FunctionTooLong — SettingsPage runs 324 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 224 over it, 3.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MapComponent.MapComponent admin/inertia/components/maps/MapComponent.tsx:133 — FunctionTooLong — MapComponent runs 304 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 204 over it, 3.04× 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: CountryPickerModal.CountryPickerModal admin/inertia/components/CountryPickerModal.tsx:44 — FunctionTooLong — CountryPickerModal runs 280 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 180 over it, 2.80× 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: ChatInterface.ChatInterface admin/inertia/components/chat/ChatInterface.tsx:32 — FunctionTooLong — ChatInterface runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: supply-depot.AppCard admin/inertia/pages/supply-depot.tsx:853 — FunctionTooLong — AppCard runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MarkerPanel.MarkerPanel admin/inertia/components/maps/MarkerPanel.tsx:77 — FunctionTooLong — MarkerPanel runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.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: ActiveDownloads.ActiveDownloads admin/inertia/components/ActiveDownloads.tsx:38 — FunctionTooLong — ActiveDownloads runs 225 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× 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: home.Home admin/inertia/pages/home.tsx:115 — FunctionTooLong — Home runs 221 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 121 over it, 2.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: system.SettingsPage admin/inertia/pages/settings/system.tsx:15 — FunctionTooLong — SettingsPage runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: interactions.DrugReferenceInteractions admin/inertia/pages/drug-reference/interactions.tsx:29 — FunctionTooLong — DrugReferenceInteractions runs 211 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 111 over it, 2.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ContentAutoUpdateSection.ContentAutoUpdateSection admin/inertia/components/updates/ContentAutoUpdateSection.tsx:22 — FunctionTooLong — ContentAutoUpdateSection runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.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: MapMarkerFormPopup.MapMarkerFormPopup admin/inertia/components/maps/MapMarkerFormPopup.tsx:33 — FunctionTooLong — MapMarkerFormPopup runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: index.ZimPage admin/inertia/pages/settings/zim/index.tsx:22 — FunctionTooLong — ZimPage runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: ContentUpdatesSection.ContentUpdatesSection admin/inertia/components/updates/ContentUpdatesSection.tsx:13 — FunctionTooLong — ContentUpdatesSection runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× 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: Alert.Alert admin/inertia/components/Alert.tsx:17 — FunctionTooLong — Alert runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× 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.
  • + 21 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file admin/inertia/pages/easy-setup/index.tsx: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 admin/inertia/lib/api.ts: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 admin/inertia/components/chat/KnowledgeBaseModal.tsx: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 admin/inertia/pages/supply-depot.tsx: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 admin/inertia/pages/settings/zim/remote-explorer.tsx: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 admin/inertia/pages/drug-reference/index.tsx: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 admin/app/controllers/system_controller.ts: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 admin/start/routes.ts: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 admin/inertia/components/chat/index.tsx: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 admin/inertia/pages/settings/models.tsx: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 REDACTED: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 admin/app/services/auto_update_service.ts: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 admin/inertia/components/maps/MapComponent.tsx: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 admin/inertia/components/CustomAppModal.tsx: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 admin/inertia/pages/settings/update.tsx: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 admin/app/services/eval_generation_service.ts: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 admin/inertia/pages/settings/maps.tsx: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 admin/inertia/pages/settings/apps.tsx: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 admin/inertia/pages/home.tsx: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 admin/inertia/components/CountryPickerModal.tsx: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 admin/inertia/components/TierSelectionModal.tsx: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 admin/inertia/components/maps/MarkerPanel.tsx: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 admin/commands/eval/retrieval.ts: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 admin/inertia/components/chat/ChatInterface.tsx: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 admin/inertia/pages/drug-reference/interactions.tsx: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.
  • + 15 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×38
  • Hotspot: admin/inertia/components/chat/index.tsx admin/inertia/components/chat/index.tsx:26 — admin/inertia/components/chat/index.tsx changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in index.Chat at line 26. 5 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/components/chat/index.tsx`: 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: REDACTED REDACTED:514 — REDACTED changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in BenchmarkService.getHardwareInfo at line 514. 10 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- REDACTED`: 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: admin/app/controllers/ollama_controller.ts admin/app/controllers/ollama_controller.ts:67 — admin/app/controllers/ollama_controller.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in OllamaController.chat at line 67. 2 of those changes were fix/bug commits, and the other 9 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/controllers/ollama_controller.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/inertia/pages/easy-setup/index.tsx admin/inertia/pages/easy-setup/index.tsx:109 — admin/inertia/pages/easy-setup/index.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 179 in index.EasySetupWizard at line 109. 1 of those changes was a fix/bug commit, and the other 2 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/pages/easy-setup/index.tsx`: 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: admin/inertia/pages/settings/benchmark.tsx admin/inertia/pages/settings/benchmark.tsx:30 — admin/inertia/pages/settings/benchmark.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in benchmark.BenchmarkPage at line 30. 3 of those changes were fix/bug commits, and the other 3 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/pages/settings/benchmark.tsx`: 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: REDACTED REDACTED:1736 — REDACTED changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in DockerService.updateContainer at line 1736. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- REDACTED`: 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: admin/app/services/system_service.ts admin/app/services/system_service.ts:386 — admin/app/services/system_service.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in SystemService.getSystemInfo at line 386. 4 of those changes were fix/bug commits, and the other 6 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/services/system_service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/inertia/pages/settings/zim/remote-explorer.tsx admin/inertia/pages/settings/zim/remote-explorer.tsx:57 — admin/inertia/pages/settings/zim/remote-explorer.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in remote-explorer.ZimRemoteExplorer at line 57. 1 of those changes was a fix/bug commit, and the other 4 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/pages/settings/zim/remote-explorer.tsx`: 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: admin/app/services/rag_service.ts admin/app/services/rag_service.ts:2399 — admin/app/services/rag_service.ts changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in RagService.scanAndSyncStorage at line 2399. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/services/rag_service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/inertia/pages/settings/models.tsx admin/inertia/pages/settings/models.tsx:28 — admin/inertia/pages/settings/models.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in models.ModelsPage at line 28. 1 of those changes was a fix/bug commit, and the other 8 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/pages/settings/models.tsx`: 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: admin/inertia/components/chat/KnowledgeBaseModal.tsx admin/inertia/components/chat/KnowledgeBaseModal.tsx:191 — admin/inertia/components/chat/KnowledgeBaseModal.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 108 in KnowledgeBaseModal.KnowledgeBaseModal at line 191. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/components/chat/KnowledgeBaseModal.tsx`: 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: admin/inertia/pages/home.tsx admin/inertia/pages/home.tsx:115 — admin/inertia/pages/home.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in home.Home at line 115. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/pages/home.tsx`: 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: admin/app/validators/settings.ts admin/app/validators/settings.ts:23 — admin/app/validators/settings.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in settings.validateSettingValue at line 23. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/validators/settings.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/app/services/zim_service.ts admin/app/services/zim_service.ts:79 — admin/app/services/zim_service.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ZimService.listRemote at line 79. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/services/zim_service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/inertia/pages/drug-reference/index.tsx admin/inertia/pages/drug-reference/index.tsx:162 — admin/inertia/pages/drug-reference/index.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in index.DrugReferenceIndex at line 162. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/pages/drug-reference/index.tsx`: 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: admin/inertia/components/chat/ChatInterface.tsx admin/inertia/components/chat/ChatInterface.tsx:32 — admin/inertia/components/chat/ChatInterface.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in ChatInterface.ChatInterface at line 32. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/components/chat/ChatInterface.tsx`: 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: admin/app/utils/downloads.ts admin/app/utils/downloads.ts:44 — admin/app/utils/downloads.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in downloads.doResumableDownload at line 44. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/utils/downloads.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/inertia/components/maps/MarkerPanel.tsx admin/inertia/components/maps/MarkerPanel.tsx:77 — admin/inertia/components/maps/MarkerPanel.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in MarkerPanel.MarkerPanel at line 77. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/components/maps/MarkerPanel.tsx`: 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: admin/inertia/components/maps/MapComponent.tsx admin/inertia/components/maps/MapComponent.tsx:133 — admin/inertia/components/maps/MapComponent.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in MapComponent.MapComponent at line 133. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/components/maps/MapComponent.tsx`: 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: admin/app/services/download_service.ts admin/app/services/download_service.ts:58 — admin/app/services/download_service.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in DownloadService.listDownloadJobs at line 58. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/services/download_service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/app/services/rag_pipeline_service.ts admin/app/services/rag_pipeline_service.ts:57 — admin/app/services/rag_pipeline_service.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in RagPipelineService.buildPrompt at line 57. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/services/rag_pipeline_service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/app/jobs/embed_file_job.ts admin/app/jobs/embed_file_job.ts:59 — admin/app/jobs/embed_file_job.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in EmbedFileJob.handle at line 59. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/jobs/embed_file_job.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/commands/eval/retrieval.ts admin/commands/eval/retrieval.ts:75 — admin/commands/eval/retrieval.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in EvalRetrieval.run at line 75. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/commands/eval/retrieval.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: admin/inertia/components/chat/ChatMessageBubble.tsx admin/inertia/components/chat/ChatMessageBubble.tsx:12 — admin/inertia/components/chat/ChatMessageBubble.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ChatMessageBubble.ChatMessageBubble at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/inertia/components/chat/ChatMessageBubble.tsx`: 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: admin/app/jobs/run_download_job.ts admin/app/jobs/run_download_job.ts:69 — admin/app/jobs/run_download_job.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in RunDownloadJob.handle at line 69. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- admin/app/jobs/run_download_job.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 13 more in this group — see findings.md.
X2 · Cancellation propagation · Async function without AbortSignal · ×34
  • Async function without AbortSignal: refreshStatus admin/inertia/pages/drug-reference/index.tsx:387 — `refreshStatus` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: sendChatMessage admin/inertia/lib/api.ts:340 — `sendChatMessage` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchReleases admin/app/services/auto_update_service.ts:205 — `fetchReleases` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: submitToRepository REDACTED:299 — `submitToRepository` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`.
  • Async function without AbortSignal: getComparisonStats REDACTED:489 — `getComparisonStats` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: _runAIBenchmark REDACTED:952 — `_runAIBenchmark` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: _runSingleAIInference REDACTED:1078 — `_runSingleAIInference` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`.
  • Async function without AbortSignal: _preflightModelDiskSpace REDACTED:1125 — `_preflightModelDiskSpace` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: _unloadResidentModels REDACTED:1170 — `_unloadResidentModels` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: fetchAndCacheSpec admin/app/services/collection_manifest_service.ts:50 — `fetchAndCacheSpec` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: enrichWithSizes admin/app/services/collection_update_service.ts:167 — `enrichWithSizes` awaits `axios.head(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.head(url, { signal })`.
  • Async function without AbortSignal: fetchZimEntriesPage admin/app/services/kiwix_catalog_service.ts:185 — `fetchZimEntriesPage` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: fetchMapListing admin/app/services/kiwix_catalog_service.ts:258 — `fetchMapListing` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: downloadRemotePreflight REDACTED:314 — `downloadRemotePreflight` awaits `axios.head(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.head(url, { signal })`.
  • Async function without AbortSignal: getGlobalMapInfo REDACTED:631 — `getGlobalMapInfo` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: _isNativeBackend admin/app/services/ollama_service.ts:268 — `_isNativeBackend` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: getModelInfo admin/app/services/ollama_service.ts:891 — `getModelInfo` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`.
  • Async function without AbortSignal: ollamaShow admin/app/services/ollama_service.ts:938 — `ollamaShow` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`.
  • Async function without AbortSignal: llamaProps admin/app/services/ollama_service.ts:947 — `llamaProps` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: deleteModel admin/app/services/ollama_service.ts:972 — `deleteModel` awaits `axios.delete(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.delete(url, { signal })`.
  • Async function without AbortSignal: _embedWithFallback admin/app/services/ollama_service.ts:1094 — `_embedWithFallback` awaits `axios.post(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.post(url, { signal })`.
  • Async function without AbortSignal: isEmbeddingGpuAccelerated admin/app/services/ollama_service.ts:1160 — `isEmbeddingGpuAccelerated` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: unloadAllChatModelsExcept admin/app/services/ollama_service.ts:1204 — `unloadAllChatModelsExcept` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: getModels admin/app/services/ollama_service.ts:1261 — `getModels` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: retrieveAndRefreshModels admin/app/services/ollama_service.ts:1377 — `retrieveAndRefreshModels` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • + 9 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×32
  • Swallowed exception (empty catch) admin/inertia/pages/supply-depot.tsx:173 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/pages/settings/update.tsx:100 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/pages/settings/zim/remote-explorer.tsx:83 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/pages/settings/zim/remote-explorer.tsx:266 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/pages/drug-reference/index.tsx:398 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/pages/drug-reference/index.tsx:411 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/pages/drug-reference/index.tsx:432 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/pages/drug-reference/index.tsx:448 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:43 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/hooks/useTheme.ts:12 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/hooks/useTheme.ts:24 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/hooks/useTheme.ts:26 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/hooks/useTheme.ts:35 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/hooks/useTheme.ts:36 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/GpuPassthroughAlert.tsx:49 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/GpuPassthroughAlert.tsx:65 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/WhatsNewBanner.tsx:58 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/maps/MapComponent.tsx:120 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/maps/MapComponent.tsx:380 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/drug-reference/DrugDisclaimerModal.tsx:31 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/chat/index.tsx:149 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/chat/index.tsx:170 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/inertia/components/ZimUploader/index.tsx:43 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/database/migrations/1778600000004_create_drug_labels_table.ts:110 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) admin/database/migrations/1778600000006_add_indications_fulltext_index.ts:29 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 7 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×19
  • FileTooLong: services/rag_service.ts admin/app/services/rag_service.ts — FileTooLong — 1486 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: RagService (69-2776). The bar is 500 significant lines; this is 986 over it, 2.97× 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: REDACTED REDACTED — FileTooLong — 1390 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: DockerService (35-2443). The bar is 500 significant lines; this is 890 over it, 2.78× 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: easy-setup/index.tsx admin/inertia/pages/easy-setup/index.tsx — FileTooLong — 1133 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: EasySetupWizard (109-1507). The bar is 500 significant lines; this is 633 over it, 2.27× 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: chat/KnowledgeBaseModal.tsx admin/inertia/components/chat/KnowledgeBaseModal.tsx — FileTooLong — 1096 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: KnowledgeBaseModal (191-1305). The bar is 500 significant lines; this is 596 over it, 2.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: pages/supply-depot.tsx admin/inertia/pages/supply-depot.tsx — FileTooLong — 953 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: SupplyDepotPage (93-822). The bar is 500 significant lines; this is 453 over it, 1.91× 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: REDACTED REDACTED — FileTooLong — 940 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: BenchmarkService (210-1797). The bar is 500 significant lines; this is 440 over it, 1.88× 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: lib/api.ts admin/inertia/lib/api.ts — FileTooLong — 915 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: API (42-1418). The bar is 500 significant lines; this is 415 over it, 1.83× 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: settings/benchmark.tsx admin/inertia/pages/settings/benchmark.tsx — FileTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: BenchmarkPage (30-1010). The bar is 500 significant lines; this is 375 over it, 1.75× 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: services/ollama_service.ts admin/app/services/ollama_service.ts — FileTooLong — 831 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: OllamaService (204-1558). The bar is 500 significant lines; this is 331 over it, 1.66× 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: zim/remote-explorer.tsx admin/inertia/pages/settings/zim/remote-explorer.tsx — FileTooLong — 785 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 285 over it, 1.57× 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: drug-reference/index.tsx admin/inertia/pages/drug-reference/index.tsx — FileTooLong — 755 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: DrugReferenceIndex (162-877). The bar is 500 significant lines; this is 255 over it, 1.51× 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: services/system_service.ts admin/app/services/system_service.ts — FileTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SystemService (39-1153). The bar is 500 significant lines; this is 227 over it, 1.45× 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: services/zim_service.ts admin/app/services/zim_service.ts — FileTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ZimService (50-1151). The bar is 500 significant lines; this is 206 over it, 1.41× 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: start/routes.ts admin/start/routes.ts — FileTooLong — 688 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 188 over it, 1.38× 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: REDACTED REDACTED — FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: MapService (74-978). The bar is 500 significant lines; this is 124 over it, 1.25× 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: controllers/system_controller.ts admin/app/controllers/system_controller.ts — FileTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: SystemController (44-931). The bar is 500 significant lines; this is 86 over it, 1.17× 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: settings/models.tsx admin/inertia/pages/settings/models.tsx — FileTooLong — 548 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: ModelsPage (28-671). The bar is 500 significant lines; this is 48 over it, 1.10× 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: chat/index.tsx admin/inertia/components/chat/index.tsx — FileTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: Chat (26-749). The bar is 500 significant lines; this is 44 over it, 1.09× 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: services/drug_reference_service.ts admin/app/services/drug_reference_service.ts — FileTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DrugReferenceService (43-884). The bar is 500 significant lines; this is 27 over it, 1.05× 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.
D3 · God Classes · MethodTooLong · ×15
  • MethodTooLong: DockerService.updateContainer REDACTED:1736 — MethodTooLong — updateContainer runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× 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: IngestDrugDataJob.streamIngestPart admin/app/jobs/ingest_drug_data_job.ts:422 — MethodTooLong — streamIngestPart runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: OllamaController.chat admin/app/controllers/ollama_controller.ts:67 — MethodTooLong — chat runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SystemService.getSystemInfo admin/app/services/system_service.ts:386 — MethodTooLong — getSystemInfo runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: RunDownloadJob.handle admin/app/jobs/run_download_job.ts:69 — MethodTooLong — handle runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.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: EmbedFileJob.handle admin/app/jobs/embed_file_job.ts:59 — MethodTooLong — handle runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: RagService.searchSimilarDocuments admin/app/services/rag_service.ts:941 — MethodTooLong — searchSimilarDocuments runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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: DownloadDrugDataJob.handle admin/app/jobs/download_drug_data_job.ts:105 — MethodTooLong — handle runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: AutoUpdateDryRun.runScenarios admin/commands/auto_update/dry_run.ts:139 — MethodTooLong — runScenarios runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.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.
  • MethodTooLong: RagService.scanAndSyncStorage admin/app/services/rag_service.ts:2399 — MethodTooLong — scanAndSyncStorage runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EvalRetrieval.run admin/commands/eval/retrieval.ts:75 — MethodTooLong — run runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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: IngestDrugDataJob.handle admin/app/jobs/ingest_drug_data_job.ts:214 — MethodTooLong — handle runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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: SystemService.getDebugInfo admin/app/services/system_service.ts:762 — MethodTooLong — getDebugInfo runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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: BenchmarkService._runBenchmark REDACTED:660 — MethodTooLong — _runBenchmark runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.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.
  • MethodTooLong: AppAutoUpdateDryRun.runScenarios admin/commands/app_auto_update/dry_run.ts:76 — MethodTooLong — runScenarios runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.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.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×13
  • Animation without a prefers-reduced-motion guard admin/inertia/components/BouncingDots.tsx:14 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/components/BouncingDots.tsx:18 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/components/BouncingDots.tsx:22 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/components/LoadingSpinner.tsx:19 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/components/LoadingSpinner.tsx:36 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/components/chat/ChatInterface.tsx:325 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/pages/home.tsx:301 — <span> moves — its `animate-ping` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/pages/settings/benchmark.tsx:246 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/pages/settings/zim/remote-explorer.tsx:539 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/pages/settings/zim/remote-explorer.tsx:847 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/pages/supply-depot.tsx:576 — <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/pages/supply-depot.tsx:943 — <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard admin/inertia/pages/supply-depot.tsx:1131 — <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
D35 · Change Coupling · Change coupling · ×13
  • Change coupling: REDACTED ↔ services.ts REDACTED:1 — `REDACTED` and `admin/types/services.ts` change together 79% of the time (11 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `400d64ab` feat(dashboard): let a link tile carry a brand colour; `b7b973e9` feat(dashboard): user-added link tiles for services NOMAD does not ma…; `8982d93a` feat: replace legacy Kolibri image default with latest v19 image (#1019) — run `git show` on any of them.
  • Change coupling: zim_controller.ts ↔ remote-explorer.tsx admin/app/controllers/zim_controller.ts:1 — `admin/app/controllers/zim_controller.ts` and `admin/inertia/pages/settings/zim/remote-explorer.tsx` change together 79% of the time (11 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `576464ab` feat(zim): let users browse the Kiwix library in any language; `a7d05859` feat(zim): add zim uploader in content manager; `62e75fdb` feat(Content): custom ZIM library sources with pre-seeded mirrors (#593) — run `git show` on any of them.
  • Change coupling: rag_controller.ts ↔ KnowledgeBaseModal.tsx admin/app/controllers/rag_controller.ts:1 — `admin/app/controllers/rag_controller.ts` and `admin/inertia/components/chat/KnowledgeBaseModal.tsx` change together 65% of the time (13 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `880c80f5` feat(kb): per-file active toggle + collection grouping/bulk toggle (#…; `ac141a33` feat(rag): add subject/collection organization to knowledge base (#1063); `88ac4d5e` feat(RAG): adds the ability to cancel all embedding jobs (#1034) — run `git show` on any of them.
  • Change coupling: index.tsx ↔ ollama.ts admin/inertia/components/chat/index.tsx:1 — `admin/inertia/components/chat/index.tsx` and `admin/types/ollama.ts` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a013eb63` fix(chat): stop capping answers at 1024 tokens and surface truncation; `8a920188` feat(ai): support local vision attachments; `8068e057` feat(AI): per-model thinking toggle with global default (off) (#1079) — run `git show` on any of them.
  • Change coupling: system_controller.ts ↔ services.ts admin/app/controllers/system_controller.ts:1 — `admin/app/controllers/system_controller.ts` and `admin/types/services.ts` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `400d64ab` feat(dashboard): let a link tile carry a brand colour; `b7b973e9` feat(dashboard): user-added link tiles for services NOMAD does not ma…; `026ab6df` feat(supply-depot): add custom launch URLs for apps — run `git show` on any of them.
  • Change coupling: ollama_controller.ts ↔ index.tsx admin/app/controllers/ollama_controller.ts:1 — `admin/app/controllers/ollama_controller.ts` and `admin/inertia/components/chat/index.tsx` change together 55% of the time (11 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `a013eb63` fix(chat): stop capping answers at 1024 tokens and surface truncation; `8a920188` feat(ai): support local vision attachments; `9fde7f77` feat: show source document and date as citations under RAG chat answers — run `git show` on any of them.
  • Change coupling: zim_service.ts ↔ remote-explorer.tsx admin/app/services/zim_service.ts:1 — `admin/app/services/zim_service.ts` and `admin/inertia/pages/settings/zim/remote-explorer.tsx` change together 54% of the time (14 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `576464ab` feat(zim): let users browse the Kiwix library in any language; `5d85b671` feat: Expandable rows in Kiwix Library browser (#1060); `a7d05859` feat(zim): add zim uploader in content manager — run `git show` on any of them.
  • Change coupling: REDACTED ↔ apps.tsx REDACTED:1 — `REDACTED` and `admin/inertia/pages/settings/apps.tsx` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `026ab6df` feat(supply-depot): add custom launch URLs for apps; `58b106f3` feat: support for updating services; `c46b75e6` fix(admin): improve duplicate install request handling — run `git show` on any of them.
  • Change coupling: KnowledgeBaseModal.tsx ↔ rag.ts admin/inertia/components/chat/KnowledgeBaseModal.tsx:1 — `admin/inertia/components/chat/KnowledgeBaseModal.tsx` and `admin/types/rag.ts` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `880c80f5` feat(kb): per-file active toggle + collection grouping/bulk toggle (#…; `ac141a33` feat(rag): add subject/collection organization to knowledge base (#1063); `51816379` feat(KnowledgeBase): add document viewer, download, metadata, and sor… — run `git show` on any of them.
  • Change coupling: rag_controller.ts ↔ rag.ts admin/app/controllers/rag_controller.ts:1 — `admin/app/controllers/rag_controller.ts` and `admin/types/rag.ts` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `880c80f5` feat(kb): per-file active toggle + collection grouping/bulk toggle (#…; `ac141a33` feat(rag): add subject/collection organization to knowledge base (#1063); `51816379` feat(KnowledgeBase): add document viewer, download, metadata, and sor… — run `git show` on any of them.
  • Change coupling: zim_controller.ts ↔ common.ts admin/app/controllers/zim_controller.ts:1 — `admin/app/controllers/zim_controller.ts` and `admin/app/validators/common.ts` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `75106a8f` fix(security): path traversal and SSRF protections from pre-launch audit; `36b6d8ed` fix: rework content tier system to dynamically determine install stat…; `2c4fc594` feat(ContentManager): Display friendly names instead of filenames — run `git show` on any of them.
  • Change coupling: service.ts ↔ home.tsx admin/app/models/service.ts:1 — `admin/app/models/service.ts` and `admin/inertia/pages/home.tsx` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `400d64ab` feat(dashboard): let a link tile carry a brand colour; `b7b973e9` feat(dashboard): user-added link tiles for services NOMAD does not ma…; `026ab6df` feat(supply-depot): add custom launch URLs for apps — run `git show` on any of them.
  • Change coupling: index.tsx ↔ downloads.ts admin/inertia/pages/easy-setup/index.tsx:1 — `admin/inertia/pages/easy-setup/index.tsx` and `admin/types/downloads.ts` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `12b0a778` feat(creator-packs): gated per-creator video packs, offline via Kiwix…; `68f374e3` feat: Add dedicated Wikipedia Selector with smart package management; `5afc3a27` feat: Improve curated collections UX with persistent tier selection — run `git show` on any of them.
D3 · God Classes · ClassTooLong · ×12
  • ClassTooLong: RagService admin/app/services/rag_service.ts:68 — ClassTooLong — 1429 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 1029 over it, 3.57× 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: DockerService REDACTED:34 — ClassTooLong — 1359 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 959 over it, 3.40× 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: KnowledgeBaseModal admin/inertia/components/chat/KnowledgeBaseModal.tsx:1 — ClassTooLong — 921 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 521 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: API admin/inertia/lib/api.ts:42 — ClassTooLong — 881 significant lines (blank, comment-only and punctuation-only lines excluded), 130 methods. The bar is 400 significant lines; this is 481 over it, 2.20× 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: BenchmarkService REDACTED:209 — ClassTooLong — 840 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 440 over it, 2.10× 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: OllamaService admin/app/services/ollama_service.ts:203 — ClassTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 333 over it, 1.83× 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: SystemService admin/app/services/system_service.ts:38 — ClassTooLong — 690 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 290 over it, 1.73× 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: ZimService admin/app/services/zim_service.ts:49 — ClassTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 259 over it, 1.65× 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: MapService REDACTED:74 — ClassTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 153 over it, 1.38× 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: SystemController admin/app/controllers/system_controller.ts:43 — ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 144 over it, 1.36× 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: DrugReferenceService admin/app/services/drug_reference_service.ts:43 — ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 99 over it, 1.25× 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: ServiceSeeder REDACTED:31 — ClassTooLong — 446 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 46 over it, 1.12× 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.
AC6 · Visual & motion safety · Focus outline removed inline · ×9
  • Focus outline removed inline admin/inertia/components/DebugInfoModal.tsx:65 — <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/components/StyledTable.tsx:141 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/components/maps/MarkerPanel.tsx:318 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/components/maps/MarkerPanel.tsx:327 — <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/components/maps/ViewMapMarkerPopup.tsx:64 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/components/maps/ViewMapMarkerPopup.tsx:72 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/pages/drug-reference/index.tsx:588 — <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/pages/drug-reference/index.tsx:603 — <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline admin/inertia/pages/maps.tsx:82 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D30 · Dependency Vulnerabilities · Medium CVE · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×9
  • Low cohesion: SystemController (LCOM4 9) admin/app/controllers/system_controller.ts:43 — SystemController's methods fall into 9 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 9 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.
  • Low cohesion: RagController (LCOM4 8) admin/app/controllers/rag_controller.ts:14 — RagController's methods fall into 8 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 8 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.
  • Low cohesion: ChatService (LCOM4 8) admin/app/services/chat_service.ts:27 — ChatService's methods fall into 8 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 8 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.
  • Low cohesion: ZimService (LCOM4 8) admin/app/services/zim_service.ts:49 — ZimService's methods fall into 8 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 8 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.
  • Low cohesion: SettingsController (LCOM4 6) admin/app/controllers/settings_controller.ts:16 — SettingsController's methods fall into 6 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 6 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.
  • Low cohesion: MapsController (LCOM4 4) admin/app/controllers/maps_controller.ts:16 — MapsController'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.
  • Low cohesion: SystemService (LCOM4 4) admin/app/services/system_service.ts:38 — SystemService'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.
  • Low cohesion: BenchmarkService (LCOM4 4) REDACTED:209 — BenchmarkService'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.
  • Low cohesion: MapService (LCOM4 4) REDACTED:74 — MapService'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.
IC1 · Incompleteness & stubs · Fake-async · ×8
  • Fake-async — async method never awaits admin/app/controllers/system_controller.ts:125 — `getSystemUpdateStatus` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits admin/app/controllers/system_controller.ts:138 — `getSystemUpdateLogs` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits admin/inertia/pages/settings/maps.tsx:177 — `confirmDeleteFile` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits admin/inertia/pages/settings/maps.tsx:197 — `confirmDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits admin/inertia/pages/settings/maps.tsx:231 — `confirmGlobalMapDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits admin/inertia/pages/settings/zim/index.tsx:84 — `confirmDeleteFile` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits admin/inertia/pages/settings/zim/remote-explorer.tsx:298 — `confirmDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits admin/inertia/pages/settings/zim/remote-explorer.tsx:323 — `confirmCustomDownload` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×8
  • Swallowed exception (caught, then discarded) install/nomad-translate/blocks.py:147 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) install/nomad-translate/proxy.py:222 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) admin/scripts/audit_catalog_ports.py:61 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) admin/scripts/audit_catalog_ports.py:97 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) admin/inertia/lib/api.ts:400 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1129 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1139 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1148 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D3 · God Classes · TooManyMethods · ×7
  • TooManyMethods: API admin/inertia/lib/api.ts:42 — TooManyMethods — 130 methods. The bar is 30 methods; this is 100 over it, 4.33× 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: RagService admin/app/services/rag_service.ts:68 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× 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: DockerService REDACTED:34 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: SystemController admin/app/controllers/system_controller.ts:43 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BenchmarkService REDACTED:209 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× 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: MapService REDACTED:74 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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: OllamaService admin/app/services/ollama_service.ts:203 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×7
  • Duplicated block (17 lines × 2 locations) admin/app/services/condition_service.ts:295 — admin/app/services/condition_service.ts:295 · admin/app/services/drug_reference_service.ts:281 — the 2 copies are spread across 2 files, 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.
  • Duplicated block (17 lines × 2 locations) REDACTED:1218 — REDACTED:1218 · REDACTED:1274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2 locations) admin/database/migrations/1776300000001_deprecate_legacy_kolibri.ts:18 — admin/database/migrations/1776300000001_deprecate_legacy_kolibri.ts:18 · admin/database/migrations/1776400000001_sunset_meshtastic_daemon.ts:14 — 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.
  • Duplicated block (17 lines × 2 locations) admin/inertia/components/chat/KnowledgeBaseModal.tsx:425 — admin/inertia/components/chat/KnowledgeBaseModal.tsx:425 · admin/inertia/components/chat/KnowledgeBaseModal.tsx:443 — 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.
  • Duplicated block (17 lines × 2 locations) admin/inertia/lib/kb_file_grouping.ts:228 — admin/inertia/lib/kb_file_grouping.ts:228 · admin/inertia/lib/kb_file_grouping.ts:248 — 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 (17 lines × 2 locations) admin/inertia/pages/settings/zim/remote-explorer.tsx:298 — admin/inertia/pages/settings/zim/remote-explorer.tsx:298 · admin/inertia/pages/settings/zim/remote-explorer.tsx:323 — 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.
  • Duplicated block (17 lines × 2 locations) admin/inertia/pages/supply-depot.tsx:708 — admin/inertia/pages/supply-depot.tsx:708 · admin/inertia/pages/supply-depot.tsx:741 — 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 (20 lines × 2 locations) · ×5
  • Duplicated block (20 lines × 2 locations) admin/app/jobs/download_model_job.ts:218 — admin/app/jobs/download_model_job.ts:218 · admin/app/jobs/run_download_job.ts:376 — the 2 copies are spread across 2 files, 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.
  • Duplicated block (20 lines × 2 locations) admin/app/utils/rag_relevance.ts:30 — admin/app/utils/rag_relevance.ts:30 · admin/app/utils/response_style.ts:28 — 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.
  • Duplicated block (20 lines × 2 locations) admin/commands/app_auto_update/dry_run.ts:17 — admin/commands/app_auto_update/dry_run.ts:17 · admin/commands/auto_update/dry_run.ts:48 — 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.
  • Duplicated block (20 lines × 2 locations) admin/inertia/lib/api.ts:1288 — admin/inertia/lib/api.ts:1288 · admin/inertia/lib/api.ts:1398 — 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 (20 lines × 2 locations) admin/inertia/pages/supply-depot.tsx:684 — admin/inertia/pages/supply-depot.tsx:684 · admin/inertia/pages/supply-depot.tsx:717 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · index.EasySetupWizard · ×3
  • index.EasySetupWizard::renderStep5 (cyclomatic 20) admin/inertia/pages/easy-setup/index.tsx:1210 — index.EasySetupWizard::renderStep5 has cyclomatic complexity 20 (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 shape REPEATS in the file: 3 other methods here (index.EasySetupWizard, index.EasySetupWizard::renderCapabilityCard, index.EasySetupWizard::renderStep3) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.EasySetupWizard::renderCapabilityCard (cyclomatic 19) admin/inertia/pages/easy-setup/index.tsx:636 — index.EasySetupWizard::renderCapabilityCard 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. This shape REPEATS in the file: 3 other methods here (index.EasySetupWizard, index.EasySetupWizard::renderStep3, index.EasySetupWizard::renderStep5) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.EasySetupWizard::renderStep3 (cyclomatic 16) admin/inertia/pages/easy-setup/index.tsx:916 — index.EasySetupWizard::renderStep3 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. This shape REPEATS in the file: 3 other methods here (index.EasySetupWizard, index.EasySetupWizard::renderCapabilityCard, index.EasySetupWizard::renderStep5) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×3
  • Change-coupling hub: system.ts → system_controller.ts, service.ts, REDACTED, routes.ts, services.ts admin/app/validators/system.ts — `admin/app/validators/system.ts` changes together with 5 other files — `admin/app/controllers/system_controller.ts`, `admin/app/models/service.ts`, `REDACTED`, `admin/start/routes.ts`, `admin/types/services.ts` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: api.ts → rag_controller.ts, system_controller.ts, zim_controller.ts, service.ts, common.ts, work.ts, routes.ts admin/inertia/lib/api.ts — `admin/inertia/lib/api.ts` changes together with 7 other files — `admin/app/controllers/rag_controller.ts`, `admin/app/controllers/system_controller.ts`, `admin/app/controllers/zim_controller.ts`, `admin/app/models/service.ts`, `admin/app/validators/common.ts`, `admin/commands/queue/work.ts`, `admin/start/routes.ts` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
  • Change-coupling hub: routes.ts → work.ts, KnowledgeBaseModal.tsx, downloads.ts, services.ts admin/start/routes.ts — `admin/start/routes.ts` changes together with 4 other files — `admin/commands/queue/work.ts`, `admin/inertia/components/chat/KnowledgeBaseModal.tsx`, `admin/types/downloads.ts`, `admin/types/services.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D36 · Supply-chain Provenance & Signing REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Markup wires an event to an empty handler · ×3
  • Markup wires an event to an empty handler admin/inertia/components/drug-reference/DrugDisclaimerModal.tsx:38 — `onClose` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler admin/inertia/pages/drug-reference/index.tsx:888 — `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler admin/inertia/pages/drug-reference/interactions.tsx:163 — `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment admin/config/shield.ts:19 — // TODO: Enable CSRF protection — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment admin/config/shield.ts:38 — // TODO: Enable HSTS in production — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D36 · Supply-chain Provenance & Signing REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×2
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×2
  • Duplicated block (16 lines × 2 locations) admin/app/controllers/system_controller.ts:275 — admin/app/controllers/system_controller.ts:275 · admin/app/services/auto_update_service.ts:342 — 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.
  • Duplicated block (16 lines × 2 locations) admin/app/services/download_service.ts:64 — admin/app/services/download_service.ts:64 · admin/app/services/download_service.ts:81 — 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.
R7 · Dead Code · Dead file (~28 LoC) · ×2
  • Dead file (~28 LoC) admin/config/vite.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~28 LoC) admin/inertia/components/markdoc/Heading.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/inertia/components/MarkdocRenderer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~22 LoC) · ×2
  • Dead file (~22 LoC) admin/app/utils/eval/quiet.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (admin/commands/eval/corpus.ts, admin/commands/eval/generation.ts, admin/commands/eval/matrix.ts and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
  • Dead file (~22 LoC) admin/inertia/components/layout/BackToHomeHeader.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~20 LoC) · ×2
  • Dead file (~20 LoC) admin/inertia/components/markdoc/Image.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/inertia/components/MarkdocRenderer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
  • Dead file (~20 LoC) admin/inertia/components/markdoc/List.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/inertia/components/MarkdocRenderer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
S1 · Web-Security Posture · Weak hash algorithm · ×2
  • Weak hash algorithm admin/app/services/countries_service.ts:188 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm REDACTED:837 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×1
  • Heading level jumps from h2 to h4 admin/inertia/pages/settings/benchmark.tsx:686 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×1
  • Heading level jumps from h1 to h3 admin/inertia/pages/settings/zim/remote-explorer.tsx:566 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 122 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · KnowledgeBaseModal.KnowledgeBaseModal (cyclomatic 108) · ×1
  • KnowledgeBaseModal.KnowledgeBaseModal (cyclomatic 108) admin/inertia/components/chat/KnowledgeBaseModal.tsx:191 — KnowledgeBaseModal.KnowledgeBaseModal has cyclomatic complexity 108 (threshold 15). Of this number, 69 points are the body's own statements and 39 belong to 31 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · index.DrugReferenceIndex (cyclomatic 106) · ×1
  • index.DrugReferenceIndex (cyclomatic 106) admin/inertia/pages/drug-reference/index.tsx:162 — index.DrugReferenceIndex has cyclomatic complexity 106 (threshold 15). Of this number, 54 points are the body's own statements and 52 belong to 22 function items 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 · remote-explorer.ZimRemoteExplorer (cyclomatic 88) · ×1
  • remote-explorer.ZimRemoteExplorer (cyclomatic 88) admin/inertia/pages/settings/zim/remote-explorer.tsx:57 — remote-explorer.ZimRemoteExplorer has cyclomatic complexity 88 (threshold 15). Of this number, 46 points are the body's own statements and 42 belong to 23 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · supply-depot.SupplyDepotPage (cyclomatic 84) · ×1
  • supply-depot.SupplyDepotPage (cyclomatic 84) admin/inertia/pages/supply-depot.tsx:93 — supply-depot.SupplyDepotPage has cyclomatic complexity 84 (threshold 15). Of this number, 28 points are the body's own statements and 56 belong to 26 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · benchmark.BenchmarkPage (cyclomatic 83) · ×1
  • benchmark.BenchmarkPage (cyclomatic 83) admin/inertia/pages/settings/benchmark.tsx:30 — benchmark.BenchmarkPage has cyclomatic complexity 83 (threshold 15). Of this number, 56 points are the body's own statements and 27 belong to 14 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · index.Chat (cyclomatic 78) · ×1
  • index.Chat (cyclomatic 78) admin/inertia/components/chat/index.tsx:26 — index.Chat has cyclomatic complexity 78 (threshold 15). Of this number, 18 points are the body's own statements and 60 belong to 27 function literals 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 · settings.validateSettingValue (cyclomatic 58) · ×1
  • settings.validateSettingValue (cyclomatic 58) admin/app/validators/settings.ts:23 — settings.validateSettingValue has cyclomatic complexity 58 (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 · apps.SettingsPage (cyclomatic 54) · ×1
  • apps.SettingsPage (cyclomatic 54) admin/inertia/pages/settings/apps.tsx:27 — apps.SettingsPage has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 7 of the 54 points are its own statements and the rest belongs to 14 function items inside it that branch (AppActions, installService, handleCheckUpdates, …). 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.
D1 · Cyclomatic Complexity · OllamaController.chat (cyclomatic 53) · ×1
  • OllamaController.chat (cyclomatic 53) admin/app/controllers/ollama_controller.ts:67 — OllamaController.chat has cyclomatic complexity 53 (threshold 15). Of this number, 51 points are the body's own statements and 2 belong to 2 function literals 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 · supply-depot.AppCard (cyclomatic 53) · ×1
  • supply-depot.AppCard (cyclomatic 53) admin/inertia/pages/supply-depot.tsx:853 — supply-depot.AppCard has cyclomatic complexity 53 (threshold 15). Of this number, 52 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · DockerService.updateContainer (cyclomatic 49) · ×1
  • DockerService.updateContainer (cyclomatic 49) REDACTED:1736 — DockerService.updateContainer has cyclomatic complexity 49 (threshold 15). Of this number, 47 points are the body's own statements and 2 belong to 2 function items 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 · update.SystemUpdatePage (cyclomatic 49) · ×1
  • update.SystemUpdatePage (cyclomatic 49) admin/inertia/pages/settings/update.tsx:44 — update.SystemUpdatePage has cyclomatic complexity 49 (threshold 15). Of this number, 20 points are the body's own statements and 29 belong to 10 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · MapComponent.MapComponent (cyclomatic 45) · ×1
  • MapComponent.MapComponent (cyclomatic 45) admin/inertia/components/maps/MapComponent.tsx:133 — MapComponent.MapComponent has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 13 of the 45 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 211, a function literal at line 294, getInitialScaleUnit, …). 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.
D1 · Cyclomatic Complexity · SystemService.getSystemInfo (cyclomatic 44) · ×1
  • SystemService.getSystemInfo (cyclomatic 44) admin/app/services/system_service.ts:386 — SystemService.getSystemInfo has cyclomatic complexity 44 (threshold 15). Of this number, 39 points are the body's own statements and 5 belong to 3 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 · BenchmarkService.getHardwareInfo (cyclomatic 43) · ×1
  • BenchmarkService.getHardwareInfo (cyclomatic 43) REDACTED:514 — BenchmarkService.getHardwareInfo has cyclomatic complexity 43 (threshold 15). Of this number, 29 points are the body's own statements and 14 belong to one function literal 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.
D1 · Cyclomatic Complexity · downloads.doResumableDownload (cyclomatic 42) · ×1
  • downloads.doResumableDownload (cyclomatic 42) admin/app/utils/downloads.ts:44 — downloads.doResumableDownload has cyclomatic complexity 42 (threshold 15). Of this number, 31 points are the body's own statements and 11 belong to 4 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 · ChatInterface.ChatInterface (cyclomatic 42) · ×1
  • ChatInterface.ChatInterface (cyclomatic 42) admin/inertia/components/chat/ChatInterface.tsx:32 — ChatInterface.ChatInterface has cyclomatic complexity 42 (threshold 15). Of this number, 23 points are the body's own statements and 19 belong to 5 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · SystemService.getDebugInfo (cyclomatic 41) · ×1
  • SystemService.getDebugInfo (cyclomatic 41) admin/app/services/system_service.ts:762 — SystemService.getDebugInfo has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs 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.
D1 · Cyclomatic Complexity · MarkerPanel.MarkerPanel (cyclomatic 40) · ×1
  • MarkerPanel.MarkerPanel (cyclomatic 40) admin/inertia/components/maps/MarkerPanel.tsx:77 — MarkerPanel.MarkerPanel has cyclomatic complexity 40 (threshold 15). Of this number, 16 points are the body's own statements and 24 belong to 10 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 · ActiveDownloads.ActiveDownloads (cyclomatic 38) · ×1
  • ActiveDownloads.ActiveDownloads (cyclomatic 38) admin/inertia/components/ActiveDownloads.tsx:38 — ActiveDownloads.ActiveDownloads has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 4 of the 38 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 124, 49). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · EmbedFileJob.handle (cyclomatic 37) · ×1
  • EmbedFileJob.handle (cyclomatic 37) admin/app/jobs/embed_file_job.ts:59 — EmbedFileJob.handle has cyclomatic complexity 37 (threshold 15). Of this number, 34 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · DockerService._createContainer (cyclomatic 36) · ×1
  • DockerService._createContainer (cyclomatic 36) REDACTED:627 — DockerService._createContainer has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 2 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 · TierSelectionModal.TierSelectionModal (cyclomatic 36) · ×1
  • TierSelectionModal.TierSelectionModal (cyclomatic 36) admin/inertia/components/TierSelectionModal.tsx:35 — TierSelectionModal.TierSelectionModal has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 11 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 223, handleSubmit, a function literal at line 46, …). 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.
D1 · Cyclomatic Complexity · models.ModelsPage (cyclomatic 36) · ×1
  • models.ModelsPage (cyclomatic 36) admin/inertia/pages/settings/models.tsx:28 — models.ModelsPage has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 13 of the 36 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 608, handleSaveRemoteOllama, handleClearRemoteOllama, …). 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.
D1 · Cyclomatic Complexity · audit_catalog_ports.main (cyclomatic 35) · ×1
  • audit_catalog_ports.main (cyclomatic 35) admin/scripts/audit_catalog_ports.py:101 — audit_catalog_ports.main has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunDownloadJob.handle (cyclomatic 33) · ×1
  • RunDownloadJob.handle (cyclomatic 33) admin/app/jobs/run_download_job.ts:69 — RunDownloadJob.handle has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to 3 function literals 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 · OllamaService._doDownloadModel (cyclomatic 33) · ×1
  • OllamaService._doDownloadModel (cyclomatic 33) admin/app/services/ollama_service.ts:346 — OllamaService._doDownloadModel has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 15 of the 33 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 419, a function literal at line 401, a function literal at line 484, …). 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.
D1 · Cyclomatic Complexity · EvalRetrieval.run (cyclomatic 33) · ×1
  • EvalRetrieval.run (cyclomatic 33) admin/commands/eval/retrieval.ts:75 — EvalRetrieval.run has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals 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 · CountryPickerModal.CountryPickerModal (cyclomatic 33) · ×1
  • CountryPickerModal.CountryPickerModal (cyclomatic 33) admin/inertia/components/CountryPickerModal.tsx:44 — CountryPickerModal.CountryPickerModal has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 141, startDownload, a function literal at line 275, …). 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.
D1 · Cyclomatic Complexity · StyledTable.StyledTable (cyclomatic 31) · ×1
  • StyledTable.StyledTable (cyclomatic 31) admin/inertia/components/StyledTable.tsx:39 — StyledTable.StyledTable has cyclomatic complexity 31 (threshold 15). Of this number, 17 points are the body's own statements and 14 belong to 4 function items 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 · IngestStatus.IngestStatus (cyclomatic 31) · ×1
  • IngestStatus.IngestStatus (cyclomatic 31) admin/inertia/components/drug-reference/IngestStatus.tsx:153 — IngestStatus.IngestStatus has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 belong to 3 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 · home.Home (cyclomatic 30) · ×1
  • home.Home (cyclomatic 30) admin/inertia/pages/home.tsx:115 — home.Home has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 170, a function literal at line 270, a function literal at line 167, …). 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.
D1 · Cyclomatic Complexity · WikipediaSelector.WikipediaSelector (cyclomatic 29) · ×1
  • WikipediaSelector.WikipediaSelector (cyclomatic 29) admin/inertia/components/WikipediaSelector.tsx:19 — WikipediaSelector.WikipediaSelector has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 73, 86). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · IngestDrugDataJob.streamIngestPart (cyclomatic 28) · ×1
  • IngestDrugDataJob.streamIngestPart (cyclomatic 28) admin/app/jobs/ingest_drug_data_job.ts:422 — IngestDrugDataJob.streamIngestPart has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 545, 649, 696, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · EvalGeneration.run (cyclomatic 27) · ×1
  • EvalGeneration.run (cyclomatic 27) admin/commands/eval/generation.ts:77 — EvalGeneration.run has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal 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.
D1 · Cyclomatic Complexity · index.EasySetupWizard (cyclomatic 27) · ×1
  • index.EasySetupWizard (cyclomatic 27) admin/inertia/pages/easy-setup/index.tsx:109 — index.EasySetupWizard has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 3 other methods here (index.EasySetupWizard::renderCapabilityCard, index.EasySetupWizard::renderStep3, index.EasySetupWizard::renderStep5) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · DownloadService.listDownloadJobs (cyclomatic 25) · ×1
  • DownloadService.listDownloadJobs (cyclomatic 25) admin/app/services/download_service.ts:58 — DownloadService.listDownloadJobs has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 83, 66, 100, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ActiveModelDownloads.ActiveModelDownloads (cyclomatic 25) · ×1
  • ActiveModelDownloads.ActiveModelDownloads (cyclomatic 25) admin/inertia/components/ActiveModelDownloads.tsx:21 — ActiveModelDownloads.ActiveModelDownloads has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 31, a function literal at line 120, runCancel, …). 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.
D1 · Cyclomatic Complexity · ContentAutoUpdateSection.ContentAutoUpdateSection (cyclomatic 25) · ×1
  • ContentAutoUpdateSection.ContentAutoUpdateSection (cyclomatic 25) admin/inertia/components/updates/ContentAutoUpdateSection.tsx:22 — ContentAutoUpdateSection.ContentAutoUpdateSection has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 4 function items 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 · interactions.DrugReferenceInteractions (cyclomatic 25) · ×1
  • interactions.DrugReferenceInteractions (cyclomatic 25) admin/inertia/pages/drug-reference/interactions.tsx:29 — interactions.DrugReferenceInteractions has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 7 function items 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 · system.SettingsPage (cyclomatic 25) · ×1
  • system.SettingsPage (cyclomatic 25) admin/inertia/pages/settings/system.tsx:15 — system.SettingsPage has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · index.ZimPage (cyclomatic 25) · ×1
  • index.ZimPage (cyclomatic 25) admin/inertia/pages/settings/zim/index.tsx:22 — index.ZimPage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 44, a function literal at line 115, toggleSort, …). 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.
D1 · Cyclomatic Complexity · Handler.do_GET (cyclomatic 25) · ×1
  • Handler.do_GET (cyclomatic 25) install/nomad-translate/proxy.py:227 — Handler.do_GET 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.
D1 · Cyclomatic Complexity · CollectionManifestService.reconcileFromFilesystem (cyclomatic 24) · ×1
  • CollectionManifestService.reconcileFromFilesystem (cyclomatic 24) admin/app/services/collection_manifest_service.ts:417 — CollectionManifestService.reconcileFromFilesystem has cyclomatic complexity 24 (threshold 15). 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.
D1 · Cyclomatic Complexity · ZimService.downloadRemoteSuccessCallback (cyclomatic 24) · ×1
  • ZimService.downloadRemoteSuccessCallback (cyclomatic 24) admin/app/services/zim_service.ts:437 — ZimService.downloadRemoteSuccessCallback has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function literal 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.
D1 · Cyclomatic Complexity · ContentUpdatesSection.ContentUpdatesSection (cyclomatic 24) · ×1
  • ContentUpdatesSection.ContentUpdatesSection (cyclomatic 24) admin/inertia/components/updates/ContentUpdatesSection.tsx:13 — ContentUpdatesSection.ContentUpdatesSection has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 7 function items inside it that branch (handleApplyAll, handleApply, handleCheck, …). 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.
D1 · Cyclomatic Complexity · maps.MapsManager (cyclomatic 24) · ×1
  • maps.MapsManager (cyclomatic 24) admin/inertia/pages/settings/maps.tsx:26 — maps.MapsManager has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 9 function items inside it that branch (downloadBaseAssets, deleteFile, a function literal at line 202, …). 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.
D1 · Cyclomatic Complexity · drug_labels.parseDrugLabelManifest (cyclomatic 23) · ×1
  • drug_labels.parseDrugLabelManifest (cyclomatic 23) admin/util/drug_labels.ts:240 — drug_labels.parseDrugLabelManifest has cyclomatic complexity 23 (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 · BenchmarkService._runBenchmark (cyclomatic 23) · ×1
  • BenchmarkService._runBenchmark (cyclomatic 23) REDACTED:660 — BenchmarkService._runBenchmark has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ZimService.listRemote (cyclomatic 23) · ×1
  • ZimService.listRemote (cyclomatic 23) admin/app/services/zim_service.ts:79 — ZimService.listRemote has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to one function literal 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.
D1 · Cyclomatic Complexity · golden_set.parseGoldens (cyclomatic 22) · ×1
  • golden_set.parseGoldens (cyclomatic 22) admin/app/utils/eval/golden_set.ts:47 — golden_set.parseGoldens has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 51, 78, 63). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ChatMessageBubble.ChatMessageBubble (cyclomatic 22) · ×1
  • ChatMessageBubble.ChatMessageBubble (cyclomatic 22) admin/inertia/components/chat/ChatMessageBubble.tsx:12 — ChatMessageBubble.ChatMessageBubble has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · CollectionCombobox.CollectionCombobox (cyclomatic 22) · ×1
  • CollectionCombobox.CollectionCombobox (cyclomatic 22) admin/inertia/components/chat/CollectionCombobox.tsx:30 — CollectionCombobox.CollectionCombobox has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 4 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 · DockerService.recreateCustomAppContainer (cyclomatic 21) · ×1
  • DockerService.recreateCustomAppContainer (cyclomatic 21) REDACTED:2327 — DockerService.recreateCustomAppContainer has cyclomatic complexity 21 (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 · CategoryCard.CategoryCard (cyclomatic 21) · ×1
  • CategoryCard.CategoryCard (cyclomatic 21) admin/inertia/components/CategoryCard.tsx:13 — CategoryCard.CategoryCard has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 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 · RagService.scanAndSyncStorage (cyclomatic 20) · ×1
  • RagService.scanAndSyncStorage (cyclomatic 20) admin/app/services/rag_service.ts:2399 — RagService.scanAndSyncStorage has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 · BenchmarkService._buildV2Submission (cyclomatic 20) · ×1
  • BenchmarkService._buildV2Submission (cyclomatic 20) REDACTED:412 — BenchmarkService._buildV2Submission has cyclomatic complexity 20 (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 · KiwixCatalogService.parseZimEntries (cyclomatic 20) · ×1
  • KiwixCatalogService.parseZimEntries (cyclomatic 20) admin/app/services/kiwix_catalog_service.ts:206 — KiwixCatalogService.parseZimEntries has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal 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.
D1 · Cyclomatic Complexity · StyledButton.StyledButton (cyclomatic 20) · ×1
  • StyledButton.StyledButton (cyclomatic 20) admin/inertia/components/StyledButton.tsx:16 — StyledButton.StyledButton has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (getVariantClasses, getIconSize, getSizeClasses, …). 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.
D1 · Cyclomatic Complexity · useDiskDisplayData.getAllDiskDisplayItems (cyclomatic 20) · ×1
  • useDiskDisplayData.getAllDiskDisplayItems (cyclomatic 20) admin/inertia/hooks/useDiskDisplayData.ts:16 — useDiskDisplayData.getAllDiskDisplayItems has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 48, 62, 28, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · context_budget.planPrompt (cyclomatic 19) · ×1
  • context_budget.planPrompt (cyclomatic 19) admin/app/utils/context_budget.ts:174 — context_budget.planPrompt 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 · drug_labels.parseDownloadState (cyclomatic 19) · ×1
  • drug_labels.parseDownloadState (cyclomatic 19) admin/util/drug_labels.ts:380 — drug_labels.parseDownloadState 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 · ZIMExtractionService.extractZIMContent (cyclomatic 19) · ×1
  • ZIMExtractionService.extractZIMContent (cyclomatic 19) admin/app/services/zim_extraction_service.ts:44 — ZIMExtractionService.extractZIMContent 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 · ZimService.registerLocalUpload (cyclomatic 19) · ×1
  • ZimService.registerLocalUpload (cyclomatic 19) admin/app/services/zim_service.ts:612 — ZimService.registerLocalUpload has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals 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 · ZimService.selectWikipedia (cyclomatic 19) · ×1
  • ZimService.selectWikipedia (cyclomatic 19) admin/app/services/zim_service.ts:842 — ZimService.selectWikipedia has cyclomatic complexity 19 (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 · QueueWork.run (cyclomatic 19) · ×1
  • QueueWork.run (cyclomatic 19) admin/commands/queue/work.ts:34 — QueueWork.run has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 90, 60, 157). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · kb_file_grouping.groupAndSortKbFiles (cyclomatic 19) · ×1
  • kb_file_grouping.groupAndSortKbFiles (cyclomatic 19) admin/inertia/lib/kb_file_grouping.ts:140 — kb_file_grouping.groupAndSortKbFiles has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal 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.
D1 · Cyclomatic Complexity · show.DrugReferenceShow (cyclomatic 19) · ×1
  • show.DrugReferenceShow (cyclomatic 19) admin/inertia/pages/drug-reference/show.tsx:22 — show.DrugReferenceShow has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · EmbedFileJob.dispatch (cyclomatic 18) · ×1
  • EmbedFileJob.dispatch (cyclomatic 18) admin/app/jobs/embed_file_job.ts:357 — EmbedFileJob.dispatch 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 · version.isNewerVersion (cyclomatic 18) · ×1
  • version.isNewerVersion (cyclomatic 18) admin/app/utils/version.ts:7 — version.isNewerVersion has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · RagService.embedAndStoreText (cyclomatic 18) · ×1
  • RagService.embedAndStoreText (cyclomatic 18) admin/app/services/rag_service.ts:349 — RagService.embedAndStoreText has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal 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.
D1 · Cyclomatic Complexity · AutoUpdateDryRun.run (cyclomatic 18) · ×1
  • AutoUpdateDryRun.run (cyclomatic 18) admin/commands/auto_update/dry_run.ts:55 — AutoUpdateDryRun.run 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.
D1 · Cyclomatic Complexity · HorizontalBarChart.HorizontalBarChart (cyclomatic 18) · ×1
  • HorizontalBarChart.HorizontalBarChart (cyclomatic 18) admin/inertia/components/HorizontalBarChart.tsx:19 — HorizontalBarChart.HorizontalBarChart has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (getBarColor, getGlowColor, getStatusLabel, …). 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.
D1 · Cyclomatic Complexity · Alert.Alert · ×1
  • Alert.Alert::getVariantStyles (cyclomatic 18) admin/inertia/components/Alert.tsx:60 — Alert.Alert::getVariantStyles 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 · CustomAppModal.CustomAppModal · ×1
  • CustomAppModal.CustomAppModal::handleSubmit (cyclomatic 18) admin/inertia/components/CustomAppModal.tsx:224 — CustomAppModal.CustomAppModal::handleSubmit 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.
D1 · Cyclomatic Complexity · GpuPassthroughAlert.GpuPassthroughAlert (cyclomatic 18) · ×1
  • GpuPassthroughAlert.GpuPassthroughAlert (cyclomatic 18) admin/inertia/components/GpuPassthroughAlert.tsx:20 — GpuPassthroughAlert.GpuPassthroughAlert has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 3 function items 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 · conditions.parseRemedyEntry (cyclomatic 17) · ×1
  • conditions.parseRemedyEntry (cyclomatic 17) admin/util/conditions.ts:204 — conditions.parseRemedyEntry has cyclomatic complexity 17 (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 · RagService.searchSimilarDocuments (cyclomatic 17) · ×1
  • RagService.searchSimilarDocuments (cyclomatic 17) admin/app/services/rag_service.ts:941 — RagService.searchSimilarDocuments has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. 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 · DockerService.forceReinstall (cyclomatic 17) · ×1
  • DockerService.forceReinstall (cyclomatic 17) REDACTED:357 — DockerService.forceReinstall has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals 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 · SystemService.updateSetting (cyclomatic 17) · ×1
  • SystemService.updateSetting (cyclomatic 17) admin/app/services/system_service.ts:923 — SystemService.updateSetting 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.
D1 · Cyclomatic Complexity · RagPipelineService.buildPrompt (cyclomatic 17) · ×1
  • RagPipelineService.buildPrompt (cyclomatic 17) admin/app/services/rag_pipeline_service.ts:57 — RagPipelineService.buildPrompt has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ZimService.downloadCategoryTier (cyclomatic 17) · ×1
  • ZimService.downloadCategoryTier (cyclomatic 17) admin/app/services/zim_service.ts:316 — ZimService.downloadCategoryTier has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CreatorPackCard.CreatorPackCard (cyclomatic 17) · ×1
  • CreatorPackCard.CreatorPackCard (cyclomatic 17) admin/inertia/components/CreatorPackCard.tsx:22 — CreatorPackCard.CreatorPackCard has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal 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.
D1 · Cyclomatic Complexity · IngestStatus.PhaseBlock (cyclomatic 17) · ×1
  • IngestStatus.PhaseBlock (cyclomatic 17) admin/inertia/components/drug-reference/IngestStatus.tsx:37 — IngestStatus.PhaseBlock has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MapMarkerFormPopup.MapMarkerFormPopup (cyclomatic 17) · ×1
  • MapMarkerFormPopup.MapMarkerFormPopup (cyclomatic 17) admin/inertia/components/maps/MapMarkerFormPopup.tsx:33 — MapMarkerFormPopup.MapMarkerFormPopup has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · useBenchmarkRun.useBenchmarkRun (cyclomatic 17) · ×1
  • useBenchmarkRun.useBenchmarkRun (cyclomatic 17) admin/inertia/hooks/useBenchmarkRun.ts:72 — useBenchmarkRun.useBenchmarkRun has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 130, 93, 111). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · GpuPassthroughRemediationProvider.boot (cyclomatic 17) · ×1
  • GpuPassthroughRemediationProvider.boot (cyclomatic 17) admin/providers/gpu_passthrough_remediation_provider.ts:40 — GpuPassthroughRemediationProvider.boot has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 43). 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.
D1 · Cyclomatic Complexity · SystemController.updateCustomApp (cyclomatic 16) · ×1
  • SystemController.updateCustomApp (cyclomatic 16) admin/app/controllers/system_controller.ts:723 — SystemController.updateCustomApp 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 · RagService.processEPUBFile (cyclomatic 16) · ×1
  • RagService.processEPUBFile (cyclomatic 16) admin/app/services/rag_service.ts:743 — RagService.processEPUBFile has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 2 function literals 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 · ZimService.browseLibraryUrl (cyclomatic 16) · ×1
  • ZimService.browseLibraryUrl (cyclomatic 16) admin/app/services/zim_service.ts:1062 — ZimService.browseLibraryUrl has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1084). 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.
D1 · Cyclomatic Complexity · AppUrlModal.AppUrlModal (cyclomatic 16) · ×1
  • AppUrlModal.AppUrlModal (cyclomatic 16) admin/inertia/components/AppUrlModal.tsx:24 — AppUrlModal.AppUrlModal has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function items 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.
D12 · Dependency Hygiene · Deprecated · ×1
  • Deprecated: eslint REDACTED:62 — eslint 9.39.2, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: REDACTED REDACTED:592 — REDACTED changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ServiceSeeder.run at line 592), 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(translate): download every released language, and list them in the docs”; “fix(translate): forward upstream redirects instead of following them”; “fix(ai): bump the Ollama pin to 0.33.3 to fix the disconnect hang”; “fix(seeder): derive ui_location from the merged config, not the live row”. 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-07-07..2026-10-05, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-07 22:30:13 +00:00' --until='2026-10-05 22:30:13 +00:00' --full-history --no-merges -- REDACTED`: 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.
D2 · Cognitive Complexity · index.Chat (cognitive 117) · ×1
  • index.Chat (cognitive 117) admin/inertia/components/chat/index.tsx:26 — index.Chat has cognitive complexity 117 (threshold 15). Drivers by points: if/else 32 (50 pts), ternaries 13 (31 pts), boolean chains 28, error handling 4 (7 pts), loops 1 (nesting depth added 39). Of this number, 16 points are the body's own statements and 101 belong to 27 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 · index.DrugReferenceIndex (cognitive 99) · ×1
  • index.DrugReferenceIndex (cognitive 99) admin/inertia/pages/drug-reference/index.tsx:162 — index.DrugReferenceIndex has cognitive complexity 99 (threshold 15). Drivers by points: boolean chains 36, if/else 30 (32 pts), ternaries 14 (23 pts), error handling 6, loops 2 (nesting depth added 11). Of this number, 49 points are the body's own statements and 50 belong to 22 function items 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 · KnowledgeBaseModal.KnowledgeBaseModal (cognitive 95) · ×1
  • KnowledgeBaseModal.KnowledgeBaseModal (cognitive 95) admin/inertia/components/chat/KnowledgeBaseModal.tsx:191 — KnowledgeBaseModal.KnowledgeBaseModal has cognitive complexity 95 (threshold 15). Drivers by points: boolean chains 61, ternaries 12 (16 pts), if/else 14, error handling 1 (2 pts), loops 2 (nesting depth added 5). Of this number, 54 points are the body's own statements and 41 belong to 31 function items inside it that branch. 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 · remote-explorer.ZimRemoteExplorer (cognitive 82) · ×1
  • remote-explorer.ZimRemoteExplorer (cognitive 82) admin/inertia/pages/settings/zim/remote-explorer.tsx:57 — remote-explorer.ZimRemoteExplorer has cognitive complexity 82 (threshold 15). Drivers by points: boolean chains 42, if/else 18 (22 pts), ternaries 8 (10 pts), error handling 7, loops 1 (nesting depth added 6). Of this number, 36 points are the body's own statements and 46 belong to 23 function items inside it that branch. 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 · OllamaController.chat (cognitive 79) · ×1
  • OllamaController.chat (cognitive 79) admin/app/controllers/ollama_controller.ts:67 — OllamaController.chat has cognitive complexity 79 (threshold 15). Drivers by points: if/else 24 (43 pts), ternaries 7 (15 pts), boolean chains 11, error handling 6 (8 pts), loops 1 (2 pts) (nesting depth added 30). Of this number, 72 points are the body's own statements and 7 belong to 2 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 · SystemService.getSystemInfo (cognitive 79) · ×1
  • SystemService.getSystemInfo (cognitive 79) admin/app/services/system_service.ts:386 — SystemService.getSystemInfo has cognitive complexity 79 (threshold 15). Drivers by points: if/else 23 (40 pts), ternaries 5 (22 pts), boolean chains 10, error handling 4 (5 pts), loops 1 (2 pts) (nesting depth added 36). Of this number, 75 points are the body's own statements and 4 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · supply-depot.SupplyDepotPage (cognitive 74) · ×1
  • supply-depot.SupplyDepotPage (cognitive 74) admin/inertia/pages/supply-depot.tsx:93 — supply-depot.SupplyDepotPage has cognitive complexity 74 (threshold 15). Drivers by points: boolean chains 43, if/else 26 (27 pts), ternaries 3, error handling 1 (nesting depth added 1). Of this number, 24 points are the body's own statements and 50 belong to 26 function items inside it that branch. 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 · SystemService.getDebugInfo (cognitive 70) · ×1
  • SystemService.getDebugInfo (cognitive 70) admin/app/services/system_service.ts:762 — SystemService.getDebugInfo has cognitive complexity 70 (threshold 15). Drivers by points: if/else 21 (35 pts), ternaries 9 (17 pts), loops 4 (11 pts), boolean chains 7 (nesting depth added 29). Of this number, 69 points are the body's own statements and 1 belongs 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 · RunDownloadJob.handle (cognitive 67) · ×1
  • RunDownloadJob.handle (cognitive 67) admin/app/jobs/run_download_job.ts:69 — RunDownloadJob.handle has cognitive complexity 67 (threshold 15). Drivers by points: if/else 18 (30 pts), error handling 8 (24 pts), boolean chains 7, ternaries 2 (6 pts) (nesting depth added 32). Of this number, 63 points are the body's own statements and 4 belong to 3 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 · benchmark.BenchmarkPage (cognitive 67) · ×1
  • benchmark.BenchmarkPage (cognitive 67) admin/inertia/pages/settings/benchmark.tsx:30 — benchmark.BenchmarkPage has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 42, if/else 15, ternaries 5 (10 pts) (nesting depth added 5). Of this number, 39 points are the body's own statements and 28 belong to 14 function items inside it that branch. 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 · Alert.Alert · ×1
  • Alert.Alert::getVariantStyles (cognitive 61) admin/inertia/components/Alert.tsx:60 — Alert.Alert::getVariantStyles has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 15 (60 pts), match/switch 1 (nesting depth added 45). 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 · DockerService.updateContainer (cognitive 60) · ×1
  • DockerService.updateContainer (cognitive 60) REDACTED:1736 — DockerService.updateContainer has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 16, error handling 8 (13 pts), ternaries 5 (nesting depth added 9). Of this number, 58 points are the body's own statements and 2 belong to 2 function items 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, 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.
D2 · Cognitive Complexity · BenchmarkService.getHardwareInfo (cognitive 55) · ×1
  • BenchmarkService.getHardwareInfo (cognitive 55) REDACTED:514 — BenchmarkService.getHardwareInfo has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 15, error handling 3 (5 pts), ternaries 1 (4 pts) (nesting depth added 17). Of this number, 42 points are the body's own statements and 13 belong to one function literal 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 · kb_file_grouping.groupAndSortKbFiles (cognitive 55) · ×1
  • kb_file_grouping.groupAndSortKbFiles (cognitive 55) admin/inertia/lib/kb_file_grouping.ts:140 — kb_file_grouping.groupAndSortKbFiles has cognitive complexity 55 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 5 (20 pts), loops 6 (14 pts) (nesting depth added 36). Of this number, 49 points are the body's own statements and 6 belong to one function literal 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 · DockerService._createContainer (cognitive 54) · ×1
  • DockerService._createContainer (cognitive 54) REDACTED:627 — DockerService._createContainer has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (41 pts), boolean chains 8, error handling 2, loops 1 (2 pts), ternaries 1 (nesting depth added 15). Of this number, 48 points are the body's own statements and 6 belong to 2 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 · settings.validateSettingValue (cognitive 53) · ×1
  • settings.validateSettingValue (cognitive 53) admin/app/validators/settings.ts:23 — settings.validateSettingValue has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 14, ternaries 2 (4 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 19). 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 · ActiveDownloads.ActiveDownloads (cognitive 52) · ×1
  • ActiveDownloads.ActiveDownloads (cognitive 52) admin/inertia/components/ActiveDownloads.tsx:38 — ActiveDownloads.ActiveDownloads has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 10 (27 pts), boolean chains 17, if/else 5 (8 pts) (nesting depth added 20). Most of this is not in the body itself: 3 of the 52 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 124, 49). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · EmbedFileJob.handle (cognitive 51) · ×1
  • EmbedFileJob.handle (cognitive 51) admin/app/jobs/embed_file_job.ts:59 — EmbedFileJob.handle has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 11 (15 pts), boolean chains 13, error handling 3 (5 pts) (nesting depth added 15). Of this number, 47 points are the body's own statements and 4 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 · MarkerPanel.MarkerPanel (cognitive 51) · ×1
  • MarkerPanel.MarkerPanel (cognitive 51) admin/inertia/components/maps/MarkerPanel.tsx:77 — MarkerPanel.MarkerPanel has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 20 (36 pts), if/else 8, boolean chains 7 (nesting depth added 16). Of this number, 27 points are the body's own statements and 24 belong to 10 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 · audit_catalog_ports.main (cognitive 51) · ×1
  • audit_catalog_ports.main (cognitive 51) admin/scripts/audit_catalog_ports.py:101 — audit_catalog_ports.main has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 7 (13 pts), boolean chains 10, ternaries 2 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OllamaService._doDownloadModel (cognitive 50) · ×1
  • OllamaService._doDownloadModel (cognitive 50) admin/app/services/ollama_service.ts:346 — OllamaService._doDownloadModel has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 6 (14 pts), boolean chains 6, loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 20). Of this number, 18 points are the body's own statements and 32 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 · supply-depot.AppCard (cognitive 47) · ×1
  • supply-depot.AppCard (cognitive 47) admin/inertia/pages/supply-depot.tsx:853 — supply-depot.AppCard has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 18 (24 pts), boolean chains 23 (nesting depth added 6). Of this number, 46 points are the body's own statements and 1 belongs 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 · EvalRetrieval.run (cognitive 44) · ×1
  • EvalRetrieval.run (cognitive 44) admin/commands/eval/retrieval.ts:75 — EvalRetrieval.run has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 11 (13 pts), boolean chains 7, loops 3 (6 pts), error handling 1 (nesting depth added 12). Of this number, 42 points are the body's own statements and 2 belong to 2 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 · update.SystemUpdatePage (cognitive 44) · ×1
  • update.SystemUpdatePage (cognitive 44) admin/inertia/pages/settings/update.tsx:44 — update.SystemUpdatePage has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 20, if/else 18 (19 pts), error handling 4 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 12 of the 44 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 72, handleStartUpdate, a function literal at line 153, …). 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 · downloads.doResumableDownload (cognitive 43) · ×1
  • downloads.doResumableDownload (cognitive 43) admin/app/utils/downloads.ts:44 — downloads.doResumableDownload has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 15, error handling 2, ternaries 1 (nesting depth added 5). Of this number, 31 points are the body's own statements and 12 belong to 4 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, 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.
D2 · Cognitive Complexity · ZimService.downloadRemoteSuccessCallback (cognitive 42) · ×1
  • ZimService.downloadRemoteSuccessCallback (cognitive 42) admin/app/services/zim_service.ts:437 — ZimService.downloadRemoteSuccessCallback has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 4 (9 pts), error handling 4 (8 pts), boolean chains 3, loops 2 (nesting depth added 17). Of this number, 36 points are the body's own statements and 6 belong to one function literal 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 · CountryPickerModal.CountryPickerModal (cognitive 41) · ×1
  • CountryPickerModal.CountryPickerModal (cognitive 41) admin/inertia/components/CountryPickerModal.tsx:44 — CountryPickerModal.CountryPickerModal has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 11, ternaries 5 (10 pts), error handling 2, loops 2 (nesting depth added 8). Most of this is not in the body itself: 10 of the 41 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 141, a function literal at line 70, startDownload, …). 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 · ChatInterface.ChatInterface (cognitive 41) · ×1
  • ChatInterface.ChatInterface (cognitive 41) admin/inertia/components/chat/ChatInterface.tsx:32 — ChatInterface.ChatInterface has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 18, if/else 10 (14 pts), ternaries 6 (8 pts), loops 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 25 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 · apps.SettingsPage (cognitive 40) · ×1
  • apps.SettingsPage (cognitive 40) admin/inertia/pages/settings/apps.tsx:27 — apps.SettingsPage has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 21, if/else 14, error handling 5. Most of this is not in the body itself: 6 of the 40 points are its own statements and the rest belongs to 14 function items inside it that branch (AppActions, installService, handleCheckUpdates, …). 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 · CollectionManifestService.reconcileFromFilesystem (cognitive 39) · ×1
  • CollectionManifestService.reconcileFromFilesystem (cognitive 39) admin/app/services/collection_manifest_service.ts:417 — CollectionManifestService.reconcileFromFilesystem has cognitive complexity 39 (threshold 15). Drivers by points: loops 9 (18 pts), if/else 7 (12 pts), ternaries 2 (4 pts), boolean chains 3, error handling 2 (nesting depth added 16). 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.
D2 · Cognitive Complexity · ZimService.listRemote (cognitive 36) · ×1
  • ZimService.listRemote (cognitive 36) admin/app/services/zim_service.ts:79 — ZimService.listRemote has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 4 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 18). Of this number, 35 points are the body's own statements and 1 belongs to one function literal 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 · TierSelectionModal.TierSelectionModal (cognitive 36) · ×1
  • TierSelectionModal.TierSelectionModal (cognitive 36) admin/inertia/components/TierSelectionModal.tsx:35 — TierSelectionModal.TierSelectionModal has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 13, if/else 12 (13 pts), ternaries 8 (10 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 223, handleSubmit, a function literal at line 46, …). 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 · models.ModelsPage (cognitive 35) · ×1
  • models.ModelsPage (cognitive 35) admin/inertia/pages/settings/models.tsx:28 — models.ModelsPage has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 17, if/else 7, ternaries 7, error handling 4. Most of this is not in the body itself: 12 of the 35 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 608, handleSaveRemoteOllama, handleClearRemoteOllama, …). 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 · MapComponent.MapComponent (cognitive 34) · ×1
  • MapComponent.MapComponent (cognitive 34) admin/inertia/components/maps/MapComponent.tsx:133 — MapComponent.MapComponent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 11, ternaries 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 34 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 211, a function literal at line 260, a function literal at line 294, …). 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 · ZimService.downloadCategoryTier (cognitive 33) · ×1
  • ZimService.downloadCategoryTier (cognitive 33) admin/app/services/zim_service.ts:316 — ZimService.downloadCategoryTier has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 2 (7 pts), error handling 1 (5 pts), boolean chains 3, loops 1 (nesting depth added 17). 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.
D2 · Cognitive Complexity · ActiveModelDownloads.ActiveModelDownloads (cognitive 33) · ×1
  • ActiveModelDownloads.ActiveModelDownloads (cognitive 33) admin/inertia/components/ActiveModelDownloads.tsx:21 — ActiveModelDownloads.ActiveModelDownloads has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 7 (10 pts), boolean chains 9 (nesting depth added 11). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 31, a function literal at line 120, runCancel, …). 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 · Handler.do_GET (cognitive 33) · ×1
  • Handler.do_GET (cognitive 33) install/nomad-translate/proxy.py:227 — Handler.do_GET has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 6, error handling 4 (6 pts), ternaries 2 (3 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ZimService.registerLocalUpload (cognitive 32) · ×1
  • ZimService.registerLocalUpload (cognitive 32) admin/app/services/zim_service.ts:612 — ZimService.registerLocalUpload has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 5 (10 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 13). Of this number, 30 points are the body's own statements and 2 belong to 2 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 · EvalGeneration.run (cognitive 32) · ×1
  • EvalGeneration.run (cognitive 32) admin/commands/eval/generation.ts:77 — EvalGeneration.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 5 (6 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 7). Of this number, 30 points are the body's own statements and 2 belong to one function literal 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 · IngestStatus.IngestStatus (cognitive 31) · ×1
  • IngestStatus.IngestStatus (cognitive 31) admin/inertia/components/drug-reference/IngestStatus.tsx:153 — IngestStatus.IngestStatus has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 11, if/else 4 (nesting depth added 4). Of this number, 26 points are the body's own statements and 5 belong to 3 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 · QueueWork.run (cognitive 30) · ×1
  • QueueWork.run (cognitive 30) admin/commands/queue/work.ts:34 — QueueWork.run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 4 (8 pts), error handling 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 13). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 90, 60, 157). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · home.Home (cognitive 29) · ×1
  • home.Home (cognitive 29) admin/inertia/pages/home.tsx:115 — home.Home has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 18, ternaries 7 (8 pts), if/else 3 (nesting depth added 1). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 170, a function literal at line 270, a function literal at line 167, …). 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 · index.ZimPage (cognitive 29) · ×1
  • index.ZimPage (cognitive 29) admin/inertia/pages/settings/zim/index.tsx:22 — index.ZimPage has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (16 pts), boolean chains 7, if/else 6 (nesting depth added 5). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 115, a function literal at line 44, toggleSort, …). 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 · report.renderComparisonMarkdown (cognitive 28) · ×1
  • report.renderComparisonMarkdown (cognitive 28) admin/app/utils/eval/report.ts:223 — report.renderComparisonMarkdown has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (26 pts), if/else 1, loops 1 (nesting depth added 18). 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.
D2 · Cognitive Complexity · context_budget.planPrompt (cognitive 27) · ×1
  • context_budget.planPrompt (cognitive 27) admin/app/utils/context_budget.ts:174 — context_budget.planPrompt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (5 pts), boolean chains 4, ternaries 2 (3 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.
D2 · Cognitive Complexity · drug_labels.parseDrugLabelManifest (cognitive 27) · ×1
  • drug_labels.parseDrugLabelManifest (cognitive 27) admin/util/drug_labels.ts:240 — drug_labels.parseDrugLabelManifest has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, ternaries 3 (6 pts), loops 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.
D2 · Cognitive Complexity · IngestDrugDataJob.streamIngestPart (cognitive 27) · ×1
  • IngestDrugDataJob.streamIngestPart (cognitive 27) admin/app/jobs/ingest_drug_data_job.ts:422 — IngestDrugDataJob.streamIngestPart has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13, ternaries 5 (8 pts), boolean chains 4, error handling 2 (nesting depth added 3). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 545, 649, 696, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · OllamaService.sortModels (cognitive 27) · ×1
  • OllamaService.sortModels (cognitive 27) admin/app/services/ollama_service.ts:1478 — OllamaService.sortModels has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 7 (23 pts), if/else 3, boolean chains 1 (nesting depth added 16). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1500, 1481, 1497). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ZIMExtractionService.extractZIMContent (cognitive 27) · ×1
  • ZIMExtractionService.extractZIMContent (cognitive 27) admin/app/services/zim_extraction_service.ts:44 — ZIMExtractionService.extractZIMContent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, error handling 2, 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.
D2 · Cognitive Complexity · BenchmarkService._runBenchmark (cognitive 26) · ×1
  • BenchmarkService._runBenchmark (cognitive 26) REDACTED:660 — BenchmarkService._runBenchmark has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (10 pts), error handling 3 (5 pts), ternaries 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.
D2 · Cognitive Complexity · KiwixCatalogService.parseZimEntries (cognitive 26) · ×1
  • KiwixCatalogService.parseZimEntries (cognitive 26) admin/app/services/kiwix_catalog_service.ts:206 — KiwixCatalogService.parseZimEntries has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 4 (7 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 1 belongs to one function literal 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 · interactions.DrugReferenceInteractions (cognitive 26) · ×1
  • interactions.DrugReferenceInteractions (cognitive 26) admin/inertia/pages/drug-reference/interactions.tsx:29 — interactions.DrugReferenceInteractions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9, ternaries 5 (9 pts), boolean chains 7, error handling 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 13 belong to 7 function items 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, 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.
D2 · Cognitive Complexity · DockerService.recreateCustomAppContainer (cognitive 25) · ×1
  • DockerService.recreateCustomAppContainer (cognitive 25) REDACTED:2327 — DockerService.recreateCustomAppContainer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, error handling 2 (3 pts), ternaries 2 (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.
D2 · Cognitive Complexity · WikipediaSelector.WikipediaSelector (cognitive 25) · ×1
  • WikipediaSelector.WikipediaSelector (cognitive 25) admin/inertia/components/WikipediaSelector.tsx:19 — WikipediaSelector.WikipediaSelector has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, ternaries 7 (9 pts) (nesting depth added 2). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 73, 86). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · RagService.embedAndStoreText (cognitive 24) · ×1
  • RagService.embedAndStoreText (cognitive 24) admin/app/services/rag_service.ts:349 — RagService.embedAndStoreText has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 2 (4 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 7). Of this number, 21 points are the body's own statements and 3 belong to one function literal 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 · RagPipelineService.buildPrompt (cognitive 24) · ×1
  • RagPipelineService.buildPrompt (cognitive 24) admin/app/services/rag_pipeline_service.ts:57 — RagPipelineService.buildPrompt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 3 (6 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.
D2 · Cognitive Complexity · ZimService.selectWikipedia (cognitive 24) · ×1
  • ZimService.selectWikipedia (cognitive 24) admin/app/services/zim_service.ts:842 — ZimService.selectWikipedia has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, error handling 1 (3 pts), ternaries 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · drug_labels.parseDownloadState (cognitive 23) · ×1
  • drug_labels.parseDownloadState (cognitive 23) admin/util/drug_labels.ts:380 — drug_labels.parseDownloadState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (8 pts), boolean chains 4, error handling 1, loops 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.
D2 · Cognitive Complexity · RagService.computeFileWarnings (cognitive 23) · ×1
  • RagService.computeFileWarnings (cognitive 23) admin/app/services/rag_service.ts:1842 — RagService.computeFileWarnings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (5 pts), error handling 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockerService.forceReinstall (cognitive 23) · ×1
  • DockerService.forceReinstall (cognitive 23) REDACTED:357 — DockerService.forceReinstall has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 5 (8 pts), boolean chains 2, loops 1 (nesting depth added 7). Of this number, 20 points are the body's own statements and 3 belong to 2 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 · CountriesService.load (cognitive 23) · ×1
  • CountriesService.load (cognitive 23) admin/app/services/countries_service.ts:96 — CountriesService.load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 4 (8 pts), boolean chains 1, loops 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 2 belong to one function literal 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 · EvalRetrievalService.run (cognitive 23) · ×1
  • EvalRetrievalService.run (cognitive 23) admin/app/services/eval_retrieval_service.ts:107 — EvalRetrievalService.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 6 (9 pts), boolean chains 2, loops 1 (nesting depth added 9). Of this number, 21 points are the body's own statements and 2 belong to one function literal 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 · ZimService.onWikipediaDownloadComplete (cognitive 23) · ×1
  • ZimService.onWikipediaDownloadComplete (cognitive 23) admin/app/services/zim_service.ts:962 — ZimService.onWikipediaDownloadComplete has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, error handling 2 (4 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · AutoUpdateDryRun.run (cognitive 23) · ×1
  • AutoUpdateDryRun.run (cognitive 23) admin/commands/auto_update/dry_run.ts:55 — AutoUpdateDryRun.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (18 pts), loops 1 (3 pts), ternaries 2 (nesting depth added 4). 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.
D2 · Cognitive Complexity · drug_interactions.parseLabelSection (cognitive 23) · ×1
  • drug_interactions.parseLabelSection (cognitive 23) REDACTED:50 — drug_interactions.parseLabelSection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (22 pts), 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.
D2 · Cognitive Complexity · ContentUpdatesSection.ContentUpdatesSection (cognitive 23) · ×1
  • ContentUpdatesSection.ContentUpdatesSection (cognitive 23) admin/inertia/components/updates/ContentUpdatesSection.tsx:13 — ContentUpdatesSection.ContentUpdatesSection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, ternaries 2 (4 pts), error handling 3 (nesting depth added 5). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (handleApplyAll, handleApply, handleCheck, …). 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 · API.streamChatMessage (cognitive 23) · ×1
  • API.streamChatMessage (cognitive 23) admin/inertia/lib/api.ts:361 — API.streamChatMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), error handling 1 (3 pts), loops 2 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · SystemService._syncContainersWithDatabase (cognitive 22) · ×1
  • SystemService._syncContainersWithDatabase (cognitive 22) admin/app/services/system_service.ts:975 — SystemService._syncContainersWithDatabase has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (20 pts), error handling 1, loops 1 (nesting depth added 13). 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.
D2 · Cognitive Complexity · DownloadService.listDownloadJobs (cognitive 22) · ×1
  • DownloadService.listDownloadJobs (cognitive 22) admin/app/services/download_service.ts:58 — DownloadService.listDownloadJobs has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, ternaries 4, if/else 2. Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 83, 66, 100, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · golden_set.parseGoldens (cognitive 22) · ×1
  • golden_set.parseGoldens (cognitive 22) admin/app/utils/eval/golden_set.ts:47 — golden_set.parseGoldens has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 8, error handling 2 (3 pts), loops 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 51, 78, 63). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CategoryCard.CategoryCard (cognitive 22) · ×1
  • CategoryCard.CategoryCard (cognitive 22) admin/inertia/components/CategoryCard.tsx:13 — CategoryCard.CategoryCard has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 6, if/else 2 (3 pts) (nesting depth added 5). Of this number, 17 points are the body's own statements and 5 belong to 2 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 · system.SettingsPage (cognitive 22) · ×1
  • system.SettingsPage (cognitive 22) admin/inertia/pages/settings/system.tsx:15 — system.SettingsPage has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, ternaries 7 (8 pts) (nesting depth added 1). 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 · EmbedFileJob.dispatch (cognitive 21) · ×1
  • EmbedFileJob.dispatch (cognitive 21) admin/app/jobs/embed_file_job.ts:357 — EmbedFileJob.dispatch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, error handling 2 (4 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDiskDisplayData.getAllDiskDisplayItems (cognitive 21) · ×1
  • useDiskDisplayData.getAllDiskDisplayItems (cognitive 21) admin/inertia/hooks/useDiskDisplayData.ts:16 — useDiskDisplayData.getAllDiskDisplayItems has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (6 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 48, 62, 72, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · EvalCompare.run (cognitive 20) · ×1
  • EvalCompare.run (cognitive 20) admin/commands/eval/compare.ts:46 — EvalCompare.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3 (4 pts), loops 1 (2 pts), error handling 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · CustomAppModal.CustomAppModal · ×1
  • CustomAppModal.CustomAppModal::handleSubmit (cognitive 20) admin/inertia/components/CustomAppModal.tsx:224 — CustomAppModal.CustomAppModal::handleSubmit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 6, error handling 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.
D2 · Cognitive Complexity · CollectionCombobox.CollectionCombobox (cognitive 20) · ×1
  • CollectionCombobox.CollectionCombobox (cognitive 20) admin/inertia/components/chat/CollectionCombobox.tsx:30 — CollectionCombobox.CollectionCombobox has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 3 (nesting depth added 3). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 138, 78, 54, …). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.EasySetupWizard · ×1
  • index.EasySetupWizard::renderCapabilityCard (cognitive 20) admin/inertia/pages/easy-setup/index.tsx:636 — index.EasySetupWizard::renderCapabilityCard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 4, if/else 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. This shape REPEATS in the file: one other method here (index.EasySetupWizard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · maps.MapsManager (cognitive 20) · ×1
  • maps.MapsManager (cognitive 20) admin/inertia/pages/settings/maps.tsx:26 — maps.MapsManager has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 4, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (downloadBaseAssets, a function literal at line 202, deleteFile, …). 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 · GpuPassthroughRemediationProvider.boot (cognitive 20) · ×1
  • GpuPassthroughRemediationProvider.boot (cognitive 20) admin/providers/gpu_passthrough_remediation_provider.ts:40 — GpuPassthroughRemediationProvider.boot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 43). 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.
D2 · Cognitive Complexity · version.isNewerVersion (cognitive 19) · ×1
  • version.isNewerVersion (cognitive 19) admin/app/utils/version.ts:7 — version.isNewerVersion has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (8 pts), loops 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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 · RagService.scanAndSyncStorage (cognitive 19) · ×1
  • RagService.scanAndSyncStorage (cognitive 19) admin/app/services/rag_service.ts:2399 — RagService.scanAndSyncStorage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4, error handling 2 (3 pts), loops 3, match/switch 1 (2 pts) (nesting depth added 5). Of this number, 17 points are the body's own statements and 2 belong to one function literal 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 · custom_app_guard.evaluateBindMounts (cognitive 19) · ×1
  • custom_app_guard.evaluateBindMounts (cognitive 19) admin/app/services/custom_app_guard.ts:46 — custom_app_guard.evaluateBindMounts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DrugReferenceService.uninstall (cognitive 19) · ×1
  • DrugReferenceService.uninstall (cognitive 19) admin/app/services/drug_reference_service.ts:648 — DrugReferenceService.uninstall has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), error handling 5 (6 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapService.downloadRemoteSuccessCallback (cognitive 19) · ×1
  • MapService.downloadRemoteSuccessCallback (cognitive 19) REDACTED:194 — MapService.downloadRemoteSuccessCallback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (5 pts), ternaries 2 (4 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · ZimService.listCatalogLanguages (cognitive 19) · ×1
  • ZimService.listCatalogLanguages (cognitive 19) admin/app/services/zim_service.ts:218 — ZimService.listCatalogLanguages has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 3 (6 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HorizontalBarChart.HorizontalBarChart (cognitive 19) · ×1
  • HorizontalBarChart.HorizontalBarChart (cognitive 19) admin/inertia/components/HorizontalBarChart.tsx:19 — HorizontalBarChart.HorizontalBarChart has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function items inside it that branch (getBarColor, getStatusLabel, getStatusColor, …). 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 · GpuPassthroughAlert.GpuPassthroughAlert (cognitive 19) · ×1
  • GpuPassthroughAlert.GpuPassthroughAlert (cognitive 19) admin/inertia/components/GpuPassthroughAlert.tsx:20 — GpuPassthroughAlert.GpuPassthroughAlert has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 4, error handling 4, if/else 2 (nesting depth added 2). Of this number, 10 points are the body's own statements and 9 belong to 3 function items 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 · IngestStatus.PhaseBlock (cognitive 19) · ×1
  • IngestStatus.PhaseBlock (cognitive 19) admin/inertia/components/drug-reference/IngestStatus.tsx:37 — IngestStatus.PhaseBlock has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 6 (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.
D2 · Cognitive Complexity · index.EasySetupWizard (cognitive 19) · ×1
  • index.EasySetupWizard (cognitive 19) admin/inertia/pages/easy-setup/index.tsx:109 — index.EasySetupWizard has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 72, ternaries 37 (61 pts), if/else 35 (47 pts), error handling 3 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.EasySetupWizard::renderCapabilityCard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · DownloadModelJob.handle (cognitive 18) · ×1
  • DownloadModelJob.handle (cognitive 18) admin/app/jobs/download_model_job.ts:43 — DownloadModelJob.handle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), error handling 2, boolean chains 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 6 belong to 4 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 · BenchmarkService._buildV2Submission (cognitive 18) · ×1
  • BenchmarkService._buildV2Submission (cognitive 18) REDACTED:412 — BenchmarkService._buildV2Submission has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · DrugReferenceService.search (cognitive 18) · ×1
  • DrugReferenceService.search (cognitive 18) admin/app/services/drug_reference_service.ts:63 — DrugReferenceService.search has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (7 pts), error handling 2 (5 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapService.generateSourcesArray (cognitive 18) · ×1
  • MapService.generateSourcesArray (cognitive 18) REDACTED:538 — MapService.generateSourcesArray has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · downloads.doResumableDownloadWithRetry (cognitive 17) · ×1
  • downloads.doResumableDownloadWithRetry (cognitive 17) admin/app/utils/downloads.ts:294 — downloads.doResumableDownloadWithRetry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RunExtractPmtilesJob.onComplete (cognitive 17) · ×1
  • RunExtractPmtilesJob.onComplete (cognitive 17) admin/app/jobs/run_extract_pmtiles_job.ts:184 — RunExtractPmtilesJob.onComplete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), boolean chains 2, loops 1, ternaries 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.
D2 · Cognitive Complexity · RagService.processEPUBFile (cognitive 17) · ×1
  • RagService.processEPUBFile (cognitive 17) admin/app/services/rag_service.ts:743 — RagService.processEPUBFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 6 belong to 2 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 · RagService.searchSimilarDocuments (cognitive 17) · ×1
  • RagService.searchSimilarDocuments (cognitive 17) admin/app/services/rag_service.ts:941 — RagService.searchSimilarDocuments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 1). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. 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 · SystemService.getNextSuggestedCustomPort (cognitive 17) · ×1
  • SystemService.getNextSuggestedCustomPort (cognitive 17) admin/app/services/system_service.ts:1122 — SystemService.getNextSuggestedCustomPort has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 2 (6 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatService.getChatSuggestions (cognitive 17) · ×1
  • ChatService.getChatSuggestions (cognitive 17) admin/app/services/chat_service.ts:66 — ChatService.getChatSuggestions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (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.
D2 · Cognitive Complexity · ContentAutoUpdateService.attempt (cognitive 17) · ×1
  • ContentAutoUpdateService.attempt (cognitive 17) admin/app/services/content_auto_update_service.ts:254 — ContentAutoUpdateService.attempt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 2, ternaries 1 (2 pts), boolean chains 1, error handling 1 (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.
D2 · Cognitive Complexity · useBenchmarkRun.useBenchmarkRun (cognitive 17) · ×1
  • useBenchmarkRun.useBenchmarkRun (cognitive 17) admin/inertia/hooks/useBenchmarkRun.ts:72 — useBenchmarkRun.useBenchmarkRun has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 10, if/else 4 (5 pts), boolean chains 2 (nesting depth added 1). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 130, 93, 111). The decisions are inside those literals, 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 literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · show.DrugReferenceShow (cognitive 17) · ×1
  • show.DrugReferenceShow (cognitive 17) admin/inertia/pages/drug-reference/show.tsx:22 — show.DrugReferenceShow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 17. 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 · OllamaService.getAvailableModels (cognitive 16) · ×1
  • OllamaService.getAvailableModels (cognitive 16) admin/app/services/ollama_service.ts:1307 — OllamaService.getAvailableModels has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 4 (6 pts), if/else 3, error handling 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 · DockerService.getServiceURL (cognitive 16) · ×1
  • DockerService.getServiceURL (cognitive 16) REDACTED:230 — DockerService.getServiceURL has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 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.
D2 · Cognitive Complexity · SystemService.updateSetting (cognitive 16) · ×1
  • SystemService.updateSetting (cognitive 16) admin/app/services/system_service.ts:923 — SystemService.updateSetting has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. 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 · service_catalog_merge.mergeContainerConfigPreservingHostPorts (cognitive 16) · ×1
  • service_catalog_merge.mergeContainerConfigPreservingHostPorts (cognitive 16) admin/app/utils/service_catalog_merge.ts:74 — service_catalog_merge.mergeContainerConfigPreservingHostPorts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (5 pts), boolean chains 2, loops 1 (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.
D2 · Cognitive Complexity · EvalMatrix.run (cognitive 16) · ×1
  • EvalMatrix.run (cognitive 16) admin/commands/eval/matrix.ts:54 — EvalMatrix.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 2 (3 pts), loops 2 (3 pts), ternaries 2 (3 pts) (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.
D2 · Cognitive Complexity · CreatorPackCard.CreatorPackCard (cognitive 16) · ×1
  • CreatorPackCard.CreatorPackCard (cognitive 16) admin/inertia/components/CreatorPackCard.tsx:22 — CreatorPackCard.CreatorPackCard has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 6, if/else 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 1 belongs to one function literal 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 · DrugResultRow.DrugResultRow (cognitive 16) · ×1
  • DrugResultRow.DrugResultRow (cognitive 16) admin/inertia/components/drug-reference/DrugResultRow.tsx:26 — DrugResultRow.DrugResultRow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 2 (nesting depth added 3). 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: settings_controller.ts, kv_store.ts, models.tsx admin/app/controllers/settings_controller.ts — 3 files — `admin/app/controllers/settings_controller.ts`, `admin/constants/kv_store.ts`, `admin/inertia/pages/settings/models.tsx` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (9 clone groups) admin/inertia/components/CustomAppModal.tsx:519 — 9 duplicated blocks under admin/inertia/ have copies in at least two of the sibling directories components, lib, pages — 2 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (8 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (8 clone groups) admin/commands/auto_update/dry_run.ts:20 — 8 duplicated blocks under admin/commands/ have copies in at least two of the sibling directories app_auto_update, auto_update, content_auto_update, eval — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (6 clone groups) admin/inertia/pages/drug-reference/show.tsx:71 — 6 duplicated blocks under admin/inertia/pages/ have copies in at least two of the sibling directories conditions, drug-reference, easy-setup, settings — 0 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (125 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (125 matched lines × 2 locations) admin/inertia/components/ActiveDownloads.tsx:10 — admin/inertia/components/ActiveDownloads.tsx:10 · admin/inertia/components/ActiveModelDownloads.tsx:11 — the two spans are one implementation copied and then locally edited — 816 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 with local edits (96 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (96 matched lines × 2 locations) admin/inertia/components/updates/ContentAutoUpdateSection.tsx:22 — admin/inertia/components/updates/ContentAutoUpdateSection.tsx:22 · admin/inertia/components/updates/CoreAutoUpdateSection.tsx:19 — the two spans are one implementation copied and then locally edited — 528 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 with local edits (78 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (78 matched lines × 2 locations) admin/app/jobs/download_drug_data_job.ts:57 — admin/app/jobs/download_drug_data_job.ts:57 · admin/app/jobs/ingest_drug_data_job.ts:166 — the two spans are one implementation copied and then locally edited — 448 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 with local edits (65 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (65 matched lines × 2 locations) admin/app/services/app_auto_update_service.ts:117 — admin/app/services/app_auto_update_service.ts:117 · admin/app/services/content_auto_update_service.ts:132 — the two spans are one implementation copied and then locally edited — 423 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 with local edits (45 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (45 matched lines × 2 locations) admin/commands/auto_update/dry_run.ts:20 — admin/commands/auto_update/dry_run.ts:20 · admin/commands/content_auto_update/dry_run.ts:18 — the two spans are one implementation copied and then locally edited — 397 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 (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) REDACTED:204 — REDACTED:204 · admin/app/services/zim_service.ts:514 — 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 (43 lines × 2 locations) · ×1
  • Duplicated block (43 lines × 2 locations) admin/inertia/components/CustomAppModal.tsx:349 — admin/inertia/components/CustomAppModal.tsx:349 · admin/inertia/components/CustomAppModal.tsx:396 — 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 with local edits (41 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (41 matched lines × 2 locations) admin/app/validators/system.ts:24 — admin/app/validators/system.ts:24 · admin/app/validators/system.ts:162 — the two spans are one implementation copied and then locally edited — 345 tokens are still identical, in the same order in both spans, 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 (35 lines × 2 locations) · ×1
  • Duplicated block (35 lines × 2 locations) admin/app/jobs/app_auto_update_job.ts:38 — admin/app/jobs/app_auto_update_job.ts:38 · admin/app/jobs/auto_update_job.ts:40 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication · Duplicated block with local edits (34 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (34 matched lines × 2 locations) admin/inertia/pages/drug-reference/index.tsx:177 — admin/inertia/pages/drug-reference/index.tsx:177 · admin/inertia/pages/drug-reference/interactions.tsx:41 — the two spans are one implementation copied and then locally edited — 261 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 (33 lines × 3 locations) · ×1
  • Duplicated block (33 lines × 3 locations) admin/app/jobs/app_auto_update_job.ts:40 — admin/app/jobs/app_auto_update_job.ts:40 · admin/app/jobs/auto_update_job.ts:42 · admin/app/jobs/content_auto_update_job.ts:44 — the 3 copies are spread across 3 files, 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.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) admin/app/jobs/download_model_job.ts:145 — admin/app/jobs/download_model_job.ts:145 · admin/app/jobs/run_download_job.ts:325 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (33 matched lines × 2 locations) admin/util/conditions.ts:36 — admin/util/conditions.ts:36 · admin/util/conditions.ts:193 — the two spans are one implementation copied and then locally edited — 279 tokens are still identical, in the same order in both spans, 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 (28 lines × 2 locations) · ×1
  • Duplicated block (28 lines × 2 locations) admin/app/jobs/check_service_updates_job.ts:102 — admin/app/jobs/check_service_updates_job.ts:102 · admin/app/jobs/check_update_job.ts:41 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication · Duplicated block (27 lines × 2 locations) · ×1
  • Duplicated block (27 lines × 2 locations) admin/app/services/collection_manifest_service.ts:460 — admin/app/services/collection_manifest_service.ts:460 · admin/app/services/collection_manifest_service.ts:514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (25 lines × 2 locations) · ×1
  • Duplicated block (25 lines × 2 locations) admin/inertia/components/KbGuardrailModal.tsx:35 — admin/inertia/components/KbGuardrailModal.tsx:35 · admin/inertia/components/TierSelectionModal.tsx:166 — 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 (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) admin/commands/app_auto_update/dry_run.ts:172 — admin/commands/app_auto_update/dry_run.ts:172 · admin/commands/auto_update/dry_run.ts:245 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) admin/app/services/rag_service.ts:2669 — admin/app/services/rag_service.ts:2669 · admin/app/services/rag_service.ts:2749 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) admin/commands/app_auto_update/dry_run.ts:205 — admin/commands/app_auto_update/dry_run.ts:205 · admin/commands/auto_update/dry_run.ts:280 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×1
  • Duplicated block (19 lines × 2 locations) admin/inertia/pages/settings/maps.tsx:430 — admin/inertia/pages/settings/maps.tsx:430 · admin/inertia/pages/settings/zim/index.tsx:225 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) admin/app/controllers/maps_controller.ts:154 — admin/app/controllers/maps_controller.ts:154 · admin/app/controllers/zim_controller.ts:74 — the 2 copies are spread across 2 files, 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.
R10 · Code Duplication · Duplicated block (17 lines × 3 locations) · ×1
  • Duplicated block (17 lines × 3 locations) admin/inertia/pages/supply-depot.tsx:611 — admin/inertia/pages/supply-depot.tsx:611 · admin/inertia/pages/supply-depot.tsx:630 · admin/inertia/pages/supply-depot.tsx:649 — all 3 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 with local edits (16 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (16 matched lines × 2 locations) admin/database/migrations/1764912210741_create_curated_collections_table.ts:1 — admin/database/migrations/1764912210741_create_curated_collections_table.ts:1 · admin/database/migrations/1769646771604_create_create_chat_sessions_table.ts:1 — the two spans are one implementation copied and then locally edited — 80 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.
R2 · Cyclomatic Complexity · Complex function validateSettingValue (cyclomatic 58, cognitive 54) · ×1
  • Complex function validateSettingValue (cyclomatic 58, cognitive 54) admin/app/validators/settings.ts:23 — validateSettingValue has cyclomatic complexity 58 and cognitive complexity 54; 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 chat (cyclomatic 57, cognitive 84) · ×1
  • Complex function chat (cyclomatic 57, cognitive 84) admin/app/controllers/ollama_controller.ts:67 — chat has cyclomatic complexity 57 and cognitive complexity 84; 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 AppCard (cyclomatic 54, cognitive 51) · ×1
  • Complex function AppCard (cyclomatic 54, cognitive 51) admin/inertia/pages/supply-depot.tsx:853 — AppCard has cyclomatic complexity 54 and cognitive complexity 51; 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 getDebugInfo (cyclomatic 51, cognitive 97) · ×1
  • Complex function getDebugInfo (cyclomatic 51, cognitive 97) admin/app/services/system_service.ts:762 — getDebugInfo has cyclomatic complexity 51 and cognitive complexity 97; 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 DrugReferenceIndex (cyclomatic 51, cognitive 50) · ×1
  • Complex function DrugReferenceIndex (cyclomatic 51, cognitive 50) admin/inertia/pages/drug-reference/index.tsx:162 — DrugReferenceIndex has cyclomatic complexity 51 and cognitive complexity 50; 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 updateContainer (cyclomatic 47, cognitive 59) · ×1
  • Complex function updateContainer (cyclomatic 47, cognitive 59) REDACTED:1736 — updateContainer has cyclomatic complexity 47 and cognitive complexity 59; 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 getSystemInfo (cyclomatic 41, cognitive 77) · ×1
  • Complex function getSystemInfo (cyclomatic 41, cognitive 77) admin/app/services/system_service.ts:386 — getSystemInfo has cyclomatic complexity 41 and cognitive complexity 77; 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 SupplyDepotPage (cyclomatic 38, cognitive 34) · ×1
  • Complex function SupplyDepotPage (cyclomatic 38, cognitive 34) admin/inertia/pages/supply-depot.tsx:93 — SupplyDepotPage has cyclomatic complexity 38 and cognitive complexity 34; 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 KnowledgeBaseModal (cyclomatic 37, cognitive 29) · ×1
  • Complex function KnowledgeBaseModal (cyclomatic 37, cognitive 29) admin/inertia/components/chat/KnowledgeBaseModal.tsx:191 — KnowledgeBaseModal has cyclomatic complexity 37 and cognitive complexity 29; 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 handle (cyclomatic 36, cognitive 49) · ×1
  • Complex function handle (cyclomatic 36, cognitive 49) admin/app/jobs/embed_file_job.ts:59 — handle has cyclomatic complexity 36 and cognitive complexity 49; 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 _createContainer (cyclomatic 34, cognitive 54) · ×1
  • Complex function _createContainer (cyclomatic 34, cognitive 54) REDACTED:627 — _createContainer has cyclomatic complexity 34 and cognitive complexity 54; 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 run (cyclomatic 33, cognitive 44) · ×1
  • Complex function run (cyclomatic 33, cognitive 44) admin/commands/eval/retrieval.ts:75 — run has cyclomatic complexity 33 and cognitive complexity 44; 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 getIngestStatus (cyclomatic 33, cognitive 28) · ×1
  • Complex function getIngestStatus (cyclomatic 33, cognitive 28) admin/app/services/drug_reference_service.ts:785 — getIngestStatus has cyclomatic complexity 33 and cognitive complexity 28; 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 doResumableDownload (cyclomatic 31, cognitive 31) · ×1
  • Complex function doResumableDownload (cyclomatic 31, cognitive 31) admin/app/utils/downloads.ts:44 — doResumableDownload has cyclomatic complexity 31 and cognitive complexity 31; 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 recreateCustomAppContainer (cyclomatic 29, cognitive 43) · ×1
  • Complex function recreateCustomAppContainer (cyclomatic 29, cognitive 43) REDACTED:2327 — recreateCustomAppContainer has cyclomatic complexity 29 and cognitive complexity 43; 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 EasySetupWizard (cyclomatic 27, cognitive 19) · ×1
  • Complex function EasySetupWizard (cyclomatic 27, cognitive 19) admin/inertia/pages/easy-setup/index.tsx:109 — EasySetupWizard has cyclomatic complexity 27 and cognitive complexity 19; 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 run (cyclomatic 26, cognitive 31) · ×1
  • Complex function run (cyclomatic 26, cognitive 31) admin/commands/eval/generation.ts:77 — run has cyclomatic complexity 26 and cognitive complexity 31; 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 IngestStatus (cyclomatic 26, cognitive 23) · ×1
  • Complex function IngestStatus (cyclomatic 26, cognitive 23) admin/inertia/components/drug-reference/IngestStatus.tsx:153 — IngestStatus has cyclomatic complexity 26 and cognitive complexity 23; 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 onComplete (cyclomatic 25, cognitive 57) · ×1
  • Complex function onComplete (cyclomatic 25, cognitive 57) admin/app/jobs/run_download_job.ts:130 — onComplete has cyclomatic complexity 25 and cognitive complexity 57; 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 reconcileFromFilesystem (cyclomatic 25, cognitive 40) · ×1
  • Complex function reconcileFromFilesystem (cyclomatic 25, cognitive 40) admin/app/services/collection_manifest_service.ts:417 — reconcileFromFilesystem has cyclomatic complexity 25 and cognitive complexity 40; 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 · admin/app/services/rag_service.ts · ×1
  • admin/app/services/rag_service.ts: 2500 lines of code admin/app/services/rag_service.ts:1 — admin/app/services/rag_service.ts has 2500 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 · REDACTED · ×1
  • REDACTED: 2210 lines of code REDACTED:1 — REDACTED has 2210 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 · admin/app/services/ollama_service.ts · ×1
  • admin/app/services/ollama_service.ts: 1435 lines of code admin/app/services/ollama_service.ts:1 — admin/app/services/ollama_service.ts has 1435 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 · admin/inertia/pages/easy-setup/index.tsx · ×1
  • admin/inertia/pages/easy-setup/index.tsx: 1401 lines of code admin/inertia/pages/easy-setup/index.tsx:1 — admin/inertia/pages/easy-setup/index.tsx has 1401 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 · admin/inertia/components/chat/KnowledgeBaseModal.tsx · ×1
  • admin/inertia/components/chat/KnowledgeBaseModal.tsx: 1294 lines of code admin/inertia/components/chat/KnowledgeBaseModal.tsx:1 — admin/inertia/components/chat/KnowledgeBaseModal.tsx has 1294 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 · admin/inertia/lib/api.ts · ×1
  • admin/inertia/lib/api.ts: 1274 lines of code admin/inertia/lib/api.ts:1 — admin/inertia/lib/api.ts has 1274 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 · admin/inertia/pages/supply-depot.tsx · ×1
  • admin/inertia/pages/supply-depot.tsx: 1093 lines of code admin/inertia/pages/supply-depot.tsx:1 — admin/inertia/pages/supply-depot.tsx has 1093 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 · admin/app/services/system_service.ts · ×1
  • admin/app/services/system_service.ts: 1050 lines of code admin/app/services/system_service.ts:1 — admin/app/services/system_service.ts has 1050 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 · admin/app/services/zim_service.ts · ×1
  • admin/app/services/zim_service.ts: 1016 lines of code admin/app/services/zim_service.ts:1 — admin/app/services/zim_service.ts has 1016 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 · admin/inertia/pages/settings/zim/remote-explorer.tsx · ×1
  • admin/inertia/pages/settings/zim/remote-explorer.tsx: 949 lines of code admin/inertia/pages/settings/zim/remote-explorer.tsx:1 — admin/inertia/pages/settings/zim/remote-explorer.tsx has 949 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 · admin/inertia/pages/drug-reference/index.tsx · ×1
  • admin/inertia/pages/drug-reference/index.tsx: 925 lines of code admin/inertia/pages/drug-reference/index.tsx:1 — admin/inertia/pages/drug-reference/index.tsx has 925 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 · admin/start/routes.ts · ×1
  • admin/start/routes.ts: 885 lines of code admin/start/routes.ts:1 — admin/start/routes.ts has 885 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 · REDACTED · ×1
  • REDACTED: 848 lines of code REDACTED:1 — REDACTED has 848 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 · admin/app/controllers/system_controller.ts · ×1
  • admin/app/controllers/system_controller.ts: 822 lines of code admin/app/controllers/system_controller.ts:1 — admin/app/controllers/system_controller.ts has 822 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 · admin/app/services/drug_reference_service.ts · ×1
  • admin/app/services/drug_reference_service.ts: 817 lines of code admin/app/services/drug_reference_service.ts:1 — admin/app/services/drug_reference_service.ts has 817 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 · admin/app/jobs/ingest_drug_data_job.ts · ×1
  • admin/app/jobs/ingest_drug_data_job.ts: 752 lines of code admin/app/jobs/ingest_drug_data_job.ts:1 — admin/app/jobs/ingest_drug_data_job.ts has 752 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 · admin/inertia/components/chat/index.tsx · ×1
  • admin/inertia/components/chat/index.tsx: 698 lines of code admin/inertia/components/chat/index.tsx:1 — admin/inertia/components/chat/index.tsx has 698 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 · admin/inertia/pages/settings/models.tsx · ×1
  • admin/inertia/pages/settings/models.tsx: 647 lines of code admin/inertia/pages/settings/models.tsx:1 — admin/inertia/pages/settings/models.tsx has 647 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 · REDACTED · ×1
  • REDACTED: 645 lines of code REDACTED:1 — REDACTED has 645 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 · admin/app/services/content_auto_update_service.ts · ×1
  • admin/app/services/content_auto_update_service.ts: 546 lines of code admin/app/services/content_auto_update_service.ts:1 — admin/app/services/content_auto_update_service.ts has 546 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 · admin/app/controllers/ollama_controller.ts · ×1
  • admin/app/controllers/ollama_controller.ts: 519 lines of code admin/app/controllers/ollama_controller.ts:1 — admin/app/controllers/ollama_controller.ts has 519 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 · admin/app/services/auto_update_service.ts · ×1
  • admin/app/services/auto_update_service.ts: 519 lines of code admin/app/services/auto_update_service.ts:1 — admin/app/services/auto_update_service.ts has 519 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 · admin/util/drug_labels.ts · ×1
  • admin/util/drug_labels.ts: 516 lines of code admin/util/drug_labels.ts:1 — admin/util/drug_labels.ts has 516 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 · admin/app/jobs/embed_file_job.ts · ×1
  • admin/app/jobs/embed_file_job.ts: 508 lines of code admin/app/jobs/embed_file_job.ts:1 — admin/app/jobs/embed_file_job.ts has 508 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 · admin/inertia/components/CustomAppModal.tsx · ×1
  • admin/inertia/components/CustomAppModal.tsx: 507 lines of code admin/inertia/components/CustomAppModal.tsx:1 — admin/inertia/components/CustomAppModal.tsx has 507 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 · admin/inertia/pages/settings/update.tsx · ×1
  • admin/inertia/pages/settings/update.tsx: 506 lines of code admin/inertia/pages/settings/update.tsx:1 — admin/inertia/pages/settings/update.tsx has 506 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 · admin/inertia/components/maps/MapComponent.tsx · ×1
  • admin/inertia/components/maps/MapComponent.tsx: 480 lines of code admin/inertia/components/maps/MapComponent.tsx:1 — admin/inertia/components/maps/MapComponent.tsx has 480 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 · admin/app/services/collection_manifest_service.ts · ×1
  • admin/app/services/collection_manifest_service.ts: 478 lines of code admin/app/services/collection_manifest_service.ts:1 — admin/app/services/collection_manifest_service.ts has 478 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 · admin/app/services/container_registry_service.ts · ×1
  • admin/app/services/container_registry_service.ts: 474 lines of code admin/app/services/container_registry_service.ts:1 — admin/app/services/container_registry_service.ts has 474 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 · admin/app/services/eval_generation_service.ts · ×1
  • admin/app/services/eval_generation_service.ts: 454 lines of code admin/app/services/eval_generation_service.ts:1 — admin/app/services/eval_generation_service.ts has 454 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 · admin/inertia/pages/settings/maps.tsx · ×1
  • admin/inertia/pages/settings/maps.tsx: 432 lines of code admin/inertia/pages/settings/maps.tsx:1 — admin/inertia/pages/settings/maps.tsx has 432 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 · admin/inertia/pages/settings/apps.tsx · ×1
  • admin/inertia/pages/settings/apps.tsx: 426 lines of code admin/inertia/pages/settings/apps.tsx:1 — admin/inertia/pages/settings/apps.tsx has 426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~654 LoC) · ×1
  • Dead file (~654 LoC) REDACTED — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~489 LoC) · ×1
  • Dead file (~489 LoC) admin/app/services/eval_generation_service.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 5 in-repo import(s) from 3 other file(s) do name it (admin/app/services/eval_report_service.ts, admin/commands/eval/generation.ts, admin/commands/eval/matrix.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~364 LoC) · ×1
  • Dead file (~364 LoC) admin/commands/eval/retrieval.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~302 LoC) · ×1
  • Dead file (~302 LoC) admin/commands/auto_update/dry_run.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~294 LoC) · ×1
  • Dead file (~294 LoC) admin/commands/eval/generation.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~244 LoC) · ×1
  • Dead file (~244 LoC) admin/commands/queue/work.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~236 LoC) · ×1
  • Dead file (~236 LoC) admin/app/services/eval_retrieval_service.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (admin/app/services/eval_report_service.ts, admin/commands/eval/retrieval.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~227 LoC) · ×1
  • Dead file (~227 LoC) admin/commands/app_auto_update/dry_run.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~218 LoC) · ×1
  • Dead file (~218 LoC) admin/commands/content_auto_update/dry_run.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~202 LoC) · ×1
  • Dead file (~202 LoC) admin/app/services/eval_corpus_service.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 6 in-repo import(s) from 6 other file(s) do name it (admin/app/services/eval_generation_service.ts, admin/app/services/eval_retrieval_service.ts, admin/commands/eval/corpus.ts and 3 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~178 LoC) · ×1
  • Dead file (~178 LoC) admin/commands/eval/matrix.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~158 LoC) · ×1
  • Dead file (~158 LoC) admin/app/services/eval_report_service.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (admin/commands/eval/compare.ts, admin/commands/eval/retrieval.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~155 LoC) · ×1
  • Dead file (~155 LoC) admin/commands/eval/corpus.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~135 LoC) · ×1
  • Dead file (~135 LoC) admin/inertia/components/MarkdocRenderer.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~127 LoC) · ×1
  • Dead file (~127 LoC) admin/commands/eval/compare.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~82 LoC) · ×1
  • Dead file (~82 LoC) admin/app/jobs/content_auto_update_job.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/commands/queue/work.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~80 LoC) · ×1
  • Dead file (~80 LoC) admin/app/jobs/auto_update_job.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/commands/queue/work.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~78 LoC) · ×1
  • Dead file (~78 LoC) admin/app/jobs/app_auto_update_job.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/commands/queue/work.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~77 LoC) · ×1
  • Dead file (~77 LoC) admin/app/jobs/check_update_job.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/commands/queue/work.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~55 LoC) · ×1
  • Dead file (~55 LoC) admin/config/bodyparser.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~51 LoC) · ×1
  • Dead file (~51 LoC) admin/config/shield.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~45 LoC) · ×1
  • Dead file (~45 LoC) admin/util/files.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~43 LoC) · ×1
  • Dead file (~43 LoC) admin/config/logger.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~42 LoC) · ×1
  • Dead file (~42 LoC) admin/inertia/components/BouncingLogo.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~40 LoC) · ×1
  • Dead file (~40 LoC) admin/config/app.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~37 LoC) · ×1
  • Dead file (~37 LoC) admin/inertia/components/markdoc/Table.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (admin/inertia/components/MarkdocRenderer.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~31 LoC) · ×1
  • Dead file (~31 LoC) admin/config/database.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~30 LoC) · ×1
  • Dead file (~30 LoC) admin/inertia/layouts/DocsLayout.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~27 LoC) · ×1
  • Dead file (~27 LoC) admin/inertia/components/ProgressBar.tsx — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~24 LoC) · ×1
  • Dead file (~24 LoC) admin/config/hash.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~19 LoC) · ×1
  • Dead file (~19 LoC) admin/config/cors.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~18 LoC) · ×1
  • Dead file (~18 LoC) admin/config/static.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~16 LoC) · ×1
  • Dead file (~16 LoC) admin/app/middleware/force_json_response_middleware.ts — no import path from any entry point (21 application, 52 tooling, 67 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unlisted import '@adonisjs/bodyparser' · ×1
  • Unlisted import '@adonisjs/bodyparser' admin/app/utils/chat_images.ts:1 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
R8 · Dependency Hygiene · Unused dependency '@adonisjs/auth' · ×1
  • Unused dependency '@adonisjs/auth' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@protomaps/basemaps' · ×1
  • Unused dependency '@protomaps/basemaps' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@tanstack/react-virtual' · ×1
  • Unused dependency '@tanstack/react-virtual' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Minor — 98 finding(s)
P2 · Observability · Console output used as the logging channel · ×39
  • Console output used as the logging channel admin/util/files.ts:25 — `admin/util/files.ts` reports through `console.*` at line 25 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/util/files.ts:43 — `admin/util/files.ts` reports through `console.*` at line 43 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/apps.tsx:76 — `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 76 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/apps.tsx:123 — `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 123 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/apps.tsx:148 — `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 148 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/apps.tsx:171 — `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 171 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/apps.tsx:200 — `admin/inertia/pages/settings/apps.tsx` reports through `console.*` at line 200 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/maps.tsx:93 — `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 93 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/maps.tsx:118 — `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 118 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/maps.tsx:137 — `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 137 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/maps.tsx:150 — `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 150 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/maps.tsx:167 — `admin/inertia/pages/settings/maps.tsx` reports through `console.*` at line 167 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/models.tsx:150 — `admin/inertia/pages/settings/models.tsx` reports through `console.*` at line 150 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/models.tsx:170 — `admin/inertia/pages/settings/models.tsx` reports through `console.*` at line 170 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/models.tsx:266 — `admin/inertia/pages/settings/models.tsx` reports through `console.*` at line 266 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/update.tsx:115 — `admin/inertia/pages/settings/update.tsx` reports through `console.*` at line 115 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/update.tsx:207 — `admin/inertia/pages/settings/update.tsx` reports through `console.*` at line 207 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/zim/remote-explorer.tsx:358 — `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 358 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/zim/remote-explorer.tsx:374 — `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 374 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/zim/remote-explorer.tsx:402 — `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 402 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/settings/zim/remote-explorer.tsx:445 — `admin/inertia/pages/settings/zim/remote-explorer.tsx` reports through `console.*` at line 445 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/easy-setup/index.tsx:401 — `admin/inertia/pages/easy-setup/index.tsx` reports through `console.*` at line 401 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/easy-setup/index.tsx:453 — `admin/inertia/pages/easy-setup/index.tsx` reports through `console.*` at line 453 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/pages/easy-setup/index.tsx:490 — `admin/inertia/pages/easy-setup/index.tsx` reports through `console.*` at line 490 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel admin/inertia/lib/api.ts:65 — `admin/inertia/lib/api.ts` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 14 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×17
  • Duplicated predicate admin/app/services/app_auto_update_service.ts:202 — `!!d.status && ['waiting', 'active', 'delayed'].includes(d.status)` appears character-identically in 3 files — admin/app/services/app_auto_update_service.ts, admin/app/services/auto_update_service.ts, admin/app/services/content_auto_update_service.ts. 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 admin/inertia/components/maps/MapComponent.tsx:70 — `!Number.isFinite(lat) || !Number.isFinite(lng) || lat < -90 || lat > 90 || lng < -180 || lng > 180` appears character-identically in 2 files — admin/inertia/components/maps/MapComponent.tsx, admin/inertia/pages/maps.tsx. 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 admin/app/services/app_auto_update_service.ts:115 — `cooloffHours !== null && Number.isFinite(parsedCooloff) && parsedCooloff >= 0` appears character-identically in 2 files — admin/app/services/app_auto_update_service.ts, admin/app/services/content_auto_update_service.ts. 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 REDACTED:247 — `decision.reason !== 'first_install' && decision.reason !== 'same_file'` appears character-identically in 2 files — REDACTED, admin/app/services/zim_service.ts. 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 admin/inertia/components/ActiveDownloads.tsx:248 — `download.downloadedBytes && download.totalBytes` appears character-identically in 2 files — admin/inertia/components/ActiveDownloads.tsx, admin/inertia/components/ActiveModelDownloads.tsx. 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 REDACTED:541 — `graphics.controllers && graphics.controllers.length > 0` appears character-identically in 2 files — REDACTED, admin/app/services/system_service.ts. 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 admin/app/jobs/download_drug_data_job.ts:152 — `partition.display_name || partition.file` appears character-identically in 2 files — admin/app/jobs/download_drug_data_job.ts, admin/app/jobs/ingest_drug_data_job.ts. 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 admin/inertia/components/ActiveDownloads.tsx:55 — `prev && prev.bytes > 0 && currentBytes > prev.bytes` appears character-identically in 2 files — admin/inertia/components/ActiveDownloads.tsx, admin/inertia/components/ActiveModelDownloads.tsx. 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 admin/inertia/components/UpdateServiceModal.tsx:64 — `record.friendly_name || record.service_name` appears character-identically in 2 files — admin/inertia/components/UpdateServiceModal.tsx, admin/inertia/pages/settings/apps.tsx. 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 admin/app/services/content_auto_update_service.ts:574 — `resource.auto_update_consecutive_failures || 0` appears character-identically in 2 files — admin/app/services/content_auto_update_service.ts, admin/app/utils/content_auto_update_backoff.ts. 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 admin/inertia/pages/home.tsx:173 — `service.friendly_name || service.service_name` appears character-identically in 3 files — admin/inertia/pages/home.tsx, admin/inertia/pages/settings/apps.tsx, admin/inertia/pages/supply-depot.tsx. 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 admin/inertia/pages/home.tsx:175 — `service.ui_location || service.custom_url` appears character-identically in 2 files — admin/inertia/pages/home.tsx, admin/inertia/pages/supply-depot.tsx. 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 admin/app/jobs/download_drug_data_job.ts:64 — `state === 'active' || state === 'waiting' || state === 'delayed'` appears character-identically in 7 files — admin/app/jobs/download_drug_data_job.ts, admin/app/jobs/download_model_job.ts, admin/app/jobs/embed_file_job.ts, admin/app/jobs/ingest_drug_data_job.ts. 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 admin/util/conditions.ts:82 — `typeof json !== 'object' || json === null` appears character-identically in 2 files — admin/util/conditions.ts, admin/util/drug_labels.ts. 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 admin/app/validators/settings.ts:51 — `url.protocol !== 'http:' && url.protocol !== 'https:'` appears character-identically in 4 files — admin/app/validators/settings.ts, admin/app/validators/system.ts, REDACTED, admin/inertia/pages/settings/advanced.tsx. 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 admin/app/jobs/download_model_job.ts:141 — `userCancelled || abortController.signal.reason === 'user-cancel'` appears character-identically in 2 files — admin/app/jobs/download_model_job.ts, admin/app/jobs/run_download_job.ts. 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 admin/inertia/pages/easy-setup/index.tsx:942 — `wikipediaState && wikipediaState.options.length > 0` appears character-identically in 2 files — admin/inertia/pages/easy-setup/index.tsx, admin/inertia/pages/settings/zim/remote-explorer.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×8
  • Silent fallback default in catch admin/scripts/audit_catalog_ports.py:61 — `parse_config` swallows every exception into `return {}` — 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.
  • Silent fallback default in catch admin/scripts/audit_catalog_ports.py:97 — `image_exposed` swallows every exception into `return []` — 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.
  • Silent fallback default in catch install/nomad-translate/blocks.py:147 — `find_blocks` swallows every exception into `return []` — 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.
  • Silent fallback default in catch install/nomad-translate/proxy.py:222 — `_lang` swallows every exception into `return ''` — 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.
  • Silent fallback default in catch admin/app/services/drug_reference_service.ts:396 — `rowCount` swallows every exception into `return 0` — 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.
  • Silent fallback default in catch REDACTED:948 — `getHost` (in `getPublicFileBaseUrl`) swallows every exception into `return 'localhost'` — 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.
  • Silent fallback default in catch admin/app/validators/settings.ts:54 — `validateSettingValue` swallows every exception into `return 'Test URL must be a valid URL (e.g. "https://example.com").'` — 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.
  • Silent fallback default in catch admin/inertia/components/WhatsNewBanner.tsx:43 — `WhatsNewBanner` 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.
D12 · Dependency Hygiene · Deprecated · ×6
  • Deprecated: @vavite/multibuild REDACTED:7234 — @vavite/multibuild 5.1.0 is resolved in REDACTED and is marked deprecated by its publisher: "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:11113 — glob 10.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: gm REDACTED:11271 — gm 1.25.1 is resolved in REDACTED and is marked deprecated by its publisher: "The gm module has been sunset. Please migrate to an alternative. https://github.com/aheckmann/gm?tab=readme-ov-file#2025-02-24-this-project-is-not-maintained". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: prebuild-install REDACTED:15922 — prebuild-install 7.1.3 is resolved in REDACTED and is marked deprecated by its publisher: "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: q REDACTED:16214 — q 1.5.1 is resolved in REDACTED and is marked deprecated by its publisher: "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: whatwg-encoding REDACTED:19464 — whatwg-encoding 3.1.1 is resolved in REDACTED and is marked deprecated by its publisher: "Use @exodus/bytes instead for a more spec-conformant and faster implementation". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D31 · IaC & Container Security · Low IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×4
  • Diagnostic log message is built whether or not it is wanted admin/app/services/rag_service.ts:484 — `debug` at line 484 is called with an argument built by `allKeywords.join(', ')` (line 484), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted admin/app/services/rag_service.ts:486 — `debug` at line 486 is called with an argument built by `structuralKeywords.join(', ')` (line 487), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted admin/app/services/rag_service.ts:999 — `debug` at line 999 is called with an argument built by `keywords.join(', ')` (line 999), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted admin/app/services/zim_extraction_service.ts:161 — `debug` at line 161 is called with an argument built by `map(c => ({ articleTitle : c.articleTitle, sectionTitle : c.sectionTitle, hierarchy : c.hierarchy, textPreview : c.te...` (line 161), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 10 significant file(s) lose their only recent owner: admin/inertia/components/benchmark/BenchmarkRunView.tsx, admin/app/services/creator_pack_service.ts, admin/inertia/hooks/useBenchmarkRun.ts, admin/inertia/components/benchmark/ScoreReveal.tsx, admin/app/utils/zim_html.ts, admin/app/services/benchmark_telemetry.ts, admin/inertia/components/WhatsNewBanner.tsx, admin/app/utils/kb_ingest_decision.ts (+2 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 8 significant file(s) lose their only recent owner: admin/constants/ollama.ts, admin/inertia/components/Alert.tsx, admin/app/utils/amd_hsa_override.ts, admin/inertia/components/StyledButton.tsx, admin/app/utils/misc.ts, admin/inertia/lib/util.ts, admin/providers/version_check_provider.ts, admin/inertia/components/file-uploader/index.tsx. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 7 significant file(s) lose their only recent owner: admin/scripts/audit_catalog_ports.py, admin/inertia/components/KbGuardrailModal.tsx, admin/inertia/components/StorageProjectionBar.tsx, admin/app/utils/kb_ratio_lookup.ts, admin/app/utils/superseded_resource.ts, admin/app/models/kb_ratio_registry.ts, admin/inertia/lib/kb_guardrail.ts. Pair on, review, or document these before any departure.
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file admin/app/services/countries_service.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file admin/providers/qdrant_restart_policy_provider.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
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 (26 single-owned of 238 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; 238 of the 445 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: admin/scripts/generate_curated_data.ts.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `admin` (67421 LoC, 555 module-visible types across 52 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
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 238 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 238 of the 445 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: admin/app/services/countries_service.ts, admin/providers/qdrant_restart_policy_provider.ts. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 14356 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 6/40 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~1.6 `!` null assertions per 1k TypeScript source lines — 115 assertion(s) across the 73383 source line(s) of the 431 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: admin/app/services/rag_service.ts (35), admin/inertia/hooks/useBenchmarkRun.ts (8), admin/app/jobs/run_extract_pmtiles_job.ts (6). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Minor — 62 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×62
  • Outdated (npm): @adonisjs/auth — @adonisjs/auth is pinned at 9.6.0; registry.npmjs.org publishes 10.1.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/core — @adonisjs/core is pinned at 6.19.3; registry.npmjs.org publishes 7.6.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/cors — @adonisjs/cors is pinned at 2.2.1; registry.npmjs.org publishes 3.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/inertia — @adonisjs/inertia is pinned at 3.1.1; registry.npmjs.org publishes 5.0.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/lucid — @adonisjs/lucid is pinned at 21.8.2; registry.npmjs.org publishes 22.4.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/session — @adonisjs/session is pinned at 7.7.1; registry.npmjs.org publishes 8.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/shield — @adonisjs/shield is pinned at 8.2.0; registry.npmjs.org publishes 9.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/static — @adonisjs/static is pinned at 1.1.1; registry.npmjs.org publishes 2.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/transmit — @adonisjs/transmit is pinned at 2.0.2; registry.npmjs.org publishes 3.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @adonisjs/vite — @adonisjs/vite is pinned at 4.0.0; registry.npmjs.org publishes 6.0.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @chonkiejs/core — @chonkiejs/core is pinned at 0.0.7; registry.npmjs.org publishes 0.0.12 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/lang-markdown — @codemirror/lang-markdown is pinned at 6.5.0; registry.npmjs.org publishes 6.5.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/state — @codemirror/state is pinned at 6.7.1; registry.npmjs.org publishes 6.7.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/view — @codemirror/view is pinned at 6.43.6; registry.npmjs.org publishes 6.43.15 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @headlessui/react — @headlessui/react is pinned at 2.2.9; registry.npmjs.org publishes 2.2.10 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @inertiajs/react — @inertiajs/react is pinned at 2.3.13; registry.npmjs.org publishes 3.9.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @markdoc/markdoc — @markdoc/markdoc is pinned at 0.5.4; registry.npmjs.org publishes 0.5.10 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @openzim/libzim — @openzim/libzim is pinned at 4.0.0; registry.npmjs.org publishes 4.7.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @protomaps/basemaps — @protomaps/basemaps is pinned at 5.7.0; registry.npmjs.org publishes 5.7.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @qdrant/js-client-rest — @qdrant/js-client-rest is pinned at 1.16.2; registry.npmjs.org publishes 1.20.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @scalar/api-reference — @scalar/api-reference is pinned at 1.62.4; registry.npmjs.org publishes 1.76.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @tabler/icons-react — @tabler/icons-react is pinned at 3.36.1; registry.npmjs.org publishes 3.49.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @tailwindcss/vite — @tailwindcss/vite is pinned at 4.3.0; registry.npmjs.org publishes 4.3.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @tanstack/react-query — @tanstack/react-query is pinned at 5.90.20; registry.npmjs.org publishes 5.105.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @tanstack/react-query-devtools — @tanstack/react-query-devtools is pinned at 5.91.3; registry.npmjs.org publishes 5.105.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • + 37 more in this group — see findings.md.

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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8b014b5eedb843a88b5985f24261da84/history.json --exit-code 0 --source .3artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-8b014b5eedb843a88b5985f24261da84/tree.json --exit-code 0 --source .2artifacts/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude admin/app/data .39artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update40artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .15artifacts/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. semgrep could not parse 4 file(s) — `admin/app/jobs/download_drug_data_job.ts`, `admin/app/jobs/ingest_drug_data_job.ts`, `admin/app/services/eval_generation_service.ts`, `admin/types/rag.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.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/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17942-fb64-704a-b022-e34365ff9c52 · 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