Public report of gotson/komga, published 22 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, 22 October 2026, 19:32 UTC · Survey ID cd_27188776b3de4c5991e6b0a1008710b8

gotson/komga

Measured 22 October 2026, 19:26 UTC, at code version 023ec90

Test reliability is not measured: The jvm executor ran against the .kt half and never executed.

CAI score 51out of 100 At risk Down 5 since the last survey

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

A large codebase: 101,106 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Production Readiness, 47

Findings by how serious they are

131 critical 461 serious 31 minor

15 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
22 October 2026, 19:26 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 ▸

92of 95 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
605of 623 findings point to an exact file and line, so you can open each one in the code. The other 18 concern the repository as a whole, such as missing documentation.
95dimensions across 8 lenses, read from 101,106 lines of product code in 5 projects.
Chapters

Executive summary

gotson/komga scores 51 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.

The weakest lens counts most in the score, and here that is Production Readiness, which scores 47 and is rated Weak. Its Dependency Hygiene dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies and to make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. The weakest lenses score close to each other, so improving any of them moves the score.

131 findings are critical: 79 in Static Analysis (SAST), 23 in Dependency Vulnerabilities, ten in Keyboard semantics, nine in Forms & labels, four in IaC & Container Security, two in Circular Imports, two in Dependency Hygiene, one in Secrets (history) and one in Test Reliability.

Watchdog couldn't measure 13 dimensions in this code, among them Code Coverage, Test Distribution and Dependency Hygiene, so they are left out of the score. The product code is 101,106 lines, which would take an estimated 1.1 person-years, around €160,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 47 · counts for 45%Accessibility 47 · counts for 25%Security and Compliance 52 · counts for 14%Maturity 61 · counts for 8%Architecture 69 · counts for 4%Code Health 69 · counts for 2%Domain Modelling 70 · counts for 1%Performance 78 · 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 81%Tests 19%
New since the last survey: 125 findings

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

  • Cyclomatic Complexity · BookDao.findAll (cyclomatic 20) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt
  • Cyclomatic Complexity · ReferentialDao.findSeriesReleaseYears (cyclomatic 19) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt
  • Cyclomatic Complexity · SeriesDtoDao.findAll (cyclomatic 17) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt
  • Cognitive Complexity · SeriesCollectionDao.findAll (cognitive 18) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesCollectionDao.kt
  • Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/AuthenticationActivityDao.kt
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt
  • Code Duplication · Duplicated block (16–17 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt
  • Code Duplication · Duplicated block (15 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt
  • Code Duplication · Duplicated block (8–11 lines × 3) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt
  • Code Duplication · Duplicated block (10 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt
  • Code Duplication · Duplicated block (8 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt
  • Test Reliability · Test suite cannot be installed from its own lockfile: next-ui/
  • Churn × Complexity Hotspots · Hotspot: next-ui/src/composables/sse.ts next-ui/src/composables/sse.ts
  • Churn × Complexity Hotspots · Hotspot: komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Change Coupling · Change-coupling hub: Utils.kt → BookDtoDao.kt, SeriesDtoDao.kt, BookController.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Code Duplication · Duplicated block with local edits (140 matched lines × 2 locations) next-ui/src/components/book/view/BookView.vue
  • Code Duplication · Duplicated block (55 lines × 2 locations) next-ui/src/composables/filter.ts
  • Code Duplication · Duplicated block (54 lines × 3 locations) next-ui/src/pages/libraries/[viewId]/books.vue
  • Code Duplication · Duplicated block (45 lines × 2 locations) next-ui/src/components/filter/by/Contributor.vue
  • Code Duplication · Duplicated block (39 lines × 2 locations) next-ui/src/components/book/form/Contributors.vue
  • Code Duplication · Duplicated block (37 lines × 2 locations) next-ui/src/functions/filter.ts
  • Large Files · next-ui/src/mocks/api/handlers/transient-books.ts: 1462 lines of code next-ui/src/mocks/api/handlers/transient-books.ts
  • Large Files · komga-webui/src/views/BrowseSeries.vue: 1070 lines of code komga-webui/src/views/BrowseSeries.vue
  • Large Files · komga-webui/src/components/dialogs/EditOneshotDialog.vue: 1057 lines of code komga-webui/src/components/dialogs/EditOneshotDialog.vue
  • Large Files · komga-webui/src/components/dialogs/EditSeriesDialog.vue: 973 lines of code komga-webui/src/components/dialogs/EditSeriesDialog.vue
  • Large Files · komga-webui/src/views/EpubReader.vue: 959 lines of code komga-webui/src/views/EpubReader.vue
  • Large Files · komga-webui/src/views/DivinaReader.vue: 916 lines of code komga-webui/src/views/DivinaReader.vue
  • Large Files · komga-webui/src/views/BrowseLibraries.vue: 854 lines of code komga-webui/src/views/BrowseLibraries.vue
  • Large Files · komga-webui/src/views/BrowseOneshot.vue: 818 lines of code komga-webui/src/views/BrowseOneshot.vue
  • Large Files · komga-webui/src/components/dialogs/EditBooksDialog.vue: 795 lines of code komga-webui/src/components/dialogs/EditBooksDialog.vue
  • Large Files · komga-webui/src/components/dialogs/LibraryEditDialog.vue: 676 lines of code komga-webui/src/components/dialogs/LibraryEditDialog.vue
  • Large Files · komga-webui/src/views/BrowseBook.vue: 658 lines of code komga-webui/src/views/BrowseBook.vue
  • Large Files · komga-webui/src/views/BrowseBooks.vue: 638 lines of code komga-webui/src/views/BrowseBooks.vue
  • Large Files · next-ui/src/components/book/view/BookView.vue: 596 lines of code next-ui/src/components/book/view/BookView.vue
  • Large Files · komga-webui/src/views/DashboardView.vue: 571 lines of code komga-webui/src/views/DashboardView.vue
  • Large Files · next-ui/src/components/import/books/TransientBooksTable.vue: 552 lines of code next-ui/src/components/import/books/TransientBooksTable.vue
  • Large Files · next-ui/src/components/series/view/SeriesView.vue: 542 lines of code next-ui/src/components/series/view/SeriesView.vue
  • Large Files · komga-webui/src/views/BrowseCollection.vue: 533 lines of code komga-webui/src/views/BrowseCollection.vue
  • Large Files · next-ui/src/colada/referential.ts: 532 lines of code next-ui/src/colada/referential.ts
  • Large Files · next-ui/src/components/import/readlist/Table.vue: 523 lines of code next-ui/src/components/import/readlist/Table.vue
  • Large Files · next-ui/src/components/server/Settings.vue: 523 lines of code next-ui/src/components/server/Settings.vue
  • Large Files · komga-webui/src/views/BrowseReadList.vue: 511 lines of code komga-webui/src/views/BrowseReadList.vue
  • Large Files · komga-webui/src/views/HomeView.vue: 480 lines of code komga-webui/src/views/HomeView.vue
  • Large Files · komga-webui/src/views/SearchView.vue: 452 lines of code komga-webui/src/views/SearchView.vue
  • Large Files · next-ui/src/pages/collection/[id].vue: 445 lines of code next-ui/src/pages/collection/[id].vue
  • Large Files · next-ui/src/composables/sse.ts: 423 lines of code next-ui/src/composables/sse.ts
  • Large Files · komga-webui/src/components/ItemCard.vue: 413 lines of code komga-webui/src/components/ItemCard.vue
  • Large Files · next-ui/src/pages/libraries/[viewId]/series.vue: 409 lines of code next-ui/src/pages/libraries/[viewId]/series.vue
  • Large Files · next-ui/src/components/pageHash/KnownTable.vue: 404 lines of code next-ui/src/components/pageHash/KnownTable.vue
  • Dead Code · Dead file (~487 LoC) next-ui/src/pages/collection/[id].vue
  • Dead Code · Dead file (~447 LoC) next-ui/src/pages/libraries/[viewId]/series.vue
  • Dead Code · Dead file (~428 LoC) next-ui/src/pages/series/[id].vue
  • Dead Code · Dead file (~409 LoC) next-ui/src/pages/readlist/[id].vue
  • Dead Code · Dead file (~367 LoC) next-ui/src/pages/libraries/[viewId]/books.vue
  • Dead Code · Dead file (~168 LoC) next-ui/src/components/btn/AddKind.vue
  • Dead Code · Dead file (~116 LoC) next-ui/src/components/layout/app/drawer/menu/Server.vue
  • Dead Code · Dead file (~92 LoC) next-ui/src/components/book/form/NotableEntities.vue
  • Dependency Hygiene · Unlisted import '@storybook/vue3' next-ui/.storybook/preview.ts
  • Dependency Hygiene · Unlisted import '@vue/test-utils' next-ui/src/colada/actuator-info.test.ts
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/components/UsersList.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/components/SearchBox.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/components/PageHashUnknownCard.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/components/PageHashKnownCard.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/components/ApiKeyTable.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/plugins/persisted-state.ts
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/plugins/persisted-state.ts
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/plugins/persisted-state.ts
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/plugins/komga-users.plugin.ts
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/plugins/komga-settings.plugin.ts
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/UISettings.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue
  • Exception handling · Swallowed exception (empty catch) komga-webui/src/views/MetricsView.vue

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

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

  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialV2Controller.kt
  • Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/AuthenticationActivityDao.kt
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt
  • Code Duplication · Duplicated block (16–17 lines × 4) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialV2Controller.kt
  • Code Duplication · Duplicated block (14–15 lines × 6) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialV2Controller.kt
  • Code Duplication · Duplicated block (13–14 lines × 10) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialV2Controller.kt
  • Churn × Complexity Hotspots · Repeated repair: komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt
  • 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 · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Change Coupling · Change coupling: Utils.kt ↔ SeriesDtoDao.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt
  • Change Coupling · Change coupling: Utils.kt ↔ BookDtoDao.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt
  • Change Coupling · Change coupling: Book.kt ↔ Series.kt komga/src/main/kotlin/org/gotson/komga/domain/model/Book.kt
  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Code Duplication · Duplicated block with local edits (126 matched lines × 2 locations) next-ui/src/components/book/view/BookView.vue
  • Code Duplication · Duplicated block (50 lines × 3 locations) next-ui/src/pages/libraries/[viewId]/books.vue
  • Code Duplication · Duplicated block (36 lines × 4 locations) next-ui/src/composables/book/useEditBookMetadataDialog.ts
  • Code Duplication · Duplicated block with local edits (35 matched lines × 2 locations) next-ui/src/components/item/CardWide/ItemCardWide.vue
  • Code Duplication · Duplicated block (35 lines × 5 locations) next-ui/src/composables/book/useEditBookMetadataDialog.ts
  • Code Duplication · Duplicated block (35 lines × 3 locations) next-ui/src/composables/collection/useCollectionActions.ts
  • Code Duplication · Duplicated block (34 lines × 2 locations) next-ui/src/colada/referential.ts
  • Code Duplication · Duplicated block (33 lines × 2 locations) komga-webui/src/components/CollectionsExpansionPanels.vue
  • Code Duplication · Duplicated block (33 lines × 2 locations) next-ui/src/components/collection/card/CollectionCard.vue
  • Code Duplication · Duplicated block (33 lines × 5 locations) next-ui/src/components/filter/by/Author.vue
  • Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) next-ui/src/pages/collection/[id].vue
  • Code Duplication · Duplicated block (32 lines × 2 locations) komga-webui/src/views/BrowseBooks.vue
  • Code Duplication · Duplicated block (31 lines × 2 locations) komga-webui/src/views/BrowseBooks.vue
  • Code Duplication · Duplicated block (30 lines × 2 locations) next-ui/src/colada/books.ts
  • Code Duplication · Duplicated block (30 lines × 2 locations) next-ui/src/components/combobox/Genre.vue
  • Code Duplication · Duplicated block (29 lines × 2 locations) komga-webui/src/components/menus/CollectionActionsMenu.vue
  • Code Duplication · Duplicated block (29 lines × 2 locations) komga-webui/src/views/HomeView.vue
  • Code Duplication · Duplicated block (28 lines × 2 locations) komga-webui/src/services/komga-announcements.service.ts
  • Code Duplication · Duplicated block (28 lines × 2 locations) komga-webui/src/views/DashboardView.vue
  • Code Duplication · Duplicated block (28 lines × 2 locations) next-ui/src/pages/libraries/[viewId]/books.vue
  • Code Duplication · Duplicated block with local edits (27 matched lines × 2 locations) komga-webui/src/views/UISettings.vue
  • Code Duplication · Duplicated block (26 lines × 2 locations) next-ui/src/components/combobox/Contributor.vue
  • Code Duplication · Duplicated block (26 lines × 2 locations) next-ui/src/components/filter/by/AgeRating.vue
  • Code Duplication · Duplicated block (26 lines × 2 locations) next-ui/src/composables/collection/useCollectionActions.ts
  • Code Duplication · Duplicated block (25 lines × 4 locations) next-ui/src/colada/referential.ts
  • Code Duplication · Duplicated block (24 lines × 2 locations) komga-webui/src/views/BrowseBooks.vue
  • Code Duplication · Duplicated block (24 lines × 2 locations) komga-webui/src/views/BrowseBooks.vue
  • Code Duplication · Duplicated block (23 lines × 2 locations) komga-webui/src/functions/shortcuts/bookreader.ts
  • Code Duplication · Duplicated block (23 lines × 2 locations) komga-webui/src/views/DuplicatePagesKnown.vue
  • Code Duplication · Duplicated block (23 lines × 2 locations) next-ui/src/pages/account/api-keys.vue
  • Code Duplication · Duplicated block (22 lines × 2 locations) komga-webui/src/components/SettingsSelect.vue
  • Code Duplication · Duplicated block (22 lines × 2 locations) next-ui/src/colada/referential.ts
  • Code Duplication · Duplicated block (21 lines × 2 locations) komga-webui/src/components/dialogs/EditBooksDialog.vue
  • Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) komga-webui/src/components/dialogs/UserEditDialog.vue
  • Code Duplication · Duplicated block (21 lines × 2 locations) komga-webui/src/views/DuplicateFiles.vue
  • Code Duplication · Duplicated block (21 lines × 2 locations) next-ui/src/functions/filter.ts
  • Code Duplication · Duplicated block (20 lines × 2 locations) komga-webui/src/components/dialogs/EditBooksDialog.vue
  • Code Duplication · Duplicated block (20 lines × 4 locations) komga-webui/src/views/BrowseBooks.vue
  • Code Duplication · Duplicated block (18 lines × 2 locations) komga-webui/src/components/menus/OneshotActionsMenu.vue
  • Code Duplication · Duplicated block (18 lines × 2 locations) komga-webui/src/views/DivinaReader.vue
  • Code Duplication · Duplicated block (18 lines × 2 locations) next-ui/src/components/collection/form/Edit.vue
  • Code Duplication · Duplicated block (18 lines × 2 locations) next-ui/src/composables/book/useBookDetailsDialog.ts
  • Code Duplication · Duplicated block (17 lines × 2 locations) komga-webui/src/components/dialogs/PasswordChangeDialog.vue
  • Code Duplication · Duplicated block (17 lines × 4 locations) komga-webui/src/services/komga-announcements.service.ts
  • Code Duplication · Duplicated block (17 lines × 2 locations) komga-webui/src/services/komga-series.service.ts
  • Code Duplication · Duplicated block (17 lines × 2 locations) komga-webui/src/views/BrowseBooks.vue
  • Code Duplication · Duplicated block (17 lines × 2 locations) komga-webui/src/views/DuplicateFiles.vue
  • Code Duplication · Duplicated block (17 lines × 2 locations) next-ui/src/composables/book/useAddToReadListDialog.ts
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) komga-webui/src/components/dialogs/BookPickerDialog.vue
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) komga-webui/src/components/dialogs/FileNameChooserDialog.vue
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) komga-webui/src/components/readers/ContinuousReader.vue
  • Code Duplication · Duplicated block (16 lines × 3 locations) komga-webui/src/views/BrowseReadList.vue
  • Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) komga-webui/src/components/dialogs/TransientBookDetailsDialog.vue
  • Code Duplication · Duplicated block (15 lines × 2 locations) komga-webui/src/types/items.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) komga-webui/src/views/BrowseOneshot.vue
  • Code Duplication · Duplicated block (15 lines × 2 locations) komga-webui/src/views/DashboardView.vue
  • Code Duplication · Duplicated block (15 lines × 2 locations) next-ui/src/components/item/form/Links.vue
  • Code Duplication · Duplicated block (15 lines × 2 locations) next-ui/src/composables/library/useLibrariesActions.ts
  • Code Duplication · Duplicated block (14 lines × 3 locations) komga-webui/src/components/AuthenticationActivityTable.vue
  • Code Duplication · Duplicated block (14 lines × 2 locations) komga-webui/src/components/dialogs/EditBooksDialog.vue
  • Code Duplication · Duplicated block (14 lines × 2 locations) komga-webui/src/services/komga-books.service.ts
  • Code Duplication · Duplicated block (14 lines × 2 locations) komga-webui/src/types/items.ts
  • Code Duplication · Duplicated block (14 lines × 3 locations) komga-webui/src/views/BrowseBooks.vue
  • Code Duplication · Duplicated block (14 lines × 2 locations) komga-webui/src/views/DivinaReader.vue
  • Code Duplication · Duplicated block (14 lines × 7 locations) next-ui/src/colada/books.ts
  • Code Duplication · Duplicated block (14 lines × 3 locations) next-ui/src/colada/series.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) komga-webui/src/components/dialogs/EditOneshotDialog.vue
  • Code Duplication · Duplicated block (13 lines × 2 locations) komga-webui/src/components/dialogs/LibraryEditDialog.vue
  • Code Duplication · Duplicated block (13 lines × 2 locations) komga-webui/src/views/HistoryView.vue
  • Code Duplication · Duplicated block (13 lines × 6 locations) next-ui/src/composables/book/useBookActions.ts
  • Code Duplication · Duplicated block (13 lines × 2 locations) next-ui/src/composables/section.ts
  • Code Duplication · Duplicated block (12 lines × 4 locations) komga-webui/src/components/dialogs/BulkEditBooksDialog.vue
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/components/dialogs/EditBooksDialog.vue
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) komga-webui/src/components/dialogs/FileBrowserDialog.vue
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/components/dialogs/UserAddDialog.vue
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/plugins/komga-libraries.plugin.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/services/komga-pagehashes.service.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/services/komga-referential.service.ts
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) komga-webui/src/services/komga-syncpoints.service.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/services/komga-users.service.ts
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/views/BrowseOneshot.vue
  • Code Duplication · Duplicated block (12 lines × 2 locations) komga-webui/src/views/DivinaReader.vue
Rebuild cost: about €160,000 · Estimate
Cost to rebuild€53,000 to €270,000, for 880 to 2,790 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problemHigh, 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 51. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 101,106 lines of product code

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
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Raises the score by about 3 points · Medium effort · Dependency Hygiene
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 2 points · Medium effort · Keyboard semantics
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 2 points · Medium effort · Forms & labels

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 €160,000 to build again, about 1.1 person-years of work. Its weakest lens is Production Readiness, at 47 (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
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch :komga :komga :komga-tray :komga-tray :komga-tray->:komga codehealth-iso-9d2e2cd76906488ebca75ac8446a8bdf codehealth-iso-9d2e2cd76906488ebca75ac8446a8bdf komga-webui komga-webui next-ui next-ui

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.

317 modules, with 409 dependencies between them. 3 loops run through 13 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 277 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 komga-webui.src.types.komga-books2 komga-webui.src.types.pageable3 next-ui.src.generated.openapi.core4 org.gotson.komga.domain.model.PageHashKnown5 org.gotson.komga.domain.model.SeriesMetadata6 org.gotson.komga.domain.model.Sidecar7 org.gotson.komga.infrastructure.mediacontainer8 org.gotson.komga.interfaces.api.dto9 org.gotson.komga.interfaces.api.kobo.dto10 komga-webui.src.functions11 komga-webui.src.services.komga-books_service12 komga-webui.src.types.komga-series13 org.gotson.komga.domain.model.SearchCondition14 next-ui.src.functions15 org.gotson.komga.domain.model16 org.gotson.komga.domain.persistence17 org.gotson.komga.infrastructure.image18 org.gotson.komga.infrastructure.jooq19 org.gotson.komga.infrastructure.metadata20 org.gotson.komga.interfaces.api.rest.dto21 org.gotson.komga.infrastructure.koreader22 org.gotson.komga.infrastructure.metadata.comicrack23 org.gotson.komga.infrastructure.metadata.localartwork24 org.gotson.komga.infrastructure.security.apikey25 org.gotson.komga.interfaces.api.persistence26 org.gotson.komga.infrastructure.search27 org.gotson.komga.interfaces.api28 org.gotson.komga.infrastructure.jooq.main29 org.gotson.komga.infrastructure.configuration30 org.gotson.komga.infrastructure.kobo31 org.gotson.komga.infrastructure.security32 org.gotson.komga.infrastructure.web33 org.gotson.komga.infrastructure.mediacontainer.epub34 org.gotson.komga.interfaces.api.opds.v235 org.gotson.komga.domain.service36 org.gotson.komga.application.tasks37 org.gotson.komga.interfaces.api.kobo38 org.gotson.komga.interfaces.api.opds.v139 org.gotson.komga.interfaces.api.rest40 org.gotson.komga.interfaces.scheduler
1 komga-webui.src.types.komga-books
2 komga-webui.src.types.pageable
3 next-ui.src.generated.openapi.core
4 org.gotson.komga.domain.model.PageHashKnown
5 org.gotson.komga.domain.model.SeriesMetadata
6 org.gotson.komga.domain.model.Sidecar
7 org.gotson.komga.infrastructure.mediacontainer
8 org.gotson.komga.interfaces.api.dto
9 org.gotson.komga.interfaces.api.kobo.dto
10 komga-webui.src.functions51
11 komga-webui.src.services.komga-books_service52
12 komga-webui.src.types.komga-series1
13 org.gotson.komga.domain.model.SearchCondition12
14 next-ui.src.functions12
15 org.gotson.komga.domain.model1422
16 org.gotson.komga.domain.persistence1242
17 org.gotson.komga.infrastructure.image111
18 org.gotson.komga.infrastructure.jooq24
19 org.gotson.komga.infrastructure.metadata9
20 org.gotson.komga.interfaces.api.rest.dto226
21 org.gotson.komga.infrastructure.koreader21
22 org.gotson.komga.infrastructure.metadata.comicrack921
23 org.gotson.komga.infrastructure.metadata.localartwork1141
24 org.gotson.komga.infrastructure.security.apikey12
25 org.gotson.komga.interfaces.api.persistence66
26 org.gotson.komga.infrastructure.search1221
27 org.gotson.komga.interfaces.api1691145114
28 org.gotson.komga.infrastructure.jooq.main1125923331944
29 org.gotson.komga.infrastructure.configuration111
30 org.gotson.komga.infrastructure.kobo312
31 org.gotson.komga.infrastructure.security23112
32 org.gotson.komga.infrastructure.web12
33 org.gotson.komga.infrastructure.mediacontainer.epub1911
34 org.gotson.komga.interfaces.api.opds.v2224231
35 org.gotson.komga.domain.service1668185111114114
36 org.gotson.komga.application.tasks542111
37 org.gotson.komga.interfaces.api.kobo425121312
38 org.gotson.komga.interfaces.api.opds.v1151122111
39 org.gotson.komga.interfaces.api.rest1241102745684121121135
40 org.gotson.komga.interfaces.scheduler48112
Uses a module listed above itPart of a loopThe module itself
1 komga-webui.src.types.komga-books2 komga-webui.src.types.pageable3 next-ui.src.generated.openapi.core4 org.gotson.komga.domain.model.PageHashKnown5 org.gotson.komga.domain.model.SeriesMetadata6 org.gotson.komga.domain.model.Sidecar7 org.gotson.komga.infrastructure.mediacontainer8 org.gotson.komga.interfaces.api.dto9 org.gotson.komga.interfaces.api.kobo.dto10 komga-webui.src.functions11 komga-webui.src.services.komga-books_service12 komga-webui.src.types.komga-series13 org.gotson.komga.domain.model.SearchCondition14 next-ui.src.functions15 org.gotson.komga.domain.model16 org.gotson.komga.domain.persistence17 org.gotson.komga.infrastructure.image18 org.gotson.komga.infrastructure.jooq19 org.gotson.komga.infrastructure.metadata20 org.gotson.komga.interfaces.api.rest.dto21 org.gotson.komga.infrastructure.koreader22 org.gotson.komga.infrastructure.metadata.comicrack23 org.gotson.komga.infrastructure.metadata.localartwork24 org.gotson.komga.infrastructure.security.apikey25 org.gotson.komga.interfaces.api.persistence26 org.gotson.komga.infrastructure.search27 org.gotson.komga.interfaces.api28 org.gotson.komga.infrastructure.jooq.main29 org.gotson.komga.infrastructure.configuration30 org.gotson.komga.infrastructure.kobo31 org.gotson.komga.infrastructure.security32 org.gotson.komga.infrastructure.web33 org.gotson.komga.infrastructure.mediacontainer.epub34 org.gotson.komga.interfaces.api.opds.v235 org.gotson.komga.domain.service36 org.gotson.komga.application.tasks37 org.gotson.komga.interfaces.api.kobo38 org.gotson.komga.interfaces.api.opds.v139 org.gotson.komga.interfaces.api.rest40 org.gotson.komga.interfaces.schedulerkomga-webui.src.types.komga-books1komga-webui.src.types.pageable2next-ui.src.generated.openapi.core3org.gotson.komga.domain.model.PageHashKnown4org.gotson.komga.domain.model.SeriesMetadata5org.gotson.komga.domain.model.Sidecar6org.gotson.komga.infrastructure.mediacontainer7org.gotson.komga.interfaces.api.dto8org.gotson.komga.interfaces.api.kobo.dto9komga-webui.src.functions10komga-webui.src.services.komga-books_service11komga-webui.src.types.komga-series12org.gotson.komga.domain.model.SearchCondition13next-ui.src.functions14org.gotson.komga.domain.model15org.gotson.komga.domain.persistence16org.gotson.komga.infrastructure.image17org.gotson.komga.infrastructure.jooq18org.gotson.komga.infrastructure.metadata19org.gotson.komga.interfaces.api.rest.dto20org.gotson.komga.infrastructure.koreader21org.gotson.komga.infrastructure.metadata.comicrack22org.gotson.komga.infrastructure.metadata.localartwork23org.gotson.komga.infrastructure.security.apikey24org.gotson.komga.interfaces.api.persistence25org.gotson.komga.infrastructure.search26org.gotson.komga.interfaces.api27org.gotson.komga.infrastructure.jooq.main28org.gotson.komga.infrastructure.configuration29org.gotson.komga.infrastructure.kobo30org.gotson.komga.infrastructure.security31org.gotson.komga.infrastructure.web32org.gotson.komga.infrastructure.mediacontainer.epub33org.gotson.komga.interfaces.api.opds.v234org.gotson.komga.domain.service35org.gotson.komga.application.tasks36org.gotson.komga.interfaces.api.kobo37org.gotson.komga.interfaces.api.opds.v138org.gotson.komga.interfaces.api.rest39org.gotson.komga.interfaces.scheduler40515211212142212421112492262192111411266122116911451141125923331944111312231121219112242311668185111114114542111425121312151122111124110274568412112113548112+277 more modules (most-connected shown)

At a glance — Code Health · 69% · Adequate ·

At a glance — Architecture · 69% · Adequate · gated by D26 ·

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

At a glance — Readiness · 47% · Weak · gated by R8, P3 ·

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

At a glance — Domain Modelling · 70% · Adequate · gated by DM2 ·

At a glance — Accessibility · 47% · Weak · gated by AC2, AC4 ·

At a glance — Performance · 78% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection79High / Critical
A03:2025 — Software Supply Chain Failures58High / Critical
A02:2025 — Security Misconfiguration10High / Critical
A07:2025 — Authentication Failures2High / Critical
A01:2025 — Broken Access Control1Medium

Roadmap

First, clean up the dependency tree by removing unused packages and explicitly declaring imports to ensure a lean and transparent build. Next, improve user accessibility by making custom controls keyboard-operable and ensuring all form elements and buttons have proper programmatic labels. Finally, strengthen the development pipeline by integrating static security analysis into CI to block regressions and enforcing accessibility standards through automated testing and CI gates.

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

Do thisHelpsEffortDimension
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+2.7 ptsMediumDependency Hygiene
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+2.5 ptsMediumKeyboard semantics
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+2.0 ptsMediumForms & labels
Resolve the 1 No ADRs found finding(s) in ADR Quality.+0.9 ptsLowADR Quality
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+1.8 ptsMediumSecurity & performance tooling
Enforce accessibility in the toolchain: add eslint-plugin-vuejs-accessibility, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+1.7 ptsMediumA11y enforcement
Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, GCP KMS / REDACTED Manager, Azure Key Vault, HashiCorp Vault — not a key compiled into the app) and encrypt the store that holds the personal data (SQLCipher, a Realm encryptionKey, field-level AEAD) — partial coverage still leaves gaps.+1.5 ptsMediumData Protection
Add tests that import the unreached modules (directly or through their public entry).+1.5 ptsMediumTest Coverage

File quality

Per-file score 0–10 — a quality signature. Of 80 files carrying findings, judged against the Production bar: 15% slop · 44% mixed · 41% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.3SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedData Compliance (PII/GDPR): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt5.5MixedCyclomatic Complexity: ReferentialDao.findGeneric (cyclomatic 30)
komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt5.7MixedCyclomatic Complexity: BookDao.findAll (cyclomatic 20)
komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt7.0MixedCyclomatic Complexity: SeriesController.getSeriesDeprecated (cyclomatic 21)
komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt7.0MixedGod Classes: ClassTooLong: Opds2Controller

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

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

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

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

Could not be resolved — 15

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. 92 of 95 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — 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 — 95 dimensions across the health lenses
D1D2D3D4D5D6D10D13D15D17D20D21D26D28D29D30D31D32D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AC7AX1AX10AX2AX3AX4AX5AX6C1C3C4DM10DM12DM2DM6DM8DM9M1M2M3M4P1P2P3P4P6P8PF1PF2PF3R1R10R11R2R3R4R5R6R7R8R9X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X4X5

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, 605 of 623 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 measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16514-192b-7dbf-a02f-51c3ffe663b1.

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: this repository's production source spans .ts, .kt, and our analyzer cannot run the .kt test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 82.8% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. In the meantime, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`, or JaCoCo XML — the Gradle `jacocoTestReport` task) 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 and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
  • D9 Test Distribution — 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 distribution NOT SCORED: this repository's production source spans more than one ecosystem, and the test-pyramid census cannot read the .kt test suite(s) — so the pyramid was not measured for the repository as a whole. The suites we could count came back with 79 test method(s) (79 unit, 0 integration, 0 BDD, 0 e2e), but that is a shape for one part of the product and we do not publish a partial pyramid as if it were complete. This is OUR limitation, not a defect in the repo — test distribution is excluded from the score rather than counted.
  • D10 Test 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. The 79 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 100 test source file(s) (.kt) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — 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 reliability NOT SCORED: this repository's production source includes .kt, and the jvm executor ran against the .kt half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (jest via `npm ci --ignore-scripts` in komga-webui/ (14 tests); vitest via `npm ci --ignore-scripts` in next-ui/): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 4 Maven/Gradle manifest(s) were read, stating a version for 25 dependency(ies) and leaving 13 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (38 contributor(s) across 3977 commit(s) sampled, automation and bot accounts excluded). One of them holds 82% of the history; the other 37 hold 0.5% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • 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) — 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. `komga-tray/src/main/kotlin/org/gotson/komga/application/gui/TrayIconRunner.kt`, `komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt`, `komga/src/main/kotlin/org/gotson/komga/infrastructure/kobo/KepubConverter.kt`, `komga/src/main/kotlin/org/gotson/komga/infrastructure/openapi/OpenApiConfiguration.kt`, `komga/src/main/kotlin/org/gotson/komga/infrastructure/security/TokenEncoder.kt`, … (+148 more) 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.
  • 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 Dockerfile (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • DM9 Scattered domain decisions — 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
  • DM9 Scattered domain decisions — 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Kotlin, Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — 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, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Kotlin, Vue components is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • 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. 174 further occurrence(s) are not listed individually; the score already reflects all 214.
  • 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. 283 further occurrence(s) are not listed individually; the score already reflects all 323.
  • 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. 87 further occurrence(s) are not listed individually; the score already reflects all 127.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • 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. 10 further occurrence(s) are not listed individually; the score already reflects all 50.

Repo exclusion declarations: 14 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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").
  • 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.
  • 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.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • 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.
  • C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
  • C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (3): D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity7.2 / 10Strong✓ 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 7.2 / 10 · rule-coverage 100% · ceiling Prevented

17 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was BookSearchHelper.toConditionInternal at 57. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being SseController.handleSseEvent at 33 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: komga/src/main/kotlin/org/gotson/komga/interfaces/sse/SseController.kt (SseController.handleSseEvent at 33). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

BookSearchHelper.toConditionInternal (cyclomatic 57)komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:41
SeriesSearchHelper.toConditionInternal (cyclomatic 57)komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:39
sse.useSSE (cyclomatic 52)next-ui/src/composables/sse.ts:201
TaskHandler.handleTask (cyclomatic 30)komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskHandler.kt:48
ReferentialDao.findGeneric (cyclomatic 30)komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:793

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

What to do

  1. Bring the 3 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with BookSearchHelper.toConditionInternal (cyclomatic 57), SeriesSearchHelper.toConditionInternal (cyclomatic 57), sse.useSSE (cyclomatic 52). — 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 3 together lifts Cyclomatic Complexity from 7.2 to about 7.9/10, projected with the scoring formula itself and assuming each lands exactly at 30; 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 Complexity6.6 / 10Adequate✓ 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 6.6 / 10 · rule-coverage 100% · ceiling Prevented

27 method(s) exceeded the cognitive complexity threshold of 15; the worst was BookSearchHelper.toConditionInternal at 55.

BookSearchHelper.toConditionInternal (cognitive 55)komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:41
KoboController.syncLibrary (cognitive 45)REDACTED:270
LibraryContentLifecycle.scanRootFolder (cognitive 43)komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:69
SeriesSearchHelper.toConditionInternal (cognitive 39)komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:39
BookImporter.importBook (cognitive 36)komga/src/main/kotlin/org/gotson/komga/domain/service/BookImporter.kt:69

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

What to do

  1. Bring the 27 bodies over 15 down to 15 or less in Cognitive Complexity — start with BookSearchHelper.toConditionInternal (cognitive 55), KoboController.syncLibrary (cognitive 45), LibraryContentLifecycle.scanRootFolder (cognitive 43). — 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 27 together lifts Cognitive Complexity from 6.6 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
  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 Classes9.1 / 10Stronggated by 28 serious findings✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Prevented

28 god class(es) detected.

ClassTooLong: ReferentialDao · ×8komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:44
MethodTooLong: KoboController.syncLibrary · ×6REDACTED:270
FileTooLong: main/ReferentialDao.kt · ×6komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt
FunctionTooLong: sse.useSSE · ×4next-ui/src/composables/sse.ts:201
TooManyMethods: ReferentialDao · ×4komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:44

What to do

  1. Resolve the 8 ClassTooLong finding(s) in God Classes — start with ReferentialDao.kt, Opds2Controller.kt, SeriesController.kt. — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 6 MethodTooLong finding(s) in God Classes — start with REDACTED, BookImporter.kt, OpenApiConfiguration.kt. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 6 FileTooLong finding(s) in God Classes — start with ReferentialDao.kt, Opds2Controller.kt, SeriesController.kt. — One of this dimension's main actionable groups (6 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.

D4 · Code Duplication9.7 / 10Stronggated by 73 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

67 duplicated block group(s) detected. A further 6 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .ts (36% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (5 lines × 2) · ×11komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:136
Duplicated block (8 lines × 2) · ×6komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:105
Duplicated block (11 lines × 2) · ×4komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:39
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:33
Duplicated block (16 lines × 2) · ×3komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:136

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

What to do

  1. Resolve the 11 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ReferentialDao.kt (2), BookSearchHelper.kt (2), BookDao.kt. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 6 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with BookConverter.kt, ReadListDao.kt, ReadProgressDtoDao.kt. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 4 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with ThumbnailBook.kt, KomgaUserDao.kt, OpdsController.kt. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling8.4 / 10Strong✓ Tool-verified

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

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

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

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

5 production modules (Gradle+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 1 module(s) off the main sequence, with abstractness counted on 4 of the 5 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: :komga

What to do

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

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

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

1 of 92 classes have LCOM4 above 3.

Low cohesion: EpubExtractor (LCOM4 10)komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt:33

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with EpubExtractor.kt. — One of this dimension's main actionable groups (1 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.

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 79 tests. Measured on the JavaScript/TypeScript suite only — at least 100 test source file(s) (.kt) went unread, so its test quality is unmeasured and is not in these counts.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 8 serious findings✓ 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 9.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: next-ui/src/composables/sse.ts (8×52=416); komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt (3×57=171); komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt (3×57=171) Repeated repair below the complexity floor: next-ui/src/components/pageHash/UnknownTable.vue (3 of 5 changes were fixes); next-ui/src/pages/libraries/[viewId]/overview.vue (3 of 4 changes were fixes); next-ui/src/router/login-guard.ts (3 of 4 changes were fixes)

Hotspot: next-ui/src/composables/sse.ts · ×5next-ui/src/composables/sse.ts:201
Repeated repair: next-ui/src/components/pageHash/UnknownTable.vue · ×3next-ui/src/components/pageHash/UnknownTable.vue:346

What to do

  1. Resolve the 5 Hotspot finding(s) in Churn × Complexity Hotspots — start with sse.ts, BookSearchHelper.kt, SeriesSearchHelper.kt. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with UnknownTable.vue, overview.vue, login-guard.ts. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d15_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 53753 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 · ×2next-ui/src/composables/useEntitiesActions.ts:40

What to do

  1. Resolve the 2 TodoComment finding(s) in Explicit Debt — start with useEntitiesActions.ts, library-view-redirect-guard.ts. — 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.

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

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_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

2 of 4 build units (Gradle, npm) flagged as possibly oversized/incoherent.

Split komga

What to do

  1. Resolve the 1 Split komga finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

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

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

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

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

79 finding(s): 0 critical, 79 high, 0 medium, 0 low. 47 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 147 file(s) — `gradlew` (line 74, line 178), `komga/src/main/resources/application.yml`, `next-ui/src/components/BuildCommit.stories.ts` (lines 26–32, lines 33–35), `next-ui/src/components/BuildVersion.stories.ts` (lines 27–33, lines 34–36), `next-ui/src/components/ContainerChip.stories.ts` (lines 25–32, line 37, lines 39–42), … (+142 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 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 26 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (17), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (26 issue-level).
  2. Resolve the 2 REDACTED finding(s) charged to Static Analysis (SAST) — the other 47 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (49 issue-level, 2 of them charged here).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

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

44 finding(s): 4 critical, 19 high, 17 medium, 4 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 18 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (18). — One of this dimension's main actionable groups (18 issue-level).
  2. Resolve the 4 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 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 Security8.1 / 10Adequategated by 4 critical findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using Watchdog's own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

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

1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep could not parse 153 file(s) — `komga-tray/src/main/kotlin/org/gotson/komga/application/gui/TrayIconRunner.kt`, `komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt`, `komga/src/main/kotlin/org/gotson/komga/infrastructure/kobo/KepubConverter.kt`, `komga/src/main/kotlin/org/gotson/komga/infrastructure/openapi/OpenApiConfiguration.kt`, `komga/src/main/kotlin/org/gotson/komga/infrastructure/security/TokenEncoder.kt`, … (+148 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.8 / 10Stronggated by 10 serious findings✓ 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 9.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: ReferentialDao.kt↔ReferentialV1Controller.kt 88%; SeriesCollectionRepository.kt↔ReadListDao.kt 73%; Utils.kt↔BookDtoDao.kt 67%

Change coupling: ReferentialDao.kt ↔ ReferentialV1Controller.kt · ×9komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:1
Change-coupling hub: Utils.kt → BookDtoDao.kt, SeriesDtoDao.kt, BookController.ktkomga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt

What to do

  1. Resolve the 9 Change coupling finding(s) in Change Coupling — start with ReferentialDao.kt, SeriesCollectionRepository.kt, BookDao.kt. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with Utils.kt. — 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 & Signing2.5 / 10Weak✓ 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 2.5 / 10 · rule-coverage 100% · ceiling Documented

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

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. 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.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

AC2 · Forms & labels3.0 / 10Weak✓ 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 <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×8) — komga-webui/src/components/readers/ContinuousReader.vue:19, komga-webui/src/components/readers/ContinuousReader.vue:25, komga-webui/src/components/readers/ContinuousReader.vue:31, …
  • This <main> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — komga-webui/src/views/EpubReader.vue:127

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 structure10.0 / 10Exemplary○ Nothing flagged

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.

AC4 · Keyboard semantics1.4 / 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. (×10) — komga-webui/src/components/dialogs/FileNameChooserDialog.vue:21, komga-webui/src/components/readers/ContinuousReader.vue:19, komga-webui/src/components/readers/ContinuousReader.vue:25, …

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 safety7.5 / 10Strong✓ 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.

  • `.normal` moves (`transition: transform 0.135s cubic-bezier(0, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — next-ui/src/components/item/card/ItemCard.vue:328, next-ui/src/components/item/CardWide/ItemCardWide.vue:228
  • `.flip-list-move` moves (`transition: transform 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — komga-webui/src/components/ItemBrowser.vue:273

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-vuejs-accessibility) 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 352 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-vuejs-accessibility, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

AX10 · Code composition4.8 / 10Weak✓ 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.

AX2 · Stateful singletons7.0 / 10Strong✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `BookConverter` is a singleton (@Service: the container shares one instance across every request thread) but mutates instance state outside any lock (failedConversions, skippedRepairs; e.g. `failedConversions` in `convertToCbz` at line 71). — komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:42
  • `BookPageEditor` is a singleton (@Service: the container shares one instance across every request thread) but mutates instance state outside any lock (failedPageRemoval; e.g. `failedPageRemoval` in `removeHashedPages` at line 55). — komga/src/main/kotlin/org/gotson/komga/domain/service/BookPageEditor.kt:40
  • `KomgaSettingsProvider` is a singleton (@Service: the container shares one instance across every request thread) but mutates instance state outside any lock (rememberMeKey; e.g. `rememberMeKey` in `renewRememberMeKey` at line 38). — komga/src/main/kotlin/org/gotson/komga/infrastructure/configuration/KomgaSettingsProvider.kt:12
  • `KepubConverter` is a singleton (@Component: the container shares one instance across every request thread) but mutates instance state outside any lock (isAvailable, kepubifyPath; e.g. `isAvailable` in `configureKepubify` at line 61). — komga/src/main/kotlin/org/gotson/komga/infrastructure/kobo/KepubConverter.kt:29
  • `WebServerEffectiveSettings` is a singleton (@Component: the container shares one instance across every request thread) but mutates instance state outside any lock (effectiveServerPort; e.g. `effectiveServerPort` in `onApplicationEvent` at line 16). — komga/src/main/kotlin/org/gotson/komga/infrastructure/web/WebServerEffectiveSettings.kt:9
  • `SseController` is a singleton (@Controller: the container shares one instance across every request thread) but mutates instance state outside any lock (acceptingConnections; e.g. `acceptingConnections` in `stop` at line 151). — komga/src/main/kotlin/org/gotson/komga/interfaces/sse/SseController.kt:38

What to do

  • Java/Kotlin: keep container singletons stateless — move per-request data into locals or a request-scoped bean — or back the state with java.util.concurrent types (ConcurrentHashMap, AtomicInteger/AtomicReference), guard it with synchronized / a Lock (Kotlin: withLock), or mark a flag that is only ever overwritten volatile (@Volatile).
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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. 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.

C1 · Data Protection4.0 / 10Weak✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

  • No in-app HTTPS enforcement, but the server reads the forwarded scheme (X-Forwarded-Proto, Ktor's XForwardedHeaders, Spring's ForwardedHeaderFilter) — a TLS-terminating reverse proxy sits in front of it, where serving TLS in the app would be wrong. Verify the reverse proxy enforces TLS. — komga/src/main/kotlin/org/gotson/komga/infrastructure/web/KoboMissingPortFilterConfiguration.kt:9

What to do

  • Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, GCP KMS / REDACTED Manager, Azure Key Vault, HashiCorp Vault — not a key compiled into the app) and encrypt the store that holds the personal data (SQLCipher, a Realm encryptionKey, field-level AEAD) — partial coverage still leaves gaps.
C3 · Audit Trail5.0 / 10Adequate✓ Tool-verified

Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.

Method: Roslyn scan: audit-trail mechanism graded (SaveChanges interceptor/immutable AuditLog/[Audited] strong; bare IAuditable/AddAuditing weak). Deterministic.

  • An audit marker (an Auditable interface) was found, but no structural mechanism (a write hook recording changes, an audit-log table or model, or per-entity @Audited) — the trail's completeness can't be confirmed from the source.

What to do

  • Back the audit convention with a structural mechanism: Hibernate Envers' @Audited on each entity that needs a who-changed-what trail, or a write hook (a JPA entity listener, a Hibernate event listener, a jOOQ RecordListener) writing each sensitive change to an audit-log table, with the acting user and time on every entry.
C4 · Data Retention6.5 / 10Adequate✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
DM10 · One transaction, one aggregate8.5 / 10Strong✓ Tool-verified

Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.

Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.

  • `BookConverter.convertToCbz` saves `BookFileDeleted`, `Book`, `Media`, `BookConverted` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:71
  • `BookImporter.importBook` saves `BookFileDeleted`, `Media`, `BookMetadata`, `ThumbnailBook`, `ReadProgress`, `ReadList`, `Series`, `Sidecar`, `BookImported` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/BookImporter.kt:69
  • `BookLifecycle.analyzeAndPersist` saves `List`, `Media` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:80
  • `BookLifecycle.deleteOne` saves `MediaRepository`, `BookMetadataRepository`, `BookProjectionRepository`, `BookRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:365
  • `BookLifecycle.deleteMany` saves `MediaRepository`, `BookMetadataRepository`, `BookProjectionRepository`, `BookRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:391
  • `BookLifecycle.deleteBookFiles` saves `BookFileDeleted`, `SeriesFolderDeleted` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:546
  • `BookPageEditor.removeHashedPages` saves `Book`, `Media`, `PageHashKnown`, `DuplicatePageDeleted` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/BookPageEditor.kt:55
  • `LibraryContentLifecycle.scanRootFolder` saves `Library`, `Series`, `Book`, `Media`, `Sidecar` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:69
  • `LibraryContentLifecycle.tryRestoreSeries` saves `List`, `SeriesMetadata`, `ThumbnailSeries`, `SeriesCollection` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:281
  • `LibraryContentLifecycle.tryRestoreBooks` saves `Book`, `ThumbnailBook`, `BookMetadata`, `ReadProgress`, `ReadList` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:363
  • `SeriesLifecycle.sortBooks` saves `List`, `Series` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:67
  • `SeriesLifecycle.addBooks` saves `BookRepository`, `MediaRepository`, `BookMetadataRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:121
  • `SeriesLifecycle.createSeries` saves `Series`, `SeriesMetadata`, `BookMetadataAggregation` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:151
  • `SeriesLifecycle.deleteMany` saves `SeriesMetadataRepository`, `BookMetadataAggregationRepository`, `SeriesRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:187

What to do

  • Mutate one aggregate per operation and let the others follow from a domain event — the second aggregate reaching consistency a moment later is the design, not a compromise.
DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.

Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.

DM2 · Strongly-typed ids3.0 / 10Weak✓ Tool-verified

Other · Domain Modelling — How much of the domain uses strongly-typed ids vs raw Guid/string/int — adoption curve, not all-or-nothing.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.

  • `ReadProgressSeriesChanged.seriesId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:86
  • `ReadProgressSeriesChanged.userId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:87
  • `ReadProgressSeriesDeleted.seriesId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:91
  • `ReadProgressSeriesDeleted.userId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:92
  • `HistoricalEvent.bookId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — komga/src/main/kotlin/org/gotson/komga/domain/model/HistoricalEvent.kt:9
  • `HistoricalEvent.seriesId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — komga/src/main/kotlin/org/gotson/komga/domain/model/HistoricalEvent.kt:10

What to do

  • Adopt strongly-typed ids across the domain — finish the migration or document the boundary; primitive ids invite transposed-argument bugs.
DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — the clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

DM8 · Value-object opportunities10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.

Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.

DM9 · Scattered domain decisions10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

M1 · Documentation (README)8.2 / 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

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 4 project(s) that lack one — worth up to 0.5 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 accuracy6.0 / 10Adequate◐ Sampled · advisory

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.

  • next-ui/i18n/README.md runs `npm run i18n-extract`, but no package.json declares a `i18n-extract` script. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — next-ui/i18n/README.md:1
  • next-ui/src/i18n/README.md runs `npm run i18n-compile`, but no package.json declares a `i18n-compile` script. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — next-ui/src/i18n/README.md:1

What to do

  • Reconcile the README with reality: next-ui/i18n/README.md runs `npm run i18n-extract`, but no package.json declares a `i18n-extract` script; next-ui/src/i18n/README.md runs `npm run i18n-compile`, but no package.json declares a `i18n-compile` script.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability10.0 / 10Exemplary○ Nothing flagged

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.

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 spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 22143 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: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

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.

P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF1 · Benchmark discipline8.5 / 10Strong✓ Tool-verified

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

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

  • A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. — komga/src/benchmark/kotlin/org/gotson/komga/benchmark/rest/UnsortedBenchmark.kt

What to do

  • Run JMH with the GC profiler (`-prof gc`, or addProfiler(GCProfiler.class)) so allocation rate regressions are visible, not just time.
PF2 · Allocation hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

  • None of the allocation-aware idioms this check reads was found in the Kotlin production code (Kotlin: primitive arrays, value classes, primitive collections, presized collections). If this code sits on a hot path, these reduce the allocation pressure it creates — a bonus, not a requirement.

What to do

  • Kotlin: on hot paths, use primitive arrays (IntArray, LongArray …) and @JvmInline value classes instead of boxed values, primitive collections (androidx.collection, fastutil) instead of boxed ones, and presize collections and StringBuilders.
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 Safety9.9 / 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.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.5 / 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.

  • 21 duplicated blocks under next-ui/src/components/ have copies in at least two of the sibling directories apikey, book, collection, history, item, library (+4 more sibling(s) not listed) — 15 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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. — next-ui/src/components/book/view/BookView.vue:360
  • 16 duplicated blocks under next-ui/src/composables/ have copies in at least two of the sibling directories book, collection, library, readlist, series — 12 of them are reported below, and 4 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 16 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 16 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 16 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. — next-ui/src/composables/book/useBookActions.ts:26
  • 9 duplicated blocks under next-ui/src/pages/ have copies in at least two of the sibling directories account, collection, libraries, readlist, series, server — 7 of them are reported below, and 2 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. — next-ui/src/pages/collection/[id].vue:418
  • 7 duplicated blocks under komga-webui/src/ have copies in at least two of the sibling directories components, views — 4 of them are reported below, and 3 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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. — komga-webui/src/components/AuthenticationActivityTable.vue:76
  • komga-webui/src/components/dialogs/EditBooksDialog.vue:570 · komga-webui/src/components/dialogs/EditSeriesDialog.vue:700 — the two spans are one implementation copied and then locally edited — 1754 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. — komga-webui/src/components/dialogs/EditBooksDialog.vue:570
  • next-ui/src/composables/book/useBookActions.ts:26 · next-ui/src/composables/series/useSeriesActions.ts:25 — the two spans are one implementation copied and then locally edited — 1115 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. — next-ui/src/composables/book/useBookActions.ts:26
  • komga-webui/src/views/BrowseCollection.vue:218 · komga-webui/src/views/BrowseReadList.vue:238 — the two spans are one implementation copied and then locally edited — 1428 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. — komga-webui/src/views/BrowseCollection.vue:218
  • komga-webui/src/components/dialogs/CollectionEditDialog.vue:120 · komga-webui/src/components/dialogs/ReadListEditDialog.vue:135 — 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. — komga-webui/src/components/dialogs/CollectionEditDialog.vue:120
  • next-ui/src/components/book/view/BookView.vue:360 · next-ui/src/components/series/view/SeriesView.vue:336 — the two spans are one implementation copied and then locally edited — 928 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. — next-ui/src/components/book/view/BookView.vue:360
  • komga-webui/src/views/BrowseBook.vue:493 · komga-webui/src/views/BrowseOneshot.vue:615 — the two spans are one implementation copied and then locally edited — 1153 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. — komga-webui/src/views/BrowseBook.vue:493
  • komga-webui/src/views/BrowseCollections.vue:62 · komga-webui/src/views/BrowseReadLists.vue:62 — these 2 files are line-for-line copies of one another — 106 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — komga-webui/src/views/BrowseCollections.vue:62
  • next-ui/src/composables/collection/useEditCollectionDialog.ts:19 · next-ui/src/composables/series/useEditSeriesMetadataDialog.ts:18 — 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. — next-ui/src/composables/collection/useEditCollectionDialog.ts:19
  • komga-webui/src/components/dialogs/EditOneshotDialog.vue:652 · komga-webui/src/components/dialogs/EditSeriesDialog.vue:630 — the two spans are one implementation copied and then locally edited — 559 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. — komga-webui/src/components/dialogs/EditOneshotDialog.vue:652
  • next-ui/src/colada/collections.ts:105 · next-ui/src/colada/readlists.ts:135 — 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. — next-ui/src/colada/collections.ts:105
  • komga-webui/src/services/komga-collections.service.ts:9 · komga-webui/src/services/komga-readlists.service.ts:15 — the two spans are one implementation copied and then locally edited — 512 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. — komga-webui/src/services/komga-collections.service.ts:9
  • next-ui/src/composables/readlist/useReadListActions.ts:18 · next-ui/src/composables/series/useSeriesActions.ts:27 — the two spans are one implementation copied and then locally edited — 410 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. — next-ui/src/composables/readlist/useReadListActions.ts:18
  • komga-webui/src/components/dialogs/CollectionAddToDialog.vue:81 · komga-webui/src/components/dialogs/ReadListAddToDialog.vue:83 — 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. — komga-webui/src/components/dialogs/CollectionAddToDialog.vue:81
  • next-ui/src/colada/books.ts:33 · next-ui/src/colada/series.ts:31 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited. — next-ui/src/colada/books.ts:33
  • next-ui/src/components/book/card/BookCard.vue:93 · next-ui/src/components/series/card/SeriesCard.vue:83 — the two spans are one implementation copied and then locally edited — 383 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. — next-ui/src/components/book/card/BookCard.vue:93
  • next-ui/src/pages/collection/[id].vue:418 · next-ui/src/pages/libraries/[viewId]/series.vue:378 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited. — next-ui/src/pages/collection/[id].vue:418
  • next-ui/src/composables/filter.ts:37 · next-ui/src/composables/filter.ts:107 — 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. — next-ui/src/composables/filter.ts:37
  • next-ui/src/pages/libraries/[viewId]/collections.vue:60 · next-ui/src/pages/libraries/[viewId]/readlists.vue:59 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited. — next-ui/src/pages/libraries/[viewId]/collections.vue:60
  • next-ui/src/pages/libraries/[viewId]/books.vue:303 · next-ui/src/pages/readlist/[id].vue:345 · next-ui/src/pages/series/[id].vue:364 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited. — next-ui/src/pages/libraries/[viewId]/books.vue:303
  • komga-webui/src/services/komga-collections.service.ts:106 · komga-webui/src/services/komga-series.service.ts:154 — 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. — komga-webui/src/services/komga-collections.service.ts:106
  • next-ui/src/components/collection/AddTo.vue:106 · next-ui/src/components/readlist/AddTo.vue:109 — the two spans are one implementation copied and then locally edited — 316 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. — next-ui/src/components/collection/AddTo.vue:106
  • komga-webui/src/views/BrowseBooks.vue:496 · komga-webui/src/views/BrowseLibraries.vue:674 — 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. — komga-webui/src/views/BrowseBooks.vue:496
  • komga-webui/src/services/komga-books.service.ts:251 · komga-webui/src/services/komga-collections.service.ts:111 · komga-webui/src/services/komga-readlists.service.ts:150 · komga-webui/src/services/komga-series.service.ts:159 — the 4 copies are spread across 4 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. — komga-webui/src/services/komga-books.service.ts:251
  • next-ui/src/components/filter/by/Contributor.vue:27 · next-ui/src/components/filter/by/NotableEntity.vue:27 — 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. — next-ui/src/components/filter/by/Contributor.vue:27
  • next-ui/src/components/filter/by/Genre.vue:26 · next-ui/src/components/filter/by/Publisher.vue:26 · next-ui/src/components/filter/by/SharingLabel.vue:26 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — next-ui/src/components/filter/by/Genre.vue:26
  • next-ui/src/components/pageHash/KnownTable.vue:329 · next-ui/src/components/pageHash/UnknownTable.vue:277 — the 2 copies are spread across 2 files, 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. — next-ui/src/components/pageHash/KnownTable.vue:329
  • next-ui/src/composables/book/useEditBookMetadataDialog.ts:68 · next-ui/src/composables/collection/useEditCollectionDialog.ts:46 · next-ui/src/composables/readlist/useEditReadListDialog.ts:46 · next-ui/src/composables/series/useEditSeriesMetadataDialog.ts:45 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — next-ui/src/composables/book/useEditBookMetadataDialog.ts:68
  • komga-webui/src/components/dialogs/EditBooksDialog.vue:482 · komga-webui/src/components/dialogs/EditOneshotDialog.vue:644 — 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. — komga-webui/src/components/dialogs/EditBooksDialog.vue:482
  • next-ui/src/components/book/menu/Sheet.vue:31 · next-ui/src/components/series/menu/Sheet.vue:33 — 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. — next-ui/src/components/book/menu/Sheet.vue:31
  • komga-webui/src/components/menus/BookActionsMenu.vue:39 · komga-webui/src/components/menus/SeriesActionsMenu.vue:41 — the two spans are one implementation copied and then locally edited — 167 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. — komga-webui/src/components/menus/BookActionsMenu.vue:39
  • next-ui/src/colada/books.ts:200 · next-ui/src/colada/series.ts:185 — 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. — next-ui/src/colada/books.ts:200
  • next-ui/src/components/book/form/Contributors.vue:39 · next-ui/src/components/book/form/NotableEntities.vue:39 — 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. — next-ui/src/components/book/form/Contributors.vue:39
  • next-ui/src/composables/book/useAddToReadListDialog.ts:47 · next-ui/src/composables/series/useAddToCollectionDialog.ts:45 — 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. — next-ui/src/composables/book/useAddToReadListDialog.ts:47
  • komga-webui/src/services/komga-libraries.service.ts:30 · komga-webui/src/services/komga-users.service.ts:70 — 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. — komga-webui/src/services/komga-libraries.service.ts:30
  • next-ui/src/composables/book/useBookActions.ts:267 · next-ui/src/composables/library/useLibraryActions.ts:375 · next-ui/src/composables/readlist/useReadListActions.ts:113 · next-ui/src/composables/series/useSeriesActions.ts:265 — the 4 copies are spread across 4 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. — next-ui/src/composables/book/useBookActions.ts:267
  • next-ui/src/functions/filter.ts:61 · next-ui/src/functions/filter.ts:99 — 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. — next-ui/src/functions/filter.ts:61

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.
R11 · Import Boundaries7.8 / 10Strong✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • komga-webui/src/components/dialogs/ApiKeyAddDialog.vue:71 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/components/dialogs/ApiKeyAddDialog.vue:71
  • komga-webui/src/components/dialogs/EditBooksDialog.vue:431 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/components/dialogs/EditBooksDialog.vue:431
  • komga-webui/src/components/dialogs/EditOneshotDialog.vue:565 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/components/dialogs/EditOneshotDialog.vue:565
  • komga-webui/src/components/dialogs/EditSeriesDialog.vue:559 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/components/dialogs/EditSeriesDialog.vue:559
  • komga-webui/src/components/dialogs/LibraryEditDialog.vue:447 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/components/dialogs/LibraryEditDialog.vue:447
  • komga-webui/src/components/dialogs/PasswordChangeDialog.vue:60 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/components/dialogs/PasswordChangeDialog.vue:60
  • komga-webui/src/components/dialogs/UserAddDialog.vue:79 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/components/dialogs/UserAddDialog.vue:79
  • komga-webui/src/functions/readium.ts:3 imports @d-i-t-a/reader/dist/types/model/Locator, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/functions/readium.ts:3
  • komga-webui/src/plugins/vuetify.ts:4 imports vuetify/lib, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/plugins/vuetify.ts:4
  • komga-webui/src/plugins/vuetify.ts:5 imports vuetify/lib/util/colors, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/plugins/vuetify.ts:5
  • komga-webui/src/plugins/vuetify.ts:7 imports vuetify/lib/directives, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/plugins/vuetify.ts:7
  • komga-webui/src/views/EpubReader.vue:318 imports @d-i-t-a/reader/dist/types/model/Locator, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/views/EpubReader.vue:318
  • komga-webui/src/views/ImportReadList.vue:128 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/views/ImportReadList.vue:128
  • komga-webui/src/views/LoginView.vue:140 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/views/LoginView.vue:140
  • komga-webui/src/views/ServerSettings.vue:200 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — komga-webui/src/views/ServerSettings.vue:200

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity9.3 / 10Exemplary✓ 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.

  • (anonymous) has cyclomatic complexity 39 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — next-ui/src/composables/sse.ts:345
  • loadPage has cyclomatic complexity 36 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. — komga-webui/src/views/BrowseLibraries.vue:766
  • resetParams has cyclomatic complexity 31 and cognitive complexity 22; 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. — komga-webui/src/views/BrowseLibraries.vue:574
  • dialogReset has cyclomatic complexity 30 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. — komga-webui/src/components/dialogs/LibraryEditDialog.vue:616
  • validateForm has cyclomatic complexity 26 and cognitive complexity 48; 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. — komga-webui/src/components/dialogs/EditSeriesDialog.vue:841
  • validateForm has cyclomatic complexity 23 and cognitive complexity 48; 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. — komga-webui/src/components/dialogs/EditOneshotDialog.vue:911
  • resetParams has cyclomatic complexity 22 and cognitive complexity 14; 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. — komga-webui/src/views/BrowseCollection.vue:342
  • resetParams has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — komga-webui/src/views/BrowseBooks.vue:442
  • loadPage has cyclomatic complexity 19 and cognitive complexity 21; 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. — komga-webui/src/views/BrowseBooks.vue:585
  • dialogReset has cyclomatic complexity 18 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. — komga-webui/src/components/dialogs/EditSeriesDialog.vue:760
  • dialogReset has cyclomatic complexity 18 and cognitive complexity 30; 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. — komga-webui/src/components/dialogs/EditOneshotDialog.vue:830
  • validateForm has cyclomatic complexity 17 and cognitive complexity 36; 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. — komga-webui/src/components/dialogs/EditBooksDialog.vue:661
  • setup has cyclomatic complexity 16 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 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. — komga-webui/src/views/DivinaReader.vue:682
  • editBooks has cyclomatic complexity 15 and cognitive complexity 24; 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. — komga-webui/src/components/dialogs/EditBooksDialog.vue:724
  • editOneShots has cyclomatic complexity 15 and cognitive complexity 24; 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. — komga-webui/src/components/dialogs/EditOneshotDialog.vue:1010
  • editSeries has cyclomatic complexity 15 and cognitive complexity 24; 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. — komga-webui/src/components/dialogs/EditSeriesDialog.vue:929
  • callback has cyclomatic complexity 15 and cognitive complexity 22; 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. — next-ui/src/composables/book/useEditBookMetadataDialog.ts:68
  • formatSingleContext has cyclomatic complexity 15 and cognitive complexity 20; 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. — next-ui/src/functions/browsing-context.ts:53
  • loadBook has cyclomatic complexity 14 and cognitive complexity 21; 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. — komga-webui/src/views/BrowseBook.vue:628
  • getSeries has cyclomatic complexity 14 and cognitive complexity 14; 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. — komga-webui/src/services/komga-collections.service.ts:83

What to do

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

  • next-ui/src/mocks/api/handlers/transient-books.ts has 1462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/mocks/api/handlers/transient-books.ts:1
  • komga-webui/src/views/BrowseSeries.vue has 1070 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/BrowseSeries.vue:1
  • komga-webui/src/components/dialogs/EditOneshotDialog.vue has 1057 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/components/dialogs/EditOneshotDialog.vue:1
  • komga-webui/src/components/dialogs/EditSeriesDialog.vue has 973 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/components/dialogs/EditSeriesDialog.vue:1
  • komga-webui/src/views/EpubReader.vue has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/EpubReader.vue:1
  • komga-webui/src/views/DivinaReader.vue has 916 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/DivinaReader.vue:1
  • komga-webui/src/views/BrowseLibraries.vue has 854 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/BrowseLibraries.vue:1
  • komga-webui/src/views/BrowseOneshot.vue has 818 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/BrowseOneshot.vue:1
  • komga-webui/src/components/dialogs/EditBooksDialog.vue has 795 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/components/dialogs/EditBooksDialog.vue:1
  • komga-webui/src/components/dialogs/LibraryEditDialog.vue has 676 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/components/dialogs/LibraryEditDialog.vue:1
  • komga-webui/src/views/BrowseBook.vue has 658 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/BrowseBook.vue:1
  • komga-webui/src/views/BrowseBooks.vue has 638 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/BrowseBooks.vue:1
  • next-ui/src/components/book/view/BookView.vue has 596 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/components/book/view/BookView.vue:1
  • komga-webui/src/views/DashboardView.vue has 571 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/DashboardView.vue:1
  • next-ui/src/components/import/books/TransientBooksTable.vue has 552 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/components/import/books/TransientBooksTable.vue:1
  • next-ui/src/components/series/view/SeriesView.vue has 542 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/components/series/view/SeriesView.vue:1
  • komga-webui/src/views/BrowseCollection.vue has 533 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/BrowseCollection.vue:1
  • next-ui/src/colada/referential.ts has 532 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/colada/referential.ts:1
  • next-ui/src/components/import/readlist/Table.vue has 523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/components/import/readlist/Table.vue:1
  • next-ui/src/components/server/Settings.vue has 523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/components/server/Settings.vue:1
  • komga-webui/src/views/BrowseReadList.vue has 511 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/BrowseReadList.vue:1
  • komga-webui/src/views/HomeView.vue 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. — komga-webui/src/views/HomeView.vue:1
  • komga-webui/src/views/SearchView.vue has 452 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/views/SearchView.vue:1
  • next-ui/src/pages/collection/[id].vue has 445 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/pages/collection/[id].vue:1
  • next-ui/src/composables/sse.ts has 423 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/composables/sse.ts:1
  • komga-webui/src/components/ItemCard.vue has 413 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — komga-webui/src/components/ItemCard.vue:1
  • next-ui/src/pages/libraries/[viewId]/series.vue has 409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/pages/libraries/[viewId]/series.vue:1
  • next-ui/src/components/pageHash/KnownTable.vue has 404 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — next-ui/src/components/pageHash/KnownTable.vue:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage4.3 / 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) — komga-webui/src/views/BrowseSeries.vue:1, komga-webui/src/components/dialogs/EditOneshotDialog.vue:1, komga-webui/src/components/dialogs/EditSeriesDialog.vue:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness7.6 / 10Strong✓ 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.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

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

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

R7 · Dead Code5.3 / 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 7 application, 28 tooling and 169 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 (7 application, 28 tooling, 169 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 (×29) — next-ui/src/pages/collection/[id].vue, next-ui/src/pages/libraries/[viewId]/series.vue, next-ui/src/pages/series/[id].vue, …
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (next-ui/src/components/library/menu/Sheet.vue) — 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 — next-ui/src/composables/library/useLibraryActions.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/book/menu/Sheet.vue, next-ui/src/components/book/view/Actions.vue) — 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 — next-ui/src/composables/book/useBookActions.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/series/menu/Sheet.vue, next-ui/src/components/series/view/Actions.vue) — 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 — next-ui/src/composables/series/useSeriesActions.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/selection/BarActions.vue, next-ui/src/components/selection/Footer.vue) — 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 — next-ui/src/composables/useEntitiesActions.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/readlist/menu/Sheet.vue, next-ui/src/components/readlist/view/Actions.vue) — 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 — next-ui/src/composables/readlist/useReadListActions.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/collection/menu/Sheet.vue, next-ui/src/components/collection/view/Actions.vue) — 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 — next-ui/src/composables/collection/useCollectionActions.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (next-ui/src/components/library/menu/SheetLibraries.vue) — 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 — next-ui/src/composables/library/useLibrariesActions.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (next-ui/src/composables/book/useBookActions.ts, next-ui/src/composables/series/useSeriesActions.ts, next-ui/src/composables/useEntitiesActions.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 (×2) — next-ui/src/composables/book/useAddToReadListDialog.ts, next-ui/src/composables/series/useAddToCollectionDialog.ts
  • no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 11 in-repo import(s) from 11 other file(s) do name it (next-ui/src/components/book/menu/Sheet.vue, next-ui/src/components/collection/menu/Sheet.vue, next-ui/src/components/readlist/menu/Sheet.vue and 8 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 — next-ui/src/composables/selection.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 but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — next-ui/.storybook/preview.ts:3, next-ui/src/colada/actuator-info.test.ts:5
  • Declared in komga-webui/package.json 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 Imports6.2 / 10Adequate✓ 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.

  • next-ui/src/colada/books.ts → next-ui/src/colada/cache.ts → next-ui/src/colada/books.ts (one verified cycle inside a mutually-dependent group of 6 files) — next-ui/src/colada/books.ts:8
  • next-ui/src/composables/filter.ts → next-ui/src/functions/filter.ts → next-ui/src/composables/filter.ts — next-ui/src/composables/filter.ts:26

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
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 document3.5 / 10Weak✓ Tool-verified

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.

  • `handleDates` is exported and takes `body: any` from its caller, and it calls itself at line 34 (`handleDates`) with a piece of `body` — and nowhere in `handleDates` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `handleDates` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — komga-webui/src/plugins/http.plugin.ts:34

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
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 propagation7.0 / 10Strong✓ 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 1/2 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.
  • `extractImageFromDataUri` 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 })`. — next-ui/src/functions/clipboard.ts:37

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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

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

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

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 materialisation10.0 / 10Exemplary○ Nothing flagged

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.

X24 · Document value interpolated into markup unescaped3.9 / 10Weak✓ Tool-verified

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.

  • `body` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — komga-webui/src/components/ItemCard.vue:141
  • `bodyHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — komga-webui/src/components/dialogs/ConfirmationDialog.vue:12
  • `item.content_html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — komga-webui/src/views/AnnouncementsView.vue:43, next-ui/src/components/announcement/Card.vue:22
  • `$t('data_import.comicrack_preambule_html')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — komga-webui/src/views/ImportReadList.vue:4
  • `$t('login.unclaimed_html')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — komga-webui/src/views/LoginView.vue:19
  • `marked(release.description)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — komga-webui/src/views/UpdatesView.vue:47, next-ui/src/components/release/Card.vue:54

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
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 (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements 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.3 / 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.

  • `.catch(e => {})` 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) — komga-webui/src/components/UsersList.vue:166, komga-webui/src/components/SearchBox.vue:237, komga-webui/src/components/ApiKeyTable.vue:147
  • 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. (×11) — komga-webui/src/components/PageHashUnknownCard.vue:98, komga-webui/src/components/PageHashKnownCard.vue:162, komga-webui/src/plugins/persisted-state.ts:57, …
  • `.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. (×9) — komga-webui/src/views/MetricsView.vue:137, komga-webui/src/views/MetricsView.vue:141, komga-webui/src/views/MetricsView.vue:144, …
  • `.catch((_:any) => {})` 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. (×7) — komga-webui/src/views/BrowseSeries.vue:1036, komga-webui/src/views/BrowseReadLists.vue:209, komga-webui/src/views/BrowseReadList.vue:433, …
  • `catch (e: 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. (×7) — komga/src/flyway/kotlin/db/migration/sqlite/V20240422132621__fix_read_progress_locators.kt:44, komga/src/flyway/kotlin/db/migration/sqlite/V20230801104436__fix_incorrect_language_codes.kt:43, komga/src/main/kotlin/org/gotson/komga/domain/model/BCP47TagValidator.kt:19, …
  • `catch (_: 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. (×3) — komga/src/main/kotlin/org/gotson/komga/domain/model/UserRoles.kt:24, komga/src/main/kotlin/org/gotson/komga/infrastructure/configuration/ConfigurationChecker.kt:34, komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt:50

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X4 · Structured logging7.9 / 10Strong✓ Tool-verified

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

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

  • `debug` at line 32 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — next-ui/src/services/logtape.ts:32

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types9.7 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.

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

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 Health69%AdequateAcceptable, with room to improve.
Architecture69%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity61%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness47%Weak — gated by R8, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security52%Adequate — gated by D29, D30, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling70%Adequate — gated by DM2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility47%Weak — gated by AC2, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance78%StrongStrongest 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 — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.

  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 43 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.

  • 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) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; 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.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
  • D12 Dependency Hygiene — Not scored — 4 Maven/Gradle manifest(s) were read, stating a version for 25 dependency(ies) and leaving 13 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — Not scored — this repository's 25 declared JVM dependency coordinate(s) were read from its 4 Maven/Gradle manifest(s), but Maven Central could not be asked for the licence of 25 of them (HTTP 429 Too Many Requests from https://repo1.maven.org/maven2/com/github/gotson/spring-session-caffeine/2.1.0/spring-session-caffeine-2.1.0.pom), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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.
  • D19 Documentation Quality — LLM evaluation failed
  • 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 — No inline comments to assess — comment value is not applicable here.
  • 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 (.kt), 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.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • 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 — polyglot repository, one half has no runner
  • D9 Test Distribution — Test distribution not scored — polyglot repository, one half's tests are uncountable
  • DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
  • DM11 Constructible invalid state — no entities detected — construction-time invariants not assessable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
  • DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (11 event handler(s))
  • ED5 Idempotency — Not assessed, and this one is on us: 11 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (an Axon event-sourcing framework (@Aggregate/@CommandHandler/@EventSourcingHandler annotations))
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — no outbound HTTP usage detected — no HTTP client call or construction in the JVM, JavaScript/TypeScript source (service entry point: komga/src/main/kotlin/org/gotson/komga/Application.kt:8 (@SpringBootApplication))
  • P9 Domain vs controller coverage — coverage data present for 5 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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 — 131 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 24 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 1 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×10
  • Click handler on a non-interactive <div> komga-webui/src/components/dialogs/FileNameChooserDialog.vue:21 — 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> komga-webui/src/components/readers/ContinuousReader.vue: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> komga-webui/src/components/readers/ContinuousReader.vue:25 — 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> komga-webui/src/components/readers/ContinuousReader.vue:31 — 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> komga-webui/src/components/readers/PagedReader.vue:43 — 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> komga-webui/src/components/readers/PagedReader.vue:50 — 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> komga-webui/src/components/readers/PagedReader.vue:57 — 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> komga-webui/src/components/readers/PagedReader.vue:64 — 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> komga-webui/src/components/readers/PagedReader.vue:71 — 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> next-ui/src/components/item/card/ItemCard.vue:13 — 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 · Custom control with no accessible name on <div> · ×8
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/ContinuousReader.vue:19 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/ContinuousReader.vue:25 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/ContinuousReader.vue:31 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/PagedReader.vue:43 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/PagedReader.vue:50 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/PagedReader.vue:57 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/PagedReader.vue:64 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> komga-webui/src/components/readers/PagedReader.vue:71 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
D30 · Dependency Vulnerabilities · Critical CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×2
  • Import cycle (2 files) next-ui/src/colada/books.ts:8 — next-ui/src/colada/books.ts → next-ui/src/colada/cache.ts → next-ui/src/colada/books.ts (one verified cycle inside a mutually-dependent group of 6 files)
  • Import cycle (2 files) next-ui/src/composables/filter.ts:26 — next-ui/src/composables/filter.ts → next-ui/src/functions/filter.ts → next-ui/src/composables/filter.ts
AC2 · Forms & labels · Custom control with no accessible name on <main> · ×1
  • Custom control with no accessible name on <main> komga-webui/src/views/EpubReader.vue:127 — This <main> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
D11 · Test Reliability · Test suite cannot be installed from its own lockfile · ×1
  • Test suite cannot be installed from its own lockfile: next-ui/ — The vitest suite in next-ui/ was never exercised because its dependency install refused the committed lockfile — the dependency install for next-ui/ refused the committed lockfile (npm error code EUSAGE), so the suite never ran. The suite is declared and committed but cannot be installed from what the repository ships, so neither this scan nor a new contributor can run it. The ask is the one the owner performs: run the install locally and commit the lockfile it writes.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
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 '@storybook/vue3' · ×1
  • Unlisted import '@storybook/vue3' next-ui/.storybook/preview.ts:3 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@vue/test-utils' · ×1
  • Unlisted import '@vue/test-utils' next-ui/src/colada/actuator-info.test.ts:5 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Serious — 461 finding(s)
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file komga-webui/src/views/BrowseSeries.vue: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 komga-webui/src/components/dialogs/EditOneshotDialog.vue: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 komga-webui/src/components/dialogs/EditSeriesDialog.vue: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 komga-webui/src/views/EpubReader.vue: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 komga-webui/src/views/DivinaReader.vue: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 komga-webui/src/views/BrowseLibraries.vue: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 komga-webui/src/views/BrowseOneshot.vue: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 komga-webui/src/components/dialogs/EditBooksDialog.vue: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 komga-webui/src/components/dialogs/LibraryEditDialog.vue: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 komga-webui/src/views/BrowseBook.vue: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 komga-webui/src/views/BrowseBooks.vue: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 komga-webui/src/views/DashboardView.vue: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 komga-webui/src/views/BrowseCollection.vue: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 komga-webui/src/views/BrowseReadList.vue: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 komga-webui/src/views/HomeView.vue: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 next-ui/src/pages/collection/[id].vue: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 komga-webui/src/views/SearchView.vue: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 next-ui/src/composables/sse.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 next-ui/src/pages/libraries/[viewId]/series.vue: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 next-ui/src/pages/series/[id].vue: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 next-ui/src/composables/library/useLibraryActions.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 next-ui/src/pages/readlist/[id].vue: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 komga-webui/src/components/ItemCard.vue: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 komga-webui/src/components/dialogs/BulkEditBooksDialog.vue: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 next-ui/src/pages/libraries/[viewId]/books.vue: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.
X3 · Exception handling · Swallowed exception (empty catch) · ×30
  • Swallowed exception (empty catch) komga-webui/src/components/UsersList.vue:166 — `.catch(e => {})` 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) komga-webui/src/components/SearchBox.vue:237 — `.catch(e => {})` 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) komga-webui/src/components/PageHashUnknownCard.vue:98 — 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) komga-webui/src/components/PageHashKnownCard.vue:162 — 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) komga-webui/src/components/ApiKeyTable.vue:147 — `.catch(e => {})` 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) komga-webui/src/plugins/persisted-state.ts:57 — 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) komga-webui/src/plugins/persisted-state.ts:62 — 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) komga-webui/src/plugins/persisted-state.ts:64 — 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) komga-webui/src/plugins/komga-users.plugin.ts:40 — 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) komga-webui/src/plugins/komga-settings.plugin.ts:28 — 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) komga-webui/src/views/UISettings.vue: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) komga-webui/src/views/MetricsView.vue:137 — `.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) komga-webui/src/views/MetricsView.vue:141 — `.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) komga-webui/src/views/MetricsView.vue:144 — `.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) komga-webui/src/views/MetricsView.vue:154 — `.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) komga-webui/src/views/MetricsView.vue:164 — `.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) komga-webui/src/views/MetricsView.vue:174 — `.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) komga-webui/src/views/MetricsView.vue:184 — `.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) komga-webui/src/views/MetricsView.vue:189 — `.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) komga-webui/src/views/MetricsView.vue:194 — `.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) komga-webui/src/views/DashboardView.vue:271 — 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) komga-webui/src/views/BrowseSeries.vue:1036 — `.catch((_:any) => {})` 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) komga-webui/src/views/BrowseReadLists.vue:209 — `.catch((_:any) => {})` 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) komga-webui/src/views/BrowseReadList.vue:433 — `.catch((_:any) => {})` 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) komga-webui/src/views/BrowseLibraries.vue:760 — `.catch((_:any) => {})` 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.
  • + 5 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R11 · Import Boundaries · Boundary violation [package · ×15
  • Boundary violation [package:third-party-deep-import] komga-webui/src/components/dialogs/ApiKeyAddDialog.vue:71 — komga-webui/src/components/dialogs/ApiKeyAddDialog.vue:71 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/components/dialogs/EditBooksDialog.vue:431 — komga-webui/src/components/dialogs/EditBooksDialog.vue:431 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/components/dialogs/EditOneshotDialog.vue:565 — komga-webui/src/components/dialogs/EditOneshotDialog.vue:565 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/components/dialogs/EditSeriesDialog.vue:559 — komga-webui/src/components/dialogs/EditSeriesDialog.vue:559 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/components/dialogs/LibraryEditDialog.vue:447 — komga-webui/src/components/dialogs/LibraryEditDialog.vue:447 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/components/dialogs/PasswordChangeDialog.vue:60 — komga-webui/src/components/dialogs/PasswordChangeDialog.vue:60 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/components/dialogs/UserAddDialog.vue:79 — komga-webui/src/components/dialogs/UserAddDialog.vue:79 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/functions/readium.ts:3 — komga-webui/src/functions/readium.ts:3 imports @d-i-t-a/reader/dist/types/model/Locator, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/plugins/vuetify.ts:4 — komga-webui/src/plugins/vuetify.ts:4 imports vuetify/lib, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/plugins/vuetify.ts:5 — komga-webui/src/plugins/vuetify.ts:5 imports vuetify/lib/util/colors, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/plugins/vuetify.ts:7 — komga-webui/src/plugins/vuetify.ts:7 imports vuetify/lib/directives, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/views/EpubReader.vue:318 — komga-webui/src/views/EpubReader.vue:318 imports @d-i-t-a/reader/dist/types/model/Locator, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/views/ImportReadList.vue:128 — komga-webui/src/views/ImportReadList.vue:128 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/views/LoginView.vue:140 — komga-webui/src/views/LoginView.vue:140 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] komga-webui/src/views/ServerSettings.vue:200 — komga-webui/src/views/ServerSettings.vue:200 imports vuelidate/lib/validators, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×11
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:136 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:136-140 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:165-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:465 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:465-469 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:480-484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailReadListDao.kt:50 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailReadListDao.kt:50-54 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailReadListDao.kt:64-68 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailReadListDao.kt:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesCollectionDao.kt:50 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesCollectionDao.kt:50-54 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesCollectionDao.kt:64-68 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesCollectionDao.kt:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/ContentRestrictionChecker.kt:35 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/ContentRestrictionChecker.kt:35-39 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/ContentRestrictionChecker.kt:52-56 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/ContentRestrictionChecker.kt:35` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `book` to `BookDto` in one and `Book` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:266 — komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:266-270 | komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:251-255 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:266` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:23 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:23-27 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:21-25 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:29 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:29-33 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:27-31 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:72 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:72-76 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:163-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesDao.kt:85 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesDao.kt:85-89 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesDao.kt:101-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailSeriesDao.kt:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt:55 — komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt:55-59 | komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt:91-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt:62` calls `add`, `TextField` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/search/LuceneEntity.kt:98` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×10
  • Swallowed exception (caught, then discarded) komga/src/flyway/kotlin/db/migration/sqlite/V20240422132621__fix_read_progress_locators.kt:44 — `catch (e: 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) komga/src/flyway/kotlin/db/migration/sqlite/V20230801104436__fix_incorrect_language_codes.kt:43 — `catch (e: 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) komga/src/main/kotlin/org/gotson/komga/domain/model/UserRoles.kt:24 — `catch (_: 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) komga/src/main/kotlin/org/gotson/komga/domain/model/BCP47TagValidator.kt:19 — `catch (e: 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) komga/src/main/kotlin/org/gotson/komga/infrastructure/configuration/ConfigurationChecker.kt:34 — `catch (_: 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) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt:107 — `catch (e: 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) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt:117 — `catch (e: 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) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt:131 — `catch (e: 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) komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/ContentDetector.kt:38 — `catch (e: 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) komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt:50 — `catch (_: 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.
D35 · Change Coupling · Change coupling · ×9
  • Change coupling: ReferentialDao.kt ↔ ReferentialV1Controller.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:1 — `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt` and `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialV1Controller.kt` change together 88% of the time (14 of the 16 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 `4de763a7` feat(api): referential APIs accept multiple library_id for filtering (at that commit the file was still `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialController.kt`); `562c57cc` feat(api): retrieve all sharing labels (at that commit the files were still `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReferentialDao.kt` and `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReferentialController.kt`); `422876ae` feat(api): search authors and tags by read list (at that commit the files were still `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReferentialDao.kt` and `komga/src/main/kotlin/org/gotson/komga/interfaces/rest/ReferentialController.kt`) — run `git show` on any of them.
  • Change coupling: SeriesCollectionRepository.kt ↔ ReadListDao.kt komga/src/main/kotlin/org/gotson/komga/domain/persistence/SeriesCollectionRepository.kt:1 — `komga/src/main/kotlin/org/gotson/komga/domain/persistence/SeriesCollectionRepository.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt` change together 73% of the time (8 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 8 shared commits counted here, the most recent 3 are `939e6a48` refactor(komga): use SearchContext instead of ContentRestrictions in …; `8d4eb68f` feat: restrict content by labels (at that commit the file was still `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadListDao.kt`); `b0d6314e` feat(api): restrict content according to user's restrictions (at that commit the file was still `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReadListDao.kt`) — run `git show` on any of them.
  • Change coupling: BookDao.kt ↔ SeriesDao.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:1 — `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt` change together 65% of the time (17 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `39a054b9` fi(api): collection series are not always sorted by number; `0dd4b270` feat(api): readlist books are not always sorted by number; `aa0a9b43` fix(api): library restrictions are not properly apply in some cases — run `git show` on any of them.
  • Change coupling: BookLifecycle.kt ↔ ThumbnailBookDao.kt komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:1 — `komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt` change together 60% of the time (6 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 6 shared commits counted here, the most recent 3 are `812f8220` fix: restore user uploaded thumbnail when restoring deleted books and…; `870afffc` feat(kobo): update changed covers on Kobo; `796745a2` feat(api): new endpoint to regenerate thumbnails conditionally (at that commit the file was still `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ThumbnailBookDao.kt`) — run `git show` on any of them.
  • Change coupling: ComicInfoProvider.kt ↔ EpubMetadataProvider.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/comicrack/ComicInfoProvider.kt:1 — `komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/comicrack/ComicInfoProvider.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt` change together 59% of the time (20 of the 34 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 20 shared commits counted here, the most recent 3 are `c2c697fb` fix: don't strip accents on input data and sort series title with uni…; `3843f777` perf(komga): convert BookMetadataProvider to property; `1050f522` feat(api): add basic metadata for transient books — run `git show` on any of them.
  • Change coupling: komga-series.service.ts ↔ BrowseLibraries.vue komga-webui/src/services/komga-series.service.ts:1 — `komga-webui/src/services/komga-series.service.ts` and `komga-webui/src/views/BrowseLibraries.vue` change together 51% of the time (19 of the 37 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 19 shared commits counted here, the most recent 3 are `c8e4a462` feat(webui): add ability to pin/unpin libraries; `2ac296dd` refactor(webui): use new book list API; `d93bc3d9` feat(webui): better filtering for Series — run `git show` on any of them.
  • Change coupling: komga-referential.service.ts ↔ BrowseLibraries.vue komga-webui/src/services/komga-referential.service.ts:1 — `komga-webui/src/services/komga-referential.service.ts` and `komga-webui/src/views/BrowseLibraries.vue` change together 50% of the time (8 of the 16 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 `ef015503` feat(webui): only shows filter values for pinned libraries; `bb1eb36d` feat(webui): display and filter series aggregated book tags; `b908ac14` feat(webui): search authors in filters — run `git show` on any of them.
  • Change coupling: ThumbnailBookDao.kt ↔ BookController.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt:1 — `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt` and `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt` 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 `870afffc` feat(kobo): update changed covers on Kobo; `796745a2` feat(api): new endpoint to regenerate thumbnails conditionally (at that commit the file was still `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ThumbnailBookDao.kt`); `bb13c0c3` feat(komga): store filesize, media type and dimensions for thumbnails (at that commit the file was still `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ThumbnailBookDao.kt`) — run `git show` on any of them.
  • Change coupling: LibraryNavigation.vue ↔ router.ts komga-webui/src/components/LibraryNavigation.vue:1 — `komga-webui/src/components/LibraryNavigation.vue` and `komga-webui/src/router.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 `406ae4be` feat(webui): new view to browse all books; `c8e4a462` feat(webui): add ability to pin/unpin libraries; `b26559dc` feat: Added a 'Recommended' tab in the library views for a library sp… — run `git show` on any of them.
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: ReferentialDao komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:44 — ClassTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 349 over it, 1.87× 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: Opds2Controller komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:68 — ClassTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 265 over it, 1.66× 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: SeriesController komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:105 — ClassTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 213 over it, 1.53× 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: OpdsController komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:104 — ClassTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 154 over it, 1.39× 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: BookController komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:102 — ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 142 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: KoboController REDACTED:162 — ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 93 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SyncPointDao komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:31 — ClassTooLong — 445 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 45 over it, 1.11× 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: BookDtoDao komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:56 — ClassTooLong — 428 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 28 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×8
  • Untrusted text written into markup unescaped komga-webui/src/components/ItemCard.vue:141 — `body` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped komga-webui/src/components/dialogs/ConfirmationDialog.vue:12 — `bodyHtml` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped komga-webui/src/views/AnnouncementsView.vue:43 — `item.content_html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped komga-webui/src/views/ImportReadList.vue:4 — `$t('data_import.comicrack_preambule_html')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped komga-webui/src/views/LoginView.vue:19 — `$t('login.unclaimed_html')` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped komga-webui/src/views/UpdatesView.vue:47 — `marked(release.description)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped next-ui/src/components/announcement/Card.vue:22 — `item.content_html` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped next-ui/src/components/release/Card.vue:54 — `marked(release.description)` is text this program did not author, and it is written into the text of an element through Vue's `v-html` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
D36 · Supply-chain Provenance & Signing REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX2 · Stateful singletons · Stateful singleton · ×6
  • Stateful singleton: BookConverter komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:42 — `BookConverter` is a singleton (@Service: the container shares one instance across every request thread) but mutates instance state outside any lock (failedConversions, skippedRepairs; e.g. `failedConversions` in `convertToCbz` at line 71).
  • Stateful singleton: BookPageEditor komga/src/main/kotlin/org/gotson/komga/domain/service/BookPageEditor.kt:40 — `BookPageEditor` is a singleton (@Service: the container shares one instance across every request thread) but mutates instance state outside any lock (failedPageRemoval; e.g. `failedPageRemoval` in `removeHashedPages` at line 55).
  • Stateful singleton: KomgaSettingsProvider komga/src/main/kotlin/org/gotson/komga/infrastructure/configuration/KomgaSettingsProvider.kt:12 — `KomgaSettingsProvider` is a singleton (@Service: the container shares one instance across every request thread) but mutates instance state outside any lock (rememberMeKey; e.g. `rememberMeKey` in `renewRememberMeKey` at line 38).
  • Stateful singleton: KepubConverter komga/src/main/kotlin/org/gotson/komga/infrastructure/kobo/KepubConverter.kt:29 — `KepubConverter` is a singleton (@Component: the container shares one instance across every request thread) but mutates instance state outside any lock (isAvailable, kepubifyPath; e.g. `isAvailable` in `configureKepubify` at line 61).
  • Stateful singleton: WebServerEffectiveSettings komga/src/main/kotlin/org/gotson/komga/infrastructure/web/WebServerEffectiveSettings.kt:9 — `WebServerEffectiveSettings` is a singleton (@Component: the container shares one instance across every request thread) but mutates instance state outside any lock (effectiveServerPort; e.g. `effectiveServerPort` in `onApplicationEvent` at line 16).
  • Stateful singleton: SseController komga/src/main/kotlin/org/gotson/komga/interfaces/sse/SseController.kt:38 — `SseController` is a singleton (@Controller: the container shares one instance across every request thread) but mutates instance state outside any lock (acceptingConnections; e.g. `acceptingConnections` in `stop` at line 151).
D3 · God Classes · MethodTooLong · ×6
  • MethodTooLong: KoboController.syncLibrary REDACTED:270 — MethodTooLong — syncLibrary runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× 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: BookImporter.importBook komga/src/main/kotlin/org/gotson/komga/domain/service/BookImporter.kt:69 — MethodTooLong — importBook runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: OpenApiConfiguration.openApi komga/src/main/kotlin/org/gotson/komga/infrastructure/openapi/OpenApiConfiguration.kt:72 — MethodTooLong — openApi runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LibraryContentLifecycle.scanRootFolder komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:69 — MethodTooLong — scanRootFolder runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: FileSystemScanner.scanRootFolder komga/src/main/kotlin/org/gotson/komga/domain/service/FileSystemScanner.kt:48 — MethodTooLong — scanRootFolder 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: TaskHandler.handleTask komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskHandler.kt:48 — MethodTooLong — handleTask 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.
D3 · God Classes · FileTooLong · ×6
  • FileTooLong: main/ReferentialDao.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt — FileTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: ReferentialDao (44-895). The bar is 500 significant lines; this is 290 over it, 1.58× 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: v2/Opds2Controller.kt komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt — FileTooLong — 728 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Opds2Controller (68-932). The bar is 500 significant lines; this is 228 over it, 1.46× 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: rest/SeriesController.kt komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt — FileTooLong — 714 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: SeriesController (105-864). The bar is 500 significant lines; this is 214 over it, 1.43× 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: v1/OpdsController.kt komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt — FileTooLong — 653 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: OpdsController (104-820). The bar is 500 significant lines; this is 153 over it, 1.31× 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: rest/BookController.kt komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt — FileTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: BookController (102-777). The bar is 500 significant lines; this is 140 over it, 1.28× 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 — 604 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: KoboController (162-853). The bar is 500 significant lines; this is 104 over it, 1.21× 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×6
  • Duplicated block (8 lines × 2) komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:105 — komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:105-112 | komga/src/main/kotlin/org/gotson/komga/domain/service/BookPageEditor.kt:107-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt:113 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt:113-120 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesCollectionDao.kt:113-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:70 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:70-77 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:110-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:118` calls `leftJoin`, `on`, `eq` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:78` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:672 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:672-679 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:830-837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:672` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt:210 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt:210-217 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:186-193 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt:210` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) komga/src/flyway/kotlin/db/migration/sqlite/V20230801104436__fix_incorrect_language_codes.kt:39 — komga/src/flyway/kotlin/db/migration/sqlite/V20230801104436__fix_incorrect_language_codes.kt:39-46 | komga/src/main/kotlin/org/gotson/komga/domain/model/BCP47TagValidator.kt:15-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D15 · Churn × Complexity Hotspots · Hotspot · ×5
  • Hotspot: next-ui/src/composables/sse.ts next-ui/src/composables/sse.ts:201 — next-ui/src/composables/sse.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in sse.useSSE at line 201. 2 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- next-ui/src/composables/sse.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: komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:41 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in BookSearchHelper.toConditionInternal at line 41. 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt`: 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: komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:39 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in SeriesSearchHelper.toConditionInternal at line 39. 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt`: 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: komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:793 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ReferentialDao.findGeneric at line 793. 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt`: 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: next-ui/src/functions/browsing-context.ts next-ui/src/functions/browsing-context.ts:53 — next-ui/src/functions/browsing-context.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in browsing-context.formatSingleContext at line 53. 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- next-ui/src/functions/browsing-context.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.
D31 · IaC & Container Security · Medium IaC · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
DM10 · One transaction, one aggregate · One operation mutates 4 aggregates · ×5
  • One operation mutates 4 aggregates: BookConverter.convertToCbz komga/src/main/kotlin/org/gotson/komga/domain/service/BookConverter.kt:71 — `BookConverter.convertToCbz` saves `BookFileDeleted`, `Book`, `Media`, `BookConverted` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 4 aggregates: BookLifecycle.deleteOne komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:365 — `BookLifecycle.deleteOne` saves `MediaRepository`, `BookMetadataRepository`, `BookProjectionRepository`, `BookRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 4 aggregates: BookLifecycle.deleteMany komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:391 — `BookLifecycle.deleteMany` saves `MediaRepository`, `BookMetadataRepository`, `BookProjectionRepository`, `BookRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 4 aggregates: BookPageEditor.removeHashedPages komga/src/main/kotlin/org/gotson/komga/domain/service/BookPageEditor.kt:55 — `BookPageEditor.removeHashedPages` saves `Book`, `Media`, `PageHashKnown`, `DuplicatePageDeleted` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 4 aggregates: LibraryContentLifecycle.tryRestoreSeries komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:281 — `LibraryContentLifecycle.tryRestoreSeries` saves `List`, `SeriesMetadata`, `ThumbnailSeries`, `SeriesCollection` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
D3 · God Classes · FunctionTooLong · ×4
  • FunctionTooLong: sse.useSSE next-ui/src/composables/sse.ts:201 — FunctionTooLong — useSSE runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useEditBookMetadataDialog.useEditBookMetadataDialog next-ui/src/composables/book/useEditBookMetadataDialog.ts:21 — FunctionTooLong — useEditBookMetadataDialog runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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: useBookActions.useBookActions.actions next-ui/src/composables/book/useBookActions.ts:38 — FunctionTooLong — useBookActions.actions 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.
  • FunctionTooLong: useSeriesActions.useSeriesActions.actions next-ui/src/composables/series/useSeriesActions.ts:37 — FunctionTooLong — useSeriesActions.actions 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.
D3 · God Classes · TooManyMethods · ×4
  • TooManyMethods: ReferentialDao komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:44 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. Most of these members implement persistence.ReferentialRepository (46 of 49 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: TaskEmitter komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskEmitter.kt:24 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: BookDao komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:34 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: BookController komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:102 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×4
  • Duplicated block (11 lines × 2) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:39 — komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:39-49 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt:38-48 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt` and `komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/KomgaUserDao.kt:108 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/KomgaUserDao.kt:108-118 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/KomgaUserDao.kt:140-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/KomgaUserDao.kt:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:258 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:258-268 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:298-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:258` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:529 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:529-539 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:613-623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:529` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×3
  • Animation without a prefers-reduced-motion guard next-ui/src/components/item/card/ItemCard.vue:328 — `.normal` moves (`transition: transform 0.135s cubic-bezier(0, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard next-ui/src/components/item/CardWide/ItemCardWide.vue:228 — `.normal` moves (`transition: transform 0.135s cubic-bezier(0, 0, 0.2, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard komga-webui/src/components/ItemBrowser.vue:273 — `.flip-list-move` moves (`transition: transform 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D15 · Churn × Complexity Hotspots · Repeated repair · ×3
  • Repeated repair: next-ui/src/components/pageHash/UnknownTable.vue next-ui/src/components/pageHash/UnknownTable.vue:346 — next-ui/src/components/pageHash/UnknownTable.vue changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is (anonymous) at line 346), 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(nextui): better tooltips on mobile”; “fix(nextui): don't show perpetual loading after assigning an action to an unknown page hash”; “fix(nextui): disable selection for already updated unknown page hash”. 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- next-ui/src/components/pageHash/UnknownTable.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: next-ui/src/pages/libraries/[viewId]/overview.vue next-ui/src/pages/libraries/[viewId]/overview.vue:132 — next-ui/src/pages/libraries/[viewId]/overview.vue changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is callback at line 132), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(nextui): library context was not accurate to the subview in breadcrumbs”; “fix(nextui): better handling of dialog callback”; “fix(nextui): better tooltips on mobile”. 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- next-ui/src/pages/libraries/[viewId]/overview.vue`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: next-ui/src/router/login-guard.ts next-ui/src/router/login-guard.ts:11 — next-ui/src/router/login-guard.ts changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is login-guard.useLoginGuard at line 11), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(nextui): login redirection failing in some cases”; “fix(nextui): properly catch errors when using queryCache.refresh”; “fix(nextui): use querycache.refresh instead of fetch”. 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-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 09:25:49 +08:00' --until='2026-10-21 09:25:49 +08:00' --full-history --no-merges -- next-ui/src/router/login-guard.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.
D36 · Supply-chain Provenance & Signing REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:33 — komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:33-56 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailReadList.kt:22-40 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt:32-55 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeriesCollection.kt:22-40 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:58 — komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:58-71 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailReadList.kt:42-54 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt:57-70 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeriesCollection.kt:42-54 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt:120 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt:120-164 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:137-180 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:197-224 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:232-307 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×3
  • Duplicated block (16 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:136 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:136-151 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:159-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:181 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:181-196 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:234-249 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt:114 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/ReadListController.kt:114-129 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:90-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:208 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:208-217 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:306-315 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:298-307 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:208` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:157 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:157-166 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:207-216 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:277-286 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:157` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) REDACTED:366 — REDACTED:366-375 | REDACTED:377-386 | REDACTED:461-470 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:366` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×3
  • Duplicated block (10 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:144 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:144-153 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:173-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:131 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:131-140 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:169-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:596 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:596-605 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:640-649 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:596` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:98 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:98-104 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:114-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadProgressDtoDao.kt:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:392 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:392-398 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:535-541 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:392` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:197 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:197-203 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:312-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:197` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:190 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:190-195 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:215-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:190` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:189` calls `add`, `ReadStatus`, `Is` and `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:214` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:176 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:176-181 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:291-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:309 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:309-314 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:387-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:309` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:307` calls `ReadStatus`, `Is` and `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:385` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
DM10 · One transaction, one aggregate · One operation mutates 2 aggregates · ×3
  • One operation mutates 2 aggregates: BookLifecycle.analyzeAndPersist komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:80 — `BookLifecycle.analyzeAndPersist` saves `List`, `Media` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: BookLifecycle.deleteBookFiles komga/src/main/kotlin/org/gotson/komga/domain/service/BookLifecycle.kt:546 — `BookLifecycle.deleteBookFiles` saves `BookFileDeleted`, `SeriesFolderDeleted` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 2 aggregates: SeriesLifecycle.sortBooks komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:67 — `SeriesLifecycle.sortBooks` saves `List`, `Series` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
DM10 · One transaction, one aggregate · One operation mutates 3 aggregates · ×3
  • One operation mutates 3 aggregates: SeriesLifecycle.addBooks komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:121 — `SeriesLifecycle.addBooks` saves `BookRepository`, `MediaRepository`, `BookMetadataRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 3 aggregates: SeriesLifecycle.createSeries komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:151 — `SeriesLifecycle.createSeries` saves `Series`, `SeriesMetadata`, `BookMetadataAggregation` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 3 aggregates: SeriesLifecycle.deleteMany komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesLifecycle.kt:187 — `SeriesLifecycle.deleteMany` saves `SeriesMetadataRepository`, `BookMetadataAggregationRepository`, `SeriesRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
R7 · Dead Code · Dead file (~89 LoC) · ×3
  • Dead file (~89 LoC) next-ui/src/components/readlist/view/ReadlistView.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~89 LoC) next-ui/src/composables/book/useAddToReadListDialog.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (next-ui/src/composables/book/useBookActions.ts, next-ui/src/composables/series/useSeriesActions.ts, next-ui/src/composables/useEntitiesActions.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
  • Dead file (~89 LoC) next-ui/src/pages/libraries/[viewId]/overview/[section].vue — no import path from any entry point (7 application, 28 tooling, 169 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
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment next-ui/src/composables/useEntitiesActions.ts:40 — //TODO: implement remaining actions — 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 next-ui/src/router/library-view-redirect-guard.ts:38 — //TODO: for now we always redirect to 'overview', this should be persisted per viewId or pinned somehow — 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:323 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:323-334 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:360-371 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:401-412 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:323` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:500 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:500-511 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:542-553 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:626-637 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:500` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:513` calls `isNotEmpty`, `FeedGroupDto`, `FeedMetadataDto` and `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:555` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×2
  • Duplicated block (10 lines × 7) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/AuthenticationActivityDao.kt:90 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/AuthenticationActivityDao.kt:90-99 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/HistoricalEventDtoDao.kt:60-69 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:99-108 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:146-155 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:191-200 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt:124-133 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesCollectionDao.kt:124-133 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/AuthenticationActivityDao.kt:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 7) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:322 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:322-331 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:359-368 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:400-409 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:444-453 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:499-508 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:541-550 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:625-634 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:322` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) komga/src/main/kotlin/org/gotson/komga/interfaces/api/CommonBookController.kt:140 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/CommonBookController.kt:140-148 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/CommonBookController.kt:212-220 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt:515-523 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 3) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:374 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:374-382 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:413-421 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:452-460 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:374` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:45 — komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:45-50 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailReadList.kt:29-34 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt:44-49 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeriesCollection.kt:29-34 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt` and `komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 4) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:61 — komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:61-66 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailReadList.kt:44-49 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt:60-65 | komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeriesCollection.kt:44-49 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt` and `komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:341 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:341-345 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:191-195 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:306-310 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:341` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:347 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:347-351 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:197-201 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:312-316 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:347` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
DM10 · One transaction, one aggregate · One operation mutates 5 aggregates · ×2
  • One operation mutates 5 aggregates: LibraryContentLifecycle.scanRootFolder komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:69 — `LibraryContentLifecycle.scanRootFolder` saves `Library`, `Series`, `Book`, `Media`, `Sidecar` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
  • One operation mutates 5 aggregates: LibraryContentLifecycle.tryRestoreBooks komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:363 — `LibraryContentLifecycle.tryRestoreBooks` saves `Book`, `ThumbnailBook`, `BookMetadata`, `ReadProgress`, `ReadList` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
R10 · Code Duplication · Duplicated block (55 lines × 2 locations) · ×2
  • Duplicated block (55 lines × 2 locations) next-ui/src/composables/filter.ts:37 — next-ui/src/composables/filter.ts:37 · next-ui/src/composables/filter.ts:107 — 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 (55 lines × 2 locations) next-ui/src/pages/libraries/[viewId]/collections.vue:60 — next-ui/src/pages/libraries/[viewId]/collections.vue:60 · next-ui/src/pages/libraries/[viewId]/readlists.vue:59 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (39 lines × 2 locations) · ×2
  • Duplicated block (39 lines × 2 locations) next-ui/src/colada/books.ts:200 — next-ui/src/colada/books.ts:200 · next-ui/src/colada/series.ts:185 — 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 (39 lines × 2 locations) next-ui/src/components/book/form/Contributors.vue:39 — next-ui/src/components/book/form/Contributors.vue:39 · next-ui/src/components/book/form/NotableEntities.vue:39 — 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 (37 lines × 2 locations) · ×2
  • Duplicated block (37 lines × 2 locations) komga-webui/src/services/komga-libraries.service.ts:30 — komga-webui/src/services/komga-libraries.service.ts:30 · komga-webui/src/services/komga-users.service.ts:70 — 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 (37 lines × 2 locations) next-ui/src/functions/filter.ts:61 — next-ui/src/functions/filter.ts:61 · next-ui/src/functions/filter.ts:99 — 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.
R7 · Dead Code · Dead file (~129 LoC) · ×2
  • Dead file (~129 LoC) next-ui/src/pages/libraries/[viewId]/collections.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~129 LoC) next-ui/src/pages/libraries/[viewId]/readlists.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~96 LoC) · ×2
  • Dead file (~96 LoC) next-ui/src/components/library/LibraryNavigation.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~96 LoC) next-ui/src/components/series/form/Titles.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~92 LoC) · ×2
  • Dead file (~92 LoC) next-ui/src/components/book/form/NotableEntities.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~92 LoC) next-ui/src/pages/book/[id].vue — no import path from any entry point (7 application, 28 tooling, 169 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
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-vuejs-accessibility) 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 352 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 · BookSearchHelper.toConditionInternal (cyclomatic 57) · ×1
  • BookSearchHelper.toConditionInternal (cyclomatic 57) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:41 — BookSearchHelper.toConditionInternal has cyclomatic complexity 57 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SeriesSearchHelper.toConditionInternal (cyclomatic 57) · ×1
  • SeriesSearchHelper.toConditionInternal (cyclomatic 57) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:39 — SeriesSearchHelper.toConditionInternal has cyclomatic complexity 57 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · sse.useSSE (cyclomatic 52) · ×1
  • sse.useSSE (cyclomatic 52) next-ui/src/composables/sse.ts:201 — sse.useSSE has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 1 of the 52 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 345, disconnect, connect, …). 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 · TaskHandler.handleTask (cyclomatic 30) · ×1
  • TaskHandler.handleTask (cyclomatic 30) komga/src/main/kotlin/org/gotson/komga/application/tasks/TaskHandler.kt:48 — TaskHandler.handleTask has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ReferentialDao.findGeneric (cyclomatic 30) · ×1
  • ReferentialDao.findGeneric (cyclomatic 30) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:793 — ReferentialDao.findGeneric has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BookImporter.importBook (cyclomatic 28) · ×1
  • BookImporter.importBook (cyclomatic 28) komga/src/main/kotlin/org/gotson/komga/domain/service/BookImporter.kt:69 — BookImporter.importBook has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KoboController.syncLibrary (cyclomatic 28) · ×1
  • KoboController.syncLibrary (cyclomatic 28) REDACTED:270 — KoboController.syncLibrary has cyclomatic complexity 28 (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 · LibraryContentLifecycle.scanRootFolder (cyclomatic 25) · ×1
  • LibraryContentLifecycle.scanRootFolder (cyclomatic 25) komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:69 — LibraryContentLifecycle.scanRootFolder 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 · SeriesController.getSeriesDeprecated (cyclomatic 21) · ×1
  • SeriesController.getSeriesDeprecated (cyclomatic 21) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:135 — SeriesController.getSeriesDeprecated 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 · BookDao.findAll (cyclomatic 20) · ×1
  • BookDao.findAll (cyclomatic 20) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDao.kt:121 — BookDao.findAll has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · BookDtoDao.findAll (cyclomatic 19) · ×1
  • BookDtoDao.findAll (cyclomatic 19) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:119 — BookDtoDao.findAll 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 · ReferentialDao.findSeriesReleaseYears (cyclomatic 19) · ×1
  • ReferentialDao.findSeriesReleaseYears (cyclomatic 19) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:654 — ReferentialDao.findSeriesReleaseYears has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FileSystemScanner.scanRootFolder (cyclomatic 18) · ×1
  • FileSystemScanner.scanRootFolder (cyclomatic 18) komga/src/main/kotlin/org/gotson/komga/domain/service/FileSystemScanner.kt:48 — FileSystemScanner.scanRootFolder 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 · SeriesController.getSeriesAlphabeticalGroupsDeprecated (cyclomatic 18) · ×1
  • SeriesController.getSeriesAlphabeticalGroupsDeprecated (cyclomatic 18) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:268 — SeriesController.getSeriesAlphabeticalGroupsDeprecated 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 · ThumbnailBook.equals (cyclomatic 17) · ×1
  • ThumbnailBook.equals (cyclomatic 17) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:33 — ThumbnailBook.equals 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 · ThumbnailSeries.equals (cyclomatic 17) · ×1
  • ThumbnailSeries.equals (cyclomatic 17) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt:32 — ThumbnailSeries.equals 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 · SeriesDtoDao.findAll (cyclomatic 17) · ×1
  • SeriesDtoDao.findAll (cyclomatic 17) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:226 — SeriesDtoDao.findAll 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.
D2 · Cognitive Complexity · BookSearchHelper.toConditionInternal (cognitive 55) · ×1
  • BookSearchHelper.toConditionInternal (cognitive 55) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:41 — BookSearchHelper.toConditionInternal has cognitive complexity 55 (threshold 15). Drivers by points: match/switch 11 (26 pts), if/else 13 (25 pts), boolean chains 4 (nesting depth added 27). 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 · KoboController.syncLibrary (cognitive 45) · ×1
  • KoboController.syncLibrary (cognitive 45) REDACTED:270 — KoboController.syncLibrary has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 15, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryContentLifecycle.scanRootFolder (cognitive 43) · ×1
  • LibraryContentLifecycle.scanRootFolder (cognitive 43) komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:69 — LibraryContentLifecycle.scanRootFolder has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 3 (8 pts), boolean chains 5, error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SeriesSearchHelper.toConditionInternal (cognitive 39) · ×1
  • SeriesSearchHelper.toConditionInternal (cognitive 39) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:39 — SeriesSearchHelper.toConditionInternal has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 12 (28 pts), if/else 6 (11 pts) (nesting depth added 21). 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 · BookImporter.importBook (cognitive 36) · ×1
  • BookImporter.importBook (cognitive 36) komga/src/main/kotlin/org/gotson/komga/domain/service/BookImporter.kt:69 — BookImporter.importBook has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (25 pts), error handling 3 (5 pts), boolean chains 3, match/switch 3 (nesting depth added 7). 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 · book-spreads.buildSpreads (cognitive 36) · ×1
  • book-spreads.buildSpreads (cognitive 36) komga-webui/src/functions/book-spreads.ts:7 — book-spreads.buildSpreads has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 1 (2 pts) (nesting depth added 19). 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 · sse.useSSE (cognitive 33) · ×1
  • sse.useSSE (cognitive 33) next-ui/src/composables/sse.ts:201 — sse.useSSE has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 1, match/switch 1, ternaries 1 (nesting depth added 9). None of this is in the body itself: all 33 points belong to 9 function items inside it that branch (a function literal at line 345, disconnect, connect, …). 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 · SeriesController.updateSeriesMetadata (cognitive 31) · ×1
  • SeriesController.updateSeriesMetadata (cognitive 31) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:675 — SeriesController.updateSeriesMetadata has cognitive complexity 31 (threshold 15). Drivers by points: if/else 26 (31 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BookMetadataUpdateDtoKt.patch (cognitive 26) · ×1
  • BookMetadataUpdateDtoKt.patch (cognitive 26) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/dto/BookMetadataUpdateDto.kt:113 — BookMetadataUpdateDtoKt.patch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22 (26 pts) (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 · ReferentialDao.findGeneric (cognitive 25) · ×1
  • ReferentialDao.findGeneric (cognitive 25) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReferentialDao.kt:793 — ReferentialDao.findGeneric has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FileSystemScanner.scanRootFolder (cognitive 24) · ×1
  • FileSystemScanner.scanRootFolder (cognitive 24) komga/src/main/kotlin/org/gotson/komga/domain/service/FileSystemScanner.kt:48 — FileSystemScanner.scanRootFolder has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6 (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 · BookDtoDao.findAll (cognitive 24) · ×1
  • BookDtoDao.findAll (cognitive 24) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:119 — BookDtoDao.findAll has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (20 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SeriesController.getSeriesDeprecated (cognitive 24) · ×1
  • SeriesController.getSeriesDeprecated (cognitive 24) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:135 — SeriesController.getSeriesDeprecated has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SeriesDtoDao.findAll (cognitive 22) · ×1
  • SeriesDtoDao.findAll (cognitive 22) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:226 — SeriesDtoDao.findAll has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReadListDao.findAll (cognitive 20) · ×1
  • ReadListDao.findAll (cognitive 20) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt:68 — ReadListDao.findAll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2, match/switch 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, 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 · SeriesController.getSeriesAlphabeticalGroupsDeprecated (cognitive 20) · ×1
  • SeriesController.getSeriesAlphabeticalGroupsDeprecated (cognitive 20) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:268 — SeriesController.getSeriesAlphabeticalGroupsDeprecated has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, match/switch 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 · browsing-context.formatSingleContext (cognitive 20) · ×1
  • browsing-context.formatSingleContext (cognitive 20) next-ui/src/functions/browsing-context.ts:53 — browsing-context.formatSingleContext has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (6 pts), match/switch 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 · LibraryContentLifecycle.tryRestoreSeries (cognitive 19) · ×1
  • LibraryContentLifecycle.tryRestoreSeries (cognitive 19) komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:281 — LibraryContentLifecycle.tryRestoreSeries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (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 · UserController.updateUserById (cognitive 19) · ×1
  • UserController.updateUserById (cognitive 19) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/UserController.kt:148 — UserController.updateUserById has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 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 · ThumbnailBook.equals (cognitive 18) · ×1
  • ThumbnailBook.equals (cognitive 18) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailBook.kt:33 — ThumbnailBook.equals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (18 pts) (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.
D2 · Cognitive Complexity · ThumbnailSeries.equals (cognitive 18) · ×1
  • ThumbnailSeries.equals (cognitive 18) komga/src/main/kotlin/org/gotson/komga/domain/model/ThumbnailSeries.kt:32 — ThumbnailSeries.equals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (18 pts) (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.
D2 · Cognitive Complexity · SeriesCollectionDao.findAll (cognitive 18) · ×1
  • SeriesCollectionDao.findAll (cognitive 18) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesCollectionDao.kt:67 — SeriesCollectionDao.findAll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, match/switch 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 · SeriesCollectionController.getSeriesByCollectionId (cognitive 18) · ×1
  • SeriesCollectionController.getSeriesByCollectionId (cognitive 18) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesCollectionController.kt:292 — SeriesCollectionController.getSeriesByCollectionId has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. 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 · LibraryContentLifecycle.tryRestoreBooks (cognitive 17) · ×1
  • LibraryContentLifecycle.tryRestoreBooks (cognitive 17) komga/src/main/kotlin/org/gotson/komga/domain/service/LibraryContentLifecycle.kt:363 — LibraryContentLifecycle.tryRestoreBooks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 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 · SeriesMetadataLifecycle.refreshMetadata (cognitive 16) · ×1
  • SeriesMetadataLifecycle.refreshMetadata (cognitive 16) komga/src/main/kotlin/org/gotson/komga/domain/service/SeriesMetadataLifecycle.kt:38 — SeriesMetadataLifecycle.refreshMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 2 (4 pts), match/switch 2, boolean chains 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 · BookDtoDao.findSiblingReadList (cognitive 16) · ×1
  • BookDtoDao.findSiblingReadList (cognitive 16) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:345 — BookDtoDao.findSiblingReadList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 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 · filter.schemaFilterStringToConditions (cognitive 16) · ×1
  • filter.schemaFilterStringToConditions (cognitive 16) next-ui/src/functions/filter.ts:181 — filter.schemaFilterStringToConditions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (8 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 187). 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.
D32 · Data Compliance (PII/GDPR) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: Utils.kt → BookDtoDao.kt, SeriesDtoDao.kt, BookController.kt komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt — `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/Utils.kt` changes together with 3 other files — `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt`, `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt`, `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/BookController.kt` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 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 3.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (32 shared lines) · ×1
  • Near-duplicate member pair (32 shared lines) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:158 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:158-223 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:290-336 — These two members are variants of one another: 32 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:299 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:299-334 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:341-371 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:378-412 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:419-456 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:464-516 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:523-557 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:565-600 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:607-641 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/AuthenticationActivityDao.kt:73 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/AuthenticationActivityDao.kt:73-99 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/HistoricalEventDtoDao.kt:35-69 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:75-108 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:110-155 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:160-200 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt:73-133 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesCollectionDao.kt:72-133 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:176 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:176-202 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:421-448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/LibraryDao.kt:87 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/LibraryDao.kt:87-114 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/LibraryDao.kt:124-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/LibraryDao.kt:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) komga/src/main/kotlin/org/gotson/komga/domain/model/SeriesMetadata.kt:86 — komga/src/main/kotlin/org/gotson/komga/domain/model/SeriesMetadata.kt:86-109 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesMetadataDao.kt:306-329 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:201 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:201-224 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:271-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesMetadataDao.kt:88 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesMetadataDao.kt:88-109 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesMetadataDao.kt:124-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesMetadataDao.kt:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–19 lines × 2) · ×1
  • Duplicated block (15–19 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:613 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:613-631 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:565-579 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:613` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:657 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:657-675 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:649-665 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v1/OpdsController.kt:657` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:188 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:188-204 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:157-173 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:157 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/BookDtoDao.kt:157-172 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:251-267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:264 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:264-278 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:295-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:205 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:205-220 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:320-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:205` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–16 lines × 3) · ×1
  • Duplicated block (4–16 lines × 3) komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:358 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:358-373 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:397-412 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:448-451 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/rest/SeriesController.kt:358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:222 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:222-236 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:191-205 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:541 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:541-553 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:572-584 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SyncPointDao.kt:541` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:225 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:225-236 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:423-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:225` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:445 — komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:445-456 | komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:589-599 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/interfaces/api/opds/v2/Opds2Controller.kt:445` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–11 lines × 3) · ×1
  • Duplicated block (8–11 lines × 3) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:97 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:97-104 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:144-151 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:186-196 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/PageHashDao.kt:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt:127 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt:127-133 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:157-163 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:207-213 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:277-283 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDao.kt:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:149 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:149-155 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:199-205 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:269-275 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesDtoDao.kt:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (3–6 lines × 4) · ×1
  • Duplicated block (3–6 lines × 4) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:165 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:165-170 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:134-139 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:258-260 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:289-291 — before extracting anything, compare `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:165` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/BookSearchHelper.kt:164` calls `notIn`, `innerEquals`, `innerAny` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesSearchHelper.kt:258` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×1
  • Duplicated block (9 lines × 2) komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt:98 — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt:98-106 | komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt:113-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt:122` calls `where`, `eq` and `komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ThumbnailBookDao.kt:107` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: :komga — :komga: abstractness 0.07, instability 0.00, distance 0.93 — an application entry point, so it is concrete by design — the distance is expected; what is worth checking is that other projects depend on it at all, since a host should be a leaf of the graph.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: EpubExtractor (LCOM4 10) komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/epub/EpubExtractor.kt:33 — EpubExtractor's methods fall into 10 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 10 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.
DM10 · One transaction, one aggregate · One operation mutates 9 aggregates · ×1
  • One operation mutates 9 aggregates: BookImporter.importBook komga/src/main/kotlin/org/gotson/komga/domain/service/BookImporter.kt:69 — `BookImporter.importBook` saves `BookFileDeleted`, `Media`, `BookMetadata`, `ThumbnailBook`, `ReadProgress`, `ReadList`, `Series`, `Sidecar`, `BookImported` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
R10 · Code Duplication · Duplication concentrated across 10 sibling directories (21 clone groups) · ×1
  • Duplication concentrated across 10 sibling directories (21 clone groups) next-ui/src/components/book/view/BookView.vue:360 — 21 duplicated blocks under next-ui/src/components/ have copies in at least two of the sibling directories apikey, book, collection, history, item, library (+4 more sibling(s) not listed) — 15 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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 5 sibling directories (16 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (16 clone groups) next-ui/src/composables/book/useBookActions.ts:26 — 16 duplicated blocks under next-ui/src/composables/ have copies in at least two of the sibling directories book, collection, library, readlist, series — 12 of them are reported below, and 4 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 16 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 16 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 16 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 6 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (9 clone groups) next-ui/src/pages/collection/[id].vue:418 — 9 duplicated blocks under next-ui/src/pages/ have copies in at least two of the sibling directories account, collection, libraries, readlist, series, server — 7 of them are reported below, and 2 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 2 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (7 clone groups) komga-webui/src/components/AuthenticationActivityTable.vue:76 — 7 duplicated blocks under komga-webui/src/ have copies in at least two of the sibling directories components, views — 4 of them are reported below, and 3 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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 (215 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (215 matched lines × 2 locations) komga-webui/src/components/dialogs/EditBooksDialog.vue:570 — komga-webui/src/components/dialogs/EditBooksDialog.vue:570 · komga-webui/src/components/dialogs/EditSeriesDialog.vue:700 — the two spans are one implementation copied and then locally edited — 1754 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 (197 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (197 matched lines × 2 locations) next-ui/src/composables/book/useBookActions.ts:26 — next-ui/src/composables/book/useBookActions.ts:26 · next-ui/src/composables/series/useSeriesActions.ts:25 — the two spans are one implementation copied and then locally edited — 1115 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 (170 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (170 matched lines × 2 locations) komga-webui/src/views/BrowseCollection.vue:218 — komga-webui/src/views/BrowseCollection.vue:218 · komga-webui/src/views/BrowseReadList.vue:238 — the two spans are one implementation copied and then locally edited — 1428 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 (157 lines × 2 locations) · ×1
  • Duplicated block (157 lines × 2 locations) komga-webui/src/components/dialogs/CollectionEditDialog.vue:120 — komga-webui/src/components/dialogs/CollectionEditDialog.vue:120 · komga-webui/src/components/dialogs/ReadListEditDialog.vue:135 — 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 (140 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (140 matched lines × 2 locations) next-ui/src/components/book/view/BookView.vue:360 — next-ui/src/components/book/view/BookView.vue:360 · next-ui/src/components/series/view/SeriesView.vue:336 — the two spans are one implementation copied and then locally edited — 928 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 (139 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (139 matched lines × 2 locations) komga-webui/src/views/BrowseBook.vue:493 — komga-webui/src/views/BrowseBook.vue:493 · komga-webui/src/views/BrowseOneshot.vue:615 — the two spans are one implementation copied and then locally edited — 1153 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 · Wholesale file copy (106 identical lines × 2 files) · ×1
  • Wholesale file copy (106 identical lines × 2 files) komga-webui/src/views/BrowseCollections.vue:62 — komga-webui/src/views/BrowseCollections.vue:62 · komga-webui/src/views/BrowseReadLists.vue:62 — these 2 files are line-for-line copies of one another — 106 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (106 lines × 2 locations) · ×1
  • Duplicated block (106 lines × 2 locations) next-ui/src/composables/collection/useEditCollectionDialog.ts:19 — next-ui/src/composables/collection/useEditCollectionDialog.ts:19 · next-ui/src/composables/series/useEditSeriesMetadataDialog.ts:18 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (87 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (87 matched lines × 2 locations) komga-webui/src/components/dialogs/EditOneshotDialog.vue:652 — komga-webui/src/components/dialogs/EditOneshotDialog.vue:652 · komga-webui/src/components/dialogs/EditSeriesDialog.vue:630 — the two spans are one implementation copied and then locally edited — 559 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 (87 lines × 2 locations) · ×1
  • Duplicated block (87 lines × 2 locations) next-ui/src/colada/collections.ts:105 — next-ui/src/colada/collections.ts:105 · next-ui/src/colada/readlists.ts:135 — 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 (75 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (75 matched lines × 2 locations) komga-webui/src/services/komga-collections.service.ts:9 — komga-webui/src/services/komga-collections.service.ts:9 · komga-webui/src/services/komga-readlists.service.ts:15 — the two spans are one implementation copied and then locally edited — 512 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 (70 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (70 matched lines × 2 locations) next-ui/src/composables/readlist/useReadListActions.ts:18 — next-ui/src/composables/readlist/useReadListActions.ts:18 · next-ui/src/composables/series/useSeriesActions.ts:27 — the two spans are one implementation copied and then locally edited — 410 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 (60 lines × 2 locations) · ×1
  • Duplicated block (60 lines × 2 locations) komga-webui/src/components/dialogs/CollectionAddToDialog.vue:81 — komga-webui/src/components/dialogs/CollectionAddToDialog.vue:81 · komga-webui/src/components/dialogs/ReadListAddToDialog.vue:83 — 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 (59 lines × 2 locations) · ×1
  • Duplicated block (59 lines × 2 locations) next-ui/src/colada/books.ts:33 — next-ui/src/colada/books.ts:33 · next-ui/src/colada/series.ts:31 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) next-ui/src/components/book/card/BookCard.vue:93 — next-ui/src/components/book/card/BookCard.vue:93 · next-ui/src/components/series/card/SeriesCard.vue:83 — the two spans are one implementation copied and then locally edited — 383 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 (56 lines × 2 locations) · ×1
  • Duplicated block (56 lines × 2 locations) next-ui/src/pages/collection/[id].vue:418 — next-ui/src/pages/collection/[id].vue:418 · next-ui/src/pages/libraries/[viewId]/series.vue:378 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (54 lines × 3 locations) · ×1
  • Duplicated block (54 lines × 3 locations) next-ui/src/pages/libraries/[viewId]/books.vue:303 — next-ui/src/pages/libraries/[viewId]/books.vue:303 · next-ui/src/pages/readlist/[id].vue:345 · next-ui/src/pages/series/[id].vue:364 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (53 lines × 2 locations) · ×1
  • Duplicated block (53 lines × 2 locations) komga-webui/src/services/komga-collections.service.ts:106 — komga-webui/src/services/komga-collections.service.ts:106 · komga-webui/src/services/komga-series.service.ts:154 — 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 (50 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (50 matched lines × 2 locations) next-ui/src/components/collection/AddTo.vue:106 — next-ui/src/components/collection/AddTo.vue:106 · next-ui/src/components/readlist/AddTo.vue:109 — the two spans are one implementation copied and then locally edited — 316 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 (49 lines × 2 locations) · ×1
  • Duplicated block (49 lines × 2 locations) komga-webui/src/views/BrowseBooks.vue:496 — komga-webui/src/views/BrowseBooks.vue:496 · komga-webui/src/views/BrowseLibraries.vue:674 — 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 (48 lines × 4 locations) · ×1
  • Duplicated block (48 lines × 4 locations) komga-webui/src/services/komga-books.service.ts:251 — komga-webui/src/services/komga-books.service.ts:251 · komga-webui/src/services/komga-collections.service.ts:111 · komga-webui/src/services/komga-readlists.service.ts:150 · komga-webui/src/services/komga-series.service.ts:159 — the 4 copies are spread across 4 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 (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) next-ui/src/components/filter/by/Contributor.vue:27 — next-ui/src/components/filter/by/Contributor.vue:27 · next-ui/src/components/filter/by/NotableEntity.vue:27 — 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 × 3 locations) · ×1
  • Duplicated block (43 lines × 3 locations) next-ui/src/components/filter/by/Genre.vue:26 — next-ui/src/components/filter/by/Genre.vue:26 · next-ui/src/components/filter/by/Publisher.vue:26 · next-ui/src/components/filter/by/SharingLabel.vue:26 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (43 lines × 2 locations) · ×1
  • Duplicated block (43 lines × 2 locations) next-ui/src/components/pageHash/KnownTable.vue:329 — next-ui/src/components/pageHash/KnownTable.vue:329 · next-ui/src/components/pageHash/UnknownTable.vue:277 — the 2 copies are spread across 2 files, 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 (43 lines × 4 locations) · ×1
  • Duplicated block (43 lines × 4 locations) next-ui/src/composables/book/useEditBookMetadataDialog.ts:68 — next-ui/src/composables/book/useEditBookMetadataDialog.ts:68 · next-ui/src/composables/collection/useEditCollectionDialog.ts:46 · next-ui/src/composables/readlist/useEditReadListDialog.ts:46 · next-ui/src/composables/series/useEditSeriesMetadataDialog.ts:45 — the 4 copies are spread across 4 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. There is one copy in each of 4 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (42 lines × 2 locations) · ×1
  • Duplicated block (42 lines × 2 locations) komga-webui/src/components/dialogs/EditBooksDialog.vue:482 — komga-webui/src/components/dialogs/EditBooksDialog.vue:482 · komga-webui/src/components/dialogs/EditOneshotDialog.vue:644 — 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 (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) next-ui/src/components/book/menu/Sheet.vue:31 — next-ui/src/components/book/menu/Sheet.vue:31 · next-ui/src/components/series/menu/Sheet.vue:33 — 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 (39 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (39 matched lines × 2 locations) komga-webui/src/components/menus/BookActionsMenu.vue:39 — komga-webui/src/components/menus/BookActionsMenu.vue:39 · komga-webui/src/components/menus/SeriesActionsMenu.vue:41 — the two spans are one implementation copied and then locally edited — 167 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 (38 lines × 2 locations) · ×1
  • Duplicated block (38 lines × 2 locations) next-ui/src/composables/book/useAddToReadListDialog.ts:47 — next-ui/src/composables/book/useAddToReadListDialog.ts:47 · next-ui/src/composables/series/useAddToCollectionDialog.ts:45 — 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 (37 lines × 4 locations) · ×1
  • Duplicated block (37 lines × 4 locations) next-ui/src/composables/book/useBookActions.ts:267 — next-ui/src/composables/book/useBookActions.ts:267 · next-ui/src/composables/library/useLibraryActions.ts:375 · next-ui/src/composables/readlist/useReadListActions.ts:113 · next-ui/src/composables/series/useSeriesActions.ts:265 — the 4 copies are spread across 4 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 39, cognitive 16) · ×1
  • Complex function (anonymous) (cyclomatic 39, cognitive 16) next-ui/src/composables/sse.ts:345 — (anonymous) has cyclomatic complexity 39 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function loadPage (cyclomatic 36, cognitive 44) · ×1
  • Complex function loadPage (cyclomatic 36, cognitive 44) komga-webui/src/views/BrowseLibraries.vue:766 — loadPage has cyclomatic complexity 36 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 resetParams (cyclomatic 31, cognitive 22) · ×1
  • Complex function resetParams (cyclomatic 31, cognitive 22) komga-webui/src/views/BrowseLibraries.vue:574 — resetParams has cyclomatic complexity 31 and cognitive complexity 22; 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 dialogReset (cyclomatic 30, cognitive 29) · ×1
  • Complex function dialogReset (cyclomatic 30, cognitive 29) komga-webui/src/components/dialogs/LibraryEditDialog.vue:616 — dialogReset has cyclomatic complexity 30 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 validateForm (cyclomatic 26, cognitive 48) · ×1
  • Complex function validateForm (cyclomatic 26, cognitive 48) komga-webui/src/components/dialogs/EditSeriesDialog.vue:841 — validateForm has cyclomatic complexity 26 and cognitive complexity 48; 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 validateForm (cyclomatic 23, cognitive 48) · ×1
  • Complex function validateForm (cyclomatic 23, cognitive 48) komga-webui/src/components/dialogs/EditOneshotDialog.vue:911 — validateForm has cyclomatic complexity 23 and cognitive complexity 48; 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 resetParams (cyclomatic 22, cognitive 14) · ×1
  • Complex function resetParams (cyclomatic 22, cognitive 14) komga-webui/src/views/BrowseCollection.vue:342 — resetParams has cyclomatic complexity 22 and cognitive complexity 14; 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 resetParams (cyclomatic 20, cognitive 16) · ×1
  • Complex function resetParams (cyclomatic 20, cognitive 16) komga-webui/src/views/BrowseBooks.vue:442 — resetParams has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function loadPage (cyclomatic 19, cognitive 21) · ×1
  • Complex function loadPage (cyclomatic 19, cognitive 21) komga-webui/src/views/BrowseBooks.vue:585 — loadPage has cyclomatic complexity 19 and cognitive complexity 21; 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 dialogReset (cyclomatic 18, cognitive 31) · ×1
  • Complex function dialogReset (cyclomatic 18, cognitive 31) komga-webui/src/components/dialogs/EditSeriesDialog.vue:760 — dialogReset has cyclomatic complexity 18 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 dialogReset (cyclomatic 18, cognitive 30) · ×1
  • Complex function dialogReset (cyclomatic 18, cognitive 30) komga-webui/src/components/dialogs/EditOneshotDialog.vue:830 — dialogReset has cyclomatic complexity 18 and cognitive complexity 30; 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 validateForm (cyclomatic 17, cognitive 36) · ×1
  • Complex function validateForm (cyclomatic 17, cognitive 36) komga-webui/src/components/dialogs/EditBooksDialog.vue:661 — validateForm has cyclomatic complexity 17 and cognitive complexity 36; 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 setup (cyclomatic 16, cognitive 19) · ×1
  • Complex function setup (cyclomatic 16, cognitive 19) komga-webui/src/views/DivinaReader.vue:682 — setup has cyclomatic complexity 16 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 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 editBooks (cyclomatic 15, cognitive 24) · ×1
  • Complex function editBooks (cyclomatic 15, cognitive 24) komga-webui/src/components/dialogs/EditBooksDialog.vue:724 — editBooks has cyclomatic complexity 15 and cognitive complexity 24; 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 editOneShots (cyclomatic 15, cognitive 24) · ×1
  • Complex function editOneShots (cyclomatic 15, cognitive 24) komga-webui/src/components/dialogs/EditOneshotDialog.vue:1010 — editOneShots has cyclomatic complexity 15 and cognitive complexity 24; 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 editSeries (cyclomatic 15, cognitive 24) · ×1
  • Complex function editSeries (cyclomatic 15, cognitive 24) komga-webui/src/components/dialogs/EditSeriesDialog.vue:929 — editSeries has cyclomatic complexity 15 and cognitive complexity 24; 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 callback (cyclomatic 15, cognitive 22) · ×1
  • Complex function callback (cyclomatic 15, cognitive 22) next-ui/src/composables/book/useEditBookMetadataDialog.ts:68 — callback has cyclomatic complexity 15 and cognitive complexity 22; 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 formatSingleContext (cyclomatic 15, cognitive 20) · ×1
  • Complex function formatSingleContext (cyclomatic 15, cognitive 20) next-ui/src/functions/browsing-context.ts:53 — formatSingleContext has cyclomatic complexity 15 and cognitive complexity 20; 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 loadBook (cyclomatic 14, cognitive 21) · ×1
  • Complex function loadBook (cyclomatic 14, cognitive 21) komga-webui/src/views/BrowseBook.vue:628 — loadBook has cyclomatic complexity 14 and cognitive complexity 21; 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 getSeries (cyclomatic 14, cognitive 14) · ×1
  • Complex function getSeries (cyclomatic 14, cognitive 14) komga-webui/src/services/komga-collections.service.ts:83 — getSeries has cyclomatic complexity 14 and cognitive complexity 14; 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 · next-ui/src/mocks/api/handlers/transient-books.ts · ×1
  • next-ui/src/mocks/api/handlers/transient-books.ts: 1462 lines of code next-ui/src/mocks/api/handlers/transient-books.ts:1 — next-ui/src/mocks/api/handlers/transient-books.ts has 1462 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 · komga-webui/src/views/BrowseSeries.vue · ×1
  • komga-webui/src/views/BrowseSeries.vue: 1070 lines of code komga-webui/src/views/BrowseSeries.vue:1 — komga-webui/src/views/BrowseSeries.vue has 1070 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 · komga-webui/src/components/dialogs/EditOneshotDialog.vue · ×1
  • komga-webui/src/components/dialogs/EditOneshotDialog.vue: 1057 lines of code komga-webui/src/components/dialogs/EditOneshotDialog.vue:1 — komga-webui/src/components/dialogs/EditOneshotDialog.vue has 1057 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 · komga-webui/src/components/dialogs/EditSeriesDialog.vue · ×1
  • komga-webui/src/components/dialogs/EditSeriesDialog.vue: 973 lines of code komga-webui/src/components/dialogs/EditSeriesDialog.vue:1 — komga-webui/src/components/dialogs/EditSeriesDialog.vue has 973 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 · komga-webui/src/views/EpubReader.vue · ×1
  • komga-webui/src/views/EpubReader.vue: 959 lines of code komga-webui/src/views/EpubReader.vue:1 — komga-webui/src/views/EpubReader.vue has 959 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 · komga-webui/src/views/DivinaReader.vue · ×1
  • komga-webui/src/views/DivinaReader.vue: 916 lines of code komga-webui/src/views/DivinaReader.vue:1 — komga-webui/src/views/DivinaReader.vue has 916 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 · komga-webui/src/views/BrowseLibraries.vue · ×1
  • komga-webui/src/views/BrowseLibraries.vue: 854 lines of code komga-webui/src/views/BrowseLibraries.vue:1 — komga-webui/src/views/BrowseLibraries.vue has 854 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 · komga-webui/src/views/BrowseOneshot.vue · ×1
  • komga-webui/src/views/BrowseOneshot.vue: 818 lines of code komga-webui/src/views/BrowseOneshot.vue:1 — komga-webui/src/views/BrowseOneshot.vue has 818 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 · komga-webui/src/components/dialogs/EditBooksDialog.vue · ×1
  • komga-webui/src/components/dialogs/EditBooksDialog.vue: 795 lines of code komga-webui/src/components/dialogs/EditBooksDialog.vue:1 — komga-webui/src/components/dialogs/EditBooksDialog.vue has 795 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 · komga-webui/src/components/dialogs/LibraryEditDialog.vue · ×1
  • komga-webui/src/components/dialogs/LibraryEditDialog.vue: 676 lines of code komga-webui/src/components/dialogs/LibraryEditDialog.vue:1 — komga-webui/src/components/dialogs/LibraryEditDialog.vue has 676 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 · komga-webui/src/views/BrowseBook.vue · ×1
  • komga-webui/src/views/BrowseBook.vue: 658 lines of code komga-webui/src/views/BrowseBook.vue:1 — komga-webui/src/views/BrowseBook.vue has 658 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 · komga-webui/src/views/BrowseBooks.vue · ×1
  • komga-webui/src/views/BrowseBooks.vue: 638 lines of code komga-webui/src/views/BrowseBooks.vue:1 — komga-webui/src/views/BrowseBooks.vue has 638 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 · next-ui/src/components/book/view/BookView.vue · ×1
  • next-ui/src/components/book/view/BookView.vue: 596 lines of code next-ui/src/components/book/view/BookView.vue:1 — next-ui/src/components/book/view/BookView.vue has 596 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 · komga-webui/src/views/DashboardView.vue · ×1
  • komga-webui/src/views/DashboardView.vue: 571 lines of code komga-webui/src/views/DashboardView.vue:1 — komga-webui/src/views/DashboardView.vue has 571 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 · next-ui/src/components/import/books/TransientBooksTable.vue · ×1
  • next-ui/src/components/import/books/TransientBooksTable.vue: 552 lines of code next-ui/src/components/import/books/TransientBooksTable.vue:1 — next-ui/src/components/import/books/TransientBooksTable.vue has 552 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 · next-ui/src/components/series/view/SeriesView.vue · ×1
  • next-ui/src/components/series/view/SeriesView.vue: 542 lines of code next-ui/src/components/series/view/SeriesView.vue:1 — next-ui/src/components/series/view/SeriesView.vue has 542 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 · komga-webui/src/views/BrowseCollection.vue · ×1
  • komga-webui/src/views/BrowseCollection.vue: 533 lines of code komga-webui/src/views/BrowseCollection.vue:1 — komga-webui/src/views/BrowseCollection.vue has 533 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 · next-ui/src/colada/referential.ts · ×1
  • next-ui/src/colada/referential.ts: 532 lines of code next-ui/src/colada/referential.ts:1 — next-ui/src/colada/referential.ts has 532 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 · next-ui/src/components/import/readlist/Table.vue · ×1
  • next-ui/src/components/import/readlist/Table.vue: 523 lines of code next-ui/src/components/import/readlist/Table.vue:1 — next-ui/src/components/import/readlist/Table.vue has 523 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 · next-ui/src/components/server/Settings.vue · ×1
  • next-ui/src/components/server/Settings.vue: 523 lines of code next-ui/src/components/server/Settings.vue:1 — next-ui/src/components/server/Settings.vue has 523 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 · komga-webui/src/views/BrowseReadList.vue · ×1
  • komga-webui/src/views/BrowseReadList.vue: 511 lines of code komga-webui/src/views/BrowseReadList.vue:1 — komga-webui/src/views/BrowseReadList.vue has 511 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 · komga-webui/src/views/HomeView.vue · ×1
  • komga-webui/src/views/HomeView.vue: 480 lines of code komga-webui/src/views/HomeView.vue:1 — komga-webui/src/views/HomeView.vue 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 · komga-webui/src/views/SearchView.vue · ×1
  • komga-webui/src/views/SearchView.vue: 452 lines of code komga-webui/src/views/SearchView.vue:1 — komga-webui/src/views/SearchView.vue has 452 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 · next-ui/src/pages/collection/[id].vue · ×1
  • next-ui/src/pages/collection/[id].vue: 445 lines of code next-ui/src/pages/collection/[id].vue:1 — next-ui/src/pages/collection/[id].vue has 445 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 · next-ui/src/composables/sse.ts · ×1
  • next-ui/src/composables/sse.ts: 423 lines of code next-ui/src/composables/sse.ts:1 — next-ui/src/composables/sse.ts has 423 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 · komga-webui/src/components/ItemCard.vue · ×1
  • komga-webui/src/components/ItemCard.vue: 413 lines of code komga-webui/src/components/ItemCard.vue:1 — komga-webui/src/components/ItemCard.vue has 413 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 · next-ui/src/pages/libraries/[viewId]/series.vue · ×1
  • next-ui/src/pages/libraries/[viewId]/series.vue: 409 lines of code next-ui/src/pages/libraries/[viewId]/series.vue:1 — next-ui/src/pages/libraries/[viewId]/series.vue has 409 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 · next-ui/src/components/pageHash/KnownTable.vue · ×1
  • next-ui/src/components/pageHash/KnownTable.vue: 404 lines of code next-ui/src/components/pageHash/KnownTable.vue:1 — next-ui/src/components/pageHash/KnownTable.vue has 404 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 (~487 LoC) · ×1
  • Dead file (~487 LoC) next-ui/src/pages/collection/[id].vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~447 LoC) · ×1
  • Dead file (~447 LoC) next-ui/src/pages/libraries/[viewId]/series.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~428 LoC) · ×1
  • Dead file (~428 LoC) next-ui/src/pages/series/[id].vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~414 LoC) · ×1
  • Dead file (~414 LoC) next-ui/src/composables/library/useLibraryActions.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (next-ui/src/components/library/menu/Sheet.vue) — 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 (~409 LoC) · ×1
  • Dead file (~409 LoC) next-ui/src/pages/readlist/[id].vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~367 LoC) · ×1
  • Dead file (~367 LoC) next-ui/src/pages/libraries/[viewId]/books.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~306 LoC) · ×1
  • Dead file (~306 LoC) next-ui/src/composables/book/useBookActions.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/book/menu/Sheet.vue, next-ui/src/components/book/view/Actions.vue) — 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 (~304 LoC) · ×1
  • Dead file (~304 LoC) next-ui/src/composables/series/useSeriesActions.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/series/menu/Sheet.vue, next-ui/src/components/series/view/Actions.vue) — 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 (~223 LoC) · ×1
  • Dead file (~223 LoC) next-ui/src/composables/useEntitiesActions.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/selection/BarActions.vue, next-ui/src/components/selection/Footer.vue) — 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 (~168 LoC) · ×1
  • Dead file (~168 LoC) next-ui/src/components/btn/AddKind.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~165 LoC) · ×1
  • Dead file (~165 LoC) next-ui/src/components/btn/AddRole.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~160 LoC) · ×1
  • Dead file (~160 LoC) next-ui/src/pages/libraries/[viewId]/overview.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~154 LoC) · ×1
  • Dead file (~154 LoC) next-ui/src/components/navigation/NavigationBreadcrumbs.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~152 LoC) · ×1
  • Dead file (~152 LoC) next-ui/src/composables/readlist/useReadListActions.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/readlist/menu/Sheet.vue, next-ui/src/components/readlist/view/Actions.vue) — 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 (~135 LoC) · ×1
  • Dead file (~135 LoC) next-ui/src/components/book/Navigation.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~128 LoC) · ×1
  • Dead file (~128 LoC) next-ui/src/components/collection/Navigation.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~118 LoC) · ×1
  • Dead file (~118 LoC) next-ui/src/composables/collection/useCollectionActions.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (next-ui/src/components/collection/menu/Sheet.vue, next-ui/src/components/collection/view/Actions.vue) — 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 (~116 LoC) · ×1
  • Dead file (~116 LoC) next-ui/src/components/layout/app/drawer/menu/Server.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~111 LoC) · ×1
  • Dead file (~111 LoC) next-ui/src/components/dialog/ConfirmEdit.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~105 LoC) · ×1
  • Dead file (~105 LoC) next-ui/src/composables/library/useLibrariesActions.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (next-ui/src/components/library/menu/SheetLibraries.vue) — 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 (~102 LoC) · ×1
  • Dead file (~102 LoC) next-ui/src/components/import/books/TransientBookWatcher.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~98 LoC) · ×1
  • Dead file (~98 LoC) next-ui/src/components/item/Scroller.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~94 LoC) · ×1
  • Dead file (~94 LoC) next-ui/src/components/item/Browser.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~87 LoC) · ×1
  • Dead file (~87 LoC) next-ui/src/composables/series/useAddToCollectionDialog.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (next-ui/src/composables/book/useBookActions.ts, next-ui/src/composables/series/useSeriesActions.ts, next-ui/src/composables/useEntitiesActions.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 (~83 LoC) · ×1
  • Dead file (~83 LoC) next-ui/src/components/collection/view/CollectionView.vue — no import path from any entry point (7 application, 28 tooling, 169 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) next-ui/src/components/filter/SelectRange.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~78 LoC) · ×1
  • Dead file (~78 LoC) next-ui/src/components/series/menu/Sheet.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~76 LoC) · ×1
  • Dead file (~76 LoC) next-ui/src/components/book/menu/Sheet.vue — no import path from any entry point (7 application, 28 tooling, 169 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 (~74 LoC) · ×1
  • Dead file (~74 LoC) next-ui/src/composables/selection.ts — no import path from any entry point (7 application, 28 tooling, 169 test roots considered), but 11 in-repo import(s) from 11 other file(s) do name it (next-ui/src/components/book/menu/Sheet.vue, next-ui/src/components/collection/menu/Sheet.vue, next-ui/src/components/readlist/menu/Sheet.vue and 8 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 (~73 LoC) · ×1
  • Dead file (~73 LoC) next-ui/src/components/item/menu/ItemMenu.vue — no import path from any entry point (7 application, 28 tooling, 169 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 · Unused dependency '@vue/cli-plugin-router' · ×1
  • Unused dependency '@vue/cli-plugin-router' — Declared in komga-webui/package.json 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 '@vue/cli-plugin-typescript' · ×1
  • Unused dependency '@vue/cli-plugin-typescript' — Declared in komga-webui/package.json 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 '@vue/cli-plugin-vuex' · ×1
  • Unused dependency '@vue/cli-plugin-vuex' — Declared in komga-webui/package.json 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.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap komga-webui/src/plugins/http.plugin.ts:34 — `handleDates` is exported and takes `body: any` from its caller, and it calls itself at line 34 (`handleDates`) with a piece of `body` — and nowhere in `handleDates` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `handleDates` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X2 · Cancellation propagation · Async function without AbortSignal · ×1
  • Async function without AbortSignal: extractImageFromDataUri next-ui/src/functions/clipboard.ts:37 — `extractImageFromDataUri` 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 })`.
Minor — 31 finding(s)
DM2 · Strongly-typed ids · Primitive id on a domain type · ×6
  • Primitive id on a domain type: ReadProgressSeriesChanged.seriesId komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:86 — `ReadProgressSeriesChanged.seriesId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: ReadProgressSeriesChanged.userId komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:87 — `ReadProgressSeriesChanged.userId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: ReadProgressSeriesDeleted.seriesId komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:91 — `ReadProgressSeriesDeleted.seriesId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: ReadProgressSeriesDeleted.userId komga/src/main/kotlin/org/gotson/komga/domain/model/DomainEvent.kt:92 — `ReadProgressSeriesDeleted.userId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: HistoricalEvent.bookId komga/src/main/kotlin/org/gotson/komga/domain/model/HistoricalEvent.kt:9 — `HistoricalEvent.bookId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: HistoricalEvent.seriesId komga/src/main/kotlin/org/gotson/komga/domain/model/HistoricalEvent.kt:10 — `HistoricalEvent.seriesId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
D30 · Dependency Vulnerabilities · Low CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X10 · Duplicated predicate · Duplicated predicate · ×3
  • Duplicated predicate komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/divina/RarExtractor.kt:41 — `analyzeDimensions && contentDetector.isImage(mediaType)` appears character-identically in 2 files — komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/divina/RarExtractor.kt, komga/src/main/kotlin/org/gotson/komga/infrastructure/mediacontainer/divina/ZipExtractor.kt. 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 komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt:84 — `belongsToLibraryIds == null && context.libraryIds == null && !context.restrictions.isRestricted` appears character-identically in 2 files — komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/ReadListDao.kt, komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/main/SeriesCollectionDao.kt. 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 komga/src/main/kotlin/org/gotson/komga/infrastructure/web/AuthorsHandlerMethodArgumentResolver.kt:22 — `param.size == 1 && param[0].isNullOrBlank()` appears character-identically in 2 files — komga/src/main/kotlin/org/gotson/komga/infrastructure/web/AuthorsHandlerMethodArgumentResolver.kt, komga/src/main/kotlin/org/gotson/komga/infrastructure/web/DelimitedPairHandlerMethodArgumentResolver.kt. 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.
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift next-ui/i18n/README.md:1 — next-ui/i18n/README.md runs `npm run i18n-extract`, but no package.json declares a `i18n-extract` script. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift next-ui/src/i18n/README.md:1 — next-ui/src/i18n/README.md runs `npm run i18n-compile`, but no package.json declares a `i18n-compile` script. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch komga/src/flyway/kotlin/db/migration/sqlite/V20230801104436__fix_incorrect_language_codes.kt:43 — `normalize` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch komga/src/main/kotlin/org/gotson/komga/domain/model/BCP47TagValidator.kt:19 — `normalize` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
C3 · Audit Trail · Partial audit-trail evidence · ×1
  • Partial audit-trail evidence — An audit marker (an Auditable interface) was found, but no structural mechanism (a write hook recording changes, an audit-log table or model, or per-entity @Audited) — the trail's completeness can't be confirmed from the source.
C4 · Data Retention · Partial data-retention evidence · ×1
  • Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Split komga · ×1
  • Split komga — A huge project whose namespaces are all domain/service/infrastructure layers of one sprawling manga platform (domain/model, interfaces/api/rest/dto, application/tasks, persistence, search/web, mediacontainer/epub) is a grab-bag. Suggested: split into komga/domain/*, komga/interfaces/*, komga/application/*, komga/infrastructure/* namespaces
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 22143 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.
PF1 · Benchmark discipline · Benchmarks don't track allocations · ×1
  • Benchmarks don't track allocations komga/src/benchmark/kotlin/org/gotson/komga/benchmark/rest/UnsortedBenchmark.kt — A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
PF2 · Allocation hygiene · No allocation-aware idioms detected · ×1
  • No allocation-aware idioms detected — None of the allocation-aware idioms this check reads was found in the Kotlin production code (Kotlin: primitive arrays, value classes, primitive collections, presized collections). If this code sits on a hot path, these reduce the allocation pressure it creates — a bonus, not a requirement.
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 1/2 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.
X4 · Structured logging · Interpolated log message defeats structured logging · ×1
  • Interpolated log message defeats structured logging next-ui/src/services/logtape.ts:32 — `debug` at line 32 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.

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-3bb9d7f31afb4c7da6e1c22e0f9f35a4/history.json --exit-code 0 --source .1artifacts/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-3bb9d7f31afb4c7da6e1c22e0f9f35a4/tree.json --exit-code 0 --source .1artifacts/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 .79artifacts/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-update44artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .10artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .1artifacts/raw/semgrep-gdpr.json
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 01a16514-192b-7dbf-a02f-51c3ffe663b1 · 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