Public report of agalwood/Motrix, published 24 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, 24 October 2026, 13:57 UTC · Survey ID cd_b7cf06b19bd44ebbbe6a9f574f52fbe5

agalwood/Motrix

Measured 24 October 2026, 13:46 UTC, at code version 6a1949a

No regression since the last survey

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

CAI score 51out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Down 1 since the last survey

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

A large codebase: 241,062 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 3.4 person-years · Weakest lens: Production Readiness, 39

Findings by how serious they are

40 critical 1549 serious 287 minor

9 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
24 October 2026, 13:46 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.

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 ▸

89of 93 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
1855of 1876 findings point to an exact file and line, so you can open each one in the code. The other 21 concern the repository as a whole, such as missing documentation.
93dimensions across 7 lenses, read from 241,062 lines of product code in 5 projects.
Chapters

Executive summary

agalwood/Motrix scores 51 out of 100 and is rated Adequate, while six of its seven lenses score higher still: Architecture at 92, rated Exemplary, and Maturity at 68, Security and Compliance and Code Health at 66, Performance at 60 and Accessibility at 59, all rated Adequate.

The score is lower than those six because the weakest lens counts most, and here that is Production Readiness, which scores 39 and is rated Weak. Its REDACTED Scanning 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 resolve the 2 Leaked secret finding(s) in REDACTED Scanning and to resolve the 4 No assertions (empty test) finding(s) in Test Quality, and if Production Readiness rose to 70, the score would rise from 51 to about 62.

40 findings are critical: 11 in Static Analysis (SAST), ten in Secrets (history), five in Dependency Vulnerabilities, four in Dependency Hygiene, four in Test Quality, two in REDACTED Scanning, two in Web-Security Posture, one in Circular Imports and one in Forms & labels.

Watchdog couldn't measure 9 dimensions in this code, among them Code Coverage, Test Reliability and Navigability, so they are left out of the score. The product code is 241,062 lines, which would take an estimated 3.4 person-years, around €490,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 39 · counts for 46%Accessibility 59 · counts for 25%Performance 60 · counts for 14%Security and Compliance 66 · counts for 8%Code Health 66 · counts for 4%Maturity 68 · counts for 2%Architecture 92 · counts for 1%

If Production Readiness rose from 39 to 70, the lowest score rated Strong, the score would rise from 51 to about 62.

Code composition: what the lines of code are
Product code 46%Tests 54%
New since the last survey: 285 findings

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

  • Cyclomatic Complexity · operation-form.OperationFormContent (cyclomatic 130) src/renderer/features/plugin-operations/operation-form.tsx
  • Cyclomatic Complexity · http-request-context.resolveLegacyHttpRequestContext (cyclomatic 75) src/core/legacy-import/http-request-context.ts
  • Cyclomatic Complexity · LegacyHttpActivationService.reconcile (cyclomatic 55) src/core/legacy-import/http-activation-service.ts
  • Cyclomatic Complexity · PluginHttpClient.fetch (cyclomatic 47) src/core/plugin/network/plugin-http-client.ts
  • Cyclomatic Complexity · OperationService.prepare (cyclomatic 40) src/core/plugin/operations/operation-service.ts
  • Cyclomatic Complexity · operation-fields.OperationFields::renderField (cyclomatic 36) src/renderer/features/plugin-operations/operation-fields.tsx
  • Cyclomatic Complexity · OperationFiles.pick (cyclomatic 31) src/core/plugin/operations/operation-files.ts
  • Cyclomatic Complexity · RendererSupervisor.tick (cyclomatic 31) src/main/window/renderer-supervisor.ts
  • Cyclomatic Complexity · OperationFiles.execution::dispatch (cyclomatic 28) src/core/plugin/operations/operation-files.ts
  • Cyclomatic Complexity · aria2-legacy-http.requestMatches (cyclomatic 25) src/core/engine/aria2/aria2-legacy-http.ts
  • Cyclomatic Complexity · CompletedEngineTaskCleanup.observe (cyclomatic 25) src/core/task/completed-engine-task-cleanup.ts
  • Cyclomatic Complexity · session-parser.parseLegacySession::flush (cyclomatic 24) src/core/legacy-import/session-parser.ts
  • Cyclomatic Complexity · finalize-committer.assertRenameFileJournal (cyclomatic 24) src/core/plugin/finalize/finalize-committer.ts
  • Cyclomatic Complexity · OperationService.run (cyclomatic 23) src/core/plugin/operations/operation-service.ts
  • Cyclomatic Complexity · compact-limit-input.CompactLimitInput (cyclomatic 23) src/renderer/routes/settings/cards/compact-limit-input.tsx
  • Cyclomatic Complexity · i18n-resolve.walkContributes (cyclomatic 22) src/core/plugin/manifest/i18n-resolve.ts
  • Cyclomatic Complexity · activity-chart-model.buildActivityChartModel (cyclomatic 21) src/renderer/routes/downloads/inspector/activity-chart-model.ts
  • Cyclomatic Complexity · Aria2ProcessOutput.emitLine (cyclomatic 20) src/core/engine/aria2/aria2-process-output.ts
  • Cyclomatic Complexity · commands.registerCommandHandlers (cyclomatic 20) src/main/ipc/commands.ts
  • Cyclomatic Complexity · operator-extension-pairing.runExtensionPairingTerminal (cyclomatic 19) src/server/operator-extension-pairing.ts
  • Cyclomatic Complexity · LegacyHttpActivationService.verifyPayload (cyclomatic 18) src/core/legacy-import/http-activation-service.ts
  • Cyclomatic Complexity · LegacyHttpActivationService.retainedContentDigest (cyclomatic 18) src/core/legacy-import/http-activation-service.ts
  • Cyclomatic Complexity · LegacyHttpActivationService.sourceContext (cyclomatic 17) src/core/legacy-import/http-activation-service.ts
  • Cyclomatic Complexity · PluginHost.activate (cyclomatic 17) src/core/plugin/host/plugin-host.ts
  • Cyclomatic Complexity · FinalizeRecovery.recoverRenameFile (cyclomatic 17) src/core/plugin/finalize/finalize-recovery.ts
  • Cyclomatic Complexity · DirectResourceValidatorService.verifyLegacyContent::verifyRange (cyclomatic 17) src/core/task/direct-resource-validator.ts
  • Cyclomatic Complexity · RendererSupervisor.created (cyclomatic 17) src/main/window/renderer-supervisor.ts
  • Cyclomatic Complexity · use-plugin-install.usePluginInstall.startInstall (cyclomatic 17) src/renderer/routes/plugins/hooks/use-plugin-install.ts
  • Cyclomatic Complexity · operator-admin.parseCommand (cyclomatic 17) src/server/operator-admin.ts
  • Cyclomatic Complexity · remote-extension-config.parseRemoteExtensionConfig (cyclomatic 16) src/server/bridge/remote-extension-config.ts
  • Cyclomatic Complexity · OperationFiles.cleanup (cyclomatic 16) src/core/plugin/operations/operation-files.ts
  • Cyclomatic Complexity · merge-engine-task.mergeEngineTask (cyclomatic 16) src/core/task/merge-engine-task.ts
  • Cyclomatic Complexity · DirectResourceValidatorService.requestFollowingRedirects (cyclomatic 16) src/core/task/direct-resource-validator.ts
  • Cyclomatic Complexity · WindowManager.recreate (cyclomatic 16) src/main/window/window-manager.ts
  • Cyclomatic Complexity · dashboard-tile-frame.DashboardTileFrame (cyclomatic 16) src/renderer/routes/dashboard/components/dashboard-tile-frame.tsx
  • Cyclomatic Complexity · operation-form.OperationForm (cyclomatic 16) src/renderer/features/plugin-operations/operation-form.tsx
  • Cognitive Complexity · operation-form.OperationFormContent (cognitive 117) src/renderer/features/plugin-operations/operation-form.tsx
  • Cognitive Complexity · http-request-context.resolveLegacyHttpRequestContext (cognitive 77) src/core/legacy-import/http-request-context.ts
  • Cognitive Complexity · PluginHttpClient.fetch (cognitive 75) src/core/plugin/network/plugin-http-client.ts
  • Cognitive Complexity · LegacyHttpActivationService.reconcile (cognitive 69) src/core/legacy-import/http-activation-service.ts
  • Cognitive Complexity · operation-fields.OperationFields::renderField (cognitive 66) src/renderer/features/plugin-operations/operation-fields.tsx
  • Cognitive Complexity · RendererSupervisor.tick (cognitive 50) src/main/window/renderer-supervisor.ts
  • Cognitive Complexity · OperationFiles.execution::dispatch (cognitive 41) src/core/plugin/operations/operation-files.ts
  • Cognitive Complexity · OperationService.prepare (cognitive 40) src/core/plugin/operations/operation-service.ts
  • Cognitive Complexity · OperationFiles.pick (cognitive 36) src/core/plugin/operations/operation-files.ts
  • Cognitive Complexity · OperationFiles.cleanup (cognitive 33) src/core/plugin/operations/operation-files.ts
  • Cognitive Complexity · activity-chart-model.buildActivityChartModel (cognitive 30) src/renderer/routes/downloads/inspector/activity-chart-model.ts
  • Cognitive Complexity · DirectResourceValidatorService.requestFollowingRedirects (cognitive 28) src/core/task/direct-resource-validator.ts
  • Cognitive Complexity · aria2-legacy-http.requestMatches (cognitive 26) src/core/engine/aria2/aria2-legacy-http.ts
  • Cognitive Complexity · compact-limit-input.CompactLimitInput (cognitive 24) src/renderer/routes/settings/cards/compact-limit-input.tsx
  • Cognitive Complexity · DirectResourceValidatorService.verifyLegacyContent::verifyRange (cognitive 23) src/core/task/direct-resource-validator.ts
  • Cognitive Complexity · commands.registerCommandHandlers (cognitive 21) src/main/ipc/commands.ts
  • Cognitive Complexity · Aria2ProcessOutput.emitLine (cognitive 20) src/core/engine/aria2/aria2-process-output.ts
  • Cognitive Complexity · operator-extension-pairing.runExtensionPairingTerminal (cognitive 20) src/server/operator-extension-pairing.ts
  • Cognitive Complexity · OperationService.run (cognitive 19) src/core/plugin/operations/operation-service.ts
  • Cognitive Complexity · CompletedEngineTaskCleanup.observe (cognitive 19) src/core/task/completed-engine-task-cleanup.ts
  • Cognitive Complexity · use-plugin-install.usePluginInstall.startInstall (cognitive 19) src/renderer/routes/plugins/hooks/use-plugin-install.ts
  • Cognitive Complexity · WindowManager.recreate (cognitive 18) src/main/window/window-manager.ts
  • Cognitive Complexity · operation-form.OperationForm (cognitive 18) src/renderer/features/plugin-operations/operation-form.tsx
  • Cognitive Complexity · operator-admin.runOperatorAdmin (cognitive 18) src/server/operator-admin.ts
  • Cognitive Complexity · finalize-committer.assertRenameFileJournal (cognitive 17) src/core/plugin/finalize/finalize-committer.ts
  • Cognitive Complexity · OperationService.catalog (cognitive 17) src/core/plugin/operations/operation-service.ts
  • Cognitive Complexity · WindowManager.createBrowserWindow (cognitive 17) src/main/window/window-manager.ts
  • Cognitive Complexity · task-inspector-action-bar.TaskInspectorActionBar (cognitive 17) src/renderer/routes/downloads/inspector/task-inspector-action-bar.tsx
  • Cognitive Complexity · directory-picker.DirectoryPicker::handlePick (cognitive 17) src/renderer/components/desktop-kit/directory-picker.tsx
  • Cognitive Complexity · verify_snap_credential_scope.parse_whoami (cognitive 17) scripts/verify_snap_credential_scope.py
  • Cognitive Complexity · LegacyHttpActivationService.sourceContext (cognitive 16) src/core/legacy-import/http-activation-service.ts
  • Cognitive Complexity · FinalizeRecovery.recoverRenameFile (cognitive 16) src/core/plugin/finalize/finalize-recovery.ts
  • Cognitive Complexity · NativeFinalizeArtifactOperations.removeKnown (cognitive 16) src/core/plugin/finalize/native-artifact-operations.ts
  • Cognitive Complexity · use-operation-state.useOperationState (cognitive 16) src/renderer/features/plugin-operations/use-operation-state.ts
  • God Classes · FunctionTooLong: operation-form.OperationFormContent src/renderer/features/plugin-operations/operation-form.tsx
  • God Classes · FunctionTooLong: operation-fields.OperationFields src/renderer/features/plugin-operations/operation-fields.tsx
  • God Classes · MethodTooLong: LegacyHttpActivationService.reconcile src/core/legacy-import/http-activation-service.ts
  • God Classes · ClassTooLong: LegacyHttpActivationService src/core/legacy-import/http-activation-service.ts
  • God Classes · FunctionTooLong: http-request-context.resolveLegacyHttpRequestContext src/core/legacy-import/http-request-context.ts
  • God Classes · MethodTooLong: PluginHttpClient.fetch src/core/plugin/network/plugin-http-client.ts
  • God Classes · FileTooLong: legacy-import/http-activation-service.ts src/core/legacy-import/http-activation-service.ts
  • God Classes · FunctionTooLong: renderer-recovery-runtime.createRendererRecoveryRuntime src/main/window/renderer-recovery-runtime.ts
  • God Classes · ClassTooLong: OperationService src/core/plugin/operations/operation-service.ts
  • God Classes · MethodTooLong: OperationFiles.execution src/core/plugin/operations/operation-files.ts
  • God Classes · MethodTooLong: OperationService.run src/core/plugin/operations/operation-service.ts
  • God Classes · ClassTooLong: OperationFiles src/core/plugin/operations/operation-files.ts
  • God Classes · FileTooLong: operations/operation-service.ts src/core/plugin/operations/operation-service.ts
  • God Classes · TooManyMethods: RendererSupervisor src/main/window/renderer-supervisor.ts
  • God Classes · MethodTooLong: OperationService.prepare src/core/plugin/operations/operation-service.ts
  • God Classes · FileTooLong: inspector/lifetime-transfer-card.tsx src/renderer/routes/downloads/inspector/lifetime-transfer-card.tsx
  • God Classes · ClassTooLong: RendererSupervisor src/main/window/renderer-supervisor.ts
  • God Classes · FileTooLong: operations/operation-files.ts src/core/plugin/operations/operation-files.ts
  • God Classes · FileTooLong: finalize/filesystem-adapter.ts src/core/plugin/finalize/filesystem-adapter.ts
  • God Classes · FileTooLong: window/renderer-supervisor.ts src/main/window/renderer-supervisor.ts
  • God Classes · FileTooLong: plugin-operations/operation-form.tsx src/renderer/features/plugin-operations/operation-form.tsx
  • God Classes · ClassTooLong: WindowManager src/main/window/window-manager.ts
  • God Classes · ClassTooLong: NativeFinalizeFilesystemAdapter src/core/plugin/finalize/filesystem-adapter.ts
  • God Classes · FunctionTooLong: activity-tab.ActivityTabContent src/renderer/routes/downloads/inspector/activity-tab.tsx
  • God Classes · ClassTooLong: State packages/finalize-fs/src/state.rs
  • God Classes · FunctionTooLong: assemble-release-artifacts.assembleReleaseArtifacts scripts/assemble-release-artifacts.mjs
  • God Classes · FunctionTooLong: finalize-task.finalizeTaskSerialized src/core/task/actions/finalize-task.ts
  • God Classes · ClassTooLong: SettingsManager src/core/settings/settings-manager.ts
  • Code Duplication · Duplicated block (8 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs
  • Code Duplication · Duplicated block (8 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs

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

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

  • Cyclomatic Complexity · media-merge-form.MediaMergeForm (cyclomatic 90) src/renderer/features/media-merge/media-merge-form.tsx
  • Cyclomatic Complexity · ManualMediaMerge.start (cyclomatic 39) src/core/plugin/commands/manual-media-merge.ts
  • Cyclomatic Complexity · session-parser.parseLegacySession (cyclomatic 26) src/core/legacy-import/session-parser.ts
  • Cyclomatic Complexity · release-signing-input.parseOptions (cyclomatic 16) scripts/release-signing-input.mjs
  • Cyclomatic Complexity · plugin-card.PluginCard (cyclomatic 16) src/renderer/routes/plugins/components/plugin-card.tsx
  • Cognitive Complexity · media-merge-form.MediaMergeForm (cognitive 79) src/renderer/features/media-merge/media-merge-form.tsx
  • Cognitive Complexity · ManualMediaMerge.start (cognitive 34) src/core/plugin/commands/manual-media-merge.ts
  • Cognitive Complexity · DirectResourceValidatorService.requestMetadata (cognitive 22) src/core/task/direct-resource-validator.ts
  • Cognitive Complexity · HookOrchestrator.eligiblePlugins (cognitive 16) src/core/plugin/hooks/hook-orchestrator.ts
  • Cognitive Complexity · github-fetcher.downloadGithubMoext (cognitive 16) src/core/plugin/install/github-fetcher.ts
  • God Classes · FunctionTooLong: media-merge-form.MediaMergeForm src/renderer/features/media-merge/media-merge-form.tsx
  • God Classes · MethodTooLong: ManualMediaMerge.start src/core/plugin/commands/manual-media-merge.ts
  • Code Duplication · Duplicated block (8 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs
  • Test Quality · No assertions: a second launch reopens a closed main window with lightweight mode ${lightweightMode} e2e/window-reopen.spec.ts
  • Churn × Complexity Hotspots · Repeated repair: src/main/window/window-manager.ts src/main/window/window-manager.ts
  • Churn × Complexity Hotspots · Repeated repair: src/renderer/components/add-task/use-external-hydration.ts src/renderer/components/add-task/use-external-hydration.ts
  • Churn × Complexity Hotspots · Repeated repair: src/shared/types/task-actions.ts src/shared/types/task-actions.ts
  • Churn × Complexity Hotspots · Repeated repair: src/core/plugin/hooks/hook-orchestrator.ts src/core/plugin/hooks/hook-orchestrator.ts
  • Churn × Complexity Hotspots · Repeated repair: packages/finalize-fs/src/platform/windows/nt.rs packages/finalize-fs/src/platform/windows/nt.rs
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Code Duplication · Duplication concentrated across 13 sibling directories (22 clone groups) src/core/plugin/runtime/plugin-hook-runtime.ts
  • Code Duplication · Duplication concentrated across 3 sibling directories (5 clone groups) packages/finalize-fs/build.mjs
  • Code Duplication · Duplication concentrated across 7 sibling directories (5 clone groups) src/core/plugin/grants/grants-manager.ts
  • Code Duplication · Duplicated block with local edits (234 matched lines × 2 locations) src/main/ipc/commands.ts
  • Code Duplication · Duplicated block with local edits (55 matched lines × 2 locations) src/core/plugin/hooks/hook-orchestrator.ts
  • Code Duplication · Duplicated block with local edits (52 matched lines × 2 locations) src/main/ipc/queries.ts
  • Code Duplication · Duplicated block (50 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (44 lines × 2 locations) src/main/ipc/commands.ts
  • Code Duplication · Duplicated block (37 lines × 2 locations) src/main/ipc/commands.ts
  • Code Duplication · Duplicated block (33 lines × 2 locations) scripts/release-snap-build-set.mjs
  • Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) src/renderer/components/byte-unit-sync.tsx
  • Code Duplication · Duplicated block (33 lines × 2 locations) src/renderer/routes/plugins/hooks/use-plugin-graph.ts
  • Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) src/core/bridge/web-socket-bridge-server.ts
  • Code Duplication · Duplicated block (32 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (32 lines × 4 locations) src/renderer/routes/settings/cards/advanced-dialog.tsx
  • Code Duplication · Duplicated block (30 lines × 2 locations) src/core/bridge/web-socket-bridge-server.ts
  • Code Duplication · Duplicated block (30 lines × 2 locations) src/main/ipc/commands.ts
  • Code Duplication · Duplicated block (28 lines × 2 locations) src/core/bridge/web-socket-bridge-server.ts
  • Code Duplication · Duplicated block (27 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (27 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (27 lines × 2 locations) src/renderer/routes/plugins/components/call-graph/plugin-call-graph.tsx
  • Code Duplication · Duplicated block (27 lines × 2 locations) vite.renderer.config.ts
  • Code Duplication · Duplicated block (26 lines × 2 locations) src/core/torrent/swap-magnet-metadata-for-bt.ts
  • Code Duplication · Duplicated block (26 lines × 2 locations) vite.server.config.ts
  • Code Duplication · Duplicated block (25 lines × 2 locations) src/core/bridge/bridge-data-dir-lock.ts
  • Code Duplication · Duplicated block (25 lines × 2 locations) src/core/task/direct-resource-validator.ts
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/core/plugin/grants/grants-manager.ts
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/main/ipc/commands.ts
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/renderer/components/desktop-kit/sidebar/app-sidebar.tsx
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/renderer/routes/plugins/components/about-section.tsx
  • Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) src/core/plugin/finalize/native-artifact-operations.ts
  • Code Duplication · Duplicated block (23 lines × 2 locations) src/renderer/routes/dashboard/components/dashboard-grid.tsx
  • Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) src/server/bridge/remote-extension-admission-policy.ts
  • Code Duplication · Duplicated block (22 lines × 2 locations) src/core/bridge/mbp1/pair-session.ts
  • Code Duplication · Duplicated block with local edits (22 matched lines × 2 locations) src/main/bridge/index.ts
  • Code Duplication · Duplicated block (22 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (22 lines × 2 locations) src/renderer/routes/dashboard/components/dashboard-grid.tsx
  • Code Duplication · Duplicated block (22 lines × 2 locations) src/renderer/routes/settings/cards/network-dialog.tsx
  • Code Duplication · Duplicated block (21 lines × 3 locations) scripts/smoke-server-package.mjs
  • Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) src/core/session/session-manager.ts
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/core/torrent/magnet-tracker.ts
  • Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) src/renderer/components/add-task-dialog/add-task-dialog-host.tsx
  • Code Duplication · Duplicated block (21 lines × 2 locations) src/renderer/features/legacy-import/legacy-fresh-download.tsx
  • Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) src/server/bridge/remote-extension-host-policy.ts
  • Code Duplication · Duplicated block (20 lines × 2 locations) scripts/audit-server-runtime.mjs
  • Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) src/core/bridge/extension-identity-resolver.ts
  • Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) src/core/bridge/extension-pairing-projection.ts
  • Code Duplication · Duplicated block with local edits (20 matched lines × 2 locations) src/core/engine/aria2/aria2-adapter.ts
  • Code Duplication · Duplicated block (20 lines × 2 locations) src/core/plugin/install/moext-reader.ts
  • Code Duplication · Duplicated block (20 lines × 2 locations) src/core/torrent/magnet-tracker.ts
  • Code Duplication · Duplicated block (20 lines × 4 locations) src/renderer/routes/settings/cards/bit-torrent-dialog.tsx
  • Code Duplication · Duplicated block (20 lines × 4 locations) src/renderer/routes/settings/cards/engine-tuning-section.tsx
  • Code Duplication · Duplicated block (20 lines × 2 locations) src/renderer/routes/settings/cards/speed-limit-section.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/native-host/build.mjs
  • Code Duplication · Duplicated block (19 lines × 4 locations) REDACTED
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/core/plugin/configuration-schema.ts
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/core/plugin/host/capability-bridge.ts
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/renderer/features/application-menu/desktop-menu-actions.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/renderer/routes/dashboard/layout/dashboard-registry.ts
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/renderer/routes/plugins/plugin-detail-page.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/renderer/routes/plugins/plugin-diagnostics-page.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) src/renderer/routes/settings/cards/bit-torrent-dialog.tsx
  • Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) src/core/bridge/credential-store.ts
  • Code Duplication · Duplicated block (18 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/core/plugin/capabilities/http.ts
  • Code Duplication · Duplicated block (18 lines × 7 locations) src/core/plugin/host/quick-js-worker.ts
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/main/index.ts
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/renderer/components/ui/dialog.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/renderer/routes/downloads/inspector/multi-selection-summary.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/renderer/routes/downloads/inspector/task-inspector-action-bar.tsx
  • Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) src/renderer/routes/downloads/inspector/task-tracker-dialog.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/renderer/routes/settings/cards/appearance-dialog.tsx
  • Code Duplication · Duplicated block (18 lines × 4 locations) src/renderer/routes/settings/cards/bit-torrent-dialog.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) src/renderer/routes/settings/cards/integration/media-tools-section.tsx
  • Code Duplication · Duplicated block (17 lines × 2 locations) scripts/audit-server-runtime.mjs
  • Code Duplication · Duplicated block (17 lines × 2 locations) scripts/electron-package-utils.mjs
  • Code Duplication · Duplicated block (17 lines × 2 locations) src/core/plugin/install/moext-reader.ts
Rebuild cost: about €490,000 · Estimate
Cost to rebuild€160,000 to €820,000, for 2,731 to 8,664 hours of work, about 3.4 person-years for 2 to 7 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.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: 241,062 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
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.
Raises the score by about 11 points · Low effort · REDACTED Scanning
2
Resolve the 4 No assertions (empty test) finding(s) in Test Quality — start with disclaimer.spec.ts, app-deep-links.spec.ts, native-messaging-installer.test.ts.
Raises the score by about 5 points · Low effort · Test Quality
3
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
Raises the score by about 5 points · Medium effort · Dependency Hygiene

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 €490,000 to build again, about 3.4 person-years of work. Its weakest lens is Production Readiness, at 39 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 11 points for low effort, because it clears the 2 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.2 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 706,426 lines over the last 90 days, which is about 2,864,950 lines a year. At that pace, the extra work comes to an estimated 323.5 to 1941 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch SafariNativeIPC SafariNativeIPC motrix-finalize-fs motrix-finalize-fs motrix-native-host motrix-native-host motrix-release-signing-tool motrix-release-signing-tool motrix-turbo motrix-turbo

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.

885 modules, with 1427 dependencies between them. 2 loops run through 4 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 845 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 motrix_finalize_fs.platform.unix2 src.core.engine.engine-adapter3 src.core.events.event-bus4 src.core.plugin.capabilities.interface5 src.main.bridge.native-messaging-installer6 src.shared.errors7 src.shared.protocol.bridge8 src.shared.types.plugin9 src.shared.types.settings10 src.shared.types.task11 src.shared.types.task-activity12 src.core.bridge.web-socket-bridge-server13 src.core.plugin.plugin-registry14 src.core.settings.settings-manager15 src.core.task.task-manager16 src.renderer.hooks17 src.renderer.lib18 src.renderer.routes.dashboard.layout.dashboard-registry19 src.renderer.routes.downloads.inspector20 src.shared.types.task-occurrence21 src.core.bridge22 src.core.engine.aria223 src.core.engine.engine-supervisor24 src.core.plugin.host.plugin-host25 src.core.plugin.install.plugin-installer26 src.core.session.motrix-database27 src.core.task.actions28 src.core.tracker.tracker-manager29 src.main.platform30 src.core.plugin.hooks.hook-orchestrator31 src.core.session.session-manager32 src.core.task33 src.core.torrent.magnet-tracker34 src.main.ipc.queries35 src.server.ipc.queries36 src.core.plugin.hooks37 src.core.plugin.runtime.runtime-factory38 src.main.commands.types39 src.main.ipc.commands40 src.server.ipc.commands
1 motrix_finalize_fs.platform.unix
2 src.core.engine.engine-adapter
3 src.core.events.event-bus
4 src.core.plugin.capabilities.interface
5 src.main.bridge.native-messaging-installer
6 src.shared.errors
7 src.shared.protocol.bridge
8 src.shared.types.plugin
9 src.shared.types.settings
10 src.shared.types.task
11 src.shared.types.task-activity
12 src.core.bridge.web-socket-bridge-server1
13 src.core.plugin.plugin-registry5
14 src.core.settings.settings-manager5
15 src.core.task.task-manager1
16 src.renderer.hooks3
17 src.renderer.lib12
18 src.renderer.routes.dashboard.layout.dashboard-registry4
19 src.renderer.routes.downloads.inspector6
20 src.shared.types.task-occurrence1
21 src.core.bridge134
22 src.core.engine.aria2211141
23 src.core.engine.engine-supervisor111
24 src.core.plugin.host.plugin-host1131
25 src.core.plugin.install.plugin-installer121
26 src.core.session.motrix-database81
27 src.core.task.actions2811
28 src.core.tracker.tracker-manager11111
29 src.main.platform31
30 src.core.plugin.hooks.hook-orchestrator11
31 src.core.session.session-manager12113
32 src.core.task313012
33 src.core.torrent.magnet-tracker1121115
34 src.main.ipc.queries11111111
35 src.server.ipc.queries11111111
36 src.core.plugin.hooks12
37 src.core.plugin.runtime.runtime-factory12111111
38 src.main.commands.types1111111
39 src.main.ipc.commands1111111111111111
40 src.server.ipc.commands111111111111111
Uses a module listed above itPart of a loopThe module itself
1 motrix_finalize_fs.platform.unix2 src.core.engine.engine-adapter3 src.core.events.event-bus4 src.core.plugin.capabilities.interface5 src.main.bridge.native-messaging-installer6 src.shared.errors7 src.shared.protocol.bridge8 src.shared.types.plugin9 src.shared.types.settings10 src.shared.types.task11 src.shared.types.task-activity12 src.core.bridge.web-socket-bridge-server13 src.core.plugin.plugin-registry14 src.core.settings.settings-manager15 src.core.task.task-manager16 src.renderer.hooks17 src.renderer.lib18 src.renderer.routes.dashboard.layout.dashboard-registry19 src.renderer.routes.downloads.inspector20 src.shared.types.task-occurrence21 src.core.bridge22 src.core.engine.aria223 src.core.engine.engine-supervisor24 src.core.plugin.host.plugin-host25 src.core.plugin.install.plugin-installer26 src.core.session.motrix-database27 src.core.task.actions28 src.core.tracker.tracker-manager29 src.main.platform30 src.core.plugin.hooks.hook-orchestrator31 src.core.session.session-manager32 src.core.task33 src.core.torrent.magnet-tracker34 src.main.ipc.queries35 src.server.ipc.queries36 src.core.plugin.hooks37 src.core.plugin.runtime.runtime-factory38 src.main.commands.types39 src.main.ipc.commands40 src.server.ipc.commandsmotrix_finalize_fs.platform.unix1src.core.engine.engine-adapter2src.core.events.event-bus3src.core.plugin.capabilities.interface4src.main.bridge.native-messaging-installer5src.shared.errors6src.shared.protocol.bridge7src.shared.types.plugin8src.shared.types.settings9src.shared.types.task10src.shared.types.task-activity11src.core.bridge.web-socket-bridge-server12src.core.plugin.plugin-registry13src.core.settings.settings-manager14src.core.task.task-manager15src.renderer.hooks16src.renderer.lib17src.renderer.routes.dashboard.layout.dashboard-registry18src.renderer.routes.downloads.inspector19src.shared.types.task-occurrence20src.core.bridge21src.core.engine.aria222src.core.engine.engine-supervisor23src.core.plugin.host.plugin-host24src.core.plugin.install.plugin-installer25src.core.session.motrix-database26src.core.task.actions27src.core.tracker.tracker-manager28src.main.platform29src.core.plugin.hooks.hook-orchestrator30src.core.session.session-manager31src.core.task32src.core.torrent.magnet-tracker33src.main.ipc.queries34src.server.ipc.queries35src.core.plugin.hooks36src.core.plugin.runtime.runtime-factory37src.main.commands.types38src.main.ipc.commands39src.server.ipc.commands40155131246113421114111111311218128111111131111211331301211211151111111111111111121211111111111111111111111111111111111111111111+845 more modules (most-connected shown)

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

At a glance — Architecture · 92% · Exemplary ·

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

At a glance — Readiness · 39% · Weak · gated by D13, R8, P7 ·

At a glance — Security · 66% · Adequate · gated by D28, D29 ·

At a glance — Domain Modelling · — · — ·

At a glance — Accessibility · 59% · Adequate ·

At a glance — Performance · 60% · Adequate ·

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 — Injection44High / Critical
A07:2025 — Authentication Failures13High / Critical
A03:2025 — Software Supply Chain Failures10High / Critical

Roadmap

Immediately resolve the two leaked secrets in the bridge pairing files and eliminate unused dependencies by declaring imports explicitly and moving test packages to devDependencies. Strengthen test coverage by fixing empty assertions in the disclaimer, deep links, and installer tests, while ensuring all outbound HTTP calls include timeouts, retries, and circuit breakers to prevent indefinite hangs. Finally, document the recovery time and point objectives alongside a tested restore procedure to establish a true disaster recovery plan.

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

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.+10.7 ptsLowREDACTED Scanning
Resolve the 4 No assertions (empty test) finding(s) in Test Quality — start with disclaimer.spec.ts, app-deep-links.spec.ts, native-messaging-installer.test.ts.+4.6 ptsLowTest Quality
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+5.3 ptsMediumDependency Hygiene
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.+2.5 ptsMediumOutbound HTTP resilience
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+1.6 ptsMediumDR & Backup
Enable Dependabot/Renovate or a dependency-review gate.+1.6 ptsMediumSecurity & performance tooling
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.+1.5 ptsMediumAsync & latency hygiene
Resolve the 1 No ADRs found finding(s) in ADR Quality.+0.7 ptsLowADR Quality

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.6SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED3.6SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
src/main/index.ts6.0MixedExplicit Debt: TodoComment
src/core/plugin/host/quick-js-worker.ts6.0MixedExplicit Debt: TodoComment
src/main/platform/appimage-integration.ts6.0MixedExplicit Debt: TodoComment
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

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

Critical — 40

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

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

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

Could not be resolved — 9

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. 89 of 93 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 93 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D17D19D20D21D22D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX6AX8AX9C2DM9GD1IC1M1M2M3M4P1P10P2P3P4P5P6P7PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X26X27X28X29X3X30X4X5

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, 1855 of 1876 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 01a16e29-9038-710d-97c3-eac5ed7a8cc8.

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: the JavaScript/TypeScript half could not be measured — the dependency install for the repository root failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • 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 MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for the repository root failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • 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 for the vitest suite in the repository root was NOT MEASURED: the dependency install for the repository root failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in packages/native-host/ was NOT MEASURED: the dependency install for packages/native-host/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • 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 (81 contributor(s) across 1505 commit(s) sampled, automation and bot accounts excluded). One of them holds 90% of the history; the other 80 hold 0.1% 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.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `scripts/vite-production-output.ts`, `src/core/bridge/bridge-data-dir-lock.ts`, `src/core/bridge/credential-store.ts`, `src/core/bridge/extension-identity-resolver.ts`, `src/core/bridge/extension-pairing-projection.ts`, … (+29 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.
  • AX1 Captive dependencies — 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in src/main/commands/command-registry.ts, whose lifetimes are not modelled 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.
  • 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 DockerCompose (compose.yaml). compose up failed (exit 18 — an image could not be pulled) — server Pulling server Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: server Pulling server Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'better-sqlite3' is imported (scripts/profile-task-inspector-activity.mts:15), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'better-sqlite3' is imported (scripts/profile-task-inspector-activity.mts:15), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'better-sqlite3' is imported (scripts/profile-task-inspector-activity.mts:15), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'better-sqlite3' is imported (scripts/profile-task-inspector-activity.mts:15), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • 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.
  • 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. 389 further occurrence(s) are not listed individually; the score already reflects all 429.
  • R3 Large Files — 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. 75 further occurrence(s) are not listed individually; the score already reflects all 115.
  • 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. 42 further occurrence(s) are not listed individually; the score already reflects all 82.
  • 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. 198 further occurrence(s) are not listed individually; the score already reflects all 238.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (4): D19, D21, D22, 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 Complexity2.8 / 10Weak✓ Tool-verified

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

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

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

343 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was commands.buildCommandHandlers at 172. A further 18 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 release-signing-input.verifyManifestEntry at 29 — they are counted neither in the figure above nor in this dimension's score. 7 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/core/engine/aria2/translate.ts (translate.translateErrorCode at 29), src/shared/schemas/ffmpeg-release.ts (ffmpeg-release.ffmpegTargetSchema at 26), packages/finalize-fs/src/protocol.rs (Request::operation at 20), src/core/bridge/pairing-prompt-controller.ts (pairing-prompt-controller.parseVerifiedIdentity at 18), src/server/bridge/remote-extension-host-policy.ts (remote-extension-host-policy.canonicalRequestAuthority at 17), and 2 more not listed here. 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.

motrix_native_host::probe::read_response_body (cyclomatic 22) · ×3packages/native-host/src/probe.rs:113
commands.buildCommandHandlers (cyclomatic 172)src/main/ipc/commands.ts:296
legacy-import-dialog.LegacyImportDialogContent (cyclomatic 149)src/renderer/features/legacy-import/legacy-import-dialog.tsx:113
activity-calendar.ActivityCalendar (cyclomatic 139)src/renderer/routes/dashboard/activity/activity-calendar.tsx:264
operation-form.OperationFormContent (cyclomatic 130)src/renderer/features/plugin-operations/operation-form.tsx:102

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

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with commands.buildCommandHandlers (cyclomatic 172), legacy-import-dialog.LegacyImportDialogContent (cyclomatic 149), activity-calendar.ActivityCalendar (cyclomatic 139). — 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 4 together lifts Cyclomatic Complexity from 2.8 to about 3.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

406 method(s) exceeded the cognitive complexity threshold of 15; the worst was commands.buildCommandHandlers at 237.

motrix_native_host::probe::read_response_body (cognitive 46) · ×5packages/native-host/src/probe.rs:113
motrix_finalize_fs::platform::windows::metadata::directory_names (cognitive 31) · ×5packages/finalize-fs/src/platform/windows/metadata.rs:275
index.main::handlePolledTasks (cognitive 28) · ×2src/server/index.ts:953
commands.buildCommandHandlers (cognitive 237)src/main/ipc/commands.ts:296
create-task-handler.handleCreateTaskUnderAdmission (cognitive 166)src/core/task/create-task-handler.ts:372

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

What to do

  1. Bring the 7 bodies over 120 down to 120 or less in Cognitive Complexity — start with commands.buildCommandHandlers (cognitive 237), create-task-handler.handleCreateTaskUnderAdmission (cognitive 166), legacy-import-dialog.LegacyImportDialogContent (cognitive 149). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 7 together lifts Cognitive Complexity from 2.0 to about 2.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes6.0 / 10Adequate✓ Tool-verified

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

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

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

303 god class(es) detected.

FunctionTooLong: index.main · ×145src/server/index.ts:201
FileTooLong: main/index.ts · ×73src/main/index.ts
MethodTooLong: MediaTaskCoordinator.run · ×40src/core/task/media-task-coordinator.ts:236
ClassTooLong: MagnetTracker · ×29src/core/torrent/magnet-tracker.ts:195
TooManyMethods: Aria2RpcClient · ×16src/core/engine/aria2/aria2-rpc-client.ts:35

What to do

  1. Resolve the 145 FunctionTooLong finding(s) in God Classes — start with index.ts (6), finalize-task.ts (3), commands.ts (2). — One of this dimension's main actionable groups (145 warning-level).
  2. Resolve the 73 FileTooLong finding(s) in God Classes — start with index.ts (3), commands.ts (2), magnet-tracker.ts. — One of this dimension's main actionable groups (73 warning-level).
  3. Resolve the 40 MethodTooLong finding(s) in God Classes — start with session-manager.ts (3), plugin-installer.ts (2), aria2-adapter.ts (2). — One of this dimension's main actionable groups (40 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 Duplication10.0 / 10Stronggated by 13 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

13 duplicated block group(s) detected. Measured on part of this repository only: .ts, .tsx (93% 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 (8 lines × 2) · ×3packages/finalize-fs/src/platform/unix/copy.rs:101
Duplicated block (11 lines × 2) · ×2packages/finalize-fs/src/platform/unix/copy.rs:86
Duplicated block (10 lines × 2) · ×2packages/native-host/src/flatpak_companion/secure_fs.rs:194
Duplicated block (15 lines × 2)packages/finalize-fs/src/state.rs:177
Duplicated block (14 lines × 2)packages/finalize-fs/src/state.rs:239

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

What to do

  1. Resolve the 3 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with copy.rs (2), rename.rs. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 2 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with copy.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with secure_fs.rs (2). — One of this dimension's main actionable groups (2 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 · Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

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

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

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

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

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

0 of 189 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D9 · Test Distribution9.7 / 10Exemplary✓ Tool-verified

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

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

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

10757 test methods: 10388 unit, 128 integration, 0 BDD, 241 e2e. The JavaScript/TypeScript suite contributes 10540 `it`/`test` case(s) across 1011 test file(s) declaring at least one beside 35 .NET test method(s); its tier split is read from package names and paths only. The Rust suite contributes 178 `#[test]` function(s) across 32 file(s) declaring at least one; its unit/integration split is Cargo's own — 3 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 4 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Adequategated by 4 critical findings✓ 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

51 skipped (40 with a documented reason), 15 zero-assertion, 3 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 10540 tests.

No assertions (empty test): quits when the disclaimer is declined · ×4e2e/disclaimer.spec.ts:104
Skipped test: (unnamed test) · ×11e2e/renderer-recovery.spec.ts:420
No assertions: a second launch restores a minimized main window · ×11e2e/window-reopen.spec.ts:34
Fixed-sleep synchronisation: http.get outside the manifest hostPermissions fails with host_not_permitted · ×3src/core/plugin/host/capability-bridge.dispatch.test.ts:355
Mock-dominated test: redacts child bindings and keeps the returned child protected · ×96src/core/logger.test.ts:177

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

What to do

  1. Resolve the 4 No assertions (empty test) finding(s) in Test Quality — start with disclaimer.spec.ts, app-deep-links.spec.ts, native-messaging-installer.test.ts. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 11 Skipped test finding(s) in Test Quality — start with application-menu.spec.ts (2), appimage-cold-launch.spec.ts (2), renderer-recovery.spec.ts. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 11 No assertions finding(s) in Test Quality — start with aria2-process-manager.test.ts (2), window-reopen.spec.ts, bridge-receiver.test.ts. — One of this dimension's main actionable groups (11 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D12 · Dependency Hygiene9.8 5.4 / 10Adequate✓ Tool-verified

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

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

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

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

Outdated: libc · ×3

What to do

  1. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

2 secret(s) detected.

REDACTED

What to do

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

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

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

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

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

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

0 of 27 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's Cargo.lock closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.1 / 10Stronggated by 148 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.1 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/main/ipc/commands.ts (49×172=8428); src/main/index.ts (63×92=5796); src/server/index.ts (44×113=4972) Repeated repair below the complexity floor: src/shared/schemas/add-task.ts (6 of 11 changes were fixes); src/core/engine/aria2/aria2-rpc-client.ts (6 of 8 changes were fixes); src/core/engine/aria2/aria2-process-manager.ts (6 of 6 changes were fixes)

Hotspot: src/main/ipc/commands.ts · ×119src/main/ipc/commands.ts:296
Repeated repair: src/shared/schemas/add-task.ts · ×29src/shared/schemas/add-task.ts:318

What to do

  1. Resolve the 119 Hotspot finding(s) in Churn × Complexity Hotspots — start with index.ts (3), commands.ts (2), create-task-handler.ts. — One of this dimension's main actionable groups (119 warning-level).
  2. Resolve the 29 Repeated repair finding(s) in Churn × Complexity Hotspots — start with mod.rs (3), add-task.ts, aria2-rpc-client.ts. — One of this dimension's main actionable groups (29 warning-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 8 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

8 deducted task-comment markers across 218609 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 · ×8src/core/plugin/host/quick-js-worker.ts:1279

What to do

  1. Resolve the 8 TodoComment finding(s) in Explicit Debt — start with quick-js-worker.ts (4), index.ts (2), capability-bridge.phase.test.ts. — One of this dimension's main actionable groups (8 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

Motrix's documentation is comprehensive and well-structured across READMEs, architecture/Docs markdown files, and a shared overview. The root README gives an overview of the project (Motrix Turbo, Motrix 2.0.0 release notes, desktop/server dual-mode), while e2e/bridge/README.md documents its browser E2E suite with build steps, prerequisites, and test commands for AppImage cold launch. Each directory's README is self-contained and clearly states what it documents (e.g., the e2e/web-directory-picker/README is a browser verification suite). The architecture section describes three modules plus a glue hook and the SSDP fixtures are seeded as corpus for fuzzing. Despite being clipped, every named heading exists in the outline; no missing sections to flag. The repository's documentation is comprehensive: 12 README files (each documenting its own directory) plus 130 architecture/design markdown docs cover the scope, and the two main app-links documents are well written with supported-link tables, encode-the-nested-address once, and changes-from-v1 sections. The bridge-pairing-protocol document is a full normative specification with an exhaustive outline (1–8) of wire-contract behavior plus a 4701-word Chinese companion that covers the same material; it is the single document showing internal jargon ('MUST', 'SHOULD') and no context, so it falls under the internal-focused category. The Docker Server deployment doc explains image selection, tag semantics, and the manifest digest, with commands using the current user's credentials. The Motrix documentation is comprehensive and well-structured for a software project. It includes twelve README files covering Docker Server deployment, Flatpak installation, legacy migration, and manual media merging, plus architecture/Docs markdown files (130) that provide detailed design rationale, manifest selection tables, TLS trust lifecycle, OCI source labels, and build-checking procedures. The prose is mostly narrative with a clear overview for each document; the only unshown section in any file is clipped by the scanner, so it cannot be flagged as missing.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

Method: 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.

D22 · Internal API ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

0 API inconsistencies across 5 exposed types.

✓ On the Gold path — maintain.

Detailed fixes: d22_recommendation.md.

D26 · Project Cohesion5.0 / 10Adequate✓ Tool-verified

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

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

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

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

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

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

44 finding(s): 0 critical, 11 high, 33 medium, 0 low. semgrep hit a parse error in 53 file(s) — `.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml`, `packages/finalize-fs/src/platform/windows/nt.rs` (line 481, line 498), `packages/native-host/src/flatpak_companion/secure_fs.rs` (line 44, line 50), `scripts/vite-production-output.ts` (line 8), `src/core/bridge-receiver/progress-mapping.test.ts` (line 118), … (+48 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 6 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

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

What to do

  1. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D30 · Dependency Vulnerabilities6.1 / 10Adequate✓ 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 6.1 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED

What to do

  1. Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).

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

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

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

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

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

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

Build pipeline generates provenance, signs artifacts and produces an SBOM.

REDACTED

✓ On the Gold path — maintain.

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 0 platform declaration(s) and 55 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 alternatives5.4 / 10Adequate✓ Tool-verified

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.

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — src/renderer/components/desktop-kit/cubic-glass/cubic-glass-gradient.tsx:114

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels4.8 / 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 control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. — src/renderer/components/operator-unlock-gate.tsx:72
  • This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — src/renderer/components/settings-kit/plugin-config-field.tsx:39, src/renderer/routes/settings/cards/integration/trusted-extensions-section.tsx:243
  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — src/renderer/components/settings-kit/plugin-config-field.tsx:64, src/renderer/routes/downloads/inspector/trackers-tab.tsx:457
  • This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×2) — src/renderer/components/settings-kit/plugin-config-field.tsx:78, src/renderer/routes/downloads/inspector/lifetime-transfer-card.tsx:600
  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. (×7) — src/renderer/routes/settings/cards/advanced-dialog.tsx:197, src/renderer/routes/settings/cards/appearance-dialog.tsx:240, src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:180, …

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

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".

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 safety5.4 / 10Adequate✓ 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.

  • <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — src/renderer/components/desktop-kit/inspector-drawer.tsx:160, src/renderer/routes/downloads/task-list-panel.tsx:173
  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — src/renderer/components/ui/input.tsx:6
  • <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — src/renderer/components/ui/native-select.tsx:15
  • <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — src/renderer/components/ui/textarea.tsx:6
  • `.drawer-slide-in` moves (`animation: drawer-slide-in-from-bottom 300ms cubic-bezier(0.32, 0.72, 0, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — src/renderer/styles/globals.css:492

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 — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 277 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 you already use: enable Biome's a11y rule group in your biome.json `linter.rules` (it is off whenever `recommended` is false and the group is unlisted), then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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

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

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

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

  • `EngineAdapter` declares 35 required operations: `setTaskBtTracker`, `connect`, `disconnect`, `getCapabilities`, `getFeatureReport`, `createDownload`, `pauseTask`, `resumeTask`, `removeTask`, `forceRemoveTask`, `getEngineTaskOptions`, `pauseAll`, `resumeAll`, `changePosition`, `getTaskStatus`, `getTaskFiles`, `changeOption`, `getTaskPieces`, `getTaskPeers`, `getGlobalStats`, `addTorrent`, `getTaskBtTracker`, `removeDownloadResult`, `removeDownloadResults`, `getUploadLength`, `listActiveAndWaiting`, `listWaitingTaskIds`, `listStopped`, `getHistoryCount`, `searchHistory`, `exportSession`, `requeueFromHistory`, `onBtDownloadComplete`, `onDownloadComplete`, `onDownloadError`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/core/engine/engine-adapter.ts:192
  • `CapabilityHost` declares 16 required operations: `createLog`, `getTail`, `clearLog`, `setLogVerbose`, `isLogVerbose`, `getLogState`, `subscribeLog`, `appSnapshot`, `i18nSnapshot`, `setLocale`, `onLocaleChange`, `flush`, `fsTaskFor`, `fsStorageFor`, `configFor`, `cookieJarFor`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/core/plugin/capabilities/interface.ts:53
  • `SelectionState` declares 16 required operations: `select`, `toggle`, `rangeSelect`, `selectAll`, `clearSelection`, `setItems`, `marqueeSelect`, `marqueeEnd`, `moveFocus`, `focusedSelect`, `shiftMoveFocus`, `focus`, `extendSelection`, `moveSelection`, `isSelected`, `selectedCount`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/renderer/components/desktop-kit/selection/types.ts:3

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

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

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

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

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

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

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

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

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

What to do

  • Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
DM9 · Scattered domain decisions8.0 / 10Strong✓ 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.

  • src.core.legacy-import.source-scanner.LegacySnapshotFile's [digest, identity] are judged in src.core.legacy-import.bt-activation-service.LegacyBtActivationService, src.core.legacy-import.source-scanner — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.core.legacy-import.source-scanner.LegacySource's [identity, root] are judged in src.core.legacy-import.bt-activation-service.LegacyBtActivationService, src.core.legacy-import.http-activation-service.LegacyHttpActivationService, src.core.legacy-import.import-service.LegacyImportService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.core.plugin.finalize.filesystem-adapter.FinalizeFsError's [code, details] are judged in src.core.plugin.finalize.finalize-committer.FinalizeCommitter, src.core.plugin.finalize.finalize-recovery-errors — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.core.stats.transfer-stats-store.TransferDelta's [downloadBytes, uploadBytes] are judged in src.core.stats.transfer-stats-service.TransferStatsService, src.core.stats.transfer-stats-store, src.core.stats.transfer-stats-store.TransferStatsStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
  • src.renderer.routes.downloads.inspector.activity-chart-model.ActivityPauseBand's [endAt, startAt] are judged in src.renderer.routes.downloads.inspector.activity-chart-model, src.renderer.routes.downloads.inspector.lifetime-transfer-card — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.

What to do

  • Move each repeated judgement onto the type that owns the members it reads, so the rule has one home and cannot drift.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • `useStagedDependencies` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — scripts/before-build-use-staged-dependencies.mjs:9
  • `has` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/core/plugin/capabilities/metadata.ts:164
  • `set` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/core/plugin/capabilities/metadata.ts:215
  • `handleStaged` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/core/plugin/host/capability-bridge.ts:1778
  • The guard above `return true;` also returns `true`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — src/core/torrent/magnet-tracker.ts:1673
  • The guard above `return null;` also returns `null`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — src/main/bridge/native-messaging-installer.ts:507
  • The guard above `return 'query';` also returns `'query'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — src/renderer/lib/transport/http-ws.ts:38
  • `onKeyDown` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — src/renderer/routes/downloads/task-row.tsx:134
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×12) — e2e/application-menu.spec.ts:161, e2e/application-menu.spec.ts:177, e2e/bridge/appimage-cold-launch.spec.ts:101, …
  • `unsubscribeLocale` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/core/plugin/host/plugin-host.ts:178
  • `unsubscribeSecurity` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/core/plugin/host/plugin-host.ts:180
  • `emit` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/core/plugin/post/delivery-observability.ts:69
  • `schedule` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/renderer/components/desktop-kit/cubic-glass/renderer.ts:28
  • `init` has an empty body — confirm it's an intentional no-op and not an unfinished method. — src/shared/i18n-resources.ts:76

What to do

  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
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 accuracy9.6 / 10Exemplary◐ 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.

  • README.md names the package `@motrix/plugin-cli`, but no package.json of the workspace declares or depends on it. 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.md:90
  • README.md runs `pnpm dev`, but no package.json declares a `dev` 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.md:112
  • README.md runs `pnpm run pack`, but no package.json declares a `pack` 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.md:114
  • README.md names Electron 44, but the manifest declares `electron` 45.0.0. 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.md:266
  • README.zh-CN.md names the package `@motrix/plugin-cli`, but no package.json of the workspace declares or depends on it. 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.zh-CN.md:88
  • README.zh-CN.md runs `pnpm dev`, but no package.json declares a `dev` 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.zh-CN.md:110
  • README.zh-CN.md runs `pnpm run pack`, but no package.json declares a `pack` 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.zh-CN.md:112
  • docs/docker-server.md runs `docker compose -f compose.yaml -f compose.aria2-rpc.yaml up -d --wait`, but `compose.aria2-rpc.yaml` does not exist. 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. — docs/docker-server.md:188
  • docs/docker-server.zh-CN.md runs `docker compose -f compose.yaml -f compose.aria2-rpc.yaml up -d --wait`, but `compose.aria2-rpc.yaml` does not exist. 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. — docs/docker-server.zh-CN.md:173
  • docs/production-builds.md names Electron 44, but the manifest declares `electron` 45.0.0. 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. — docs/production-builds.md:116
  • e2e/bridge/README.md runs `pnpm build:chromium`, but no package.json declares a `build:chromium` 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. — e2e/bridge/README.md:21
  • e2e/bridge/README.md runs `pnpm build:firefox`, but no package.json declares a `build:firefox` 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. — e2e/bridge/README.md:21
  • e2e/bridge/README.zh-CN.md runs `pnpm build:chromium`, but no package.json declares a `build:chromium` 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. — e2e/bridge/README.zh-CN.md:17
  • e2e/bridge/README.zh-CN.md runs `pnpm build:firefox`, but no package.json declares a `build:firefox` 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. — e2e/bridge/README.zh-CN.md:18
  • packages/finalize-fs/README.md documents the environment variable `SHARING_VIOLATION`, but no code, script or configuration file names it. 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. — packages/finalize-fs/README.md:211
  • packages/finalize-fs/README.md documents the environment variable `LOCK_VIOLATION`, but no code, script or configuration file names it. 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. — packages/finalize-fs/README.md:212
  • packages/finalize-fs/README.md documents the environment variable `ERROR_INVALID_FUNCTION`, but no code, script or configuration file names it. 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. — packages/finalize-fs/README.md:222
  • packages/finalize-fs/README.md documents the environment variable `ERROR_NOT_SUPPORTED`, but no code, script or configuration file names it. 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. — packages/finalize-fs/README.md:223

What to do

  • Reconcile the README with reality: README.md names the package `@motrix/plugin-cli`, but no package.json of the workspace declares or depends on it; README.md runs `pnpm dev`, but no package.json declares a `dev` script; README.md runs `pnpm run pack`, but no package.json declares a `pack` script; README.md names Electron 44, but the manifest declares `electron` 45.0.0; README.zh-CN.md names the package `@motrix/plugin-cli`, but no package.json of the workspace declares or depends on it.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P2 · Observability7.2 / 10Strong✓ Tool-verified

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

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

  • Only 3/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/finalize-fs`.
  • `packages/safari-bootstrap/test-integration.mjs` reports through `console.*` at line 113 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/safari-bootstrap/test-integration.mjs:113
  • `src/core/plugin/capabilities/commands.ts` reports through `console.*` at line 138 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/core/plugin/capabilities/commands.ts:138
  • `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 380 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/renderer/components/add-task/add-task-form.tsx:380
  • `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 462 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/renderer/components/add-task/add-task-form.tsx:462
  • `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 506 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/renderer/components/add-task/add-task-form.tsx:506
  • `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 589 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/renderer/components/add-task/add-task-form.tsx:589
  • `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 706 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/renderer/components/add-task/add-task-form.tsx:706
  • `src/renderer/lib/notification-text.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/renderer/lib/notification-text.ts:21
  • `src/renderer/routes/dashboard/components/tile-error-boundary.tsx` reports through `console.*` at line 45 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/renderer/routes/dashboard/components/tile-error-boundary.tsx:45

What to do

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

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

What to do

  • The pipeline declares a deployment environment, but whether required reviewers / protection rules are attached to it lives in repository settings we cannot read — confirm the gate is enforced before production promotion.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

  • `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — scripts/run_flatpak_node_generator.py:24
  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×8) — REDACTED:140, REDACTED:257, scripts/smoke-server-package.mjs:233, …
  • `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — src/core/plugin/install/github-fetcher.ts:90, src/core/plugin/install/github-fetcher.ts:130, src/core/plugin/install/url-fetcher.ts:12, …
  • `fetcher(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — src/core/session/session-manager.ts:104

What to do

  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ 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.

  • `existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — REDACTED:200, REDACTED:389
  • `spawnSync` in `globalSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — e2e/global-setup.ts:22, e2e/global-setup.ts:61
  • `existsSync` in `callback to REQUIRED_ARTIFACTS.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — e2e/global-setup.ts:44
  • `spawnSync` in `buildNativeHost` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/native-host/build.mjs:144
  • `gzipSync` in `packageFlatpakCompanion` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/native-host/package-flatpak-companion.mjs:166
  • `inflateRawSync` in `inspectEmbeddedBlockmap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/appimage-artifact.mjs:319
  • `existsSync` in `readLockFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/fetch-engine.mjs:289
  • `execFileSync` in `sign` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — scripts/sign-macos.mjs:89, scripts/sign-macos.mjs:100, scripts/sign-macos.mjs:106
  • `existsSync` in `installVerifiedFfmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — src/core/ffmpeg/verified-install.ts:826, src/core/ffmpeg/verified-install.ts:918
  • `readFileSync` in `spawnTestBridge` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — src/core/plugin/host/test-helpers.ts:110, src/core/plugin/host/test-helpers.ts:115
  • `existsSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/core/plugin/secret-store-libsodium.ts:73
  • `readFileSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/core/plugin/secret-store-libsodium.ts:74
  • `writeFileSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/core/plugin/secret-store-libsodium.ts:87
  • `fs.existsSync` in `reAddOrMarkErrorFromPair` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/core/session/session-manager.ts:1546
  • `fs.readFileSync` in `reAddOrMarkErrorFromPair` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/core/session/session-manager.ts:1554
  • `gunzipSync` in `legacyHttpActivationFixture` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/test-utils/legacy-http-service.ts:83

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety9.7 / 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 Duplication9.1 / 10Exemplary✓ 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.

  • 89 duplicated blocks under src/ have copies in at least two of the sibling directories core, main, preload, renderer, server, shared — 63 of them are reported below, and 26 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 89 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 89 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 89 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. — src/main/ipc/commands.ts:893
  • 29 duplicated blocks under src/renderer/ have copies in at least two of the sibling directories components, features, hooks, lib, routes — 12 of them are reported below, and 17 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 29 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 29 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 29 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. — src/renderer/components/theme-sync.tsx:14
  • 26 duplicated blocks under src/core/ have copies in at least two of the sibling directories activity, bridge, bridge-receiver, engine, ffmpeg, inspector-activity (+8 more sibling(s) not listed) — 10 of them are reported below, and 16 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 26 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 26 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 26 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. — src/core/plugin/runtime/plugin-hook-runtime.ts:370
  • 9 duplicated blocks under src/renderer/routes/ have copies in at least two of the sibling directories dashboard, downloads, plugins, settings, trackers — 5 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 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. — src/renderer/routes/downloads/inspector/task-tracker-dialog.tsx:69
  • 5 duplicated blocks under src/core/plugin/ have copies in at least two of the sibling directories capabilities, commands, grants, hooks, install, manifest (+2 more sibling(s) not listed) — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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. — src/core/plugin/grants/grants-manager.ts:162
  • scripts/stage-electron-app.mjs:45 · scripts/stage-server-app.mjs:40 — the two spans are one implementation copied and then locally edited — 2738 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. — scripts/stage-electron-app.mjs:45
  • src/main/ipc/commands.ts:893 · src/server/ipc/commands.ts:469 — the two spans are one implementation copied and then locally edited — 1200 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. — src/main/ipc/commands.ts:893
  • src/renderer/routes/settings/cards/advanced-dialog.tsx:138 · src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:103 — the two spans are one implementation copied and then locally edited — 758 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. — src/renderer/routes/settings/cards/advanced-dialog.tsx:138
  • scripts/verify-electron-package.mjs:109 · scripts/verify-server-package.mjs:56 — the two spans are one implementation copied and then locally edited — 996 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. — scripts/verify-electron-package.mjs:109
  • src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:129 · src/renderer/routes/settings/cards/network-dialog.tsx:142 — the two spans are one implementation copied and then locally edited — 680 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. — src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:129
  • src/shared/lib/log-redact.ts:455 · src/shared/lib/log-redact.ts:780 — the two spans are one implementation copied and then locally edited — 642 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/shared/lib/log-redact.ts:455
  • src/renderer/routes/settings/cards/appearance-dialog.tsx:384 · src/renderer/routes/settings/cards/network-dialog.tsx:315 — the two spans are one implementation copied and then locally edited — 503 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. — src/renderer/routes/settings/cards/appearance-dialog.tsx:384
  • scripts/prepare-snap-project.mjs:65 · scripts/verify-snap-artifact.mjs:109 — the two spans are one implementation copied and then locally edited — 670 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. — scripts/prepare-snap-project.mjs:65
  • src/renderer/routes/settings/cards/downloads-dialog.tsx:96 · src/renderer/routes/settings/cards/general-dialog.tsx:219 — the two spans are one implementation copied and then locally edited — 481 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. — src/renderer/routes/settings/cards/downloads-dialog.tsx:96
  • src/main/plugin/capability-host.ts:1 · src/server/plugin/capability-host.ts:1 — these 2 files are line-for-line copies of one another — 99 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. — src/main/plugin/capability-host.ts:1
  • src/renderer/routes/trackers/components/blacklist-tracker-panel.tsx:18 · src/renderer/routes/trackers/components/effective-tracker-panel.tsx:38 — the two spans are one implementation copied and then locally edited — 604 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. — src/renderer/routes/trackers/components/blacklist-tracker-panel.tsx:18
  • src/core/plugin/capabilities/metadata.ts:66 · src/core/plugin/capabilities/storage.ts:76 — the two spans are one implementation copied and then locally edited — 538 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. — src/core/plugin/capabilities/metadata.ts:66
  • scripts/assemble-release-artifacts.mjs:472 · scripts/verify-update-artifacts.mjs:166 — the two spans are one implementation copied and then locally edited — 622 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. — scripts/assemble-release-artifacts.mjs:472
  • src/main/index.ts:2680 · src/server/index.ts:1862 — the two spans are one implementation copied and then locally edited — 362 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. — src/main/index.ts:2680
  • src/main/bridge/pairing-dialog-controller.ts:54 · src/server/bridge/extension-pairing-prompt-adapter.ts:51 — the two spans are one implementation copied and then locally edited — 451 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. — src/main/bridge/pairing-dialog-controller.ts:54
  • src/renderer/components/ui/autocomplete.tsx:17 · src/renderer/components/ui/combobox.tsx:43 — the two spans are one implementation copied and then locally edited — 300 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. — src/renderer/components/ui/autocomplete.tsx:17
  • src/main/ipc/queries.ts:240 · src/server/ipc/queries.ts:231 — the two spans are one implementation copied and then locally edited — 518 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. — src/main/ipc/queries.ts:240
  • src/main/ipc/commands.ts:789 · src/server/ipc/commands.ts:623 — 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. — src/main/ipc/commands.ts:789
  • src/main/ipc/commands.ts:353 · src/server/ipc/commands.ts:263 — the two spans are one implementation copied and then locally edited — 320 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. — src/main/ipc/commands.ts:353
  • src/core/task/actions/finalize-task.ts:334 · src/core/task/actions/finalize-task.ts:607 — the two spans are one implementation copied and then locally edited — 287 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/core/task/actions/finalize-task.ts:334
  • src/main/index.ts:288 · src/server/index.ts:288 — the two spans are one implementation copied and then locally edited — 375 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. — src/main/index.ts:288
  • src/core/plugin/hooks/hook-orchestrator.ts:225 · src/core/plugin/hooks/hook-orchestrator.ts:391 — the two spans are one implementation copied and then locally edited — 343 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/core/plugin/hooks/hook-orchestrator.ts:225
  • src/renderer/routes/plugins/hooks/use-plugin-graph.ts:60 · src/renderer/routes/plugins/hooks/use-plugin-metadata.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. — src/renderer/routes/plugins/hooks/use-plugin-graph.ts:60
  • src/main/index.ts:2442 · src/server/index.ts:874 — 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. — src/main/index.ts:2442
  • src/renderer/routes/settings/cards/advanced-dialog.tsx:164 · src/renderer/routes/settings/cards/appearance-dialog.tsx:207 — 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. — src/renderer/routes/settings/cards/advanced-dialog.tsx:164
  • src/main/plugin/dev-watcher.ts:23 · src/server/plugin/dev-watcher.ts:15 — 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. — src/main/plugin/dev-watcher.ts:23
  • src/main/ipc/commands.ts:1888 · src/server/ipc/commands.ts:1073 — 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. — src/main/ipc/commands.ts:1888
  • src/renderer/routes/settings/cards/network-dialog.tsx:378 · src/renderer/routes/settings/cards/network-dialog.tsx:439 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/renderer/routes/settings/cards/network-dialog.tsx:378
  • src/main/ipc/commands.ts:1637 · src/server/ipc/commands.ts:953 — 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. — src/main/ipc/commands.ts:1637
  • scripts/electron-package-utils.mjs:31 · scripts/server-package-utils.mjs:47 — 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. — scripts/electron-package-utils.mjs:31
  • src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:831 · src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:831
  • src/core/plugin/finalize/finalize-committer.ts:602 · src/core/plugin/finalize/finalize-recovery.ts:781 — 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. — src/core/plugin/finalize/finalize-committer.ts:602
  • src/renderer/routes/plugins/hooks/use-plugin-detail.ts:19 · src/renderer/routes/plugins/hooks/use-plugins.ts:22 — the two spans are one implementation copied and then locally edited — 175 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. — src/renderer/routes/plugins/hooks/use-plugin-detail.ts:19
  • src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:144 · src/renderer/routes/settings/cards/integration/integration-dialog.tsx:118 · src/renderer/routes/settings/cards/network-dialog.tsx:157 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:144
  • src/core/legacy-import/bt-activation-service.ts:342 · src/core/legacy-import/http-activation-service.ts:600 — 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. — src/core/legacy-import/bt-activation-service.ts:342

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 Boundaries9.9 / 10Exemplary✓ 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.

  • scripts/profile-task-inspector-activity.mts:24 imports src/test-utils/task.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — scripts/profile-task-inspector-activity.mts:24
  • src/renderer/routes/plugins/lib/call-graph-engine.ts:2 imports elkjs/lib/elk-api.js, 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. — src/renderer/routes/plugins/lib/call-graph-engine.ts:2
  • src/renderer/routes/plugins/lib/call-graph-engine.ts:3 imports elkjs/lib/elk-worker.min.js?worker, 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. — src/renderer/routes/plugins/lib/call-graph-engine.ts:3

What to do

  • Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (2 rows); move the shared test helper into a source directory production code may depend on (1 row).
R2 · Cyclomatic Complexity8.0 / 10Strong✓ Tool-verified

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

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

  • handleCreateTaskUnderAdmission has cyclomatic complexity 115 and cognitive complexity 192; 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. — src/core/task/create-task-handler.ts:372
  • keyDown has cyclomatic complexity 95 and cognitive complexity 113; 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. — src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:303
  • EngineDiagnosticsDialogHost has cyclomatic complexity 95 and cognitive complexity 90; 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. — src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx:140
  • restore has cyclomatic complexity 75 and cognitive complexity 147; 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. — src/core/session/session-manager.ts:641
  • verifyFlatpakPackaging has cyclomatic complexity 75 and cognitive complexity 39; 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. — scripts/verify-flatpak-packaging.mjs:118
  • scanLegacySource has cyclomatic complexity 71 and cognitive complexity 113; 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. — src/core/legacy-import/source-scanner.ts:298
  • recover has cyclomatic complexity 65 and cognitive complexity 85; 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. — src/core/plugin/finalize/finalize-recovery.ts:80
  • MediaToolsSection has cyclomatic complexity 63 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/renderer/routes/settings/cards/integration/media-tools-section.tsx:75
  • invoke has cyclomatic complexity 61 and cognitive complexity 89; 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. — e2e/web-directory-picker/fixture-transport.ts:159
  • PickerSession has cyclomatic complexity 60 and cognitive complexity 53; 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. — src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:134
  • createDownload has cyclomatic complexity 58 and cognitive complexity 66; 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. — src/core/engine/aria2/aria2-adapter.ts:421
  • reconcile has cyclomatic complexity 57 and cognitive complexity 71; 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. — src/core/legacy-import/http-activation-service.ts:762
  • OperationFormContent has cyclomatic complexity 54 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/renderer/features/plugin-operations/operation-form.tsx:102
  • smokeServerImage has cyclomatic complexity 53 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:928
  • run has cyclomatic complexity 52 and cognitive complexity 75; 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. — src/core/task/media-task-coordinator.ts:236
  • TaskRow has cyclomatic complexity 52 and cognitive complexity 64; 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. — src/renderer/routes/dashboard/tiles/tasks-tile.tsx:162
  • swapMagnetMetadataForBtUnderMutation has cyclomatic complexity 50 and cognitive complexity 64; 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. — src/core/torrent/swap-magnet-metadata-for-bt.ts:128
  • DirectoryPicker has cyclomatic complexity 49 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/renderer/components/desktop-kit/directory-picker.tsx:56
  • addTorrent has cyclomatic complexity 48 and cognitive complexity 53; 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. — src/core/engine/aria2/aria2-adapter.ts:847
  • reconcile has cyclomatic complexity 48 and cognitive complexity 52; 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. — src/core/legacy-import/bt-activation-service.ts:489

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files6.7 / 10Adequate✓ Tool-verified

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

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

  • src/main/index.ts has 3113 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/index.ts:1
  • src/core/bridge/web-socket-bridge-server.ts has 2422 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/bridge/web-socket-bridge-server.ts:1
  • src/core/plugin/host/capability-bridge.ts has 2148 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/plugin/host/capability-bridge.ts:1
  • src/core/torrent/magnet-tracker.ts has 2129 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/torrent/magnet-tracker.ts:1
  • src/server/index.ts has 2055 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/server/index.ts:1
  • src/core/session/session-manager.ts has 1978 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/session/session-manager.ts:1
  • src/main/ipc/commands.ts has 1948 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/ipc/commands.ts:1
  • src/core/plugin/host/quick-js-worker.ts has 1902 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/plugin/host/quick-js-worker.ts:1
  • src/core/session/motrix-database.ts has 1599 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/session/motrix-database.ts:1
  • src/renderer/routes/dashboard/components/dashboard-grid.tsx has 1538 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderer/routes/dashboard/components/dashboard-grid.tsx:1
  • src/core/plugin/host/plugin-host.ts has 1487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/plugin/host/plugin-host.ts:1
  • src/core/task/actions/finalize-task.ts has 1432 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/task/actions/finalize-task.ts:1
  • src/core/session/post-delivery-repository.ts has 1384 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/session/post-delivery-repository.ts:1
  • src/core/task/create-task-handler.ts has 1370 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/task/create-task-handler.ts:1
  • src/core/task/direct-resource-validator.ts has 1361 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/task/direct-resource-validator.ts:1
  • src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx has 1285 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:1
  • src/core/engine/aria2/aria2-adapter.ts has 1255 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/engine/aria2/aria2-adapter.ts:1
  • src/core/task/media-task-coordinator.ts has 1228 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/task/media-task-coordinator.ts:1
  • src/main/platform/appimage-integration.ts has 1220 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/platform/appimage-integration.ts:1
  • src/renderer/routes/dashboard/activity/activity-calendar.tsx has 1147 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderer/routes/dashboard/activity/activity-calendar.tsx:1
  • src/core/bridge/credential-store.ts has 1096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/bridge/credential-store.ts:1
  • src/server/ipc/commands.ts has 1067 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/server/ipc/commands.ts:1
  • src/core/bridge/mbp1/pair-session.ts has 1055 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/bridge/mbp1/pair-session.ts:1
  • src/main/bridge/index.ts has 1048 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/main/bridge/index.ts:1
  • src/core/engine/engine-supervisor.ts has 1029 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/engine/engine-supervisor.ts:1
  • src/core/inspector-activity/task-inspector-activity-service.ts has 1021 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/inspector-activity/task-inspector-activity-service.ts:1
  • src/core/ffmpeg/verified-install.ts has 1003 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/ffmpeg/verified-install.ts:1
  • src/core/legacy-import/http-activation-service.ts has 1003 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/legacy-import/http-activation-service.ts:1
  • src/core/plugin/plugin-registry.ts has 985 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/plugin/plugin-registry.ts:1
  • src/renderer/features/legacy-import/legacy-import-dialog.tsx has 981 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderer/features/legacy-import/legacy-import-dialog.tsx:1
  • src/shared/lib/log-redact.ts 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. — src/shared/lib/log-redact.ts:1
  • src/core/torrent/swap-magnet-metadata-for-bt.ts has 925 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/torrent/swap-magnet-metadata-for-bt.ts:1
  • src/core/inspector-activity/task-inspector-activity-runtime.ts has 912 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/inspector-activity/task-inspector-activity-runtime.ts:1
  • src/core/bridge/bridge-data-dir-lock.ts has 888 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/bridge/bridge-data-dir-lock.ts:1
  • src/renderer/components/add-task/add-task-form.tsx has 878 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderer/components/add-task/add-task-form.tsx:1
  • src/core/legacy-import/import-service.ts 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. — src/core/legacy-import/import-service.ts:1
  • src/renderer/routes/settings/cards/bit-torrent-dialog.tsx has 847 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:1
  • src/core/bridge/extension-pairing-projection.ts has 832 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/bridge/extension-pairing-projection.ts:1
  • src/core/plugin/finalize/finalize-recovery.ts has 817 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/core/plugin/finalize/finalize-recovery.ts:1
  • src/server/operator-admin.ts has 816 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/server/operator-admin.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.8 / 10Exemplary✓ 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. (×30) — REDACTED:1, scripts/profile-task-inspector-activity.mts:1, scripts/measure-desktop-navigation.mjs:1, …

What to do

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

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

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

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 Code7.9 / 10Strong✓ 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 237 application, 68 tooling and 1086 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (237 application, 68 tooling, 1086 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 (×11) — scripts/profile-task-inspector-activity.mts, scripts/migrate-i18n.mjs, src/renderer/components/ui/command.tsx, …
  • Nothing imports this binding — it is safe to review for removal. (×23) — scripts/obsidian-docs-lib.mjs:14, scripts/obsidian-docs-lib.mjs:15, scripts/server-package-utils.mjs:510, …
  • Nothing ultimately consumes this binding: its only referrer is the re-export in src/core/inspector-activity/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/core/inspector-activity/index.ts in the same commit, or the barrel will import a name that no longer exists. (×2) — src/core/inspector-activity/validators.ts:11, src/core/inspector-activity/validators.ts:19
  • Nothing ultimately consumes this binding: its only referrer is the re-export in src/core/stats/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/core/stats/index.ts in the same commit, or the barrel will import a name that no longer exists. (×2) — src/core/stats/transfer-stats-service.ts:14, src/core/stats/transfer-stats-service.ts:16
  • Nothing ultimately consumes this binding: its only referrer is the re-export in src/renderer/components/icons/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/renderer/components/icons/index.ts in the same commit, or the barrel will import a name that no longer exists. — src/renderer/components/icons/copy-link.tsx:4

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.5 / 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. (×4) — scripts/verify-electron-package.mjs:15, scripts/finalize-appimage-artifact.mjs:28, tests/scripts/windows-artifact-names.test.ts:52, …
  • Declared in the root 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 Imports8.2 / 10Strong✓ 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.

  • src/core/plugin/finalize/finalize-committer.ts → src/core/plugin/finalize/finalize-recovery.ts → src/core/plugin/finalize/finalize-committer.ts (one verified cycle inside a mutually-dependent group of 3 files) — src/core/plugin/finalize/finalize-committer.ts:18

What to do

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

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.

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

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×2) — src/core/engine/aria2/aria2-session-identity-recovery.ts:215, src/core/legacy-import/source-scanner.ts:213
  • `o.password !== n.password` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. — src/core/proxy/applier.ts:103
  • `password === this.localProxyPassword` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. — REDACTED:162
  • This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. — REDACTED:271
  • This code fixes scrypt at N=16,384 (r=8, p=1). A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. — src/core/bridge/mbp1/scrypt-w.ts:32
  • `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — REDACTED:501
  • `http.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — src/core/bridge/web-socket-bridge-server.ts:926

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `src/core/engine/aria2/aria2-session-identity-recovery.ts:215` (createHash("sha1")), `src/core/legacy-import/source-scanner.ts:213` (createHash("sha1")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Store passwords with a salted, deliberately slow KDF — scrypt or PBKDF2 from node:crypto, or bcrypt/Argon2 — and compare with a constant-time check. A fast digest of a password, however it is encoded, is reversed by precomputed tables or GPU guessing. Start in `src/core/proxy/applier.ts:103`.
  • Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code. This repository constructs a key derivation priced below the floor at 2 sites, not one: `REDACTED:271` (scrypt, N=16,384 (r=8, p=1), Node's default), `src/core/bridge/mbp1/scrypt-w.ts:32` (scrypt, N=16,384 (r=8, p=1)). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
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 stream5.4 / 10Adequate✓ Tool-verified

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.

  • `spawn` pipes `stdout` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `child.stdout`, while `child.stderr` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stdout (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`child.stdout.on('data', …)`, or `child.stdout.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot. — scripts/smoke-server-package.mjs:67

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
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 document2.2 / 10Critical✓ 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.

  • `canonicalize` is exported and takes `value: unknown` from its caller, and it calls itself at line 29 (`canonicalize`) with a piece of `value` (and at line 36) — and nowhere in `canonicalize` 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 `canonicalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/core/plugin/install/public-command-hash.ts:29
  • `flattenLocaleDict` is exported and takes `obj: Record<string, unknown>` from its caller, and it calls itself at line 30 (`flattenLocaleDict`) with a piece of `obj` — and nowhere in `flattenLocaleDict` 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 `flattenLocaleDict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/core/plugin/manifest/i18n-resolve.ts:30
  • `canonicalJson` is exported, takes a document from its caller (line 48) and hands it to `serialize`, which calls itself at line 72 (`serialize`) with a piece of `candidate` (and at line 79) — and nowhere in `serialize` 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 `serialize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/core/plugin/post/delivery-materializer.ts:72

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.7 / 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 11/18 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.
  • `waitForHealth` 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 })`. (×2) — scripts/smoke-server-package.mjs:224, REDACTED:130
  • `assertOperatorAuth` 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 })`. — scripts/smoke-server-package.mjs:245
  • `createTrackerHttpClient` 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 })`. — src/core/tracker/tracker-http-client.ts:26
  • `refreshOperatorSession` 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 })`. — src/renderer/lib/operator-auth.ts:50
  • `operatorLogin` 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 })`. — src/renderer/lib/operator-auth.ts:111
  • `operatorLogout` 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 })`. — src/renderer/lib/operator-auth.ts:131

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

  • `debug` at line 634 is called with an argument built by `active.map((p) => p.id)` (line 639), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — src/core/plugin/hooks/hook-orchestrator.ts:634

What to do

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

  • `Object.entries(THEMES).map(([theme,prefix])=>` ${prefix} [data-chart=${id}] { ${colorConfig.map(([key,itemConfig])=>{…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — REDACTED:93

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` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

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

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

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

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

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

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

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

X3 · Exception handling5.4 / 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` 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. (×5) — packages/safari-bootstrap/Sources/SafariNativeIPC/BootstrapIPCService.swift:149, packages/safari-bootstrap/Sources/SafariNativeIPC/BootstrapIPCService.swift:150, scripts/verify-update-artifacts.mjs:49, …
  • `.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. (×12) — scripts/verify-snap-store-channel.mjs:314, scripts/verify-appimage-artifact.mjs:109, scripts/smoke-electron-package.mjs:406, …
  • 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. (×22) — scripts/stage-server-app.mjs:116, scripts/stage-electron-app.mjs:162, scripts/smoke-server-package.mjs:235, …
  • `.then(…, () => {})` 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. — src/core/bridge/web-socket-bridge-server.ts:1901

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X4 · Structured logging7.5 / 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.

  • `warn` at line 226 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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. — src/core/task/actions/shared.ts:226
  • `warn` at line 248 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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. — src/core/task/actions/shared.ts:248
  • `warn` at line 375 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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. — src/core/task/actions/shared.ts:375
  • `warn` at line 384 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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. — src/core/task/actions/shared.ts:384
  • `error` at line 554 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.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('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. — src/main/window/window-manager.ts:554
  • `info` at line 1785 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.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('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. — src/server/index.ts:1785
  • `info` at line 39 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.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('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. — src/server/bridge/remote-extension-startup-log.ts:39

What to do

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

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

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

  • ~0.3 `!` null assertions per 1k TypeScript source lines — 58 assertion(s) across the 217035 source line(s) of the 1280 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/core/session/motrix-database.ts (32), src/core/plugin/capabilities/ffmpeg.ts (4), src/core/inspector-activity/task-inspector-activity-runtime.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

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

WCAG coverage — what static analysis assessed

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

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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

Reference — by lens

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

LensScoreRatingImpact
Code Health66%Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92%ExemplaryStrongest area.
Maturity68%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness39%Weak — gated by D13, R8, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security66%Adequate — gated by D28, D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility59%AdequateAcceptable, with room to improve.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 3 check(s) recorded observations but carry no score

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

  • P12 CI test-gate honesty — 1 observation(s) recorded · 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'.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 24 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: this repository stores data through 'better-sqlite3' (scripts/profile-task-inspector-activity.mts:15) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'better-sqlite3' (scripts/profile-task-inspector-activity.mts:15) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'better-sqlite3' (scripts/profile-task-inspector-activity.mts:15) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
Not included — 42 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — not 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
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — server Pulling server Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: server Pulling server Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: this repository stores data through 'better-sqlite3' (scripts/profile-task-inspector-activity.mts:15) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • 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.
  • 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 (.js,.mjs,.ts,.tsx), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 34 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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 — JavaScript/TypeScript suite
  • DM1 Aggregate boundaries — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM10 One transaction, one aggregate — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM2 Strongly-typed ids — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM4 Rich vs anemic model — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM5 Encapsulated state — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM6 Domain ↔ infrastructure boundary — this TypeScript/JavaScript repository maps no type to a persistence framework (TypeORM/Prisma/MikroORM/Sequelize/Mongoose), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage --coverage.reporter=lcovonly`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: allocation awareness is rated where code engineers for it — at least 400 production lines that ship benchmarks or already use allocation-aware idioms (8 or more). This repository's Swift code has 939 production line(s), 2 such use(s) and no benchmarks, so there is no allocation work to rate. The card is reward-only: its absence costs nothing.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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 — 40 finding(s)
D28 · Secrets (history) · REDACTED · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · No assertions (empty test) · ×4
  • No assertions (empty test): quits when the disclaimer is declined e2e/disclaimer.spec.ts:104 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): an early app link survives renderer startup and a released main window e2e/app-deep-links.spec.ts:120 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): can unregister repeatedly when manifests are already absent src/main/bridge/native-messaging-installer.test.ts:645 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): installs motrix-example-bilibili-resolver from GH and rewrites a URL tests/integration/community-plugin-install.test.ts:14 — Test method has an empty body — it asserts nothing and exercises no code.
D13 · REDACTED Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
S1 · Web-Security Posture · Password hashing without a KDF · ×2
  • Password hashing without a KDF src/core/proxy/applier.ts:103 — `o.password !== n.password` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account.
  • Password hashing without a KDF REDACTED:162 — `password === this.localProxyPassword` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account.
AC2 · Forms & labels · <input> without a programmatic label · ×1
  • <input> without a programmatic label src/renderer/components/operator-unlock-gate.tsx:72 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@electron/asar' · ×1
  • Unlisted import '@electron/asar' scripts/verify-electron-package.mjs:15 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'app-builder-lib' · ×1
  • Unlisted import 'app-builder-lib' scripts/finalize-appimage-artifact.mjs:28 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'builder-util' · ×1
  • Unlisted import 'builder-util' tests/scripts/windows-artifact-names.test.ts:52 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'plist' · ×1
  • Unlisted import 'plist' tests/scripts/release-signing-input.test.ts:280 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) src/core/plugin/finalize/finalize-committer.ts:18 — src/core/plugin/finalize/finalize-committer.ts → src/core/plugin/finalize/finalize-recovery.ts → src/core/plugin/finalize/finalize-committer.ts (one verified cycle inside a mutually-dependent group of 3 files)
Serious — 1549 finding(s)
D3 · God Classes · FunctionTooLong · ×145
  • FunctionTooLong: index.main src/server/index.ts:201 — FunctionTooLong — main runs 1394 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1294 over it, 13.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.initializeMainProcess src/main/index.ts:1589 — FunctionTooLong — initializeMainProcess runs 1137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1037 over it, 11.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: commands.buildCommandHandlers src/main/ipc/commands.ts:296 — FunctionTooLong — buildCommandHandlers runs 1134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1034 over it, 11.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: web-directory-picker-dialog.PickerSession src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:134 — FunctionTooLong — PickerSession runs 930 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 830 over it, 9.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: activity-calendar.ActivityCalendar src/renderer/routes/dashboard/activity/activity-calendar.tsx:264 — FunctionTooLong — ActivityCalendar runs 769 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 669 over it, 7.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: legacy-import-dialog.LegacyImportDialogContent src/renderer/features/legacy-import/legacy-import-dialog.tsx:113 — FunctionTooLong — LegacyImportDialogContent runs 753 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 653 over it, 7.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: bit-torrent-dialog.BitTorrentDialog src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:87 — FunctionTooLong — BitTorrentDialog runs 687 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 587 over it, 6.87× 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: commands.buildServerCommandHandlers src/server/ipc/commands.ts:197 — FunctionTooLong — buildServerCommandHandlers runs 676 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 576 over it, 6.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: dashboard-grid.DashboardGrid src/renderer/routes/dashboard/components/dashboard-grid.tsx:849 — FunctionTooLong — DashboardGrid runs 636 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 536 over it, 6.36× 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: lifetime-transfer-card.LifetimeTransferCard src/renderer/routes/downloads/inspector/lifetime-transfer-card.tsx:58 — FunctionTooLong — LifetimeTransferCard runs 583 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 483 over it, 5.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: add-task-form.AddTaskForm src/renderer/components/add-task/add-task-form.tsx:139 — FunctionTooLong — AddTaskForm runs 534 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 434 over it, 5.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: media-tools-section.MediaToolsSection src/renderer/routes/settings/cards/integration/media-tools-section.tsx:75 — FunctionTooLong — MediaToolsSection runs 525 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 425 over it, 5.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: engine-diagnostics-dialog.EngineDiagnosticsDialogHost src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx:140 — FunctionTooLong — EngineDiagnosticsDialogHost runs 510 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 410 over it, 5.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: swap-magnet-metadata-for-bt.swapMagnetMetadataForBtUnderMutation src/core/torrent/swap-magnet-metadata-for-bt.ts:128 — FunctionTooLong — swapMagnetMetadataForBtUnderMutation runs 501 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 401 over it, 5.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: operation-form.OperationFormContent src/renderer/features/plugin-operations/operation-form.tsx:102 — FunctionTooLong — OperationFormContent runs 477 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 377 over it, 4.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.bootstrapBridge src/main/bridge/index.ts:405 — FunctionTooLong — bootstrapBridge runs 428 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 328 over it, 4.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: network-dialog.NetworkDialog src/renderer/routes/settings/cards/network-dialog.tsx:96 — FunctionTooLong — NetworkDialog runs 424 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 324 over it, 4.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: advanced-dialog.AdvancedDialog src/renderer/routes/settings/cards/advanced-dialog.tsx:82 — FunctionTooLong — AdvancedDialog runs 412 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 312 over it, 4.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: task-actions-menu.TaskActionsMenu src/renderer/routes/downloads/task-actions-menu.tsx:98 — FunctionTooLong — TaskActionsMenu runs 398 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 298 over it, 3.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: verify-flatpak-packaging.verifyFlatpakPackaging scripts/verify-flatpak-packaging.mjs:118 — FunctionTooLong — verifyFlatpakPackaging runs 396 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 296 over it, 3.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: plugin-call-graph.PluginCallGraph src/renderer/routes/plugins/components/call-graph/plugin-call-graph.tsx:221 — FunctionTooLong — PluginCallGraph runs 392 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 292 over it, 3.92× 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: appearance-dialog.AppearanceDialog src/renderer/routes/settings/cards/appearance-dialog.tsx:94 — FunctionTooLong — AppearanceDialog runs 392 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 292 over it, 3.92× 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: speed-limit-section.SpeedLimitSection src/renderer/routes/settings/cards/speed-limit-section.tsx:121 — FunctionTooLong — SpeedLimitSection runs 390 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 290 over it, 3.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: verify-electron-package.verifyElectronPackage scripts/verify-electron-package.mjs:271 — FunctionTooLong — verifyElectronPackage runs 389 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 289 over it, 3.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: proxy-section.ProxySection src/renderer/routes/settings/cards/proxy-section.tsx:53 — FunctionTooLong — ProxySection runs 377 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 277 over it, 3.77× 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.
  • + 120 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×119
  • Hotspot: src/main/ipc/commands.ts src/main/ipc/commands.ts:296 — src/main/ipc/commands.ts changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 172 in commands.buildCommandHandlers at line 296. 22 of those changes were fix/bug commits, and the other 27 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/main/ipc/commands.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: src/main/index.ts src/main/index.ts:1589 — src/main/index.ts changed 63 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 92 in index.initializeMainProcess at line 1589. 33 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/main/index.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: src/server/index.ts src/server/index.ts:201 — src/server/index.ts changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 113 in index.main at line 201. 22 of those changes were fix/bug commits, and the other 22 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/server/index.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: src/server/ipc/commands.ts src/server/ipc/commands.ts:197 — src/server/ipc/commands.ts changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in commands.buildServerCommandHandlers at line 197. 15 of those changes were fix/bug commits, and the other 21 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/server/ipc/commands.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: src/core/task/create-task-handler.ts src/core/task/create-task-handler.ts:372 — src/core/task/create-task-handler.ts changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 119 in create-task-handler.handleCreateTaskUnderAdmission at line 372. 13 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/task/create-task-handler.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: scripts/verify-flatpak-packaging.mjs scripts/verify-flatpak-packaging.mjs:118 — scripts/verify-flatpak-packaging.mjs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in verify-flatpak-packaging.verifyFlatpakPackaging at line 118. 12 of those changes were fix/bug commits, and the other 18 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- scripts/verify-flatpak-packaging.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/renderer/components/add-task/add-task-form.tsx src/renderer/components/add-task/add-task-form.tsx:139 — src/renderer/components/add-task/add-task-form.tsx changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in add-task-form.AddTaskForm at line 139. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/components/add-task/add-task-form.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/core/session/session-manager.ts src/core/session/session-manager.ts:641 — src/core/session/session-manager.ts changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in SessionManager.restore at line 641. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/session/session-manager.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: src/core/engine/aria2/aria2-adapter.ts src/core/engine/aria2/aria2-adapter.ts:847 — src/core/engine/aria2/aria2-adapter.ts changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in Aria2Adapter.addTorrent at line 847. 13 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/engine/aria2/aria2-adapter.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: src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:134 — src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 210 in web-directory-picker-dialog.PickerSession at line 134. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/renderer/routes/downloads/task-actions-menu.tsx src/renderer/routes/downloads/task-actions-menu.tsx:98 — src/renderer/routes/downloads/task-actions-menu.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in task-actions-menu.TaskActionsMenu at line 98. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/routes/downloads/task-actions-menu.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/renderer/routes/settings/cards/integration/media-tools-section.tsx src/renderer/routes/settings/cards/integration/media-tools-section.tsx:75 — src/renderer/routes/settings/cards/integration/media-tools-section.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in media-tools-section.MediaToolsSection at line 75. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/routes/settings/cards/integration/media-tools-section.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/core/engine/engine-supervisor.ts src/core/engine/engine-supervisor.ts:428 — src/core/engine/engine-supervisor.ts changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in EngineSupervisor.doStart at line 428. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/engine/engine-supervisor.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: src/renderer/components/desktop-kit/directory-picker.tsx src/renderer/components/desktop-kit/directory-picker.tsx:56 — src/renderer/components/desktop-kit/directory-picker.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in directory-picker.DirectoryPicker at line 56. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/components/desktop-kit/directory-picker.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:928 — REDACTED changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in smoke-server-image.smokeServerImage at line 928. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/renderer/routes/downloads/downloads-page.tsx src/renderer/routes/downloads/downloads-page.tsx:112 — src/renderer/routes/downloads/downloads-page.tsx changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in downloads-page.DownloadsPage at line 112. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/routes/downloads/downloads-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/core/task/media-task-coordinator.ts src/core/task/media-task-coordinator.ts:236 — src/core/task/media-task-coordinator.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in MediaTaskCoordinator.run at line 236. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/task/media-task-coordinator.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: src/core/task/actions/finalize-task.ts src/core/task/actions/finalize-task.ts:195 — src/core/task/actions/finalize-task.ts changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in finalize-task.finalizeTaskSerialized at line 195. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/task/actions/finalize-task.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: scripts/release-signing-input.mjs scripts/release-signing-input.mjs:700 — scripts/release-signing-input.mjs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in release-signing-input.verifyRestrictedConfig at line 700. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- scripts/release-signing-input.mjs`: 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: packages/finalize-fs/src/state.rs packages/finalize-fs/src/state.rs:32 — packages/finalize-fs/src/state.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in State::dispatch at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- packages/finalize-fs/src/state.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/renderer/routes/settings/cards/appearance-dialog.tsx src/renderer/routes/settings/cards/appearance-dialog.tsx:94 — src/renderer/routes/settings/cards/appearance-dialog.tsx changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in appearance-dialog.AppearanceDialog at line 94. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/routes/settings/cards/appearance-dialog.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/renderer/routes/dashboard/components/dashboard-grid.tsx src/renderer/routes/dashboard/components/dashboard-grid.tsx:849 — src/renderer/routes/dashboard/components/dashboard-grid.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in dashboard-grid.DashboardGrid at line 849. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/routes/dashboard/components/dashboard-grid.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/main/bridge/index.ts src/main/bridge/index.ts:405 — src/main/bridge/index.ts changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in index.bootstrapBridge at line 405. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/main/bridge/index.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: src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx:140 — src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in engine-diagnostics-dialog.EngineDiagnosticsDialogHost at line 140. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/core/plugin/host/plugin-host.ts src/core/plugin/host/plugin-host.ts:458 — src/core/plugin/host/plugin-host.ts changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in PluginHost.doActivate at line 458. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/plugin/host/plugin-host.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.
  • + 94 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×73
  • FileTooLong: main/index.ts src/main/index.ts — FileTooLong — 2231 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1731 over it, 4.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: server/index.ts src/server/index.ts — FileTooLong — 1598 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: main (201-2110). The bar is 500 significant lines; this is 1098 over it, 3.20× 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: torrent/magnet-tracker.ts src/core/torrent/magnet-tracker.ts — FileTooLong — 1504 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: MagnetTracker (195-2120). The bar is 500 significant lines; this is 1004 over it, 3.01× 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: ipc/commands.ts src/main/ipc/commands.ts — FileTooLong — 1494 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: buildCommandHandlers (296-1939). The bar is 500 significant lines; this is 994 over it, 2.99× 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: host/capability-bridge.ts src/core/plugin/host/capability-bridge.ts — FileTooLong — 1480 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 980 over it, 2.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: bridge/web-socket-bridge-server.ts src/core/bridge/web-socket-bridge-server.ts — FileTooLong — 1431 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: WebSocketBridgeServer (529-2286). The bar is 500 significant lines; this is 931 over it, 2.86× 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: host/quick-js-worker.ts src/core/plugin/host/quick-js-worker.ts — FileTooLong — 1411 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 911 over it, 2.82× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: session/session-manager.ts src/core/session/session-manager.ts — FileTooLong — 1393 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: SessionManager (233-2031). The bar is 500 significant lines; this is 893 over it, 2.79× 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: components/dashboard-grid.tsx src/renderer/routes/dashboard/components/dashboard-grid.tsx — FileTooLong — 1320 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 820 over it, 2.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: session/post-delivery-repository.ts src/core/session/post-delivery-repository.ts — FileTooLong — 1168 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: SqlitePostDeliveryRepository (117-1406). The bar is 500 significant lines; this is 668 over it, 2.34× 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: session/motrix-database.ts src/core/session/motrix-database.ts — FileTooLong — 1140 significant lines (blank, comment-only and punctuation-only lines excluded), about 66% of them inside a single declaration: MotrixDatabase (230-1396). The bar is 500 significant lines; this is 640 over it, 2.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: web-directory-picker/web-directory-picker-dialog.tsx src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx — FileTooLong — 1140 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: PickerSession (134-1186). The bar is 500 significant lines; this is 640 over it, 2.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 — 1053 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 553 over it, 2.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: task/direct-resource-validator.ts src/core/task/direct-resource-validator.ts — FileTooLong — 1048 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 548 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: host/plugin-host.ts src/core/plugin/host/plugin-host.ts — FileTooLong — 1038 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: PluginHost (157-1452). The bar is 500 significant lines; this is 538 over it, 2.08× 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: actions/finalize-task.ts src/core/task/actions/finalize-task.ts — FileTooLong — 1020 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 520 over it, 2.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: activity/activity-calendar.tsx src/renderer/routes/dashboard/activity/activity-calendar.tsx — FileTooLong — 977 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: ActivityCalendar (264-1226). The bar is 500 significant lines; this is 477 over it, 1.95× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: task/create-task-handler.ts src/core/task/create-task-handler.ts — FileTooLong — 966 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: handleCreateTaskUnderAdmission (372-1245). The bar is 500 significant lines; this is 466 over it, 1.93× 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: aria2/aria2-adapter.ts src/core/engine/aria2/aria2-adapter.ts — FileTooLong — 897 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: Aria2Adapter (146-1299). The bar is 500 significant lines; this is 397 over it, 1.79× 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: ipc/commands.ts src/server/ipc/commands.ts — FileTooLong — 856 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: buildServerCommandHandlers (197-1138). The bar is 500 significant lines; this is 356 over it, 1.71× 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: task/media-task-coordinator.ts src/core/task/media-task-coordinator.ts — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: EMIT_THROTTLE_MS (166-1171). The bar is 500 significant lines; this is 354 over it, 1.71× 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: legacy-import/legacy-import-dialog.tsx src/renderer/features/legacy-import/legacy-import-dialog.tsx — FileTooLong — 853 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: LegacyImportDialogContent (113-993). The bar is 500 significant lines; this is 353 over it, 1.71× 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: inspector-activity/task-inspector-activity-service.ts src/core/inspector-activity/task-inspector-activity-service.ts — FileTooLong — 833 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: TaskInspectorActivityService (154-1089). The bar is 500 significant lines; this is 333 over it, 1.67× 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: platform/appimage-integration.ts src/main/platform/appimage-integration.ts — FileTooLong — 825 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 325 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ffmpeg/verified-install.ts src/core/ffmpeg/verified-install.ts — FileTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 321 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 48 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×40
  • MethodTooLong: MediaTaskCoordinator.run src/core/task/media-task-coordinator.ts:236 — MethodTooLong — run runs 428 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 328 over it, 4.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: State.dispatch packages/finalize-fs/src/state.rs:32 — MethodTooLong — dispatch runs 324 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 224 over it, 3.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SessionManager.restore src/core/session/session-manager.ts:641 — MethodTooLong — restore runs 260 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 160 over it, 2.60× 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: PluginHost.doActivate src/core/plugin/host/plugin-host.ts:458 — MethodTooLong — doActivate runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× 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: SegmentDownloader.run src/core/download/segment-downloader.ts:234 — MethodTooLong — run runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.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: LegacyHttpActivationService.reconcile src/core/legacy-import/http-activation-service.ts:762 — MethodTooLong — reconcile runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TrackerManager.performSyncAndCurate src/core/tracker/tracker-manager.ts:301 — MethodTooLong — performSyncAndCurate runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EngineSupervisor.doStart src/core/engine/engine-supervisor.ts:428 — MethodTooLong — doStart runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WebSocketBridgeServer.constructor src/core/bridge/web-socket-bridge-server.ts:573 — MethodTooLong — constructor runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MotrixDatabase.prepareStatements src/core/session/motrix-database.ts:308 — MethodTooLong — prepareStatements runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FinalizeRecovery.recover src/core/plugin/finalize/finalize-recovery.ts:80 — MethodTooLong — recover runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× 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: SessionManager.reAddOrMarkErrorFromPair src/core/session/session-manager.ts:1536 — MethodTooLong — reAddOrMarkErrorFromPair runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× 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: PluginHttpClient.fetch src/core/plugin/network/plugin-http-client.ts:25 — MethodTooLong — fetch runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× 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: FullCrossPluginInvoker.execute src/core/plugin/commands/cross-plugin-invoker.ts:114 — MethodTooLong — execute runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PluginInstaller.stage src/core/plugin/install/plugin-installer.ts:249 — MethodTooLong — stage runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Aria2Adapter.addTorrent src/core/engine/aria2/aria2-adapter.ts:847 — MethodTooLong — addTorrent runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MagnetTracker.retryMetadataUnderMutation src/core/torrent/magnet-tracker.ts:733 — MethodTooLong — retryMetadataUnderMutation runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FinalizeCommitter.commitPrepared src/core/plugin/finalize/finalize-committer.ts:262 — MethodTooLong — commitPrepared runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: OperationFiles.execution src/core/plugin/operations/operation-files.ts:389 — MethodTooLong — execution 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: HttpCapabilityHost.request src/core/plugin/capabilities/http.ts:397 — MethodTooLong — request runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: OperationService.run src/core/plugin/operations/operation-service.ts:624 — MethodTooLong — run runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TaskInspectorActivityStore.applyCheckpoint src/core/inspector-activity/task-inspector-activity-store.ts:339 — MethodTooLong — applyCheckpoint runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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: Aria2Adapter.createDownload src/core/engine/aria2/aria2-adapter.ts:421 — MethodTooLong — createDownload runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PluginInstaller.commit src/core/plugin/install/plugin-installer.ts:468 — MethodTooLong — commit runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LegacyBtActivationService.reconcile src/core/legacy-import/bt-activation-service.ts:489 — MethodTooLong — reconcile runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×35
  • Swallowed exception (empty catch) scripts/verify-snap-store-channel.mjs:314 — `.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) scripts/verify-appimage-artifact.mjs:109 — `.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) scripts/stage-server-app.mjs:116 — 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) scripts/stage-electron-app.mjs: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) scripts/smoke-server-package.mjs:235 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:142 — 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) scripts/smoke-electron-package.mjs:406 — `.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) scripts/smoke-electron-package.mjs:410 — `.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) scripts/measure-desktop-navigation.mjs:277 — `.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) scripts/finalize-appimage-artifact.mjs:53 — `.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) scripts/fetch-builtins.mjs:325 — `.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) scripts/fetch-builtins.mjs:337 — `.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) scripts/fetch-builtins.mjs:382 — `.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) scripts/electron-package-runtime-helper.cjs:205 — 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) scripts/audit-server-runtime.mjs:160 — 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) src/core/activity/task-activity-service.ts:137 — 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) src/core/activity/task-activity-service.ts:182 — 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) src/core/bridge-receiver/bridge-receiver.ts:350 — `.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) src/core/bridge/web-socket-bridge-server.ts:1155 — 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) src/core/bridge/web-socket-bridge-server.ts:1206 — 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) src/core/bridge/web-socket-bridge-server.ts:1237 — 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) src/core/bridge/web-socket-bridge-server.ts:1418 — 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) src/core/bridge/web-socket-bridge-server.ts:1424 — 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) src/core/bridge/web-socket-bridge-server.ts:1429 — 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) src/core/bridge/web-socket-bridge-server.ts:1439 — 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.
  • + 10 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×30
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/profile-task-inspector-activity.mts: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 scripts/measure-desktop-navigation.mjs: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 scripts/render-installer-images.mjs: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 scripts/test-tray-render.mjs: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 src/shared/types/plugin.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 scripts/migrate-i18n.mjs: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 scripts/registry-runtime-conformance.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 src/renderer/components/ui/command.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/safari-bootstrap/build.mjs: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 packages/safari-bootstrap/test-integration.mjs: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 scripts/profile-task-activity.mts: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 src/renderer/app-root.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/renderer/components/desktop-kit/sidebar/nav-user.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/renderer/components/ui/table.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/renderer/components/desktop-kit/sidebar/nav-projects.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/renderer/components/desktop-kit/sidebar/nav-main.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/finalize-fs/build.mjs: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 src/renderer/routes/plugins/components/plugin-permission-list.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/check-file-names.mjs: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 src/renderer/components/ui/native-select.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/check-registry-electron-runtime.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 scripts/check-schema-parity.mjs: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 scripts/check-registry-electron-runtime.mjs: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 src/renderer/router.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 5 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×29
  • Repeated repair: src/shared/schemas/add-task.ts src/shared/schemas/add-task.ts:318 — src/shared/schemas/add-task.ts changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is add-task.formValuesToTaskCreateRequest at line 318), 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(migration): resume verified legacy http downloads (#2420)”; “fix(downloads): validate sources and stabilize url entry (#2154)”; “fix(bt): recover magnet file selection and add timeout fallback (#2089)”; “fix: stabilize browser bridge and FFmpeg media workflow (#2019)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/shared/schemas/add-task.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/core/engine/aria2/aria2-rpc-client.ts src/core/engine/aria2/aria2-rpc-client.ts:163 — src/core/engine/aria2/aria2-rpc-client.ts changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is Aria2RpcClient.unpause at line 163), 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: unblock task creation, resume retried downloads, explain long paths (#2194)”; “fix: stabilize linux ci and improve scrollbar contrast (#2180)”; “fix(downloads): stabilize task controls and completion display (#2100)”; “fix(bridge): submit task cookies with aria2 motrix.13 (#2073)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/engine/aria2/aria2-rpc-client.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/core/engine/aria2/aria2-process-manager.ts src/core/engine/aria2/aria2-process-manager.ts:277 — src/core/engine/aria2/aria2-process-manager.ts changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is Aria2ProcessManager.inspectPort at line 277), 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(engine): preserve production download diagnostics (#2361)”; “fix(aria2): harden WebSocket RPC and upgrade engine (#2032)”; “fix(download): preserve filenames for proxied redirect downloads (#2013)”; “fix: resolve beta blockers in downloads, RPC, NAT, and proxy (#2002)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/engine/aria2/aria2-process-manager.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/shared/external-urls.ts src/shared/external-urls.ts:56 — src/shared/external-urls.ts changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is external-urls.getFfmpegManualUrl at line 56), 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(ffmpeg): polish verified installation and settings (#2302)”; “fix(linux): replace login startup switches with manual guidance (#2261)”; “fix(settings): clarify validation and connection feedback (#2126)”; “fix: stabilize browser bridge and FFmpeg media workflow (#2019)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/shared/external-urls.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/renderer/components/desktop-kit/panel/panel-shell.tsx src/renderer/components/desktop-kit/panel/panel-shell.tsx:28 — src/renderer/components/desktop-kit/panel/panel-shell.tsx changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is panel-shell.PanelShell at line 28), 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(downloads): keep list rows reachable under the inspector drawer (#2288)”; “fix(panels): restrict toolbar dragging to compact headers (#2281)”; “fix(ui): adjust panel header spacing”; “fix(downloads): refine list, inspector, and menu interactions (#2149)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/components/desktop-kit/panel/panel-shell.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: e2e/fixtures/electron-app.ts e2e/fixtures/electron-app.ts:125 — e2e/fixtures/electron-app.ts changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is (anonymous) at line 125), 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(i18n): default new installations to system language (#2404)”; “fix(protocol): restore safe motrix deep links and retire mo (#2300)”; “fix(settings): clarify validation and connection feedback (#2126)”; “fix(task): recover interrupted download finalization (#2115)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- e2e/fixtures/electron-app.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/finalize-fs/src/platform/windows/mod.rs packages/finalize-fs/src/platform/windows/mod.rs:179 — packages/finalize-fs/src/platform/windows/mod.rs changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is motrix_finalize_fs::platform::windows::split_absolute_root at line 179), 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(finalize): allow exfat directory roots without file ids (#2330)”; “fix(finalize): bound rename retries and report durable completion (#2265)”; “fix(finalize): harden artifact publication across filesystems (#2192)”; “fix(finalize): support smb shares and recover failed journals (#2132)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- packages/finalize-fs/src/platform/windows/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/shared/schemas/engine-settings.ts src/shared/schemas/engine-settings.ts:15 — src/shared/schemas/engine-settings.ts changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is engine-settings.controlFreeString at line 15), 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(settings): clarify validation and connection feedback (#2126)”; “fix(bt): isolate web seed failures and extend magnet timeout (#2088)”; “fix(download): preserve filenames for proxied redirect downloads (#2013)”; “fix: resolve beta blockers in downloads, RPC, NAT, and proxy (#2002)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/shared/schemas/engine-settings.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/main/ipc/commands/reveal-in-folder.ts src/main/ipc/commands/reveal-in-folder.ts:45 — src/main/ipc/commands/reveal-in-folder.ts changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is reveal-in-folder.createRevealInFolderHandler at line 45), 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(downloads): normalize windows task output paths (#2395)”; “fix(downloads): stabilize task controls and completion display (#2100)”; “fix(bt): prevent duplicate torrent tasks and path conflicts (#1939)”; “fix(security): harden supply-chain trust boundaries (#1846)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/main/ipc/commands/reveal-in-folder.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/main/launcher.ts src/main/launcher.ts:55 — src/main/launcher.ts changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is launcher.setupLauncher at line 55), 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(window): preserve visibility on repeated login launches (#2348)”; “fix(window): preserve startup activation and restore minimized windows (#2325)”; “fix(protocol): restore safe motrix deep links and retire mo (#2300)”; “fix(bridge): restore Windows desktop startup (#2066)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/main/launcher.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/renderer/components/desktop-kit/virtual-list/virtual-list.tsx src/renderer/components/desktop-kit/virtual-list/virtual-list.tsx:23 — src/renderer/components/desktop-kit/virtual-list/virtual-list.tsx changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is virtual-list.VirtualListInner at line 23), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(downloads): keep scrollbar below the column header (#2323)”; “fix(downloads): keep list rows reachable under the inspector drawer (#2288)”; “fix(downloads): refine list, inspector, and menu interactions (#2149)”; “fix(downloads): stabilize task controls and completion display (#2100)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/components/desktop-kit/virtual-list/virtual-list.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:55 — REDACTED changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is proxy-settings.isProxyHost at line 55), 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(plugins): apply dedicated proxy scope to plugin networking (#2360)”; “fix(settings): clarify validation and connection feedback (#2126)”; “fix(download): preserve filenames for proxied redirect downloads (#2013)”; “fix: resolve beta blockers in downloads, RPC, NAT, and proxy (#2002)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/finalize-fs/src/platform/mod.rs packages/finalize-fs/src/platform/mod.rs:86 — packages/finalize-fs/src/platform/mod.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is motrix_finalize_fs::platform::open_root_for_selection at line 86), 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(finalize): support cross-platform publication and storage recovery (#2339)”; “fix(finalize): publish completed files safely on NFS (#2179)”; “fix(finalize): support smb shares and recover failed journals (#2132)”; “fix(task): repair terminal recovery and large artifact finalization (#2080)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- packages/finalize-fs/src/platform/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/finalize-fs/src/platform/unix/mod.rs packages/finalize-fs/src/platform/unix/mod.rs:164 — packages/finalize-fs/src/platform/unix/mod.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is motrix_finalize_fs::platform::unix::open_artifact_internal at line 164), 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(finalize): support cross-platform publication and storage recovery (#2339)”; “fix: stabilize linux ci and improve scrollbar contrast (#2180)”; “fix(finalize): publish completed files safely on NFS (#2179)”; “fix(task): repair terminal recovery and large artifact finalization (#2080)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- packages/finalize-fs/src/platform/unix/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/finalize-fs/src/error.rs packages/finalize-fs/src/error.rs:3 — packages/finalize-fs/src/error.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is motrix_finalize_fs::error::classify_error at line 3), 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(finalize): support cross-platform publication and storage recovery (#2339)”; “fix(finalize): bound rename retries and report durable completion (#2265)”; “fix(finalize): publish completed files safely on NFS (#2179)”; “fix(finalize): support smb shares and recover failed journals (#2132)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- packages/finalize-fs/src/error.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/finalize-fs/src/platform/unix/rename.rs packages/finalize-fs/src/platform/unix/rename.rs:10 — packages/finalize-fs/src/platform/unix/rename.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is motrix_finalize_fs::platform::unix::rename::rename_opened_no_replace at line 10), 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(finalize): bound rename retries and report durable completion (#2265)”; “fix(finalize): harden artifact publication across filesystems (#2192)”; “fix(finalize): publish completed files safely on NFS (#2179)”; “fix(task): repair terminal recovery and large artifact finalization (#2080)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- packages/finalize-fs/src/platform/unix/rename.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/main/window/platform-options.ts src/main/window/platform-options.ts:14 — src/main/window/platform-options.ts changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is platform-options.buildPlatformOptions at line 14), 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(window): align startup themes and fullscreen chrome (#2057)”; “fix: persist settings and align desktop window controls (#1906)”; “fix: sync and align window controls (#1894)”; “fix: improve window controls and refresh dependencies (#1886)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/main/window/platform-options.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/renderer/windows/add-task-window.tsx src/renderer/windows/add-task-window.tsx:18 — src/renderer/windows/add-task-window.tsx 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 add-task-window.AddTaskWindow at line 18), 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: stabilize browser bridge and FFmpeg media workflow (#2019)”; “fix(bt): prevent duplicate torrent tasks and path conflicts (#1939)”; “fix: persist settings and align desktop window controls (#1906)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/windows/add-task-window.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: REDACTED REDACTED:198 — REDACTED 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 12 (its worst body is aria2.waitForRpc at line 198), 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(engine): upgrade aria2 for durable task cookies (#2074)”; “fix(bridge): submit task cookies with aria2 motrix.13 (#2073)”; “fix(aria2): harden WebSocket RPC and upgrade engine (#2032)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/renderer/routes/downloads/columns.ts src/renderer/routes/downloads/columns.ts:23 — src/renderer/routes/downloads/columns.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 2 (its worst body is columns.clampColumnWidth at line 23), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(downloads): restore checkboxes for touch-friendly selection (#2381)”; “fix(ui): polish dashboard metrics, tray speeds and download labels (#2175)”; “fix(downloads): refine list, inspector, and menu interactions (#2149)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/renderer/routes/downloads/columns.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/preload/preload.ts src/preload/preload.ts:51 — src/preload/preload.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 3 (its worst body is preload.assertEventChannel at line 51), 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(plugins): preserve diagnostics and dispose bridge subscriptions (#2380)”; “fix(window): refine Windows caption controls (#1935)”; “fix(security): harden supply-chain trust boundaries (#1846)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/preload/preload.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/core/plugin/install/github-fetcher.ts src/core/plugin/install/github-fetcher.ts:81 — src/core/plugin/install/github-fetcher.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 11 (its worst body is github-fetcher.downloadGithubMoext at line 81), 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(plugins): apply dedicated proxy scope to plugin networking (#2360)”; “fix(download): preserve filenames for proxied redirect downloads (#2013)”; “fix(security): harden supply-chain trust boundaries (#1846)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/plugin/install/github-fetcher.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/server/plugin/install-service.ts src/server/plugin/install-service.ts:107 — src/server/plugin/install-service.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 10 (its worst body is ServerPluginInstallService.materialize at line 107), 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(plugins): apply dedicated proxy scope to plugin networking (#2360)”; “fix(download): preserve filenames for proxied redirect downloads (#2013)”; “fix(security): harden supply-chain trust boundaries (#1846)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/server/plugin/install-service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: packages/finalize-fs/src/platform/windows/metadata.rs packages/finalize-fs/src/platform/windows/metadata.rs:275 — packages/finalize-fs/src/platform/windows/metadata.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is motrix_finalize_fs::platform::windows::metadata::directory_names at line 275), 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(finalize): allow exfat directory roots without file ids (#2330)”; “fix(finalize): bound rename retries and report durable completion (#2265)”; “fix(finalize): support smb shares and recover failed journals (#2132)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- packages/finalize-fs/src/platform/windows/metadata.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/core/plugin/finalize/artifact-identity.ts src/core/plugin/finalize/artifact-identity.ts:391 — src/core/plugin/finalize/artifact-identity.ts changed 3 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 14 (its worst body is artifact-identity.artifactIdentityEquals at line 391), 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(downloads): avoid hashing ordinary windows finalization (#2406)”; “fix(finalize): support smb shares and recover failed journals (#2132)”; “fix(task): repair terminal recovery and large artifact finalization (#2080)”. 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-26..2026-10-24, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-26 21:12:41 +08:00' --until='2026-10-24 21:12:41 +08:00' --full-history --no-merges -- src/core/plugin/finalize/artifact-identity.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.
  • + 4 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×29
  • ClassTooLong: MagnetTracker src/core/torrent/magnet-tracker.ts:195 — ClassTooLong — 1283 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 883 over it, 3.21× 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: SessionManager src/core/session/session-manager.ts:233 — ClassTooLong — 1176 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 776 over it, 2.94× 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: SqlitePostDeliveryRepository src/core/session/post-delivery-repository.ts:117 — ClassTooLong — 1045 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 645 over it, 2.61× 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: WebSocketBridgeServer src/core/bridge/web-socket-bridge-server.ts:529 — ClassTooLong — 1011 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 611 over it, 2.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: PluginHost src/core/plugin/host/plugin-host.ts:157 — ClassTooLong — 869 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 469 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LegacyHttpActivationService src/core/legacy-import/http-activation-service.ts:63 — ClassTooLong — 763 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 363 over it, 1.91× 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: Aria2Adapter src/core/engine/aria2/aria2-adapter.ts:146 — ClassTooLong — 762 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 362 over it, 1.91× 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: MotrixDatabase src/core/session/motrix-database.ts:230 — ClassTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 353 over it, 1.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TaskInspectorActivityService src/core/inspector-activity/task-inspector-activity-service.ts:154 — ClassTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 309 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EngineSupervisor src/core/engine/engine-supervisor.ts:90 — ClassTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 281 over it, 1.70× 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: LegacyImportService src/core/legacy-import/import-service.ts:57 — ClassTooLong — 660 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 260 over it, 1.65× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OperationService src/core/plugin/operations/operation-service.ts:68 — ClassTooLong — 600 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 200 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TrackerManager src/core/tracker/tracker-manager.ts:79 — ClassTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 194 over it, 1.49× 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: TaskInspectorActivityRuntime src/core/inspector-activity/task-inspector-activity-runtime.ts:123 — ClassTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 181 over it, 1.45× 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: FinalizeRecovery src/core/plugin/finalize/finalize-recovery.ts:45 — ClassTooLong — 580 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 180 over it, 1.45× 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: PluginRegistry src/core/plugin/plugin-registry.ts:148 — ClassTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 164 over it, 1.41× 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: OperationFiles src/core/plugin/operations/operation-files.ts:54 — ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 144 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NativeFinalizeArtifactOperations src/core/plugin/finalize/native-artifact-operations.ts:38 — ClassTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 118 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PairSession src/core/bridge/mbp1/pair-session.ts:248 — ClassTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 109 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DirectoryPickerController src/renderer/features/web-directory-picker/directory-picker-controller.ts:89 — ClassTooLong — 500 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 100 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RendererSupervisor src/main/window/renderer-supervisor.ts:78 — ClassTooLong — 499 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 99 over it, 1.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TaskInspectorActivityStore src/core/inspector-activity/task-inspector-activity-store.ts:189 — ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 96 over it, 1.24× 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: LegacyBtActivationService src/core/legacy-import/bt-activation-service.ts:45 — ClassTooLong — 473 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 73 over it, 1.18× 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: WindowManager src/main/window/window-manager.ts:57 — ClassTooLong — 448 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 48 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PluginInstaller src/core/plugin/install/plugin-installer.ts:235 — ClassTooLong — 439 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 39 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.
  • + 4 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×22
  • Sync-over-async blocking REDACTED:200 — `existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:389 — `existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking e2e/global-setup.ts:22 — `spawnSync` in `globalSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking e2e/global-setup.ts:44 — `existsSync` in `callback to REQUIRED_ARTIFACTS.filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking e2e/global-setup.ts:61 — `spawnSync` in `globalSetup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/native-host/build.mjs:144 — `spawnSync` in `buildNativeHost` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/native-host/package-flatpak-companion.mjs:166 — `gzipSync` in `packageFlatpakCompanion` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/appimage-artifact.mjs:319 — `inflateRawSync` in `inspectEmbeddedBlockmap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/fetch-engine.mjs:289 — `existsSync` in `readLockFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/sign-macos.mjs:89 — `execFileSync` in `sign` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/sign-macos.mjs:100 — `execFileSync` in `sign` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/sign-macos.mjs:106 — `execFileSync` in `sign` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/ffmpeg/verified-install.ts:826 — `existsSync` in `installVerifiedFfmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/ffmpeg/verified-install.ts:918 — `existsSync` in `installVerifiedFfmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/plugin/host/test-helpers.ts:110 — `readFileSync` in `spawnTestBridge` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/plugin/host/test-helpers.ts:115 — `readFileSync` in `spawnTestBridge` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/plugin/secret-store-libsodium.ts:73 — `existsSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/plugin/secret-store-libsodium.ts:74 — `readFileSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/plugin/secret-store-libsodium.ts:87 — `writeFileSync` in `create` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/session/session-manager.ts:1546 — `fs.existsSync` in `reAddOrMarkErrorFromPair` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/core/session/session-manager.ts:1554 — `fs.readFileSync` in `reAddOrMarkErrorFromPair` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking src/test-utils/legacy-http-service.ts:83 — `gunzipSync` in `legacyHttpActivationFixture` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D3 · God Classes · TooManyMethods · ×16
  • TooManyMethods: Aria2RpcClient src/core/engine/aria2/aria2-rpc-client.ts:35 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: Aria2Adapter src/core/engine/aria2/aria2-adapter.ts:146 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. Most of these members implement engine-adapter.EngineAdapter (46 of 57 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: PluginHost src/core/plugin/host/plugin-host.ts:157 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SqlitePostDeliveryRepository src/core/session/post-delivery-repository.ts:117 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: MagnetTracker src/core/torrent/magnet-tracker.ts:195 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: CapabilityBridge src/core/plugin/host/capability-bridge.ts:370 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 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.
  • TooManyMethods: WebSocketBridgeServer src/core/bridge/web-socket-bridge-server.ts:529 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MotrixDatabase src/core/session/motrix-database.ts:230 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SessionManager src/core/session/session-manager.ts:233 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RendererSupervisor src/main/window/renderer-supervisor.ts:78 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WindowManager src/main/window/window-manager.ts:57 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 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.
  • TooManyMethods: EngineSupervisor src/core/engine/engine-supervisor.ts:90 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TrackerManager src/core/tracker/tracker-manager.ts:79 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DirectoryPickerController src/renderer/features/web-directory-picker/directory-picker-controller.ts:89 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TaskInspectorActivityService src/core/inspector-activity/task-inspector-activity-service.ts:154 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 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.
  • TooManyMethods: TaskInspectorActivityRuntime src/core/inspector-activity/task-inspector-activity-runtime.ts:123 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×14
  • Outbound HTTP without resilience scripts/run_flatpak_node_generator.py:24 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:140 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:257 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience scripts/smoke-server-package.mjs:233 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience scripts/smoke-server-package.mjs:246 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience scripts/smoke-server-package.mjs:256 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience scripts/smoke-server-package.mjs:262 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/plugin/install/github-fetcher.ts:90 — `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/plugin/install/github-fetcher.ts:130 — `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/plugin/install/url-fetcher.ts:12 — `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/plugin/registry/registry-fetcher.ts:67 — `fetchImpl(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/session/session-manager.ts:104 — `fetcher(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/tracker/tracker-http-client.ts:22 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/core/tracker/tracker-http-client.ts:50 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D29 · Static Analysis (SAST) · REDACTED · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · Skipped test · ×11
  • Skipped test: (unnamed test) e2e/renderer-recovery.spec.ts:420 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/renderer-recovery-soak.spec.ts:11 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/media-settings.spec.ts:10 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/legacy-http-activation.spec.ts:41 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/legacy-bt-activation.spec.ts:53 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/hidden-window-startup.spec.ts:17 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/application-menu.spec.ts:161 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/application-menu.spec.ts:177 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/bridge/native-messaging-registration.spec.ts:15 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/bridge/appimage-cold-launch.spec.ts:101 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) e2e/bridge/appimage-cold-launch.spec.ts:110 — Skipped — switched off by test.skip
D10 · Test Quality · No assertions · ×11
  • No assertions: a second launch restores a minimized main window e2e/window-reopen.spec.ts:34 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: restoreInflight: no-op src/core/bridge-receiver/bridge-receiver.test.ts:215 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: restricts a PairSession handle to paired or aborted outcomes src/core/bridge/pairing-prompt-controller.test.ts:99 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: positive time ends seeding even when ratio is unlimited src/core/engine/aria2/seeding-policy.integration.test.ts:110 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: ignores notifications with no matching handler src/core/engine/aria2/aria2-rpc-client.test.ts:936 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: is a no-op when not running src/core/engine/aria2/aria2-process-manager.test.ts:563 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: is a no-op when not running src/core/engine/aria2/aria2-process-manager.test.ts:582 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: skips updateApp when handler is undefined src/core/proxy/applier.test.ts:173 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: removes listeners on unmount src/renderer/hooks/use-modifier-keys.test.ts:36 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: keeps the metric and text content contracts closed src/renderer/routes/dashboard/components/tile-title.test.tsx:31 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: keeps the operation visible but unavailable for a disabled plugin src/renderer/routes/plugins/plugin-detail-page.test.tsx:257 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · TodoComment · ×8
  • TodoComment src/core/plugin/host/quick-js-worker.ts:1279 — // TODO(Plan G): proper Uint8Array marshaling via QuickJS typed-array API. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/core/plugin/host/quick-js-worker.ts:1798 — // TODO(Plan C): implement streaming reader protocol via opId round-trips. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/core/plugin/host/quick-js-worker.ts:1822 — // TODO(Plan C): bridge will return {opId} once context wiring is done. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/core/plugin/host/quick-js-worker.ts:1874 — // TODO(Plan C): upgrade to AsyncIterable progress if needed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/core/plugin/host/capability-bridge.phase.test.ts:598 — // ── 11. TODO: chain failure → no DB write (requires HookOrchestrator T12) ─ — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/main/index.ts:2102 — // TODO Task 22: wire settingsManager.snapshot()?.plugins?.[pluginId] ?? {} — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/main/index.ts:2104 — // TODO Plan F: derive from manifest contributes.configuration schema — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/main/platform/appimage-integration.ts:1024 — // converges. TODO(follow-up): also reconcile immediately when the setting — 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.
AC2 · Forms & labels · <fieldset> without a <legend> · ×7
  • <fieldset> without a <legend> src/renderer/routes/settings/cards/advanced-dialog.tsx:197 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> src/renderer/routes/settings/cards/appearance-dialog.tsx:240 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:180 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> src/renderer/routes/settings/cards/downloads-dialog.tsx:130 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> src/renderer/routes/settings/cards/general-dialog.tsx:256 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> src/renderer/routes/settings/cards/integration/integration-dialog.tsx:153 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> src/renderer/routes/settings/cards/network-dialog.tsx:193 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X2 · Cancellation propagation · Async function without AbortSignal · ×7
  • Async function without AbortSignal: waitForHealth scripts/smoke-server-package.mjs:224 — `waitForHealth` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: assertOperatorAuth scripts/smoke-server-package.mjs:245 — `assertOperatorAuth` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: waitForHealth REDACTED:130 — `waitForHealth` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: createTrackerHttpClient src/core/tracker/tracker-http-client.ts:26 — `createTrackerHttpClient` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: refreshOperatorSession src/renderer/lib/operator-auth.ts:50 — `refreshOperatorSession` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: operatorLogin src/renderer/lib/operator-auth.ts:111 — `operatorLogin` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: operatorLogout src/renderer/lib/operator-auth.ts:131 — `operatorLogout` 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 })`.
AC6 · Visual & motion safety · Focus outline removed inline · ×5
  • Focus outline removed inline src/renderer/components/desktop-kit/inspector-drawer.tsx:160 — <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline src/renderer/components/ui/input.tsx:6 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline src/renderer/components/ui/native-select.tsx:15 — <select> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline src/renderer/components/ui/textarea.tsx:6 — <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline src/renderer/routes/downloads/task-list-panel.tsx:173 — <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D2 · Cognitive Complexity · motrix_native_host · ×5
  • motrix_native_host::probe::read_response_body (cognitive 46) packages/native-host/src/probe.rs:113 — motrix_native_host::probe::read_response_body has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (26 pts), match/switch 6 (19 pts), loops 1 (nesting depth added 30). 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.
  • motrix_native_host::probe::decode_chunked (cognitive 28) packages/native-host/src/probe.rs:246 — motrix_native_host::probe::decode_chunked has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • motrix_native_host::flatpak_companion::installation::uninstall_companion (cognitive 19) packages/native-host/src/flatpak_companion/installation.rs:208 — motrix_native_host::flatpak_companion::installation::uninstall_companion has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, loops 4 (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.
  • motrix_native_host::flatpak_companion::installation::install_companion (cognitive 18) packages/native-host/src/flatpak_companion/installation.rs:42 — motrix_native_host::flatpak_companion::installation::install_companion has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), loops 3 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • motrix_native_host::resolve::poll_launched_endpoint (cognitive 17) packages/native-host/src/resolve.rs:152 — motrix_native_host::resolve::poll_launched_endpoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · motrix_finalize_fs · ×5
  • motrix_finalize_fs::platform::windows::metadata::directory_names (cognitive 31) packages/finalize-fs/src/platform/windows/metadata.rs:275 — motrix_finalize_fs::platform::windows::metadata::directory_names has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). 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.
  • motrix_finalize_fs::platform::unix::copy::copy_file_contents (cognitive 22) packages/finalize-fs/src/platform/unix/copy.rs:29 — motrix_finalize_fs::platform::unix::copy::copy_file_contents has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • motrix_finalize_fs::platform::unix::remove::remove_directory_snapshot (cognitive 22) packages/finalize-fs/src/platform/unix/remove.rs:160 — motrix_finalize_fs::platform::unix::remove::remove_directory_snapshot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • motrix_finalize_fs::platform::unix::copy::copy_directory_contents (cognitive 21) packages/finalize-fs/src/platform/unix/copy.rs:78 — motrix_finalize_fs::platform::unix::copy::copy_directory_contents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • motrix_finalize_fs::platform::unix::remove::isolate_opened_for_removal (cognitive 18) packages/finalize-fs/src/platform/unix/remove.rs:24 — motrix_finalize_fs::platform::unix::remove::isolate_opened_for_removal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4 (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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×5
  • Swallowed exception (caught, then discarded) packages/safari-bootstrap/Sources/SafariNativeIPC/BootstrapIPCService.swift:149 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/safari-bootstrap/Sources/SafariNativeIPC/BootstrapIPCService.swift:150 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) scripts/verify-update-artifacts.mjs:49 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) scripts/fetch-builtins.mjs:445 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/core/bridge/trusted-extension-registry.ts:70 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Fake-async · ×4
  • Fake-async — async method never awaits scripts/before-build-use-staged-dependencies.mjs:9 — `useStagedDependencies` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/core/plugin/capabilities/metadata.ts:164 — `has` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/core/plugin/capabilities/metadata.ts:215 — `set` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/core/plugin/host/capability-bridge.ts:1778 — `handleStaged` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
D1 · Cyclomatic Complexity · motrix_native_host · ×3
  • motrix_native_host::probe::read_response_body (cyclomatic 22) packages/native-host/src/probe.rs:113 — motrix_native_host::probe::read_response_body has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • motrix_native_host::flatpak_companion::installation::install_companion (cyclomatic 17) packages/native-host/src/flatpak_companion/installation.rs:42 — motrix_native_host::flatpak_companion::installation::install_companion has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • motrix_native_host::flatpak_companion::installation::uninstall_companion (cyclomatic 17) packages/native-host/src/flatpak_companion/installation.rs:208 — motrix_native_host::flatpak_companion::installation::uninstall_companion 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.
D10 · Test Quality · Fixed-sleep synchronisation · ×3
  • Fixed-sleep synchronisation: http.get outside the manifest hostPermissions fails with host_not_permitted src/core/plugin/host/capability-bridge.dispatch.test.ts:355 — This test starts work it did not wait for (`scoped`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 5))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: cancel invokes downloader.cancel during download phase src/core/task/media-task-coordinator.test.ts:1071 — This test starts work it did not wait for (`startPromise`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 10))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: getActiveSegmentGids returns the running downloaders active gids src/core/task/media-task-coordinator.test.ts:1461 — This test starts work it did not wait for (`startPromise`, still running when the sleep starts) and then orders itself against it with `new Promise((r) => setTimeout(r, 10))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×3
  • Duplicated block (8 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs:101 — packages/finalize-fs/src/platform/unix/copy.rs:101-108 | packages/finalize-fs/src/platform/unix/copy.rs:187-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs:187 — packages/finalize-fs/src/platform/unix/copy.rs:187-194 | packages/finalize-fs/src/platform/unix/operations.rs:31-38 — 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 (8 lines × 2) packages/finalize-fs/src/platform/unix/rename.rs:121 — packages/finalize-fs/src/platform/unix/rename.rs:121-128 | packages/finalize-fs/src/platform/unsupported.rs:41-48 — 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.
IC1 · Incompleteness & stubs · Guard cannot change the result · ×3
  • Guard cannot change the result — returns what the code already falls through to src/core/torrent/magnet-tracker.ts:1673 — The guard above `return true;` also returns `true`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
  • Guard cannot change the result — returns what the code already falls through to src/main/bridge/native-messaging-installer.ts:507 — The guard above `return null;` also returns `null`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
  • Guard cannot change the result — returns what the code already falls through to src/renderer/lib/transport/http-ws.ts:38 — The guard above `return 'query';` also returns `'query'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
R11 · Import Boundaries · Boundary violation [package · ×3
  • Boundary violation [package:test-suite-dependency] scripts/profile-task-inspector-activity.mts:24 — scripts/profile-task-inspector-activity.mts:24 imports src/test-utils/task.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:third-party-deep-import] src/renderer/routes/plugins/lib/call-graph-engine.ts:2 — src/renderer/routes/plugins/lib/call-graph-engine.ts:2 imports elkjs/lib/elk-api.js, 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] src/renderer/routes/plugins/lib/call-graph-engine.ts:3 — src/renderer/routes/plugins/lib/call-graph-engine.ts:3 imports elkjs/lib/elk-worker.min.js?worker, 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.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×3
  • Recursive walk over a caller-supplied document has no depth cap src/core/plugin/install/public-command-hash.ts:29 — `canonicalize` is exported and takes `value: unknown` from its caller, and it calls itself at line 29 (`canonicalize`) with a piece of `value` (and at line 36) — and nowhere in `canonicalize` 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 `canonicalize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/core/plugin/manifest/i18n-resolve.ts:30 — `flattenLocaleDict` is exported and takes `obj: Record<string, unknown>` from its caller, and it calls itself at line 30 (`flattenLocaleDict`) with a piece of `obj` — and nowhere in `flattenLocaleDict` 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 `flattenLocaleDict` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/core/plugin/post/delivery-materializer.ts:72 — `canonicalJson` is exported, takes a document from its caller (line 48) and hands it to `serialize`, which calls itself at line 72 (`serialize`) with a piece of `candidate` (and at line 79) — and nowhere in `serialize` 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 `serialize` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
AC2 · Forms & labels · <Select> field component without a label · ×2
  • <Select> field component without a label src/renderer/components/settings-kit/plugin-config-field.tsx:39 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label src/renderer/routes/settings/cards/integration/trusted-extensions-section.tsx:243 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D2 · Cognitive Complexity · index.main · ×2
  • index.main::handlePolledTasks (cognitive 28) src/server/index.ts:953 — index.main::handlePolledTasks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), error handling 1 (3 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.main::startServer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • index.main::startServer (cognitive 27) src/server/index.ts:1407 — index.main::startServer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), error handling 6 (7 pts), boolean chains 3 (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. This shape REPEATS in the file: one other method here (index.main::handlePolledTasks) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs:86 — packages/finalize-fs/src/platform/unix/copy.rs:86-96 | packages/finalize-fs/src/platform/unix/copy.rs:98-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs:91 — packages/finalize-fs/src/platform/unix/copy.rs:91-101 | packages/finalize-fs/src/platform/unix/copy.rs:117-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) packages/native-host/src/flatpak_companion/secure_fs.rs:194 — packages/native-host/src/flatpak_companion/secure_fs.rs:194-203 | packages/native-host/src/flatpak_companion/secure_fs.rs:233-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) packages/native-host/src/flatpak_companion/secure_fs.rs:99 — packages/native-host/src/flatpak_companion/secure_fs.rs:99-108 | packages/native-host/src/flatpak_companion/secure_fs.rs:301-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.
R10 · Code Duplication · Duplicated block with local edits (110 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (110 matched lines × 2 locations) scripts/prepare-snap-project.mjs:65 — scripts/prepare-snap-project.mjs:65 · scripts/verify-snap-artifact.mjs:109 — the two spans are one implementation copied and then locally edited — 670 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (110 matched lines × 2 locations) src/renderer/routes/settings/cards/downloads-dialog.tsx:96 — src/renderer/routes/settings/cards/downloads-dialog.tsx:96 · src/renderer/routes/settings/cards/general-dialog.tsx:219 — the two spans are one implementation copied and then locally edited — 481 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 (76 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (76 matched lines × 2 locations) src/main/bridge/pairing-dialog-controller.ts:54 — src/main/bridge/pairing-dialog-controller.ts:54 · src/server/bridge/extension-pairing-prompt-adapter.ts:51 — the two spans are one implementation copied and then locally edited — 451 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (76 matched lines × 2 locations) src/renderer/components/ui/autocomplete.tsx:17 — src/renderer/components/ui/autocomplete.tsx:17 · src/renderer/components/ui/combobox.tsx:43 — the two spans are one implementation copied and then locally edited — 300 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 (57 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (57 matched lines × 2 locations) src/core/task/actions/finalize-task.ts:334 — src/core/task/actions/finalize-task.ts:334 · src/core/task/actions/finalize-task.ts:607 — the two spans are one implementation copied and then locally edited — 287 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (57 matched lines × 2 locations) src/main/index.ts:288 — src/main/index.ts:288 · src/server/index.ts:288 — the two spans are one implementation copied and then locally edited — 375 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.
R7 · Dead Code · Dead file (~113 LoC) · ×2
  • Dead file (~113 LoC) src/renderer/components/desktop-kit/sidebar/nav-user.tsx — no import path from any entry point (237 application, 68 tooling, 1086 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 (~113 LoC) src/renderer/components/ui/table.tsx — no import path from any entry point (237 application, 68 tooling, 1086 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
S1 · Web-Security Posture · Weak hash algorithm · ×2
  • Weak hash algorithm src/core/engine/aria2/aria2-session-identity-recovery.ts:215 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm src/core/legacy-import/source-scanner.ts:213 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
S1 · Web-Security Posture · Password key derivation is priced too cheaply · ×2
  • Password key derivation is priced too cheaply REDACTED:271 — This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
  • Password key derivation is priced too cheaply src/core/bridge/mbp1/scrypt-w.ts:32 — This code fixes scrypt at N=16,384 (r=8, p=1). A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative src/renderer/components/desktop-kit/cubic-glass/cubic-glass-gradient.tsx:114 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC2 · Forms & labels · <PasswordInput> field component without a label · ×1
  • <PasswordInput> field component without a label src/renderer/components/settings-kit/plugin-config-field.tsx:64 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <NumberInput> field component without a label · ×1
  • <NumberInput> field component without a label src/renderer/components/settings-kit/plugin-config-field.tsx:78 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <Slider> field component without a label · ×1
  • <Slider> field component without a label src/renderer/routes/downloads/inspector/lifetime-transfer-card.tsx:600 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <Textarea> field component without a label · ×1
  • <Textarea> field component without a label src/renderer/routes/downloads/inspector/trackers-tab.tsx:457 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard src/renderer/styles/globals.css:492 — `.drawer-slide-in` moves (`animation: drawer-slide-in-from-bottom 300ms cubic-bezier(0.32, 0.72, 0, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — your Biome config enables no a11y rules and there's no axe/pa11y/Lighthouse in tests or CI. Start by turning on Biome's own a11y rule group to catch issues at author time. What was searched, so you can tell an absence from a miss: the 277 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 · commands.buildCommandHandlers (cyclomatic 172) · ×1
  • commands.buildCommandHandlers (cyclomatic 172) src/main/ipc/commands.ts:296 — commands.buildCommandHandlers has cyclomatic complexity 172 (threshold 15). Most of this is not in the body itself: 2 of the 172 points are its own statements and the rest belongs to 37 function items inside it that branch (a function literal at line 1154, a function literal at line 896, a function literal at line 1667, …). 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 · legacy-import-dialog.LegacyImportDialogContent (cyclomatic 149) · ×1
  • legacy-import-dialog.LegacyImportDialogContent (cyclomatic 149) src/renderer/features/legacy-import/legacy-import-dialog.tsx:113 — legacy-import-dialog.LegacyImportDialogContent has cyclomatic complexity 149 (threshold 15). Of this number, 44 points are the body's own statements and 105 belong to 35 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · activity-calendar.ActivityCalendar (cyclomatic 139) · ×1
  • activity-calendar.ActivityCalendar (cyclomatic 139) src/renderer/routes/dashboard/activity/activity-calendar.tsx:264 — activity-calendar.ActivityCalendar has cyclomatic complexity 139 (threshold 15). Of this number, 39 points are the body's own statements and 100 belong to 27 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · operation-form.OperationFormContent (cyclomatic 130) · ×1
  • operation-form.OperationFormContent (cyclomatic 130) src/renderer/features/plugin-operations/operation-form.tsx:102 — operation-form.OperationFormContent has cyclomatic complexity 130 (threshold 15). Of this number, 50 points are the body's own statements and 80 belong to 17 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · create-task-handler.handleCreateTaskUnderAdmission (cyclomatic 119) · ×1
  • create-task-handler.handleCreateTaskUnderAdmission (cyclomatic 119) src/core/task/create-task-handler.ts:372 — create-task-handler.handleCreateTaskUnderAdmission has cyclomatic complexity 119 (threshold 15). Of this number, 97 points are the body's own statements and 22 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · add-task-form.AddTaskForm (cyclomatic 109) · ×1
  • add-task-form.AddTaskForm (cyclomatic 109) src/renderer/components/add-task/add-task-form.tsx:139 — add-task-form.AddTaskForm has cyclomatic complexity 109 (threshold 15). Most of this is not in the body itself: 8 of the 109 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 521, 411, 195, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · engine-diagnostics-dialog.EngineDiagnosticsDialogHost (cyclomatic 101) · ×1
  • engine-diagnostics-dialog.EngineDiagnosticsDialogHost (cyclomatic 101) src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx:140 — engine-diagnostics-dialog.EngineDiagnosticsDialogHost has cyclomatic complexity 101 (threshold 15). Of this number, 81 points are the body's own statements and 20 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · web-directory-picker-dialog.PickerSession · ×1
  • web-directory-picker-dialog.PickerSession::keyDown (cyclomatic 94) src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:303 — web-directory-picker-dialog.PickerSession::keyDown has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (web-directory-picker-dialog.PickerSession) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · index.initializeMainProcess (cyclomatic 92) · ×1
  • index.initializeMainProcess (cyclomatic 92) src/main/index.ts:1589 — index.initializeMainProcess has cyclomatic complexity 92 (threshold 15). Of this number, 48 points are the body's own statements and 44 belong to 33 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · media-tools-section.MediaToolsSection (cyclomatic 84) · ×1
  • media-tools-section.MediaToolsSection (cyclomatic 84) src/renderer/routes/settings/cards/integration/media-tools-section.tsx:75 — media-tools-section.MediaToolsSection has cyclomatic complexity 84 (threshold 15). Of this number, 60 points are the body's own statements and 24 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaTaskCoordinator.run (cyclomatic 78) · ×1
  • MediaTaskCoordinator.run (cyclomatic 78) src/core/task/media-task-coordinator.ts:236 — MediaTaskCoordinator.run has cyclomatic complexity 78 (threshold 15). Of this number, 46 points are the body's own statements and 32 belong to 15 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · verify-electron-package.verifyElectronPackage (cyclomatic 77) · ×1
  • verify-electron-package.verifyElectronPackage (cyclomatic 77) scripts/verify-electron-package.mjs:271 — verify-electron-package.verifyElectronPackage has cyclomatic complexity 77 (threshold 15). Most of this is not in the body itself: 3 of the 77 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 583, a function literal at line 467, a function literal at line 345, …). 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 · verify-flatpak-packaging.verifyFlatpakPackaging (cyclomatic 77) · ×1
  • verify-flatpak-packaging.verifyFlatpakPackaging (cyclomatic 77) scripts/verify-flatpak-packaging.mjs:118 — verify-flatpak-packaging.verifyFlatpakPackaging has cyclomatic complexity 77 (threshold 15). Of this number, 68 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · commands.buildServerCommandHandlers (cyclomatic 77) · ×1
  • commands.buildServerCommandHandlers (cyclomatic 77) src/server/ipc/commands.ts:197 — commands.buildServerCommandHandlers has cyclomatic complexity 77 (threshold 15). Most of this is not in the body itself: 2 of the 77 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 472, a function literal at line 814, a function literal at line 983, …). 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 · http-request-context.resolveLegacyHttpRequestContext (cyclomatic 75) · ×1
  • http-request-context.resolveLegacyHttpRequestContext (cyclomatic 75) src/core/legacy-import/http-request-context.ts:28 — http-request-context.resolveLegacyHttpRequestContext has cyclomatic complexity 75 (threshold 15). Of this number, 45 points are the body's own statements and 30 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SessionManager.restore (cyclomatic 74) · ×1
  • SessionManager.restore (cyclomatic 74) src/core/session/session-manager.ts:641 — SessionManager.restore has cyclomatic complexity 74 (threshold 15). Of this number, 71 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · directory-picker.DirectoryPicker (cyclomatic 73) · ×1
  • directory-picker.DirectoryPicker (cyclomatic 73) src/renderer/components/desktop-kit/directory-picker.tsx:56 — directory-picker.DirectoryPicker has cyclomatic complexity 73 (threshold 15). Of this number, 43 points are the body's own statements and 30 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dashboard-grid.DashboardGrid (cyclomatic 71) · ×1
  • dashboard-grid.DashboardGrid (cyclomatic 71) src/renderer/routes/dashboard/components/dashboard-grid.tsx:849 — dashboard-grid.DashboardGrid has cyclomatic complexity 71 (threshold 15). Most of this is not in the body itself: 11 of the 71 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 1041, 1225, 1162, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · trackers-tab.TrackersTab (cyclomatic 70) · ×1
  • trackers-tab.TrackersTab (cyclomatic 70) src/renderer/routes/downloads/inspector/trackers-tab.tsx:42 — trackers-tab.TrackersTab has cyclomatic complexity 70 (threshold 15). Of this number, 19 points are the body's own statements and 51 belong to 13 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · plugin-call-graph.PluginCallGraph (cyclomatic 70) · ×1
  • plugin-call-graph.PluginCallGraph (cyclomatic 70) src/renderer/routes/plugins/components/call-graph/plugin-call-graph.tsx:221 — plugin-call-graph.PluginCallGraph has cyclomatic complexity 70 (threshold 15). Most of this is not in the body itself: 7 of the 70 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 525, 279, 305, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · verify-server-package.verifyServerPackage (cyclomatic 69) · ×1
  • verify-server-package.verifyServerPackage (cyclomatic 69) scripts/verify-server-package.mjs:177 — verify-server-package.verifyServerPackage has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 4 of the 69 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 344, a function literal at line 493, a function literal at line 410, …). 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 · source-scanner.scanLegacySource (cyclomatic 69) · ×1
  • source-scanner.scanLegacySource (cyclomatic 69) src/core/legacy-import/source-scanner.ts:298 — source-scanner.scanLegacySource has cyclomatic complexity 69 (threshold 15). Of this number, 67 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · lifetime-transfer-card.LifetimeTransferCard (cyclomatic 65) · ×1
  • lifetime-transfer-card.LifetimeTransferCard (cyclomatic 65) src/renderer/routes/downloads/inspector/lifetime-transfer-card.tsx:58 — lifetime-transfer-card.LifetimeTransferCard has cyclomatic complexity 65 (threshold 15). Of this number, 21 points are the body's own statements and 44 belong to 19 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · system-protocols-section.SystemProtocolsSection (cyclomatic 61) · ×1
  • system-protocols-section.SystemProtocolsSection (cyclomatic 61) src/renderer/routes/settings/cards/integration/system-protocols-section.tsx:62 — system-protocols-section.SystemProtocolsSection has cyclomatic complexity 61 (threshold 15). Of this number, 41 points are the body's own statements and 20 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · task-list-panel.TaskListPanel (cyclomatic 60) · ×1
  • task-list-panel.TaskListPanel (cyclomatic 60) src/renderer/routes/downloads/task-list-panel.tsx:38 — task-list-panel.TaskListPanel has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 6 of the 60 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 248, 187, 285, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · FinalizeRecovery.recover (cyclomatic 59) · ×1
  • FinalizeRecovery.recover (cyclomatic 59) src/core/plugin/finalize/finalize-recovery.ts:80 — FinalizeRecovery.recover has cyclomatic complexity 59 (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 · web-directory-picker-dialog.PickerSession (cyclomatic 59) · ×1
  • web-directory-picker-dialog.PickerSession (cyclomatic 59) src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:134 — web-directory-picker-dialog.PickerSession has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (web-directory-picker-dialog.PickerSession::keyDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Aria2Adapter.addTorrent (cyclomatic 58) · ×1
  • Aria2Adapter.addTorrent (cyclomatic 58) src/core/engine/aria2/aria2-adapter.ts:847 — Aria2Adapter.addTorrent has cyclomatic complexity 58 (threshold 15). Of this number, 47 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · plugin-install-dialog.PluginInstallSession (cyclomatic 57) · ×1
  • plugin-install-dialog.PluginInstallSession (cyclomatic 57) src/renderer/routes/plugins/plugin-install-dialog.tsx:96 — plugin-install-dialog.PluginInstallSession has cyclomatic complexity 57 (threshold 15). Of this number, 32 points are the body's own statements and 25 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · web-menu-button.WebMenuButton (cyclomatic 57) · ×1
  • web-menu-button.WebMenuButton (cyclomatic 57) src/renderer/features/application-menu/web-menu-button.tsx:69 — web-menu-button.WebMenuButton has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 3 of the 57 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 185, a function literal at line 283, renderItems, …). 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 · State · ×1
  • State::dispatch (cyclomatic 56) packages/finalize-fs/src/state.rs:32 — State::dispatch has cyclomatic complexity 56 (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 · LegacyHttpActivationService.reconcile (cyclomatic 55) · ×1
  • LegacyHttpActivationService.reconcile (cyclomatic 55) src/core/legacy-import/http-activation-service.ts:762 — LegacyHttpActivationService.reconcile has cyclomatic complexity 55 (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 · swap-magnet-metadata-for-bt.swapMagnetMetadataForBtUnderMutation (cyclomatic 55) · ×1
  • swap-magnet-metadata-for-bt.swapMagnetMetadataForBtUnderMutation (cyclomatic 55) src/core/torrent/swap-magnet-metadata-for-bt.ts:128 — swap-magnet-metadata-for-bt.swapMagnetMetadataForBtUnderMutation has cyclomatic complexity 55 (threshold 15). Of this number, 47 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · tasks-tile.TaskRow (cyclomatic 53) · ×1
  • tasks-tile.TaskRow (cyclomatic 53) src/renderer/routes/dashboard/tiles/tasks-tile.tsx:162 — tasks-tile.TaskRow has cyclomatic complexity 53 (threshold 15). Of this number, 51 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · create-selection-store.createSelectionStore (cyclomatic 53) · ×1
  • create-selection-store.createSelectionStore (cyclomatic 53) src/renderer/components/desktop-kit/selection/create-selection-store.ts:13 — create-selection-store.createSelectionStore has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 1 of the 53 points is its own statement and the rest belongs to one function literal inside it that branches (line 32). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SessionManager.reAddOrMarkErrorFromPair (cyclomatic 51) · ×1
  • SessionManager.reAddOrMarkErrorFromPair (cyclomatic 51) src/core/session/session-manager.ts:1536 — SessionManager.reAddOrMarkErrorFromPair has cyclomatic complexity 51 (threshold 15). Of this number, 35 points are the body's own statements and 16 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Aria2Adapter.createDownload (cyclomatic 50) · ×1
  • Aria2Adapter.createDownload (cyclomatic 50) src/core/engine/aria2/aria2-adapter.ts:421 — Aria2Adapter.createDownload has cyclomatic complexity 50 (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 · PluginHttpClient.fetch (cyclomatic 47) · ×1
  • PluginHttpClient.fetch (cyclomatic 47) src/core/plugin/network/plugin-http-client.ts:25 — PluginHttpClient.fetch has cyclomatic complexity 47 (threshold 15). Of this number, 42 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LegacyBtActivationService.reconcile (cyclomatic 46) · ×1
  • LegacyBtActivationService.reconcile (cyclomatic 46) src/core/legacy-import/bt-activation-service.ts:489 — LegacyBtActivationService.reconcile has cyclomatic complexity 46 (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 · remove-task.removeTaskUnderMutation (cyclomatic 46) · ×1
  • remove-task.removeTaskUnderMutation (cyclomatic 46) src/core/task/actions/remove-task.ts:99 — remove-task.removeTaskUnderMutation has cyclomatic complexity 46 (threshold 15). Of this number, 38 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · smoke-server-image.smokeServerImage (cyclomatic 45) · ×1
  • smoke-server-image.smokeServerImage (cyclomatic 45) REDACTED:928 — smoke-server-image.smokeServerImage has cyclomatic complexity 45 (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 · SegmentDownloader.run (cyclomatic 45) · ×1
  • SegmentDownloader.run (cyclomatic 45) src/core/download/segment-downloader.ts:234 — SegmentDownloader.run has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 4 of the 45 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 425, a function literal at line 349, a function literal at line 303, …). 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 · index.migrate (cyclomatic 44) · ×1
  • index.migrate (cyclomatic 44) src/core/session/migrations/index.ts:323 — index.migrate has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CapabilityBridge.dispatchCall (cyclomatic 44) · ×1
  • CapabilityBridge.dispatchCall (cyclomatic 44) src/core/plugin/host/capability-bridge.ts:615 — CapabilityBridge.dispatchCall has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · url-textarea.UrlTextarea (cyclomatic 43) · ×1
  • url-textarea.UrlTextarea (cyclomatic 43) src/renderer/components/add-task/url-textarea.tsx:54 — url-textarea.UrlTextarea has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 8 of the 43 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 151, a function literal at line 89, a function literal at line 225, …). 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 · download-source.analyzeDownloadSource (cyclomatic 43) · ×1
  • download-source.analyzeDownloadSource (cyclomatic 43) src/shared/lib/download-source.ts:23 — download-source.analyzeDownloadSource has cyclomatic complexity 43 (threshold 15). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EngineSupervisor.doStart (cyclomatic 41) · ×1
  • EngineSupervisor.doStart (cyclomatic 41) src/core/engine/engine-supervisor.ts:428 — EngineSupervisor.doStart has cyclomatic complexity 41 (threshold 15). Of this number, 39 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verified-install.extractVerifiedTar (cyclomatic 41) · ×1
  • verified-install.extractVerifiedTar (cyclomatic 41) src/core/ffmpeg/verified-install.ts:594 — verified-install.extractVerifiedTar has cyclomatic complexity 41 (threshold 15). Of this number, 35 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · downloads-page.DownloadsPage (cyclomatic 41) · ×1
  • downloads-page.DownloadsPage (cyclomatic 41) src/renderer/routes/downloads/downloads-page.tsx:112 — downloads-page.DownloadsPage has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 9 of the 41 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 230, 316, 217, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plugin-detail-page.PluginDetailPage (cyclomatic 41) · ×1
  • plugin-detail-page.PluginDetailPage (cyclomatic 41) src/renderer/routes/plugins/plugin-detail-page.tsx:63 — plugin-detail-page.PluginDetailPage has cyclomatic complexity 41 (threshold 15). Of this number, 33 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · app-deep-link.parseAppDeepLink (cyclomatic 41) · ×1
  • app-deep-link.parseAppDeepLink (cyclomatic 41) src/shared/lib/app-deep-link.ts:28 — app-deep-link.parseAppDeepLink has cyclomatic complexity 41 (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 · OperationService.prepare (cyclomatic 40) · ×1
  • OperationService.prepare (cyclomatic 40) src/core/plugin/operations/operation-service.ts:210 — OperationService.prepare has cyclomatic complexity 40 (threshold 15). Of this number, 35 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aria2-session-identity-recovery.recoverAria2SessionIdentity (cyclomatic 39) · ×1
  • aria2-session-identity-recovery.recoverAria2SessionIdentity (cyclomatic 39) src/core/engine/aria2/aria2-session-identity-recovery.ts:68 — aria2-session-identity-recovery.recoverAria2SessionIdentity has cyclomatic complexity 39 (threshold 15). Of this number, 31 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parse.parseManifest (cyclomatic 39) · ×1
  • parse.parseManifest (cyclomatic 39) src/core/plugin/manifest/parse.ts:157 — parse.parseManifest has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-selectable-list.useSelectableList.onKeyDown (cyclomatic 39) · ×1
  • use-selectable-list.useSelectableList.onKeyDown (cyclomatic 39) src/renderer/components/desktop-kit/hooks/use-selectable-list.ts:178 — use-selectable-list.useSelectableList.onKeyDown has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.createApp (cyclomatic 39) · ×1
  • app.createApp (cyclomatic 39) REDACTED:125 — app.createApp has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 6 of the 39 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 199, dispatchCommand, a function literal at line 300, …). 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 · CompletedTaskStartupGuard.prepare (cyclomatic 38) · ×1
  • CompletedTaskStartupGuard.prepare (cyclomatic 38) src/core/engine/aria2/completed-task-startup-guard.ts:163 — CompletedTaskStartupGuard.prepare has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 218, 193, 198). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · legacy-fresh-download.LegacyFreshDownload (cyclomatic 38) · ×1
  • legacy-fresh-download.LegacyFreshDownload (cyclomatic 38) src/renderer/features/legacy-import/legacy-fresh-download.tsx:28 — legacy-fresh-download.LegacyFreshDownload has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 15 of the 38 points are its own statements and the rest belongs to 7 function items inside it that branch (cancelActivation, activate, prepare, …). 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 · profile-task-inspector-activity.main (cyclomatic 37) · ×1
  • profile-task-inspector-activity.main (cyclomatic 37) scripts/profile-task-inspector-activity.mts:374 — profile-task-inspector-activity.main has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WebSocketBridgeServer.constructor (cyclomatic 37) · ×1
  • WebSocketBridgeServer.constructor (cyclomatic 37) src/core/bridge/web-socket-bridge-server.ts:573 — WebSocketBridgeServer.constructor has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 711, 633, 795, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · verified-install.installVerifiedFfmpeg (cyclomatic 37) · ×1
  • verified-install.installVerifiedFfmpeg (cyclomatic 37) src/core/ffmpeg/verified-install.ts:713 — verified-install.installVerifiedFfmpeg has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · finalize-journal-repository.validateIntents (cyclomatic 37) · ×1
  • finalize-journal-repository.validateIntents (cyclomatic 37) src/core/session/finalize-journal-repository.ts:442 — finalize-journal-repository.validateIntents has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · plugin-input-group.PluginInputGroup (cyclomatic 37) · ×1
  • plugin-input-group.PluginInputGroup (cyclomatic 37) src/renderer/routes/plugins/components/plugin-input-group.tsx:49 — plugin-input-group.PluginInputGroup has cyclomatic complexity 37 (threshold 15). Of this number, 20 points are the body's own statements and 17 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · motrix-menu-button.ElectronMotrixMenuButton (cyclomatic 37) · ×1
  • motrix-menu-button.ElectronMotrixMenuButton (cyclomatic 37) src/renderer/components/window-chrome/motrix-menu-button.tsx:230 — motrix-menu-button.ElectronMotrixMenuButton has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 6 of the 37 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 325, a function literal at line 377, a function literal at line 239, …). 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 · verified-install.extractVerifiedFfmpeg (cyclomatic 36) · ×1
  • verified-install.extractVerifiedFfmpeg (cyclomatic 36) src/core/ffmpeg/verified-install.ts:451 — verified-install.extractVerifiedFfmpeg has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 4 of the 36 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 525, 550, 501, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · HttpCapabilityHost.request (cyclomatic 36) · ×1
  • HttpCapabilityHost.request (cyclomatic 36) src/core/plugin/capabilities/http.ts:397 — HttpCapabilityHost.request has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackerManager.performSyncAndCurate (cyclomatic 36) · ×1
  • TrackerManager.performSyncAndCurate (cyclomatic 36) src/core/tracker/tracker-manager.ts:301 — TrackerManager.performSyncAndCurate has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 325, fetchKind, a function literal at line 439, …). 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 · directory-preferences-section.DirectoryPreferencesSection (cyclomatic 36) · ×1
  • directory-preferences-section.DirectoryPreferencesSection (cyclomatic 36) src/renderer/features/directory-preferences/directory-preferences-section.tsx:74 — directory-preferences-section.DirectoryPreferencesSection has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 9 of the 36 points are its own statements and the rest belongs to 5 function items inside it that branch (addFavorite, a function literal at line 160, a function literal at line 104, …). 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 · operation-fields.OperationFields · ×1
  • operation-fields.OperationFields::renderField (cyclomatic 36) src/renderer/features/plugin-operations/operation-fields.tsx:62 — operation-fields.OperationFields::renderField has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · log-redact.redactValue (cyclomatic 36) · ×1
  • log-redact.redactValue (cyclomatic 36) src/shared/lib/log-redact.ts:666 — log-redact.redactValue has cyclomatic complexity 36 (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 · PluginHost.doActivate (cyclomatic 35) · ×1
  • PluginHost.doActivate (cyclomatic 35) src/core/plugin/host/plugin-host.ts:458 — PluginHost.doActivate has cyclomatic complexity 35 (threshold 15). Of this number, 24 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · task-actions-menu.TaskActionsMenu (cyclomatic 35) · ×1
  • task-actions-menu.TaskActionsMenu (cyclomatic 35) src/renderer/routes/downloads/task-actions-menu.tsx:98 — task-actions-menu.TaskActionsMenu has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (task-actions-menu.TaskActionsMenu::handleShortcut) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CompletedEngineTaskCleanup.complete (cyclomatic 34) · ×1
  • CompletedEngineTaskCleanup.complete (cyclomatic 34) src/core/task/completed-engine-task-cleanup.ts:196 — CompletedEngineTaskCleanup.complete has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 203, 271). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · package-manager.classifyCliInstall (cyclomatic 34) · ×1
  • package-manager.classifyCliInstall (cyclomatic 34) src/main/cli/package-manager.ts:164 — package-manager.classifyCliInstall has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · moext-reader.extractLoadedMoext (cyclomatic 33) · ×1
  • moext-reader.extractLoadedMoext (cyclomatic 33) src/core/plugin/install/moext-reader.ts:240 — moext-reader.extractLoadedMoext has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 293, 368, 390, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · finalize-task.finalizeTaskSerialized (cyclomatic 33) · ×1
  • finalize-task.finalizeTaskSerialized (cyclomatic 33) src/core/task/actions/finalize-task.ts:195 — finalize-task.finalizeTaskSerialized has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · plugin-diagnostics-page.PluginDiagnosticsPage (cyclomatic 33) · ×1
  • plugin-diagnostics-page.PluginDiagnosticsPage (cyclomatic 33) src/renderer/routes/plugins/plugin-diagnostics-page.tsx:118 — plugin-diagnostics-page.PluginDiagnosticsPage has cyclomatic complexity 33 (threshold 15). Of this number, 27 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tracker-sync-details.TrackerSyncDetails (cyclomatic 33) · ×1
  • tracker-sync-details.TrackerSyncDetails (cyclomatic 33) src/renderer/routes/trackers/components/tracker-sync-details.tsx:35 — tracker-sync-details.TrackerSyncDetails has cyclomatic complexity 33 (threshold 15). Of this number, 20 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · appimage-artifact.parseAppImageRuntime (cyclomatic 32) · ×1
  • appimage-artifact.parseAppImageRuntime (cyclomatic 32) scripts/appimage-artifact.mjs:56 — appimage-artifact.parseAppImageRuntime has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · obsidian-docs.main (cyclomatic 32) · ×1
  • obsidian-docs.main (cyclomatic 32) scripts/obsidian-docs.mjs:141 — obsidian-docs.main has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · transfer-tile.TransferTile (cyclomatic 32) · ×1
  • transfer-tile.TransferTile (cyclomatic 32) src/renderer/routes/dashboard/tiles/transfer-tile.tsx:279 — transfer-tile.TransferTile has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · general-dialog.GeneralDialog (cyclomatic 32) · ×1
  • general-dialog.GeneralDialog (cyclomatic 32) src/renderer/routes/settings/cards/general-dialog.tsx:52 — general-dialog.GeneralDialog has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 91, a function literal at line 71, notificationRow, …). 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 · network-dialog.NetworkDialog (cyclomatic 32) · ×1
  • network-dialog.NetworkDialog (cyclomatic 32) src/renderer/routes/settings/cards/network-dialog.tsx:96 — network-dialog.NetworkDialog has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 135, 119, 121, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · marquee-overlay.MarqueeOverlay (cyclomatic 32) · ×1
  • marquee-overlay.MarqueeOverlay (cyclomatic 32) src/renderer/components/desktop-kit/marquee-selection/marquee-overlay.tsx:21 — marquee-overlay.MarqueeOverlay has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 133, 78, 164, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · settings-validation.settingsValidationError (cyclomatic 32) · ×1
  • settings-validation.settingsValidationError (cyclomatic 32) src/renderer/lib/settings-validation.ts:22 — settings-validation.settingsValidationError has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · EngineSupervisor.diagnose (cyclomatic 31) · ×1
  • EngineSupervisor.diagnose (cyclomatic 31) src/core/engine/engine-supervisor.ts:841 — EngineSupervisor.diagnose has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LegacyImportService.scan (cyclomatic 31) · ×1
  • LegacyImportService.scan (cyclomatic 31) src/core/legacy-import/import-service.ts:157 — LegacyImportService.scan has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · hls-parser.parseHlsMedia (cyclomatic 31) · ×1
  • hls-parser.parseHlsMedia (cyclomatic 31) REDACTED:126 — hls-parser.parseHlsMedia has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OperationFiles.pick (cyclomatic 31) · ×1
  • OperationFiles.pick (cyclomatic 31) src/core/plugin/operations/operation-files.ts:99 — OperationFiles.pick has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RendererSupervisor.tick (cyclomatic 31) · ×1
  • RendererSupervisor.tick (cyclomatic 31) src/main/window/renderer-supervisor.ts:427 — RendererSupervisor.tick has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-pending-magnet-selection.usePendingMagnetSelection (cyclomatic 31) · ×1
  • use-pending-magnet-selection.usePendingMagnetSelection (cyclomatic 31) src/renderer/components/add-task-dialog/use-pending-magnet-selection.ts:12 — use-pending-magnet-selection.usePendingMagnetSelection has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 61, 28, 98, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · bootstrap.bootstrapBridgeForServer (cyclomatic 30) · ×1
  • bootstrap.bootstrapBridgeForServer (cyclomatic 30) src/server/bridge/bootstrap.ts:136 — bootstrap.bootstrapBridgeForServer has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · quick-js-worker.injectPluginApi (cyclomatic 30) · ×1
  • quick-js-worker.injectPluginApi (cyclomatic 30) src/core/plugin/host/quick-js-worker.ts:1536 — quick-js-worker.injectPluginApi has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 1664, 1593, 1637, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PluginInstaller.stage (cyclomatic 30) · ×1
  • PluginInstaller.stage (cyclomatic 30) src/core/plugin/install/plugin-installer.ts:249 — PluginInstaller.stage 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 · nat-tile.ElectronNatTile (cyclomatic 30) · ×1
  • nat-tile.ElectronNatTile (cyclomatic 30) src/renderer/routes/dashboard/tiles/nat-tile.tsx:38 — nat-tile.ElectronNatTile has cyclomatic complexity 30 (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 · ServerDirectoryService.list (cyclomatic 30) · ×1
  • ServerDirectoryService.list (cyclomatic 30) src/server/server-directory-service.ts:260 — ServerDirectoryService.list has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FinalizeRecovery.recoverReserved (cyclomatic 29) · ×1
  • FinalizeRecovery.recoverReserved (cyclomatic 29) src/core/plugin/finalize/finalize-recovery.ts:396 — FinalizeRecovery.recoverReserved has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · delivery-materializer.materializeCandidate (cyclomatic 29) · ×1
  • delivery-materializer.materializeCandidate (cyclomatic 29) src/core/plugin/post/delivery-materializer.ts:191 — delivery-materializer.materializeCandidate has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.startEngineAndRestore (cyclomatic 29) · ×1
  • index.startEngineAndRestore (cyclomatic 29) src/main/index.ts:1256 — index.startEngineAndRestore has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 1519, 1477, 1307, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · tile-segmented-control.ForwardedTileSegmentedControl (cyclomatic 29) · ×1
  • tile-segmented-control.ForwardedTileSegmentedControl (cyclomatic 29) src/renderer/routes/dashboard/components/tile-segmented-control.tsx:35 — tile-segmented-control.ForwardedTileSegmentedControl has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (handleKeyDown, adjacentEnabledValue, requestValueChange, …). 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 · advanced-dialog.AdvancedDialog (cyclomatic 29) · ×1
  • advanced-dialog.AdvancedDialog (cyclomatic 29) src/renderer/routes/settings/cards/advanced-dialog.tsx:82 — advanced-dialog.AdvancedDialog has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 348, 123, 369, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · directory-preferences-dialog.OpenDirectoryPreferencesDialog (cyclomatic 29) · ×1
  • directory-preferences-dialog.OpenDirectoryPreferencesDialog (cyclomatic 29) src/renderer/features/directory-preferences/directory-preferences-dialog.tsx:36 — directory-preferences-dialog.OpenDirectoryPreferencesDialog has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 7 of the 29 points are its own statements and the rest belongs to 4 function items inside it that branch (keyDown, save, close, …). 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 · OperationFiles.execution · ×1
  • OperationFiles.execution::dispatch (cyclomatic 28) src/core/plugin/operations/operation-files.ts:394 — OperationFiles.execution::dispatch 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 · command-runner.createCommandRunner (cyclomatic 28) · ×1
  • command-runner.createCommandRunner (cyclomatic 28) src/main/cli/command-runner.ts:112 — command-runner.createCommandRunner has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 125, 180, 199, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · appimage-integration.installSelfIntegration (cyclomatic 28) · ×1
  • appimage-integration.installSelfIntegration (cyclomatic 28) src/main/platform/appimage-integration.ts:749 — appimage-integration.installSelfIntegration has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ffmpeg-fetch-electron.fetchFfmpegAsset (cyclomatic 28) · ×1
  • ffmpeg-fetch-electron.fetchFfmpegAsset (cyclomatic 28) src/main/plugin/ffmpeg-fetch-electron.ts:10 — ffmpeg-fetch-electron.fetchFfmpegAsset has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 83, 41, 61, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · desktop-import.registerLegacyImportIpc (cyclomatic 28) · ×1
  • desktop-import.registerLegacyImportIpc (cyclomatic 28) src/main/legacy-import/desktop-import.ts:93 — desktop-import.registerLegacyImportIpc has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 227, a function literal at line 277, a function literal at line 123, …). 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 · speed-sparkline.SpeedSparkline (cyclomatic 28) · ×1
  • speed-sparkline.SpeedSparkline (cyclomatic 28) src/renderer/routes/dashboard/components/speed-sparkline.tsx:38 — speed-sparkline.SpeedSparkline has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 50, 118, 62, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · url-editor.UrlEditor (cyclomatic 28) · ×1
  • url-editor.UrlEditor (cyclomatic 28) src/renderer/components/add-task/url-editor.tsx:33 — url-editor.UrlEditor has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 60, 94, 97, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · task-inspector-activity.cloneDataOnlyValue (cyclomatic 28) · ×1
  • task-inspector-activity.cloneDataOnlyValue (cyclomatic 28) src/shared/schemas/task-inspector-activity.ts:38 — task-inspector-activity.cloneDataOnlyValue 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 · source-scanner.readLegacyFile (cyclomatic 27) · ×1
  • source-scanner.readLegacyFile (cyclomatic 27) src/core/legacy-import/source-scanner.ts:104 — source-scanner.readLegacyFile has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LegacyBtActivationService.prepare (cyclomatic 27) · ×1
  • LegacyBtActivationService.prepare (cyclomatic 27) src/core/legacy-import/bt-activation-service.ts:221 — LegacyBtActivationService.prepare has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FinalizeCommitter.commitPrepared (cyclomatic 27) · ×1
  • FinalizeCommitter.commitPrepared (cyclomatic 27) src/core/plugin/finalize/finalize-committer.ts:262 — FinalizeCommitter.commitPrepared has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · finalize-task.finalizeBtAfterRename (cyclomatic 27) · ×1
  • finalize-task.finalizeBtAfterRename (cyclomatic 27) src/core/task/actions/finalize-task.ts:801 — finalize-task.finalizeBtAfterRename has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.handlePolledTasks (cyclomatic 27) · ×1
  • index.handlePolledTasks (cyclomatic 27) src/main/index.ts:848 — index.handlePolledTasks has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bt-peer-geo-section.BtPeerGeoSection (cyclomatic 27) · ×1
  • bt-peer-geo-section.BtPeerGeoSection (cyclomatic 27) src/renderer/routes/settings/cards/bt-peer-geo-section.tsx:42 — bt-peer-geo-section.BtPeerGeoSection has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · bit-torrent-dialog.BitTorrentDialog (cyclomatic 27) · ×1
  • bit-torrent-dialog.BitTorrentDialog (cyclomatic 27) src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:87 — bit-torrent-dialog.BitTorrentDialog has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 97, 135, 150, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · obsidian-docs-lib.validatePlanPair (cyclomatic 26) · ×1
  • obsidian-docs-lib.validatePlanPair (cyclomatic 26) scripts/obsidian-docs-lib.mjs:268 — obsidian-docs-lib.validatePlanPair has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginRegistry.scanInto (cyclomatic 26) · ×1
  • PluginRegistry.scanInto (cyclomatic 26) src/core/plugin/plugin-registry.ts:503 — PluginRegistry.scanInto has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · task-save-directory.restoreTaskSaveDirectory (cyclomatic 26) · ×1
  • task-save-directory.restoreTaskSaveDirectory (cyclomatic 26) src/core/task/task-save-directory.ts:8 — task-save-directory.restoreTaskSaveDirectory has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SessionManager.mergeTaskFromPair (cyclomatic 26) · ×1
  • SessionManager.mergeTaskFromPair (cyclomatic 26) src/core/session/session-manager.ts:1306 — SessionManager.mergeTaskFromPair has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DurableFinalizeRuntime.commit (cyclomatic 26) · ×1
  • DurableFinalizeRuntime.commit (cyclomatic 26) src/core/session/durable-finalize-runtime.ts:61 — DurableFinalizeRuntime.commit has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · re-add-task.buildDirectReAddParams (cyclomatic 26) · ×1
  • re-add-task.buildDirectReAddParams (cyclomatic 26) src/core/task/actions/re-add-task.ts:208 — re-add-task.buildDirectReAddParams has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · downloads-more-menu.DownloadsMoreMenu (cyclomatic 26) · ×1
  • downloads-more-menu.DownloadsMoreMenu (cyclomatic 26) src/renderer/routes/downloads/downloads-more-menu.tsx:22 — downloads-more-menu.DownloadsMoreMenu has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · task-inspector-action-bar.TaskInspectorActionBar (cyclomatic 26) · ×1
  • task-inspector-action-bar.TaskInspectorActionBar (cyclomatic 26) src/renderer/routes/downloads/inspector/task-inspector-action-bar.tsx:191 — task-inspector-action-bar.TaskInspectorActionBar has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · appearance-dialog.AppearanceDialog (cyclomatic 26) · ×1
  • appearance-dialog.AppearanceDialog (cyclomatic 26) src/renderer/routes/settings/cards/appearance-dialog.tsx:94 — appearance-dialog.AppearanceDialog has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 131, 106, 124, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · speed-limit-section.SpeedLimitSection (cyclomatic 26) · ×1
  • speed-limit-section.SpeedLimitSection (cyclomatic 26) src/renderer/routes/settings/cards/speed-limit-section.tsx:121 — speed-limit-section.SpeedLimitSection has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 6 function items inside it that branch (fillFromPeak, a function literal at line 140, a function literal at line 431, …). 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 · cli-tool-section.CliToolSection (cyclomatic 26) · ×1
  • cli-tool-section.CliToolSection (cyclomatic 26) src/renderer/routes/settings/cards/integration/cli-tool-section.tsx:151 — cli-tool-section.CliToolSection has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TaskInspectorActivityService.recordSample (cyclomatic 25) · ×1
  • TaskInspectorActivityService.recordSample (cyclomatic 25) src/core/inspector-activity/task-inspector-activity-service.ts:305 — TaskInspectorActivityService.recordSample has cyclomatic complexity 25 (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 · render-installer-images.decodePng (cyclomatic 25) · ×1
  • render-installer-images.decodePng (cyclomatic 25) scripts/render-installer-images.mjs:49 — render-installer-images.decodePng 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 · stage-electron-app.stageElectronApp (cyclomatic 25) · ×1
  • stage-electron-app.stageElectronApp (cyclomatic 25) scripts/stage-electron-app.mjs:498 — stage-electron-app.stageElectronApp has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aria2-legacy-http.requestMatches (cyclomatic 25) · ×1
  • aria2-legacy-http.requestMatches (cyclomatic 25) src/core/engine/aria2/aria2-legacy-http.ts:88 — aria2-legacy-http.requestMatches 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. This is NOT this file's highest cyclomatic complexity: aria2-legacy-http.pinLegacyHttpOptions (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · LegacyImportService.runBatches (cyclomatic 25) · ×1
  • LegacyImportService.runBatches (cyclomatic 25) src/core/legacy-import/import-service.ts:510 — LegacyImportService.runBatches has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · http-cookies.parseSetCookie (cyclomatic 25) · ×1
  • http-cookies.parseSetCookie (cyclomatic 25) src/core/plugin/capabilities/http-cookies.ts:85 — http-cookies.parseSetCookie 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 · move-tasks.moveBatch (cyclomatic 25) · ×1
  • move-tasks.moveBatch (cyclomatic 25) src/core/task/actions/move-tasks.ts:30 — move-tasks.moveBatch has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 2 function items inside it that branch (move, a function literal at line 37). 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 · CompletedEngineTaskCleanup.observe (cyclomatic 25) · ×1
  • CompletedEngineTaskCleanup.observe (cyclomatic 25) src/core/task/completed-engine-task-cleanup.ts:104 — CompletedEngineTaskCleanup.observe has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.bootstrapBridge (cyclomatic 25) · ×1
  • index.bootstrapBridge (cyclomatic 25) src/main/bridge/index.ts:405 — index.bootstrapBridge has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 948, a function literal at line 562, a function literal at line 840, …). 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 · ffmpeg-macos-trust.verifyMacFfmpegTrust (cyclomatic 25) · ×1
  • ffmpeg-macos-trust.verifyMacFfmpegTrust (cyclomatic 25) src/main/plugin/ffmpeg-macos-trust.ts:11 — ffmpeg-macos-trust.verifyMacFfmpegTrust has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · desktop-import.prepareFreshDownload (cyclomatic 25) · ×1
  • desktop-import.prepareFreshDownload (cyclomatic 25) src/main/legacy-import/desktop-import.ts:323 — desktop-import.prepareFreshDownload 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 · overview-tab.OverviewTab (cyclomatic 25) · ×1
  • overview-tab.OverviewTab (cyclomatic 25) src/renderer/routes/downloads/inspector/overview-tab.tsx:121 — overview-tab.OverviewTab has cyclomatic complexity 25 (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 · task-inspector-drawer.TaskInspectorDrawer (cyclomatic 25) · ×1
  • task-inspector-drawer.TaskInspectorDrawer (cyclomatic 25) src/renderer/routes/downloads/task-inspector-drawer.tsx:62 — task-inspector-drawer.TaskInspectorDrawer has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · import-task-selection.ImportTaskSelection (cyclomatic 25) · ×1
  • import-task-selection.ImportTaskSelection (cyclomatic 25) src/renderer/features/legacy-import/import-task-selection.tsx:47 — import-task-selection.ImportTaskSelection has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (renderRow, a function literal at line 74, a function literal at line 150, …). 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 · use-engine-display-status.useEngineDisplayStatus (cyclomatic 25) · ×1
  • use-engine-display-status.useEngineDisplayStatus (cyclomatic 25) src/renderer/hooks/use-engine-display-status.ts:53 — use-engine-display-status.useEngineDisplayStatus has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 77, 61, 136, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · BootstrapIPCCodec.validateResponse (cyclomatic 25) · ×1
  • BootstrapIPCCodec.validateResponse (cyclomatic 25) packages/safari-bootstrap/Sources/SafariNativeIPC/BootstrapIPCCodec.swift:31 — BootstrapIPCCodec.validateResponse has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · obsidian-docs-lib.validateActivePlanDocuments (cyclomatic 24) · ×1
  • obsidian-docs-lib.validateActivePlanDocuments (cyclomatic 24) scripts/obsidian-docs-lib.mjs:738 — obsidian-docs-lib.validateActivePlanDocuments has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stage-server-app.stageServerApp (cyclomatic 24) · ×1
  • stage-server-app.stageServerApp (cyclomatic 24) scripts/stage-server-app.mjs:395 — stage-server-app.stageServerApp has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · verify-update-artifacts.verifyUpdateArtifacts (cyclomatic 24) · ×1
  • verify-update-artifacts.verifyUpdateArtifacts (cyclomatic 24) scripts/verify-update-artifacts.mjs:25 — verify-update-artifacts.verifyUpdateArtifacts has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsManager.persistUpdate (cyclomatic 24) · ×1
  • SettingsManager.persistUpdate (cyclomatic 24) src/core/settings/settings-manager.ts:600 — SettingsManager.persistUpdate has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session-parser.parseLegacySession · ×1
  • session-parser.parseLegacySession::flush (cyclomatic 24) src/core/legacy-import/session-parser.ts:86 — session-parser.parseLegacySession::flush has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FullCrossPluginInvoker.execute (cyclomatic 24) · ×1
  • FullCrossPluginInvoker.execute (cyclomatic 24) src/core/plugin/commands/cross-plugin-invoker.ts:114 — FullCrossPluginInvoker.execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CapabilityBridge.onMessage (cyclomatic 24) · ×1
  • CapabilityBridge.onMessage (cyclomatic 24) src/core/plugin/host/capability-bridge.ts:493 — CapabilityBridge.onMessage has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · finalize-committer.assertRenameFileJournal (cyclomatic 24) · ×1
  • finalize-committer.assertRenameFileJournal (cyclomatic 24) src/core/plugin/finalize/finalize-committer.ts:716 — finalize-committer.assertRenameFileJournal has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · quick-js-worker.port.on("message") (cyclomatic 24) · ×1
  • quick-js-worker.port.on("message") (cyclomatic 24) src/core/plugin/host/quick-js-worker.ts:242 — quick-js-worker.port.on("message") has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MotrixNatManager.checkDiagnostics (cyclomatic 24) · ×1
  • MotrixNatManager.checkDiagnostics (cyclomatic 24) src/main/nat/motrix-nat-manager.ts:45 — MotrixNatManager.checkDiagnostics has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · notifications-page.NotificationsPage (cyclomatic 24) · ×1
  • notifications-page.NotificationsPage (cyclomatic 24) src/renderer/routes/notifications/notifications-page.tsx:163 — notifications-page.NotificationsPage has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 212, runAction, a function literal at line 284, …). 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 · plugin-call-graph-edge.PluginCallGraphEdge (cyclomatic 24) · ×1
  • plugin-call-graph-edge.PluginCallGraphEdge (cyclomatic 24) src/renderer/routes/plugins/components/call-graph/plugin-call-graph-edge.tsx:32 — plugin-call-graph-edge.PluginCallGraphEdge has cyclomatic complexity 24 (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 · appimage-integration-section.AppImageIntegrationSection (cyclomatic 24) · ×1
  • appimage-integration-section.AppImageIntegrationSection (cyclomatic 24) src/renderer/routes/settings/cards/integration/appimage-integration-section.tsx:31 — appimage-integration-section.AppImageIntegrationSection has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · inspector-drawer.InspectorDrawer (cyclomatic 24) · ×1
  • inspector-drawer.InspectorDrawer (cyclomatic 24) src/renderer/components/desktop-kit/inspector-drawer.tsx:29 — inspector-drawer.InspectorDrawer has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 87, a function literal at line 169, selectHeight, …). 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 · index.main · ×1
  • index.main::startServer (cyclomatic 24) src/server/index.ts:1407 — index.main::startServer has cyclomatic complexity 24 (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 · validators.validateHistoryEventInput (cyclomatic 23) · ×1
  • validators.validateHistoryEventInput (cyclomatic 23) src/core/inspector-activity/validators.ts:159 — validators.validateHistoryEventInput has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FfmpegService.run (cyclomatic 23) · ×1
  • FfmpegService.run (cyclomatic 23) src/core/ffmpeg/ffmpeg-service.ts:81 — FfmpegService.run has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 4 function items inside it that branch (acceptLine, a function literal at line 130, a function literal at line 158, …). 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 · verified-install.download (cyclomatic 23) · ×1
  • verified-install.download (cyclomatic 23) src/core/ffmpeg/verified-install.ts:370 — verified-install.download has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OperationService.run (cyclomatic 23) · ×1
  • OperationService.run (cyclomatic 23) src/core/plugin/operations/operation-service.ts:624 — OperationService.run has cyclomatic complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MagnetTracker.submitUnderAdmission (cyclomatic 23) · ×1
  • MagnetTracker.submitUnderAdmission (cyclomatic 23) src/core/torrent/magnet-tracker.ts:434 — MagnetTracker.submitUnderAdmission has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TrackerSyncer.fetch (cyclomatic 23) · ×1
  • TrackerSyncer.fetch (cyclomatic 23) src/core/tracker/tracker-syncer.ts:82 — TrackerSyncer.fetch has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · compact-limit-input.CompactLimitInput (cyclomatic 23) · ×1
  • compact-limit-input.CompactLimitInput (cyclomatic 23) src/renderer/routes/settings/cards/compact-limit-input.tsx:45 — compact-limit-input.CompactLimitInput has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · toolbar-search.ToolbarSearch (cyclomatic 23) · ×1
  • toolbar-search.ToolbarSearch (cyclomatic 23) src/renderer/components/desktop-kit/toolbar/toolbar-search.tsx:40 — toolbar-search.ToolbarSearch has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 88, a function literal at line 136, collapseIfIdle, …). 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 · operator-auth.registerOperatorAuth (cyclomatic 23) · ×1
  • operator-auth.registerOperatorAuth (cyclomatic 23) REDACTED:190 — operator-auth.registerOperatorAuth has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 227, 281, 312, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · semver.compareSemver (cyclomatic 23) · ×1
  • semver.compareSemver (cyclomatic 23) src/shared/semver.ts:28 — semver.compareSemver has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stage-electron-app.scanStaticExternals (cyclomatic 22) · ×1
  • stage-electron-app.scanStaticExternals (cyclomatic 22) scripts/stage-electron-app.mjs:360 — stage-electron-app.scanStaticExternals has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aria2-tuning.recommendFileAllocation (cyclomatic 22) · ×1
  • aria2-tuning.recommendFileAllocation (cyclomatic 22) src/core/engine/aria2/aria2-tuning.ts:49 — aria2-tuning.recommendFileAllocation has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · i18n-resolve.walkContributes (cyclomatic 22) · ×1
  • i18n-resolve.walkContributes (cyclomatic 22) src/core/plugin/manifest/i18n-resolve.ts:79 — i18n-resolve.walkContributes has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 112, 85, 99). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PluginInstaller.commit (cyclomatic 22) · ×1
  • PluginInstaller.commit (cyclomatic 22) src/core/plugin/install/plugin-installer.ts:468 — PluginInstaller.commit has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 483, 639). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · CliToolService.#probe (cyclomatic 22) · ×1
  • CliToolService.#probe (cyclomatic 22) REDACTED:362 — CliToolService.#probe has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ffmpeg-probe-electron.makeElectronFfmpegProbe (cyclomatic 22) · ×1
  • ffmpeg-probe-electron.makeElectronFfmpegProbe (cyclomatic 22) src/main/plugin/ffmpeg-probe-electron.ts:67 — ffmpeg-probe-electron.makeElectronFfmpegProbe has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 77). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · builtin-update-dialog.BuiltinUpdateDialog (cyclomatic 22) · ×1
  • builtin-update-dialog.BuiltinUpdateDialog (cyclomatic 22) src/renderer/routes/plugins/components/builtin-update-dialog.tsx:32 — builtin-update-dialog.BuiltinUpdateDialog has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 49, confirm, cancel, …). 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 · window-chrome.WindowChrome (cyclomatic 22) · ×1
  • window-chrome.WindowChrome (cyclomatic 22) src/renderer/components/window-chrome/window-chrome.tsx:158 — window-chrome.WindowChrome has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · chart.ChartTooltipContent (cyclomatic 22) · ×1
  • chart.ChartTooltipContent (cyclomatic 22) REDACTED:116 — chart.ChartTooltipContent has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 199, 146). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DirectoryPickerController.commitListing (cyclomatic 22) · ×1
  • DirectoryPickerController.commitListing (cyclomatic 22) src/renderer/features/web-directory-picker/directory-picker-controller.ts:384 — DirectoryPickerController.commitListing has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · use-transfer-stats.useTransferStats (cyclomatic 22) · ×1
  • use-transfer-stats.useTransferStats (cyclomatic 22) src/renderer/hooks/use-transfer-stats.ts:58 — use-transfer-stats.useTransferStats has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 75, 192, 101, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · json-schema-to-zod.jsonSchemaToZod (cyclomatic 22) · ×1
  • json-schema-to-zod.jsonSchemaToZod (cyclomatic 22) REDACTED:28 — json-schema-to-zod.jsonSchemaToZod has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · remote-extension-config.parsePublicUrl (cyclomatic 21) · ×1
  • remote-extension-config.parsePublicUrl (cyclomatic 21) src/server/bridge/remote-extension-config.ts:185 — remote-extension-config.parsePublicUrl 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 · release-snap-build-set.releaseSnapBuildSet (cyclomatic 21) · ×1
  • release-snap-build-set.releaseSnapBuildSet (cyclomatic 21) scripts/release-snap-build-set.mjs:162 — release-snap-build-set.releaseSnapBuildSet has cyclomatic complexity 21 (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 · verify-remote-extension-threat-evidence.validateThreatEvidenceManifest (cyclomatic 21) · ×1
  • verify-remote-extension-threat-evidence.validateThreatEvidenceManifest (cyclomatic 21) scripts/verify-remote-extension-threat-evidence.mjs:34 — verify-remote-extension-threat-evidence.validateThreatEvidenceManifest has cyclomatic complexity 21 (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 · session-parser.validateLegacyBencode · ×1
  • session-parser.validateLegacyBencode::visit (cyclomatic 21) src/core/legacy-import/session-parser.ts:195 — session-parser.validateLegacyBencode::visit has cyclomatic complexity 21 (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 · LegacyImportService.authorizeMetadataAdmission (cyclomatic 21) · ×1
  • LegacyImportService.authorizeMetadataAdmission (cyclomatic 21) src/core/legacy-import/import-service.ts:260 — LegacyImportService.authorizeMetadataAdmission has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (current, unchanged). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MagnetTracker.retryMetadataUnderMutation (cyclomatic 21) · ×1
  • MagnetTracker.retryMetadataUnderMutation (cyclomatic 21) src/core/torrent/magnet-tracker.ts:733 — MagnetTracker.retryMetadataUnderMutation has cyclomatic complexity 21 (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 · TaskRecoveryServiceImpl.recover (cyclomatic 21) · ×1
  • TaskRecoveryServiceImpl.recover (cyclomatic 21) src/core/task/task-recovery-service.ts:192 — TaskRecoveryServiceImpl.recover has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · tracker-snapshots.mergeSourceSnapshots (cyclomatic 21) · ×1
  • tracker-snapshots.mergeSourceSnapshots (cyclomatic 21) src/core/tracker/tracker-snapshots.ts:8 — tracker-snapshots.mergeSourceSnapshots has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CliToolService.#verifyInstall (cyclomatic 21) · ×1
  • CliToolService.#verifyInstall (cyclomatic 21) REDACTED:497 — CliToolService.#verifyInstall has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · activity-calendar-model.selectActivityGeometry (cyclomatic 21) · ×1
  • activity-calendar-model.selectActivityGeometry (cyclomatic 21) src/renderer/routes/dashboard/activity/activity-calendar-model.ts:346 — activity-calendar-model.selectActivityGeometry has cyclomatic complexity 21 (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 · engine-tile.EngineTile (cyclomatic 21) · ×1
  • engine-tile.EngineTile (cyclomatic 21) src/renderer/routes/dashboard/tiles/engine-tile.tsx:37 — engine-tile.EngineTile 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 · activity-chart-model.buildActivityChartModel (cyclomatic 21) · ×1
  • activity-chart-model.buildActivityChartModel (cyclomatic 21) src/renderer/routes/downloads/inspector/activity-chart-model.ts:135 — activity-chart-model.buildActivityChartModel has cyclomatic complexity 21 (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 · use-directory-preferences-draft.useRevisionedDirectoryDraft.save (cyclomatic 21) · ×1
  • use-directory-preferences-draft.useRevisionedDirectoryDraft.save (cyclomatic 21) src/renderer/features/directory-preferences/use-directory-preferences-draft.ts:237 — use-directory-preferences-draft.useRevisionedDirectoryDraft.save has cyclomatic complexity 21 (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 · server-process-ownership-authority.readExactBinding (cyclomatic 21) · ×1
  • server-process-ownership-authority.readExactBinding (cyclomatic 21) src/server/bridge/server-process-ownership-authority.ts:102 — server-process-ownership-authority.readExactBinding 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 · plugin-hooks.isBoundedJsonValue (cyclomatic 21) · ×1
  • plugin-hooks.isBoundedJsonValue (cyclomatic 21) src/shared/schemas/plugin-hooks.ts:78 — plugin-hooks.isBoundedJsonValue has cyclomatic complexity 21 (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 · remote-extension-admission-policy.parseForwarded (cyclomatic 20) · ×1
  • remote-extension-admission-policy.parseForwarded (cyclomatic 20) src/server/bridge/remote-extension-admission-policy.ts:304 — remote-extension-admission-policy.parseForwarded has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · obsidian-docs-lib.assertDocumentPair (cyclomatic 20) · ×1
  • obsidian-docs-lib.assertDocumentPair (cyclomatic 20) scripts/obsidian-docs-lib.mjs:562 — obsidian-docs-lib.assertDocumentPair has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TaskInspectorActivityService.selectOrdinaryCandidate (cyclomatic 20) · ×1
  • TaskInspectorActivityService.selectOrdinaryCandidate (cyclomatic 20) src/core/inspector-activity/task-inspector-activity-service.ts:647 — TaskInspectorActivityService.selectOrdinaryCandidate has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · bridge-data-dir-lock.createOwnedFile (cyclomatic 20) · ×1
  • bridge-data-dir-lock.createOwnedFile (cyclomatic 20) src/core/bridge/bridge-data-dir-lock.ts:525 — bridge-data-dir-lock.createOwnedFile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extension-identity-resolver.normalizeExtensionIdentity (cyclomatic 20) · ×1
  • extension-identity-resolver.normalizeExtensionIdentity (cyclomatic 20) src/core/bridge/extension-identity-resolver.ts:170 — extension-identity-resolver.normalizeExtensionIdentity has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Aria2ProcessOutput.emitLine (cyclomatic 20) · ×1
  • Aria2ProcessOutput.emitLine (cyclomatic 20) src/core/engine/aria2/aria2-process-output.ts:109 — Aria2ProcessOutput.emitLine has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TaskInspectorActivityRuntime.deliverRecoveredAnchor (cyclomatic 20) · ×1
  • TaskInspectorActivityRuntime.deliverRecoveredAnchor (cyclomatic 20) src/core/inspector-activity/task-inspector-activity-runtime.ts:752 — TaskInspectorActivityRuntime.deliverRecoveredAnchor has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 790). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · CookieJar.cookieHeader (cyclomatic 20) · ×1
  • CookieJar.cookieHeader (cyclomatic 20) src/core/plugin/capabilities/http-cookies.ts:292 — CookieJar.cookieHeader has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginRegistry.applyOverlay (cyclomatic 20) · ×1
  • PluginRegistry.applyOverlay (cyclomatic 20) src/core/plugin/plugin-registry.ts:639 — PluginRegistry.applyOverlay has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · registry-fetcher.fetchVerifiedPackageBytes (cyclomatic 20) · ×1
  • registry-fetcher.fetchVerifiedPackageBytes (cyclomatic 20) src/core/plugin/registry/registry-fetcher.ts:49 — registry-fetcher.fetchVerifiedPackageBytes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aria2-proxy-routing.normalizeProxyUrl (cyclomatic 20) · ×1
  • aria2-proxy-routing.normalizeProxyUrl (cyclomatic 20) REDACTED:20 — aria2-proxy-routing.normalizeProxyUrl has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · system-proxy.parseProxyEnvironment (cyclomatic 20) · ×1
  • system-proxy.parseProxyEnvironment (cyclomatic 20) REDACTED:58 — system-proxy.parseProxyEnvironment has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MagnetTracker.doCleanupCacheEntry (cyclomatic 20) · ×1
  • MagnetTracker.doCleanupCacheEntry (cyclomatic 20) src/core/torrent/magnet-tracker.ts:1701 — MagnetTracker.doCleanupCacheEntry has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · appimage-native-host.binaryHash (cyclomatic 20) · ×1
  • appimage-native-host.binaryHash (cyclomatic 20) src/main/bridge/appimage-native-host.ts:137 — appimage-native-host.binaryHash has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · commands.registerCommandHandlers (cyclomatic 20) · ×1
  • commands.registerCommandHandlers (cyclomatic 20) src/main/ipc/commands.ts:1941 — commands.registerCommandHandlers has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · task-actions-menu.TaskActionsMenu · ×1
  • task-actions-menu.TaskActionsMenu::handleShortcut (cyclomatic 20) src/renderer/routes/downloads/task-actions-menu.tsx:216 — task-actions-menu.TaskActionsMenu::handleShortcut has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (task-actions-menu.TaskActionsMenu) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · task-column-header.TaskColumnHeader (cyclomatic 20) · ×1
  • task-column-header.TaskColumnHeader (cyclomatic 20) src/renderer/routes/downloads/task-column-header.tsx:39 — task-column-header.TaskColumnHeader has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 82, 150, 112, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · notifications-page.NotificationRow (cyclomatic 20) · ×1
  • notifications-page.NotificationRow (cyclomatic 20) src/renderer/routes/notifications/notifications-page.tsx:40 — notifications-page.NotificationRow has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · curl.tokenize (cyclomatic 20) · ×1
  • curl.tokenize (cyclomatic 20) src/renderer/components/add-task/url-interpreters/curl.ts:8 — curl.tokenize has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-menu-command.useMenuCommand (cyclomatic 20) · ×1
  • use-menu-command.useMenuCommand (cyclomatic 20) src/renderer/features/application-menu/use-menu-command.ts:19 — use-menu-command.useMenuCommand has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-task-speed-history.useTaskSpeedHistory (cyclomatic 20) · ×1
  • use-task-speed-history.useTaskSpeedHistory (cyclomatic 20) src/renderer/hooks/use-task-speed-history.ts:42 — use-task-speed-history.useTaskSpeedHistory has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 97, 61, 74, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · log-redact.redactError (cyclomatic 20) · ×1
  • log-redact.redactError (cyclomatic 20) src/shared/lib/log-redact.ts:428 — log-redact.redactError has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · remote-extension-admission-policy.resolveForwardedSource (cyclomatic 19) · ×1
  • remote-extension-admission-policy.resolveForwardedSource (cyclomatic 19) src/server/bridge/remote-extension-admission-policy.ts:353 — remote-extension-admission-policy.resolveForwardedSource has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: remote-extension-admission-policy.normalizeVerifiedOrigin (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · appimage-artifact.inspectEmbeddedBlockmap (cyclomatic 19) · ×1
  • appimage-artifact.inspectEmbeddedBlockmap (cyclomatic 19) scripts/appimage-artifact.mjs:303 — appimage-artifact.inspectEmbeddedBlockmap has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · audit-server-runtime.auditInputs (cyclomatic 19) · ×1
  • audit-server-runtime.auditInputs (cyclomatic 19) scripts/audit-server-runtime.mjs:69 — audit-server-runtime.auditInputs has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · check-i18n.checkI18n (cyclomatic 19) · ×1
  • check-i18n.checkI18n (cyclomatic 19) scripts/check-i18n.mjs:285 — check-i18n.checkI18n has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fetch-builtins.downloadBytes (cyclomatic 19) · ×1
  • fetch-builtins.downloadBytes (cyclomatic 19) scripts/fetch-builtins.mjs:316 — fetch-builtins.downloadBytes has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TaskInspectorActivityStore.applyCheckpoint (cyclomatic 19) · ×1
  • TaskInspectorActivityStore.applyCheckpoint (cyclomatic 19) src/core/inspector-activity/task-inspector-activity-store.ts:339 — TaskInspectorActivityStore.applyCheckpoint 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 · release-signing-input.verifySigningInput (cyclomatic 19) · ×1
  • release-signing-input.verifySigningInput (cyclomatic 19) scripts/release-signing-input.mjs:777 — release-signing-input.verifySigningInput has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: release-signing-input.verifyManifestEntry (cyclomatic 29) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · WebSocketBridgeServer.resolveExtensionMbp1Route (cyclomatic 19) · ×1
  • WebSocketBridgeServer.resolveExtensionMbp1Route (cyclomatic 19) src/core/bridge/web-socket-bridge-server.ts:940 — WebSocketBridgeServer.resolveExtensionMbp1Route has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeoIPDownloader.download (cyclomatic 19) · ×1
  • GeoIPDownloader.download (cyclomatic 19) src/core/geoip/geo-ip-downloader.ts:49 — GeoIPDownloader.download has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FfmpegCapabilityHost.run (cyclomatic 19) · ×1
  • FfmpegCapabilityHost.run (cyclomatic 19) src/core/plugin/capabilities/ffmpeg.ts:299 — FfmpegCapabilityHost.run has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (abort, a function literal at line 411, a function literal at line 441, …). 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 · finalize-removal-safety.selectRemovalSurvivor (cyclomatic 19) · ×1
  • finalize-removal-safety.selectRemovalSurvivor (cyclomatic 19) src/core/plugin/finalize/finalize-removal-safety.ts:23 — finalize-removal-safety.selectRemovalSurvivor has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NativeFinalizeArtifactOperations.removeIsolated (cyclomatic 19) · ×1
  • NativeFinalizeArtifactOperations.removeIsolated (cyclomatic 19) src/core/plugin/finalize/native-artifact-operations.ts:438 — NativeFinalizeArtifactOperations.removeIsolated 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 · aria2-proxy-routing.parseAria2ProxyUrl (cyclomatic 19) · ×1
  • aria2-proxy-routing.parseAria2ProxyUrl (cyclomatic 19) REDACTED:120 — aria2-proxy-routing.parseAria2ProxyUrl has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · bt-duplicate-policy.inspectBtDuplicate (cyclomatic 19) · ×1
  • bt-duplicate-policy.inspectBtDuplicate (cyclomatic 19) src/core/task/bt-duplicate-policy.ts:130 — bt-duplicate-policy.inspectBtDuplicate has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · get-task-files.createGetTaskFilesHandler (cyclomatic 19) · ×1
  • get-task-files.createGetTaskFilesHandler (cyclomatic 19) src/core/task/get-task-files.ts:63 — get-task-files.createGetTaskFilesHandler has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 64, 71). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.syncNativeMessagingManifests (cyclomatic 19) · ×1
  • index.syncNativeMessagingManifests (cyclomatic 19) src/main/bridge/index.ts:342 — index.syncNativeMessagingManifests has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MenuManager.executeApplicationMenuItem (cyclomatic 19) · ×1
  • MenuManager.executeApplicationMenuItem (cyclomatic 19) src/main/menu/menu-manager.ts:153 — MenuManager.executeApplicationMenuItem has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · inline-consent-panel.InlineConsentPanel (cyclomatic 19) · ×1
  • inline-consent-panel.InlineConsentPanel (cyclomatic 19) src/renderer/routes/plugins/components/inline-consent-panel.tsx:26 — inline-consent-panel.InlineConsentPanel has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · integration-dialog.IntegrationDialog (cyclomatic 19) · ×1
  • integration-dialog.IntegrationDialog (cyclomatic 19) src/renderer/routes/settings/cards/integration/integration-dialog.tsx:58 — integration-dialog.IntegrationDialog has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 85, 72, 124). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · proxy-section.ProxySection (cyclomatic 19) · ×1
  • proxy-section.ProxySection (cyclomatic 19) src/renderer/routes/settings/cards/proxy-section.tsx:53 — proxy-section.ProxySection has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 7 function items inside it that branch (handleImportFromSystem, a function literal at line 344, a function literal at line 74, …). 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 · sidebar.SidebarProvider (cyclomatic 19) · ×1
  • sidebar.SidebarProvider (cyclomatic 19) src/renderer/components/ui/sidebar.tsx:53 — sidebar.SidebarProvider has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 103, 73, 82, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-transport-mirror.useTransportMirror (cyclomatic 19) · ×1
  • use-transport-mirror.useTransportMirror (cyclomatic 19) src/renderer/hooks/use-transport-mirror.ts:95 — use-transport-mirror.useTransportMirror has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 140, 113, 207, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · operator-extension-pairing.runExtensionPairingTerminal (cyclomatic 19) · ×1
  • operator-extension-pairing.runExtensionPairingTerminal (cyclomatic 19) src/server/operator-extension-pairing.ts:112 — operator-extension-pairing.runExtensionPairingTerminal has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · log-redact.limitVerboseValue (cyclomatic 19) · ×1
  • log-redact.limitVerboseValue (cyclomatic 19) src/shared/lib/log-redact.ts:910 — log-redact.limitVerboseValue 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 · remote-extension-route-policy.evaluateRemoteExtensionRoute (cyclomatic 18) · ×1
  • remote-extension-route-policy.evaluateRemoteExtensionRoute (cyclomatic 18) src/server/bridge/remote-extension-route-policy.ts:129 — remote-extension-route-policy.evaluateRemoteExtensionRoute 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 · server-package-utils.tokenizeJavaScript (cyclomatic 18) · ×1
  • server-package-utils.tokenizeJavaScript (cyclomatic 18) scripts/server-package-utils.mjs:398 — server-package-utils.tokenizeJavaScript 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 · container-platform-metadata.validateContainerPlatformMetadata (cyclomatic 18) · ×1
  • container-platform-metadata.validateContainerPlatformMetadata (cyclomatic 18) scripts/container-platform-metadata.mjs:381 — container-platform-metadata.validateContainerPlatformMetadata 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 · generate-third-party-notices.collectExternalComponents (cyclomatic 18) · ×1
  • generate-third-party-notices.collectExternalComponents (cyclomatic 18) scripts/generate-third-party-notices.mjs:314 — generate-third-party-notices.collectExternalComponents 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 · TaskInspectorActivityService.closeAtExactTerminalTransition (cyclomatic 18) · ×1
  • TaskInspectorActivityService.closeAtExactTerminalTransition (cyclomatic 18) src/core/inspector-activity/task-inspector-activity-service.ts:480 — TaskInspectorActivityService.closeAtExactTerminalTransition has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ReconnectSession.onReconnectResponse (cyclomatic 18) · ×1
  • ReconnectSession.onReconnectResponse (cyclomatic 18) src/core/bridge/mbp1/reconnect-session.ts:193 — ReconnectSession.onReconnectResponse 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 · Aria2ConfigBuilder.buildArgs (cyclomatic 18) · ×1
  • Aria2ConfigBuilder.buildArgs (cyclomatic 18) REDACTED:149 — Aria2ConfigBuilder.buildArgs 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 · LegacyHttpActivationService.verifyPayload (cyclomatic 18) · ×1
  • LegacyHttpActivationService.verifyPayload (cyclomatic 18) src/core/legacy-import/http-activation-service.ts:394 — LegacyHttpActivationService.verifyPayload has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · LegacyHttpActivationService.retainedContentDigest (cyclomatic 18) · ×1
  • LegacyHttpActivationService.retainedContentDigest (cyclomatic 18) src/core/legacy-import/http-activation-service.ts:492 — LegacyHttpActivationService.retainedContentDigest has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LegacyImportService.commitAdmission (cyclomatic 18) · ×1
  • LegacyImportService.commitAdmission (cyclomatic 18) src/core/legacy-import/import-service.ts:371 — LegacyImportService.commitAdmission has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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 · CapabilityBridge.dispatchFfmpeg (cyclomatic 18) · ×1
  • CapabilityBridge.dispatchFfmpeg (cyclomatic 18) src/core/plugin/host/capability-bridge.ts:1440 — CapabilityBridge.dispatchFfmpeg has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CapabilityBridge.applyHookEffects (cyclomatic 18) · ×1
  • CapabilityBridge.applyHookEffects (cyclomatic 18) src/core/plugin/host/capability-bridge.ts:1696 — CapabilityBridge.applyHookEffects has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · magnet-cleanup-quarantine.isTaskRow (cyclomatic 18) · ×1
  • magnet-cleanup-quarantine.isTaskRow (cyclomatic 18) src/core/torrent/magnet-cleanup-quarantine.ts:140 — magnet-cleanup-quarantine.isTaskRow has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MagnetTracker.deferCleanup (cyclomatic 18) · ×1
  • MagnetTracker.deferCleanup (cyclomatic 18) src/core/torrent/magnet-tracker.ts:1787 — MagnetTracker.deferCleanup has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · magnet-tracker.isSafeSwapCleanupArtifactPath (cyclomatic 18) · ×1
  • magnet-tracker.isSafeSwapCleanupArtifactPath (cyclomatic 18) src/core/torrent/magnet-tracker.ts:2176 — magnet-tracker.isSafeSwapCleanupArtifactPath 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 · CompletionShutdownController.execute (cyclomatic 18) · ×1
  • CompletionShutdownController.execute (cyclomatic 18) src/core/task/completion-shutdown-controller.ts:201 — CompletionShutdownController.execute has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TaskRecoveryServiceImpl.applyAction (cyclomatic 18) · ×1
  • TaskRecoveryServiceImpl.applyAction (cyclomatic 18) src/core/task/task-recovery-service.ts:429 — TaskRecoveryServiceImpl.applyAction 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 · TrackerProber.probeUdp (cyclomatic 18) · ×1
  • TrackerProber.probeUdp (cyclomatic 18) src/core/tracker/tracker-prober.ts:116 — TrackerProber.probeUdp has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 150, 130, 125, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AppImageNativeHost.install (cyclomatic 18) · ×1
  • AppImageNativeHost.install (cyclomatic 18) src/main/bridge/appimage-native-host.ts:282 — AppImageNativeHost.install 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 · tasks-tile.TasksTile (cyclomatic 18) · ×1
  • tasks-tile.TasksTile (cyclomatic 18) src/renderer/routes/dashboard/tiles/tasks-tile.tsx:509 — tasks-tile.TasksTile has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · files-tab.FilesTab (cyclomatic 18) · ×1
  • files-tab.FilesTab (cyclomatic 18) src/renderer/routes/downloads/inspector/files-tab.tsx:33 — files-tab.FilesTab has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · task-row.TaskRowBase (cyclomatic 18) · ×1
  • task-row.TaskRowBase (cyclomatic 18) src/renderer/routes/downloads/task-row.tsx:43 — task-row.TaskRowBase has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · file-list.FileList (cyclomatic 18) · ×1
  • file-list.FileList (cyclomatic 18) src/renderer/components/file-list/file-list.tsx:28 — file-list.FileList has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 130, toggleSelectAll, toggleFile, …). 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 · use-notification-toasts.useNotificationToasts (cyclomatic 18) · ×1
  • use-notification-toasts.useNotificationToasts (cyclomatic 18) src/renderer/hooks/use-notification-toasts.ts:90 — use-notification-toasts.useNotificationToasts has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 169, 130, 162). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · HttpWsTransport.ensureSocket (cyclomatic 18) · ×1
  • HttpWsTransport.ensureSocket (cyclomatic 18) src/renderer/lib/transport/http-ws.ts:175 — HttpWsTransport.ensureSocket has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · log-redact.limitVerboseError (cyclomatic 18) · ×1
  • log-redact.limitVerboseError (cyclomatic 18) src/shared/lib/log-redact.ts:757 — log-redact.limitVerboseError 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 · task-inspector-activity.findTaskSpeedUpdate (cyclomatic 18) · ×1
  • task-inspector-activity.findTaskSpeedUpdate (cyclomatic 18) src/shared/schemas/task-inspector-activity.ts:379 — task-inspector-activity.findTaskSpeedUpdate 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 · assemble-release-artifacts.assembleReleaseArtifacts (cyclomatic 17) · ×1
  • assemble-release-artifacts.assembleReleaseArtifacts (cyclomatic 17) scripts/assemble-release-artifacts.mjs:130 — assemble-release-artifacts.assembleReleaseArtifacts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · native-binary-target.detectMach (cyclomatic 17) · ×1
  • native-binary-target.detectMach (cyclomatic 17) scripts/native-binary-target.mjs:29 — native-binary-target.detectMach has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fetch-builtins.parseLock (cyclomatic 17) · ×1
  • fetch-builtins.parseLock (cyclomatic 17) scripts/fetch-builtins.mjs:82 — fetch-builtins.parseLock has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · obsidian-docs-lib.selectPlanDocuments (cyclomatic 17) · ×1
  • obsidian-docs-lib.selectPlanDocuments (cyclomatic 17) scripts/obsidian-docs-lib.mjs:613 — obsidian-docs-lib.selectPlanDocuments has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TaskInspectorActivityStore.applyTransition (cyclomatic 17) · ×1
  • TaskInspectorActivityStore.applyTransition (cyclomatic 17) src/core/inspector-activity/task-inspector-activity-store.ts:505 — TaskInspectorActivityStore.applyTransition 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 · verify-snap-store-channel.readStoreChannelSnapshot (cyclomatic 17) · ×1
  • verify-snap-store-channel.readStoreChannelSnapshot (cyclomatic 17) scripts/verify-snap-store-channel.mjs:79 — verify-snap-store-channel.readStoreChannelSnapshot has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run-remote-extension-release-soak.validateReleasePlaywrightReport · ×1
  • run-remote-extension-release-soak.validateReleasePlaywrightReport::visitSuite (cyclomatic 17) scripts/run-remote-extension-release-soak.mjs:311 — run-remote-extension-release-soak.validateReleasePlaywrightReport::visitSuite has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HlsDashPipeline.dispatch (cyclomatic 17) · ×1
  • HlsDashPipeline.dispatch (cyclomatic 17) src/core/bridge-receiver/pipelines/hls-dash-pipeline.ts:42 — HlsDashPipeline.dispatch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BridgeReceiver.dispatchAdapted (cyclomatic 17) · ×1
  • BridgeReceiver.dispatchAdapted (cyclomatic 17) src/core/bridge-receiver/bridge-receiver.ts:354 — BridgeReceiver.dispatchAdapted has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FileExtensionPairingProjectionStore.saveChecked (cyclomatic 17) · ×1
  • FileExtensionPairingProjectionStore.saveChecked (cyclomatic 17) src/core/bridge/file-extension-pairing-projection-store.ts:179 — FileExtensionPairingProjectionStore.saveChecked 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 · PairSession.onPairHello (cyclomatic 17) · ×1
  • PairSession.onPairHello (cyclomatic 17) src/core/bridge/mbp1/pair-session.ts:415 — PairSession.onPairHello 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 · Aria2PauseState.reconcile (cyclomatic 17) · ×1
  • Aria2PauseState.reconcile (cyclomatic 17) src/core/engine/aria2/aria2-pause-state.ts:25 — Aria2PauseState.reconcile has cyclomatic complexity 17 (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 · verified-release.verifyFfmpegRelease (cyclomatic 17) · ×1
  • verified-release.verifyFfmpegRelease (cyclomatic 17) src/core/ffmpeg/verified-release.ts:33 — verified-release.verifyFfmpegRelease has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LegacyHttpActivationService.sourceContext (cyclomatic 17) · ×1
  • LegacyHttpActivationService.sourceContext (cyclomatic 17) src/core/legacy-import/http-activation-service.ts:261 — LegacyHttpActivationService.sourceContext has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fs-sandbox.resolveDeepInsideSandbox (cyclomatic 17) · ×1
  • fs-sandbox.resolveDeepInsideSandbox (cyclomatic 17) src/core/plugin/capabilities/fs-sandbox.ts:64 — fs-sandbox.resolveDeepInsideSandbox has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · command-graph.readSnapshot (cyclomatic 17) · ×1
  • command-graph.readSnapshot (cyclomatic 17) src/core/plugin/commands/command-graph.ts:130 — command-graph.readSnapshot has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PluginHost.activate (cyclomatic 17) · ×1
  • PluginHost.activate (cyclomatic 17) src/core/plugin/host/plugin-host.ts:310 — PluginHost.activate has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FinalizeRecovery.recoverRenameFile (cyclomatic 17) · ×1
  • FinalizeRecovery.recoverRenameFile (cyclomatic 17) src/core/plugin/finalize/finalize-recovery.ts:320 — FinalizeRecovery.recoverRenameFile 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 · NativeFinalizeArtifactOperations.publishReserved (cyclomatic 17) · ×1
  • NativeFinalizeArtifactOperations.publishReserved (cyclomatic 17) src/core/plugin/finalize/native-artifact-operations.ts:74 — NativeFinalizeArtifactOperations.publishReserved has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NativeFinalizeArtifactOperations.removeKnown (cyclomatic 17) · ×1
  • NativeFinalizeArtifactOperations.removeKnown (cyclomatic 17) src/core/plugin/finalize/native-artifact-operations.ts:543 — NativeFinalizeArtifactOperations.removeKnown 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 · DirectRecoveryPlanner.plan (cyclomatic 17) · ×1
  • DirectRecoveryPlanner.plan (cyclomatic 17) src/core/session/direct-recovery-planner.ts:142 — DirectRecoveryPlanner.plan 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 · finalize-journal-repository.transitionAllowed (cyclomatic 17) · ×1
  • finalize-journal-repository.transitionAllowed (cyclomatic 17) src/core/session/finalize-journal-repository.ts:521 — finalize-journal-repository.transitionAllowed has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DirectResourceValidatorService.verifyLegacyContent · ×1
  • DirectResourceValidatorService.verifyLegacyContent::verifyRange (cyclomatic 17) src/core/task/direct-resource-validator.ts:516 — DirectResourceValidatorService.verifyLegacyContent::verifyRange has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · direct-resource-validator.redirectRequestUrl (cyclomatic 17) · ×1
  • direct-resource-validator.redirectRequestUrl (cyclomatic 17) src/core/task/direct-resource-validator.ts:842 — direct-resource-validator.redirectRequestUrl has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SqlitePostDeliveryRepository.admissionRejection (cyclomatic 17) · ×1
  • SqlitePostDeliveryRepository.admissionRejection (cyclomatic 17) src/core/session/post-delivery-repository.ts:666 — SqlitePostDeliveryRepository.admissionRejection has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · finalize-task.finalizeBt (cyclomatic 17) · ×1
  • finalize-task.finalizeBt (cyclomatic 17) src/core/task/actions/finalize-task.ts:586 — finalize-task.finalizeBt has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · safari-bootstrap-registration.registerSafariBootstrap (cyclomatic 17) · ×1
  • safari-bootstrap-registration.registerSafariBootstrap (cyclomatic 17) src/main/bridge/safari-bootstrap-registration.ts:26 — safari-bootstrap-registration.registerSafariBootstrap has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BridgeManager.stopCurrent (cyclomatic 17) · ×1
  • BridgeManager.stopCurrent (cyclomatic 17) src/main/bridge/bridge-manager.ts:106 — BridgeManager.stopCurrent 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 · RendererSupervisor.created (cyclomatic 17) · ×1
  • RendererSupervisor.created (cyclomatic 17) src/main/window/renderer-supervisor.ts:107 — RendererSupervisor.created has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (onInPageNavigation, onNavigation, onLoadFailure, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · completion-shutdown.setupCompletionShutdown (cyclomatic 17) · ×1
  • completion-shutdown.setupCompletionShutdown (cyclomatic 17) src/main/platform/completion-shutdown.ts:38 — completion-shutdown.setupCompletionShutdown has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 58, 76, 48, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use-plugin-install.usePluginInstall.startInstall (cyclomatic 17) · ×1
  • use-plugin-install.usePluginInstall.startInstall (cyclomatic 17) src/renderer/routes/plugins/hooks/use-plugin-install.ts:84 — use-plugin-install.usePluginInstall.startInstall 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 · trusted-extensions-section.TrustedExtensionsSection (cyclomatic 17) · ×1
  • trusted-extensions-section.TrustedExtensionsSection (cyclomatic 17) src/renderer/routes/settings/cards/integration/trusted-extensions-section.tsx:87 — trusted-extensions-section.TrustedExtensionsSection has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 187, handleAdd, a function literal at line 110, …). 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 · add-task-dialog-host.AddTaskDialogHost (cyclomatic 17) · ×1
  • add-task-dialog-host.AddTaskDialogHost (cyclomatic 17) src/renderer/components/add-task-dialog/add-task-dialog-host.tsx:39 — add-task-dialog-host.AddTaskDialogHost has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 124, 58, 97, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DirectoryPickerController.start (cyclomatic 17) · ×1
  • DirectoryPickerController.start (cyclomatic 17) src/renderer/features/web-directory-picker/directory-picker-controller.ts:226 — DirectoryPickerController.start has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · use-task-inspector-activity.useTaskInspectorActivity (cyclomatic 17) · ×1
  • use-task-inspector-activity.useTaskInspectorActivity (cyclomatic 17) src/renderer/hooks/use-task-inspector-activity.ts:64 — use-task-inspector-activity.useTaskInspectorActivity has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 147, 134, 93, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · match.matchesAccelerator (cyclomatic 17) · ×1
  • match.matchesAccelerator (cyclomatic 17) src/renderer/shortcuts/match.ts:1 — match.matchesAccelerator 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 · operator-admin.parseCommand (cyclomatic 17) · ×1
  • operator-admin.parseCommand (cyclomatic 17) src/server/operator-admin.ts:271 — operator-admin.parseCommand has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · log-redact.redactExtraEngineOptions (cyclomatic 17) · ×1
  • log-redact.redactExtraEngineOptions (cyclomatic 17) src/shared/lib/log-redact.ts:540 — log-redact.redactExtraEngineOptions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · remote-extension-config.parseRemoteExtensionConfig (cyclomatic 16) · ×1
  • remote-extension-config.parseRemoteExtensionConfig (cyclomatic 16) src/server/bridge/remote-extension-config.ts:349 — remote-extension-config.parseRemoteExtensionConfig has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server-package-utils.parseServerTarget (cyclomatic 16) · ×1
  • server-package-utils.parseServerTarget (cyclomatic 16) scripts/server-package-utils.mjs:241 — server-package-utils.parseServerTarget has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server-package-utils.scanStaticModuleSpecifiers (cyclomatic 16) · ×1
  • server-package-utils.scanStaticModuleSpecifiers (cyclomatic 16) scripts/server-package-utils.mjs:445 — server-package-utils.scanStaticModuleSpecifiers has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · profile-task-inspector-activity.timelineFixture (cyclomatic 16) · ×1
  • profile-task-inspector-activity.timelineFixture (cyclomatic 16) scripts/profile-task-inspector-activity.mts:277 — profile-task-inspector-activity.timelineFixture has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 280). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · release-signing-input.assertSafeTree · ×1
  • release-signing-input.assertSafeTree::visit (cyclomatic 16) scripts/release-signing-input.mjs:321 — release-signing-input.assertSafeTree::visit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: release-signing-input.verifyManifestEntry (cyclomatic 29) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · credential-store.reconcile (cyclomatic 16) · ×1
  • credential-store.reconcile (cyclomatic 16) src/core/bridge/credential-store.ts:1027 — credential-store.reconcile has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · file-extension-pairing-projection-store.recoverExtensionPairingProjectionWriterLock (cyclomatic 16) · ×1
  • file-extension-pairing-projection-store.recoverExtensionPairingProjectionWriterLock (cyclomatic 16) src/core/bridge/file-extension-pairing-projection-store.ts:58 — file-extension-pairing-projection-store.recoverExtensionPairingProjectionWriterLock has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 63). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PluginSecurityService.fetchPolicy · ×1
  • PluginSecurityService.fetchPolicy::download (cyclomatic 16) src/core/plugin/security/security-service.ts:283 — PluginSecurityService.fetchPolicy::download has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NativeFinalizeFilesystemAdapter.sendRequest (cyclomatic 16) · ×1
  • NativeFinalizeFilesystemAdapter.sendRequest (cyclomatic 16) src/core/plugin/finalize/filesystem-adapter.ts:595 — NativeFinalizeFilesystemAdapter.sendRequest has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OperationFiles.cleanup (cyclomatic 16) · ×1
  • OperationFiles.cleanup (cyclomatic 16) src/core/plugin/operations/operation-files.ts:680 — OperationFiles.cleanup has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FinalizeRecovery.cleanup (cyclomatic 16) · ×1
  • FinalizeRecovery.cleanup (cyclomatic 16) src/core/plugin/finalize/finalize-recovery.ts:553 — FinalizeRecovery.cleanup has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FinalizeRecovery.restorePrepared (cyclomatic 16) · ×1
  • FinalizeRecovery.restorePrepared (cyclomatic 16) src/core/plugin/finalize/finalize-recovery.ts:673 — FinalizeRecovery.restorePrepared has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FinalizeCommitter.publish (cyclomatic 16) · ×1
  • FinalizeCommitter.publish (cyclomatic 16) src/core/plugin/finalize/finalize-committer.ts:467 — FinalizeCommitter.publish has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PostDeliveryScheduler.execute (cyclomatic 16) · ×1
  • PostDeliveryScheduler.execute (cyclomatic 16) src/core/plugin/post/delivery-scheduler.ts:281 — PostDeliveryScheduler.execute has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · finalize-journal-repository.parseRecord (cyclomatic 16) · ×1
  • finalize-journal-repository.parseRecord (cyclomatic 16) src/core/session/finalize-journal-repository.ts:347 — finalize-journal-repository.parseRecord has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · merge-engine-task.mergeEngineTask (cyclomatic 16) · ×1
  • merge-engine-task.mergeEngineTask (cyclomatic 16) src/core/task/merge-engine-task.ts:18 — merge-engine-task.mergeEngineTask has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: merge-engine-task.hasEngineTaskDelta (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · DirectResourceValidatorService.requestFollowingRedirects (cyclomatic 16) · ×1
  • DirectResourceValidatorService.requestFollowingRedirects (cyclomatic 16) src/core/task/direct-resource-validator.ts:652 — DirectResourceValidatorService.requestFollowingRedirects has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · MotrixDatabase.commitTerminalHookBoundary (cyclomatic 16) · ×1
  • MotrixDatabase.commitTerminalHookBoundary (cyclomatic 16) src/core/session/motrix-database.ts:817 — MotrixDatabase.commitTerminalHookBoundary has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 823). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · finalize-task.finalizeBtInPlace (cyclomatic 16) · ×1
  • finalize-task.finalizeBtInPlace (cyclomatic 16) src/core/task/actions/finalize-task.ts:1056 — finalize-task.finalizeBtInPlace has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · re-add-task.reAddTaskUnderMutation (cyclomatic 16) · ×1
  • re-add-task.reAddTaskUnderMutation (cyclomatic 16) src/core/task/actions/re-add-task.ts:533 — re-add-task.reAddTaskUnderMutation has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · create-task-handler.createAdmittedTask (cyclomatic 16) · ×1
  • create-task-handler.createAdmittedTask (cyclomatic 16) src/core/task/create-task-handler.ts:285 — create-task-handler.createAdmittedTask has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · MagnetSelectionTimeout.refresh (cyclomatic 16) · ×1
  • MagnetSelectionTimeout.refresh (cyclomatic 16) src/core/torrent/magnet-selection-timeout.ts:95 — MagnetSelectionTimeout.refresh has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackerManager.init (cyclomatic 16) · ×1
  • TrackerManager.init (cyclomatic 16) src/core/tracker/tracker-manager.ts:164 — TrackerManager.init has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.makeResolveToMux (cyclomatic 16) · ×1
  • index.makeResolveToMux (cyclomatic 16) src/main/bridge/index.ts:121 — index.makeResolveToMux has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 134, 144, 138). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · package-manager.managerBinDirectory (cyclomatic 16) · ×1
  • package-manager.managerBinDirectory (cyclomatic 16) src/main/cli/package-manager.ts:387 — package-manager.managerBinDirectory has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindowManager.recreate (cyclomatic 16) · ×1
  • WindowManager.recreate (cyclomatic 16) src/main/window/window-manager.ts:229 — WindowManager.recreate has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · appimage-integration.inspectSystemIntegration (cyclomatic 16) · ×1
  • appimage-integration.inspectSystemIntegration (cyclomatic 16) src/main/platform/appimage-integration.ts:1048 — appimage-integration.inspectSystemIntegration has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · services.createElectronPlatformServices (cyclomatic 16) · ×1
  • services.createElectronPlatformServices (cyclomatic 16) src/main/platform/services.ts:11 — services.createElectronPlatformServices has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tray.setupTray.createTray (cyclomatic 16) · ×1
  • tray.setupTray.createTray (cyclomatic 16) src/main/platform/tray.ts:85 — tray.setupTray.createTray has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dashboard-tile-frame.DashboardTileFrame (cyclomatic 16) · ×1
  • dashboard-tile-frame.DashboardTileFrame (cyclomatic 16) src/renderer/routes/dashboard/components/dashboard-tile-frame.tsx:92 — dashboard-tile-frame.DashboardTileFrame has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 216, 179, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · activity-calendar-model.activityMonthLabels (cyclomatic 16) · ×1
  • activity-calendar-model.activityMonthLabels (cyclomatic 16) src/renderer/routes/dashboard/activity/activity-calendar-model.ts:542 — activity-calendar-model.activityMonthLabels has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: activity-calendar-model.moveActivityActiveIndex (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · resize-handle.ResizeHandle (cyclomatic 16) · ×1
  • resize-handle.ResizeHandle (cyclomatic 16) src/renderer/components/desktop-kit/resize-handle.tsx:16 — resize-handle.ResizeHandle has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 79, 59, 46, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · operation-form.OperationForm (cyclomatic 16) · ×1
  • operation-form.OperationForm (cyclomatic 16) src/renderer/features/plugin-operations/operation-form.tsx:39 — operation-form.OperationForm has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · commands.buildCommandHandlers (cognitive 237) · ×1
  • commands.buildCommandHandlers (cognitive 237) src/main/ipc/commands.ts:296 — commands.buildCommandHandlers has cognitive complexity 237 (threshold 15). Drivers by points: if/else 83 (137 pts), ternaries 22 (42 pts), boolean chains 31, error handling 14 (22 pts), loops 3, match/switch 2 (nesting depth added 82). Most of this is not in the body itself: 1 of the 237 points is its own statement and the rest belongs to 37 function items inside it that branch (a function literal at line 896, a function literal at line 1154, a function literal at line 1738, …). 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 · create-task-handler.handleCreateTaskUnderAdmission (cognitive 166) · ×1
  • create-task-handler.handleCreateTaskUnderAdmission (cognitive 166) src/core/task/create-task-handler.ts:372 — create-task-handler.handleCreateTaskUnderAdmission has cognitive complexity 166 (threshold 15). Drivers by points: if/else 52 (96 pts), ternaries 31 (65 pts), error handling 10 (19 pts), boolean chains 15, loops 1 (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (create-task-handler.handleCreateTaskUnderAdmission::createReservedTask) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · legacy-import-dialog.LegacyImportDialogContent (cognitive 149) · ×1
  • legacy-import-dialog.LegacyImportDialogContent (cognitive 149) src/renderer/features/legacy-import/legacy-import-dialog.tsx:113 — legacy-import-dialog.LegacyImportDialogContent has cognitive complexity 149 (threshold 15). Drivers by points: if/else 50 (58 pts), boolean chains 53, ternaries 22 (34 pts), error handling 4 (nesting depth added 20). Of this number, 36 points are the body's own statements and 113 belong to 35 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SessionManager.restore (cognitive 142) · ×1
  • SessionManager.restore (cognitive 142) src/core/session/session-manager.ts:641 — SessionManager.restore has cognitive complexity 142 (threshold 15). Drivers by points: if/else 43 (112 pts), boolean chains 17, loops 7 (12 pts), ternaries 1 (nesting depth added 74). Of this number, 140 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · activity-calendar.ActivityCalendar (cognitive 140) · ×1
  • activity-calendar.ActivityCalendar (cognitive 140) src/renderer/routes/dashboard/activity/activity-calendar.tsx:264 — activity-calendar.ActivityCalendar has cognitive complexity 140 (threshold 15). Drivers by points: if/else 56 (62 pts), ternaries 33 (41 pts), boolean chains 37 (nesting depth added 14). Of this number, 41 points are the body's own statements and 99 belong to 27 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · add-task-form.AddTaskForm (cognitive 137) · ×1
  • add-task-form.AddTaskForm (cognitive 137) src/renderer/components/add-task/add-task-form.tsx:139 — add-task-form.AddTaskForm has cognitive complexity 137 (threshold 15). Drivers by points: if/else 59 (80 pts), boolean chains 24, ternaries 11 (20 pts), error handling 7 (10 pts), loops 2 (3 pts) (nesting depth added 34). Most of this is not in the body itself: 6 of the 137 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 521, 411, 195, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · commands.buildServerCommandHandlers (cognitive 130) · ×1
  • commands.buildServerCommandHandlers (cognitive 130) src/server/ipc/commands.ts:197 — commands.buildServerCommandHandlers has cognitive complexity 130 (threshold 15). Drivers by points: if/else 42 (80 pts), ternaries 7 (21 pts), boolean chains 16, error handling 6 (12 pts), loops 1 (nesting depth added 58). Most of this is not in the body itself: 1 of the 130 points is its own statement and the rest belongs to 17 function items inside it that branch (a function literal at line 472, a function literal at line 814, a function literal at line 983, …). 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 · operation-form.OperationFormContent (cognitive 117) · ×1
  • operation-form.OperationFormContent (cognitive 117) src/renderer/features/plugin-operations/operation-form.tsx:102 — operation-form.OperationFormContent has cognitive complexity 117 (threshold 15). Drivers by points: if/else 46 (59 pts), boolean chains 46, ternaries 5, error handling 4, loops 2 (3 pts) (nesting depth added 14). Of this number, 36 points are the body's own statements and 81 belong to 17 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · web-directory-picker-dialog.PickerSession · ×1
  • web-directory-picker-dialog.PickerSession::keyDown (cognitive 113) src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:303 — web-directory-picker-dialog.PickerSession::keyDown has cognitive complexity 113 (threshold 15). Drivers by points: if/else 36 (57 pts), boolean chains 29, ternaries 9 (25 pts), loops 1 (2 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (web-directory-picker-dialog.PickerSession) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · engine-diagnostics-dialog.EngineDiagnosticsDialogHost (cognitive 100) · ×1
  • engine-diagnostics-dialog.EngineDiagnosticsDialogHost (cognitive 100) src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx:140 — engine-diagnostics-dialog.EngineDiagnosticsDialogHost has cognitive complexity 100 (threshold 15). Drivers by points: ternaries 31 (59 pts), boolean chains 31, if/else 7 (8 pts), error handling 2 (nesting depth added 29). Of this number, 75 points are the body's own statements and 25 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · source-scanner.scanLegacySource (cognitive 96) · ×1
  • source-scanner.scanLegacySource (cognitive 96) src/core/legacy-import/source-scanner.ts:298 — source-scanner.scanLegacySource has cognitive complexity 96 (threshold 15). Drivers by points: if/else 25 (58 pts), boolean chains 22, ternaries 5 (11 pts), loops 3, error handling 1 (2 pts) (nesting depth added 40). Of this number, 95 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionManager.reAddOrMarkErrorFromPair (cognitive 96) · ×1
  • SessionManager.reAddOrMarkErrorFromPair (cognitive 96) src/core/session/session-manager.ts:1536 — SessionManager.reAddOrMarkErrorFromPair has cognitive complexity 96 (threshold 15). Drivers by points: ternaries 19 (52 pts), if/else 13 (27 pts), boolean chains 13, error handling 2 (4 pts) (nesting depth added 49). Of this number, 64 points are the body's own statements and 32 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · media-tools-section.MediaToolsSection (cognitive 93) · ×1
  • media-tools-section.MediaToolsSection (cognitive 93) src/renderer/routes/settings/cards/integration/media-tools-section.tsx:75 — media-tools-section.MediaToolsSection has cognitive complexity 93 (threshold 15). Drivers by points: ternaries 26 (42 pts), boolean chains 34, if/else 9 (15 pts), error handling 2 (nesting depth added 22). Of this number, 54 points are the body's own statements and 39 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · remove-task.removeTaskUnderMutation (cognitive 91) · ×1
  • remove-task.removeTaskUnderMutation (cognitive 91) src/core/task/actions/remove-task.ts:99 — remove-task.removeTaskUnderMutation has cognitive complexity 91 (threshold 15). Drivers by points: if/else 28 (59 pts), boolean chains 10, error handling 3 (10 pts), ternaries 4 (9 pts), loops 1 (3 pts) (nesting depth added 45). Of this number, 72 points are the body's own statements and 19 belong to 4 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · transfer-tile.TransferTile (cognitive 91) · ×1
  • transfer-tile.TransferTile (cognitive 91) src/renderer/routes/dashboard/tiles/transfer-tile.tsx:279 — transfer-tile.TransferTile has cognitive complexity 91 (threshold 15). Drivers by points: ternaries 22 (80 pts), boolean chains 6, if/else 4 (5 pts) (nesting depth added 59). 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 · verify-electron-package.verifyElectronPackage (cognitive 89) · ×1
  • verify-electron-package.verifyElectronPackage (cognitive 89) scripts/verify-electron-package.mjs:271 — verify-electron-package.verifyElectronPackage has cognitive complexity 89 (threshold 15). Drivers by points: if/else 40 (56 pts), boolean chains 13, loops 11, ternaries 7 (8 pts), error handling 1 (nesting depth added 17). Most of this is not in the body itself: 2 of the 89 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 583, a function literal at line 467, a function literal at line 371, …). 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 · MediaTaskCoordinator.run (cognitive 86) · ×1
  • MediaTaskCoordinator.run (cognitive 86) src/core/task/media-task-coordinator.ts:236 — MediaTaskCoordinator.run has cognitive complexity 86 (threshold 15). Drivers by points: if/else 37 (47 pts), ternaries 15 (17 pts), boolean chains 16, error handling 4 (5 pts), loops 1 (nesting depth added 13). Of this number, 56 points are the body's own statements and 30 belong to 15 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.initializeMainProcess (cognitive 84) · ×1
  • index.initializeMainProcess (cognitive 84) src/main/index.ts:1589 — index.initializeMainProcess has cognitive complexity 84 (threshold 15). Drivers by points: if/else 51 (57 pts), boolean chains 19, ternaries 5 (7 pts), error handling 1 (nesting depth added 8). Of this number, 50 points are the body's own statements and 34 belong to 33 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · trackers-tab.TrackersTab (cognitive 81) · ×1
  • trackers-tab.TrackersTab (cognitive 81) src/renderer/routes/downloads/inspector/trackers-tab.tsx:42 — trackers-tab.TrackersTab has cognitive complexity 81 (threshold 15). Drivers by points: if/else 29 (35 pts), ternaries 12 (24 pts), boolean chains 16, error handling 4, loops 2 (nesting depth added 18). Of this number, 23 points are the body's own statements and 58 belong to 13 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · http-request-context.resolveLegacyHttpRequestContext (cognitive 77) · ×1
  • http-request-context.resolveLegacyHttpRequestContext (cognitive 77) src/core/legacy-import/http-request-context.ts:28 — http-request-context.resolveLegacyHttpRequestContext has cognitive complexity 77 (threshold 15). Drivers by points: if/else 35 (43 pts), boolean chains 22, ternaries 4 (5 pts), loops 4, error handling 3 (nesting depth added 9). Of this number, 48 points are the body's own statements and 29 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.handlePolledTasks (cognitive 77) · ×1
  • index.handlePolledTasks (cognitive 77) src/main/index.ts:848 — index.handlePolledTasks has cognitive complexity 77 (threshold 15). Drivers by points: if/else 21 (59 pts), error handling 2 (9 pts), ternaries 1 (5 pts), boolean chains 3, loops 1 (nesting depth added 49). Of this number, 60 points are the body's own statements and 17 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · dashboard-grid.DashboardGrid (cognitive 76) · ×1
  • dashboard-grid.DashboardGrid (cognitive 76) src/renderer/routes/dashboard/components/dashboard-grid.tsx:849 — dashboard-grid.DashboardGrid has cognitive complexity 76 (threshold 15). Drivers by points: if/else 31 (38 pts), ternaries 18 (20 pts), boolean chains 16, error handling 1, loops 1 (nesting depth added 9). Most of this is not in the body itself: 11 of the 76 points are its own statements and the rest belongs to 24 function literals inside it that branch (lines 1041, 1124, 1162, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · State · ×1
  • State::dispatch (cognitive 76) packages/finalize-fs/src/state.rs:32 — State::dispatch has cognitive complexity 76 (threshold 15). Drivers by points: if/else 25 (49 pts), match/switch 12 (24 pts), boolean chains 3 (nesting depth added 36). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FinalizeRecovery.recover (cognitive 75) · ×1
  • FinalizeRecovery.recover (cognitive 75) src/core/plugin/finalize/finalize-recovery.ts:80 — FinalizeRecovery.recover has cognitive complexity 75 (threshold 15). Drivers by points: if/else 34 (56 pts), boolean chains 13, ternaries 5 (6 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHttpClient.fetch (cognitive 75) · ×1
  • PluginHttpClient.fetch (cognitive 75) src/core/plugin/network/plugin-http-client.ts:25 — PluginHttpClient.fetch has cognitive complexity 75 (threshold 15). Drivers by points: if/else 23 (50 pts), boolean chains 13, ternaries 4 (8 pts), error handling 2 (3 pts), loops 1 (nesting depth added 32). Of this number, 65 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · swap-magnet-metadata-for-bt.swapMagnetMetadataForBtUnderMutation (cognitive 74) · ×1
  • swap-magnet-metadata-for-bt.swapMagnetMetadataForBtUnderMutation (cognitive 74) src/core/torrent/swap-magnet-metadata-for-bt.ts:128 — swap-magnet-metadata-for-bt.swapMagnetMetadataForBtUnderMutation has cognitive complexity 74 (threshold 15). Drivers by points: error handling 16 (34 pts), if/else 17 (25 pts), boolean chains 9, ternaries 6 (nesting depth added 26). Of this number, 60 points are the body's own statements and 14 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hls-parser.parseHlsMedia (cognitive 72) · ×1
  • hls-parser.parseHlsMedia (cognitive 72) REDACTED:126 — hls-parser.parseHlsMedia has cognitive complexity 72 (threshold 15). Drivers by points: if/else 17 (43 pts), ternaries 8 (23 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegacyHttpActivationService.reconcile (cognitive 69) · ×1
  • LegacyHttpActivationService.reconcile (cognitive 69) src/core/legacy-import/http-activation-service.ts:762 — LegacyHttpActivationService.reconcile has cognitive complexity 69 (threshold 15). Drivers by points: if/else 30 (51 pts), boolean chains 15, error handling 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · create-selection-store.createSelectionStore (cognitive 69) · ×1
  • create-selection-store.createSelectionStore (cognitive 69) src/renderer/components/desktop-kit/selection/create-selection-store.ts:13 — create-selection-store.createSelectionStore has cognitive complexity 69 (threshold 15). Drivers by points: if/else 36 (48 pts), loops 7 (9 pts), ternaries 7, boolean chains 5 (nesting depth added 14). None of this is in the body itself: all 69 points belong to one function literal inside it that branches (line 32). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · HttpCapabilityHost.request (cognitive 66) · ×1
  • HttpCapabilityHost.request (cognitive 66) src/core/plugin/capabilities/http.ts:397 — HttpCapabilityHost.request has cognitive complexity 66 (threshold 15). Drivers by points: if/else 20 (41 pts), ternaries 4 (13 pts), boolean chains 6, error handling 2 (4 pts), loops 2 (nesting depth added 32). Of this number, 65 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · operation-fields.OperationFields · ×1
  • operation-fields.OperationFields::renderField (cognitive 66) src/renderer/features/plugin-operations/operation-fields.tsx:62 — operation-fields.OperationFields::renderField has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 12 (46 pts), boolean chains 17, if/else 3 (nesting depth added 34). 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 · verify-server-package.verifyServerPackage (cognitive 65) · ×1
  • verify-server-package.verifyServerPackage (cognitive 65) scripts/verify-server-package.mjs:177 — verify-server-package.verifyServerPackage has cognitive complexity 65 (threshold 15). Drivers by points: if/else 30 (36 pts), boolean chains 15, loops 6, ternaries 4 (6 pts), error handling 2 (nesting depth added 8). Most of this is not in the body itself: 3 of the 65 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 344, a function literal at line 410, a function literal at line 287, …). 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 · plugin-call-graph.PluginCallGraph (cognitive 64) · ×1
  • plugin-call-graph.PluginCallGraph (cognitive 64) src/renderer/routes/plugins/components/call-graph/plugin-call-graph.tsx:221 — plugin-call-graph.PluginCallGraph has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 29, if/else 25 (29 pts), ternaries 4, loops 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 4 of the 64 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 525, 279, 305, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · verified-install.installVerifiedFfmpeg (cognitive 59) · ×1
  • verified-install.installVerifiedFfmpeg (cognitive 59) src/core/ffmpeg/verified-install.ts:713 — verified-install.installVerifiedFfmpeg has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (23 pts), ternaries 5 (20 pts), boolean chains 11, loops 2 (3 pts), error handling 2 (nesting depth added 23). Of this number, 58 points are the body's own statements and 1 belongs to one function item inside it that branches. 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 · parse.parseManifest (cognitive 58) · ×1
  • parse.parseManifest (cognitive 58) src/core/plugin/manifest/parse.ts:157 — parse.parseManifest has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 8, loops 5 (8 pts), error handling 1, ternaries 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · web-menu-button.WebMenuButton (cognitive 58) · ×1
  • web-menu-button.WebMenuButton (cognitive 58) src/renderer/features/application-menu/web-menu-button.tsx:69 — web-menu-button.WebMenuButton has cognitive complexity 58 (threshold 15). Drivers by points: if/else 31 (36 pts), boolean chains 11, ternaries 5 (7 pts), error handling 1 (2 pts), loops 2 (nesting depth added 8). Most of this is not in the body itself: 2 of the 58 points are its own statements and the rest belongs to 22 function items inside it that branch (a function literal at line 418, renderItems, a function literal at line 283, …). 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 · Aria2Adapter.createDownload (cognitive 56) · ×1
  • Aria2Adapter.createDownload (cognitive 56) src/core/engine/aria2/aria2-adapter.ts:421 — Aria2Adapter.createDownload has cognitive complexity 56 (threshold 15). Drivers by points: if/else 32 (40 pts), boolean chains 13, loops 1 (2 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CompletedTaskStartupGuard.prepare (cognitive 56) · ×1
  • CompletedTaskStartupGuard.prepare (cognitive 56) src/core/engine/aria2/completed-task-startup-guard.ts:163 — CompletedTaskStartupGuard.prepare has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 8, error handling 4 (8 pts), loops 2, ternaries 2 (nesting depth added 21). Most of this is not in the body itself: 12 of the 56 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 218, 193, 198). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tasks-tile.TaskRow (cognitive 56) · ×1
  • tasks-tile.TaskRow (cognitive 56) src/renderer/routes/dashboard/tiles/tasks-tile.tsx:162 — tasks-tile.TaskRow has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 18 (33 pts), boolean chains 15, if/else 6, match/switch 1 (2 pts) (nesting depth added 16). Of this number, 54 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SegmentDownloader.run (cognitive 55) · ×1
  • SegmentDownloader.run (cognitive 55) src/core/download/segment-downloader.ts:234 — SegmentDownloader.run has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (34 pts), ternaries 5 (8 pts), loops 6 (7 pts), boolean chains 5, error handling 1 (nesting depth added 14). Most of this is not in the body itself: 3 of the 55 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 425, a function literal at line 303, a function literal at line 323, …). 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 · EngineSupervisor.doStart (cognitive 54) · ×1
  • EngineSupervisor.doStart (cognitive 54) src/core/engine/engine-supervisor.ts:428 — EngineSupervisor.doStart has cognitive complexity 54 (threshold 15). Drivers by points: if/else 25 (32 pts), ternaries 3 (9 pts), error handling 4 (7 pts), boolean chains 6 (nesting depth added 16). Of this number, 51 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-selectable-list.useSelectableList.onKeyDown (cognitive 53) · ×1
  • use-selectable-list.useSelectableList.onKeyDown (cognitive 53) src/renderer/components/desktop-kit/hooks/use-selectable-list.ts:178 — use-selectable-list.useSelectableList.onKeyDown has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 10, ternaries 3 (9 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aria2-session-identity-recovery.recoverAria2SessionIdentity (cognitive 52) · ×1
  • aria2-session-identity-recovery.recoverAria2SessionIdentity (cognitive 52) src/core/engine/aria2/aria2-session-identity-recovery.ts:68 — aria2-session-identity-recovery.recoverAria2SessionIdentity has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 8, ternaries 5 (7 pts), error handling 3 (6 pts), loops 5 (nesting depth added 16). Of this number, 43 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lifetime-transfer-card.LifetimeTransferCard (cognitive 52) · ×1
  • lifetime-transfer-card.LifetimeTransferCard (cognitive 52) src/renderer/routes/downloads/inspector/lifetime-transfer-card.tsx:58 — lifetime-transfer-card.LifetimeTransferCard has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 25, ternaries 14 (15 pts), if/else 11 (12 pts) (nesting depth added 2). Most of this is not in the body itself: 15 of the 52 points are its own statements and the rest belongs to 19 function items inside it that branch (a function literal at line 161, a function literal at line 220, a function literal at line 367, …). 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 · plugin-install-dialog.PluginInstallSession (cognitive 52) · ×1
  • plugin-install-dialog.PluginInstallSession (cognitive 52) src/renderer/routes/plugins/plugin-install-dialog.tsx:96 — plugin-install-dialog.PluginInstallSession has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 21, ternaries 6 (8 pts) (nesting depth added 5). Of this number, 24 points are the body's own statements and 28 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Aria2Adapter.addTorrent (cognitive 51) · ×1
  • Aria2Adapter.addTorrent (cognitive 51) src/core/engine/aria2/aria2-adapter.ts:847 — Aria2Adapter.addTorrent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28 (38 pts), boolean chains 10, loops 1 (2 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · obsidian-docs.main (cognitive 50) · ×1
  • obsidian-docs.main (cognitive 50) scripts/obsidian-docs.mjs:141 — obsidian-docs.main has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (29 pts), ternaries 5 (10 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verified-install.extractVerifiedTar (cognitive 50) · ×1
  • verified-install.extractVerifiedTar (cognitive 50) src/core/ffmpeg/verified-install.ts:594 — verified-install.extractVerifiedTar has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 8, loops 4 (7 pts) (nesting depth added 23). Of this number, 39 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegacyBtActivationService.reconcile (cognitive 50) · ×1
  • LegacyBtActivationService.reconcile (cognitive 50) src/core/legacy-import/bt-activation-service.ts:489 — LegacyBtActivationService.reconcile has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 12, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RendererSupervisor.tick (cognitive 50) · ×1
  • RendererSupervisor.tick (cognitive 50) src/main/window/renderer-supervisor.ts:427 — RendererSupervisor.tick has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 8, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 21). 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 · web-directory-picker-dialog.PickerSession (cognitive 50) · ×1
  • web-directory-picker-dialog.PickerSession (cognitive 50) src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:134 — web-directory-picker-dialog.PickerSession has cognitive complexity 50 (threshold 15). Drivers by points: if/else 60 (84 pts), boolean chains 75, ternaries 29 (50 pts), loops 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (web-directory-picker-dialog.PickerSession::keyDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LegacyImportService.runBatches (cognitive 49) · ×1
  • LegacyImportService.runBatches (cognitive 49) src/core/legacy-import/import-service.ts:510 — LegacyImportService.runBatches has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 7 (14 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 26). Of this number, 34 points are the body's own statements and 15 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · nat-tile.ElectronNatTile (cognitive 49) · ×1
  • nat-tile.ElectronNatTile (cognitive 49) src/renderer/routes/dashboard/tiles/nat-tile.tsx:38 — nat-tile.ElectronNatTile has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 19 (42 pts), boolean chains 7 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · url-textarea.UrlTextarea (cognitive 49) · ×1
  • url-textarea.UrlTextarea (cognitive 49) src/renderer/components/add-task/url-textarea.tsx:54 — url-textarea.UrlTextarea has cognitive complexity 49 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 9, ternaries 4 (6 pts), loops 2 (3 pts) (nesting depth added 12). Most of this is not in the body itself: 7 of the 49 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 151, a function literal at line 89, a function literal at line 225, …). 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 · audit-server-runtime.auditInputs (cognitive 48) · ×1
  • audit-server-runtime.auditInputs (cognitive 48) scripts/audit-server-runtime.mjs:69 — audit-server-runtime.auditInputs has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 6 (20 pts), if/else 5 (13 pts), loops 4 (13 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · smoke-server-image.smokeServerImage (cognitive 47) · ×1
  • smoke-server-image.smokeServerImage (cognitive 47) REDACTED:928 — smoke-server-image.smokeServerImage has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (25 pts), boolean chains 11, ternaries 4 (8 pts), loops 2, error handling 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · MagnetTracker.deferCleanup (cognitive 46) · ×1
  • MagnetTracker.deferCleanup (cognitive 46) src/core/torrent/magnet-tracker.ts:1787 — MagnetTracker.deferCleanup has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (30 pts), ternaries 4 (12 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 28). Of this number, 23 points are the body's own statements and 23 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · StaleSchemaError.constructor (cognitive 45) · ×1
  • StaleSchemaError.constructor (cognitive 45) src/core/session/migrations/index.ts:65 — StaleSchemaError.constructor has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 9 (45 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · download-source.analyzeDownloadSource (cognitive 45) · ×1
  • download-source.analyzeDownloadSource (cognitive 45) src/shared/lib/download-source.ts:23 — download-source.analyzeDownloadSource has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 13, ternaries 3 (4 pts), error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app-deep-link.parseAppDeepLink (cognitive 45) · ×1
  • app-deep-link.parseAppDeepLink (cognitive 45) src/shared/lib/app-deep-link.ts:28 — app-deep-link.parseAppDeepLink has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 8 (16 pts), boolean chains 6, error handling 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebSocketBridgeServer.constructor (cognitive 44) · ×1
  • WebSocketBridgeServer.constructor (cognitive 44) src/core/bridge/web-socket-bridge-server.ts:573 — WebSocketBridgeServer.constructor has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 10, ternaries 1 (2 pts), error handling 1 (nesting depth added 8). None of this is in the body itself: all 44 points belong to 5 function literals inside it that branch (lines 711, 633, 795, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · LegacyImportService.scan (cognitive 44) · ×1
  • LegacyImportService.scan (cognitive 44) src/core/legacy-import/import-service.ts:157 — LegacyImportService.scan has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 6 (9 pts), boolean chains 3, error handling 1 (nesting depth added 17). 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 · PluginRegistry.scanInto (cognitive 44) · ×1
  • PluginRegistry.scanInto (cognitive 44) src/core/plugin/plugin-registry.ts:503 — PluginRegistry.scanInto has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 7 (15 pts), boolean chains 6, error handling 2 (3 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CapabilityBridge.dispatchCall (cognitive 44) · ×1
  • CapabilityBridge.dispatchCall (cognitive 44) src/core/plugin/host/capability-bridge.ts:615 — CapabilityBridge.dispatchCall has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 4 (14 pts), boolean chains 6, error handling 1, match/switch 1 (nesting depth added 17). 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 · profile-task-inspector-activity.main (cognitive 42) · ×1
  • profile-task-inspector-activity.main (cognitive 42) scripts/profile-task-inspector-activity.mts:374 — profile-task-inspector-activity.main has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25 (32 pts), boolean chains 6, loops 3, ternaries 1 (nesting depth added 7). Of this number, 41 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · http-cookies.parseSetCookie (cognitive 42) · ×1
  • http-cookies.parseSetCookie (cognitive 42) src/core/plugin/capabilities/http-cookies.ts:85 — http-cookies.parseSetCookie has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (29 pts), ternaries 3 (7 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 17). 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 · quick-js-worker.port.on("message") (cognitive 42) · ×1
  • quick-js-worker.port.on("message") (cognitive 42) src/core/plugin/host/quick-js-worker.ts:242 — quick-js-worker.port.on("message") has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 2, match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OperationFiles.execution · ×1
  • OperationFiles.execution::dispatch (cognitive 41) src/core/plugin/operations/operation-files.ts:394 — OperationFiles.execution::dispatch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · log-redact.redactValue (cognitive 41) · ×1
  • log-redact.redactValue (cognitive 41) src/shared/lib/log-redact.ts:666 — log-redact.redactValue has cognitive complexity 41 (threshold 15). Drivers by points: if/else 26 (28 pts), boolean chains 5, error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · obsidian-docs-lib.validateActivePlanDocuments (cognitive 40) · ×1
  • obsidian-docs-lib.validateActivePlanDocuments (cognitive 40) scripts/obsidian-docs-lib.mjs:738 — obsidian-docs-lib.validateActivePlanDocuments has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 7, ternaries 2 (6 pts), error handling 2 (4 pts), loops 3 (nesting depth added 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.migrate (cognitive 40) · ×1
  • index.migrate (cognitive 40) src/core/session/migrations/index.ts:323 — index.migrate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, ternaries 4 (9 pts), loops 1 (nesting depth added 15). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OperationService.prepare (cognitive 40) · ×1
  • OperationService.prepare (cognitive 40) src/core/plugin/operations/operation-service.ts:210 — OperationService.prepare has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 9, loops 3 (6 pts), error handling 1, ternaries 1 (nesting depth added 12). Of this number, 37 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · downloads-page.DownloadsPage (cognitive 40) · ×1
  • downloads-page.DownloadsPage (cognitive 40) src/renderer/routes/downloads/downloads-page.tsx:112 — downloads-page.DownloadsPage has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17, boolean chains 14, ternaries 7 (9 pts) (nesting depth added 2). Most of this is not in the body itself: 9 of the 40 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 230, 316, 119, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · curl.tokenize (cognitive 40) · ×1
  • curl.tokenize (cognitive 40) src/renderer/components/add-task/url-interpreters/curl.ts:8 — curl.tokenize has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (36 pts), boolean chains 3, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ServerDirectoryService.list (cognitive 40) · ×1
  • ServerDirectoryService.list (cognitive 40) src/server/server-directory-service.ts:260 — ServerDirectoryService.list has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 9, ternaries 5 (7 pts), error handling 3 (5 pts), loops 1 (nesting depth added 14). Of this number, 39 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · profile-task-inspector-activity.seedFixture (cognitive 39) · ×1
  • profile-task-inspector-activity.seedFixture (cognitive 39) scripts/profile-task-inspector-activity.mts:133 — profile-task-inspector-activity.seedFixture has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (33 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 26). None of this is in the body itself: all 39 points belong to one function literal inside it that branches (line 183). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CapabilityBridge.onMessage (cognitive 39) · ×1
  • CapabilityBridge.onMessage (cognitive 39) src/core/plugin/host/capability-bridge.ts:493 — CapabilityBridge.onMessage has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 13). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompletedEngineTaskCleanup.complete (cognitive 39) · ×1
  • CompletedEngineTaskCleanup.complete (cognitive 39) src/core/task/completed-engine-task-cleanup.ts:196 — CompletedEngineTaskCleanup.complete has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 12). Most of this is not in the body itself: 13 of the 39 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 271, 203). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · downloads-more-menu.DownloadsMoreMenu (cognitive 39) · ×1
  • downloads-more-menu.DownloadsMoreMenu (cognitive 39) src/renderer/routes/downloads/downloads-more-menu.tsx:22 — downloads-more-menu.DownloadsMoreMenu has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (23 pts), boolean chains 8, if/else 7, error handling 1 (nesting depth added 15). Of this number, 30 points are the body's own statements and 9 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · directory-picker.DirectoryPicker (cognitive 39) · ×1
  • directory-picker.DirectoryPicker (cognitive 39) src/renderer/components/desktop-kit/directory-picker.tsx:56 — directory-picker.DirectoryPicker has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 28, if/else 20 (24 pts), ternaries 12 (24 pts), error handling 2 (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. This shape REPEATS in the file: one other method here (directory-picker.DirectoryPicker::handlePick) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · obsidian-docs-lib.validatePlanPair (cognitive 38) · ×1
  • obsidian-docs-lib.validatePlanPair (cognitive 38) scripts/obsidian-docs-lib.mjs:268 — obsidian-docs-lib.validatePlanPair has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (31 pts), loops 3 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-update-artifacts.verifyUpdateArtifacts (cognitive 38) · ×1
  • verify-update-artifacts.verifyUpdateArtifacts (cognitive 38) scripts/verify-update-artifacts.mjs:25 — verify-update-artifacts.verifyUpdateArtifacts has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 5 (7 pts), boolean chains 4, error handling 1 (2 pts) (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 · CookieJar.cookieHeader (cognitive 38) · ×1
  • CookieJar.cookieHeader (cognitive 38) src/core/plugin/capabilities/http-cookies.ts:292 — CookieJar.cookieHeader has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1, loops 1 (nesting depth added 17). Of this number, 34 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settings-validation.settingsValidationError (cognitive 38) · ×1
  • settings-validation.settingsValidationError (cognitive 38) src/renderer/lib/settings-validation.ts:22 — settings-validation.settingsValidationError has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 11, ternaries 3 (8 pts) (nesting depth added 11). None of this is in the body itself: all 38 points belong to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plugin-hooks.isBoundedJsonValue (cognitive 38) · ×1
  • plugin-hooks.isBoundedJsonValue (cognitive 38) src/shared/schemas/plugin-hooks.ts:78 — plugin-hooks.isBoundedJsonValue has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · semver.compareSemver (cognitive 38) · ×1
  • semver.compareSemver (cognitive 38) src/shared/semver.ts:28 — semver.compareSemver has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 5 (14 pts), boolean chains 3, loops 2 (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 · activity-calendar-model.selectActivityGeometry (cognitive 37) · ×1
  • activity-calendar-model.selectActivityGeometry (cognitive 37) src/renderer/routes/dashboard/activity/activity-calendar-model.ts:346 — activity-calendar-model.selectActivityGeometry has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (11 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · directory-preferences-section.DirectoryPreferencesSection (cognitive 37) · ×1
  • directory-preferences-section.DirectoryPreferencesSection (cognitive 37) src/renderer/features/directory-preferences/directory-preferences-section.tsx:74 — directory-preferences-section.DirectoryPreferencesSection has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 15, ternaries 7 (11 pts), if/else 8 (10 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 37 points are its own statements and the rest belongs to 5 function items inside it that branch (addFavorite, a function literal at line 104, a function literal at line 160, …). 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 · legacy-fresh-download.LegacyFreshDownload (cognitive 37) · ×1
  • legacy-fresh-download.LegacyFreshDownload (cognitive 37) src/renderer/features/legacy-import/legacy-fresh-download.tsx:28 — legacy-fresh-download.LegacyFreshDownload has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 10, if/else 9 (10 pts), error handling 3 (nesting depth added 5). Most of this is not in the body itself: 10 of the 37 points are its own statements and the rest belongs to 7 function items inside it that branch (cancelActivation, prepare, activate, …). 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 · OperationFiles.pick (cognitive 36) · ×1
  • OperationFiles.pick (cognitive 36) src/core/plugin/operations/operation-files.ts:99 — OperationFiles.pick has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6, ternaries 4, error handling 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-save-directory.restoreTaskSaveDirectory (cognitive 36) · ×1
  • task-save-directory.restoreTaskSaveDirectory (cognitive 36) src/core/task/task-save-directory.ts:8 — task-save-directory.restoreTaskSaveDirectory has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 9, loops 2 (4 pts), ternaries 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackerSyncer.fetch (cognitive 36) · ×1
  • TrackerSyncer.fetch (cognitive 36) src/core/tracker/tracker-syncer.ts:82 — TrackerSyncer.fetch has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 5 (9 pts), boolean chains 5, error handling 1 (2 pts), loops 1 (nesting depth added 17). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to one function literal inside it that branches (line 95). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · task-list-panel.TaskListPanel (cognitive 36) · ×1
  • task-list-panel.TaskListPanel (cognitive 36) src/renderer/routes/downloads/task-list-panel.tsx:38 — task-list-panel.TaskListPanel has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 14, ternaries 4 (nesting depth added 1). Most of this is not in the body itself: 5 of the 36 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 248, 220, 187, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plugin-detail-page.PluginDetailPage (cognitive 36) · ×1
  • plugin-detail-page.PluginDetailPage (cognitive 36) src/renderer/routes/plugins/plugin-detail-page.tsx:63 — plugin-detail-page.PluginDetailPage has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 19, ternaries 8 (9 pts), if/else 5 (8 pts) (nesting depth added 4). Of this number, 31 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app.createApp (cognitive 36) · ×1
  • app.createApp (cognitive 36) REDACTED:125 — app.createApp has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 7, ternaries 5 (7 pts), error handling 2 (nesting depth added 6). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 199, dispatchCommand, a function literal at line 151, …). 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 · verify-container-publication.verifyProvenance (cognitive 35) · ×1
  • verify-container-publication.verifyProvenance (cognitive 35) scripts/verify-container-publication.mjs:200 — verify-container-publication.verifyProvenance has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-flatpak-packaging.verifyFlatpakPackaging (cognitive 35) · ×1
  • verify-flatpak-packaging.verifyFlatpakPackaging (cognitive 35) scripts/verify-flatpak-packaging.mjs:118 — verify-flatpak-packaging.verifyFlatpakPackaging has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 26, loops 8 (9 pts) (nesting depth added 1). Of this number, 32 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · FinalizeCommitter.commitPrepared (cognitive 35) · ×1
  • FinalizeCommitter.commitPrepared (cognitive 35) src/core/plugin/finalize/finalize-committer.ts:262 — FinalizeCommitter.commitPrepared has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 6, ternaries 3 (4 pts), error handling 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quick-js-worker.injectPluginApi (cognitive 35) · ×1
  • quick-js-worker.injectPluginApi (cognitive 35) src/core/plugin/host/quick-js-worker.ts:1536 — quick-js-worker.injectPluginApi has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 9 (12 pts), error handling 4 (5 pts), loops 4, boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 1664, 1593, 1637, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · move-tasks.moveBatch (cognitive 35) · ×1
  • move-tasks.moveBatch (cognitive 35) src/core/task/actions/move-tasks.ts:30 — move-tasks.moveBatch has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (10 pts), boolean chains 7, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 13). Most of this is not in the body itself: 13 of the 35 points are its own statements and the rest belongs to 2 function items inside it that branch (move, a function literal at line 37). 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 · general-dialog.GeneralDialog (cognitive 35) · ×1
  • general-dialog.GeneralDialog (cognitive 35) src/renderer/routes/settings/cards/general-dialog.tsx:52 — general-dialog.GeneralDialog has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 13, ternaries 9 (13 pts), if/else 7 (8 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 35 points are its own statements and the rest belongs to 10 function items inside it that branch (notificationRow, a function literal at line 217, a function literal at line 71, …). 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 · url-editor.UrlEditor (cognitive 35) · ×1
  • url-editor.UrlEditor (cognitive 35) src/renderer/components/add-task/url-editor.tsx:33 — url-editor.UrlEditor has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 8 (12 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 60, 94, 109, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · appimage-artifact.parseAppImageRuntime (cognitive 34) · ×1
  • appimage-artifact.parseAppImageRuntime (cognitive 34) scripts/appimage-artifact.mjs:56 — appimage-artifact.parseAppImageRuntime has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), loops 5, boolean chains 4 (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 · fetch-builtins.downloadBytes (cognitive 34) · ×1
  • fetch-builtins.downloadBytes (cognitive 34) scripts/fetch-builtins.mjs:316 — fetch-builtins.downloadBytes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 17). 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 · stage-electron-app.scanStaticExternals (cognitive 34) · ×1
  • stage-electron-app.scanStaticExternals (cognitive 34) scripts/stage-electron-app.mjs:360 — stage-electron-app.scanStaticExternals has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginRegistry.applyOverlay (cognitive 34) · ×1
  • PluginRegistry.applyOverlay (cognitive 34) src/core/plugin/plugin-registry.ts:639 — PluginRegistry.applyOverlay has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 5 (9 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginInstaller.stage (cognitive 34) · ×1
  • PluginInstaller.stage (cognitive 34) src/core/plugin/install/plugin-installer.ts:249 — PluginInstaller.stage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, error handling 5 (7 pts), ternaries 4 (5 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.
D2 · Cognitive Complexity · finalize-task.finalizeTaskSerialized (cognitive 34) · ×1
  • finalize-task.finalizeTaskSerialized (cognitive 34) src/core/task/actions/finalize-task.ts:195 — finalize-task.finalizeTaskSerialized has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 8, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · command-graph.readSnapshot (cognitive 33) · ×1
  • command-graph.readSnapshot (cognitive 33) src/core/plugin/commands/command-graph.ts:130 — command-graph.readSnapshot has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (23 pts), error handling 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · moext-reader.extractLoadedMoext (cognitive 33) · ×1
  • moext-reader.extractLoadedMoext (cognitive 33) src/core/plugin/install/moext-reader.ts:240 — moext-reader.extractLoadedMoext has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24, boolean chains 6, ternaries 2, error handling 1. Most of this is not in the body itself: 4 of the 33 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 293, 368, 390, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · OperationFiles.cleanup (cognitive 33) · ×1
  • OperationFiles.cleanup (cognitive 33) src/core/plugin/operations/operation-files.ts:680 — OperationFiles.cleanup has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 4 (10 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FinalizeRecovery.recoverReserved (cognitive 33) · ×1
  • FinalizeRecovery.recoverReserved (cognitive 33) src/core/plugin/finalize/finalize-recovery.ts:396 — FinalizeRecovery.recoverReserved has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 7, ternaries 2 (nesting depth added 6). Of this number, 26 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · finalize-task.finalizeBtAfterRename (cognitive 33) · ×1
  • finalize-task.finalizeBtAfterRename (cognitive 33) src/core/task/actions/finalize-task.ts:801 — finalize-task.finalizeBtAfterRename has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 11 (13 pts), error handling 6 (10 pts), boolean chains 5, if/else 4 (5 pts) (nesting depth added 7). Of this number, 31 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · generate-third-party-notices.collectExternalComponents (cognitive 32) · ×1
  • generate-third-party-notices.collectExternalComponents (cognitive 32) scripts/generate-third-party-notices.mjs:314 — generate-third-party-notices.collectExternalComponents has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 4 (8 pts), loops 3 (6 pts), boolean chains 3 (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 · run-remote-extension-release-soak.validateReleasePlaywrightReport · ×1
  • run-remote-extension-release-soak.validateReleasePlaywrightReport::visitSuite (cognitive 32) scripts/run-remote-extension-release-soak.mjs:311 — run-remote-extension-release-soak.validateReleasePlaywrightReport::visitSuite has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (11 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verified-install.download (cognitive 32) · ×1
  • verified-install.download (cognitive 32) src/core/ffmpeg/verified-install.ts:370 — verified-install.download has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-parser.parseLegacySession · ×1
  • session-parser.parseLegacySession::flush (cognitive 32) src/core/legacy-import/session-parser.ts:86 — session-parser.parseLegacySession::flush has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 9, ternaries 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (session-parser.parseLegacySession) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PluginHost.doActivate (cognitive 32) · ×1
  • PluginHost.doActivate (cognitive 32) src/core/plugin/host/plugin-host.ts:458 — PluginHost.doActivate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 6, error handling 2, ternaries 1 (nesting depth added 5). Of this number, 29 points are the body's own statements and 3 belong to 5 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.bootstrapBridge (cognitive 32) · ×1
  • index.bootstrapBridge (cognitive 32) src/main/bridge/index.ts:405 — index.bootstrapBridge has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5 (9 pts), error handling 4 (6 pts), loops 3, boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 948, a function literal at line 562, a function literal at line 840, …). 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 · package-manager.classifyCliInstall (cognitive 32) · ×1
  • package-manager.classifyCliInstall (cognitive 32) src/main/cli/package-manager.ts:164 — package-manager.classifyCliInstall has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 10, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plugin-input-group.PluginInputGroup (cognitive 32) · ×1
  • plugin-input-group.PluginInputGroup (cognitive 32) src/renderer/routes/plugins/components/plugin-input-group.tsx:49 — plugin-input-group.PluginInputGroup has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, if/else 10 (11 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 71, triggerCheck, a function literal at line 92, …). 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 · server-package-utils.validateInputList (cognitive 31) · ×1
  • server-package-utils.validateInputList (cognitive 31) scripts/server-package-utils.mjs:101 — server-package-utils.validateInputList has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HlsDashPipeline.dispatch (cognitive 31) · ×1
  • HlsDashPipeline.dispatch (cognitive 31) src/core/bridge-receiver/pipelines/hls-dash-pipeline.ts:42 — HlsDashPipeline.dispatch has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 8 (18 pts), error handling 4 (7 pts), if/else 4 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsManager.persistUpdate (cognitive 31) · ×1
  • SettingsManager.persistUpdate (cognitive 31) src/core/settings/settings-manager.ts:600 — SettingsManager.persistUpdate has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (24 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EngineSupervisor.diagnose (cognitive 31) · ×1
  • EngineSupervisor.diagnose (cognitive 31) src/core/engine/engine-supervisor.ts:841 — EngineSupervisor.diagnose has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (17 pts), boolean chains 10, error handling 1 (2 pts), if/else 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-inspector-activity.cloneDataOnlyValue (cognitive 31) · ×1
  • task-inspector-activity.cloneDataOnlyValue (cognitive 31) src/shared/schemas/task-inspector-activity.ts:38 — task-inspector-activity.cloneDataOnlyValue has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 7, loops 2 (3 pts), error handling 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 · BridgeReceiver.dispatchAdapted (cognitive 30) · ×1
  • BridgeReceiver.dispatchAdapted (cognitive 30) src/core/bridge-receiver/bridge-receiver.ts:354 — BridgeReceiver.dispatchAdapted has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 5 (14 pts), if/else 8 (13 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FullCrossPluginInvoker.execute (cognitive 30) · ×1
  • FullCrossPluginInvoker.execute (cognitive 30) src/core/plugin/commands/cross-plugin-invoker.ts:114 — FullCrossPluginInvoker.execute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (18 pts), error handling 4 (5 pts), ternaries 2 (5 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 · desktop-import.prepareFreshDownload (cognitive 30) · ×1
  • desktop-import.prepareFreshDownload (cognitive 30) src/main/legacy-import/desktop-import.ts:323 — desktop-import.prepareFreshDownload has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 6, ternaries 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 · activity-chart-model.buildActivityChartModel (cognitive 30) · ×1
  • activity-chart-model.buildActivityChartModel (cognitive 30) src/renderer/routes/downloads/inspector/activity-chart-model.ts:135 — activity-chart-model.buildActivityChartModel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 6 (9 pts), boolean chains 5, ternaries 4 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · marquee-overlay.MarqueeOverlay (cognitive 30) · ×1
  • marquee-overlay.MarqueeOverlay (cognitive 30) src/renderer/components/desktop-kit/marquee-selection/marquee-overlay.tsx:21 — marquee-overlay.MarqueeOverlay has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (21 pts), boolean chains 8, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 30 points belong to 11 function literals inside it that branch (lines 133, 164, 78, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · bootstrap.bootstrapBridgeForServer (cognitive 29) · ×1
  • bootstrap.bootstrapBridgeForServer (cognitive 29) src/server/bridge/bootstrap.ts:136 — bootstrap.bootstrapBridgeForServer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 6 (7 pts), boolean chains 6, error handling 1, loops 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · assemble-release-artifacts.assembleReleaseArtifacts (cognitive 29) · ×1
  • assemble-release-artifacts.assembleReleaseArtifacts (cognitive 29) scripts/assemble-release-artifacts.mjs:130 — assemble-release-artifacts.assembleReleaseArtifacts has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 9 (13 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aria2-tuning.recommendFileAllocation (cognitive 29) · ×1
  • aria2-tuning.recommendFileAllocation (cognitive 29) src/core/engine/aria2/aria2-tuning.ts:49 — aria2-tuning.recommendFileAllocation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6 (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 · chain-merge.mergeChain (cognitive 29) · ×1
  • chain-merge.mergeChain (cognitive 29) src/core/plugin/hooks/chain-merge.ts:23 — chain-merge.mergeChain has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 16). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · desktop-import.registerLegacyImportIpc (cognitive 29) · ×1
  • desktop-import.registerLegacyImportIpc (cognitive 29) src/main/legacy-import/desktop-import.ts:93 — desktop-import.registerLegacyImportIpc has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12, boolean chains 8, ternaries 4 (6 pts), loops 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 14 function items inside it that branch (a function literal at line 227, a function literal at line 277, a function literal at line 123, …). 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 · stage-electron-app.stageElectronApp (cognitive 28) · ×1
  • stage-electron-app.stageElectronApp (cognitive 28) scripts/stage-electron-app.mjs:498 — stage-electron-app.stageElectronApp has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 8 (10 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridge-data-dir-lock.createOwnedFile (cognitive 28) · ×1
  • bridge-data-dir-lock.createOwnedFile (cognitive 28) src/core/bridge/bridge-data-dir-lock.ts:525 — bridge-data-dir-lock.createOwnedFile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 5 (9 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfmpegService.run (cognitive 28) · ×1
  • FfmpegService.run (cognitive 28) src/core/ffmpeg/ffmpeg-service.ts:81 — FfmpegService.run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 5). None of this is in the body itself: all 28 points belong to 4 function items inside it that branch (a function literal at line 130, acceptLine, a function literal at line 158, …). 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 · PluginInstaller.commit (cognitive 28) · ×1
  • PluginInstaller.commit (cognitive 28) src/core/plugin/install/plugin-installer.ts:468 — PluginInstaller.commit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 483, 639). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · finalize-journal-repository.validateIntents (cognitive 28) · ×1
  • finalize-journal-repository.validateIntents (cognitive 28) src/core/session/finalize-journal-repository.ts:442 — finalize-journal-repository.validateIntents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 9, ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DirectResourceValidatorService.requestFollowingRedirects (cognitive 28) · ×1
  • DirectResourceValidatorService.requestFollowingRedirects (cognitive 28) src/core/task/direct-resource-validator.ts:652 — DirectResourceValidatorService.requestFollowingRedirects has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 3 (8 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ffmpeg-fetch-electron.fetchFfmpegAsset (cognitive 28) · ×1
  • ffmpeg-fetch-electron.fetchFfmpegAsset (cognitive 28) src/main/plugin/ffmpeg-fetch-electron.ts:10 — ffmpeg-fetch-electron.fetchFfmpegAsset has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 6, error handling 3 (4 pts), ternaries 1 (3 pts), loops 2 (nesting depth added 4). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 83, 22, 41, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tracker-sync-details.TrackerSyncDetails (cognitive 28) · ×1
  • tracker-sync-details.TrackerSyncDetails (cognitive 28) src/renderer/routes/trackers/components/tracker-sync-details.tsx:35 — tracker-sync-details.TrackerSyncDetails has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 12, error handling 1, if/else 1 (nesting depth added 4). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 70, a function literal at line 196, a function literal at line 55, …). 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 · use-pending-magnet-selection.usePendingMagnetSelection (cognitive 28) · ×1
  • use-pending-magnet-selection.usePendingMagnetSelection (cognitive 28) src/renderer/components/add-task-dialog/use-pending-magnet-selection.ts:12 — use-pending-magnet-selection.usePendingMagnetSelection has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 10, ternaries 3 (nesting depth added 1). None of this is in the body itself: all 28 points belong to 10 function literals inside it that branch (lines 61, 28, 50, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · import-task-selection.ImportTaskSelection (cognitive 28) · ×1
  • import-task-selection.ImportTaskSelection (cognitive 28) src/renderer/features/legacy-import/import-task-selection.tsx:47 — import-task-selection.ImportTaskSelection has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (9 pts), ternaries 4 (6 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (renderRow, a function literal at line 74, a function literal at line 150, …). 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 · operator-auth.registerOperatorAuth (cognitive 28) · ×1
  • operator-auth.registerOperatorAuth (cognitive 28) REDACTED:190 — operator-auth.registerOperatorAuth has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 6, error handling 1 (3 pts), ternaries 2 (nesting depth added 7). None of this is in the body itself: all 28 points belong to 4 function literals inside it that branch (lines 227, 281, 312, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · stage-server-app.stageServerApp (cognitive 27) · ×1
  • stage-server-app.stageServerApp (cognitive 27) scripts/stage-server-app.mjs:395 — stage-server-app.stageServerApp has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 8 (10 pts), boolean chains 1, error handling 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-parser.validateLegacyBencode · ×1
  • session-parser.validateLegacyBencode::visit (cognitive 27) src/core/legacy-import/session-parser.ts:195 — session-parser.validateLegacyBencode::visit has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostDeliveryScheduler.runBatch (cognitive 27) · ×1
  • PostDeliveryScheduler.runBatch (cognitive 27) src/core/plugin/post/delivery-scheduler.ts:150 — PostDeliveryScheduler.runBatch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionManager.mergeTaskFromPair (cognitive 27) · ×1
  • SessionManager.mergeTaskFromPair (cognitive 27) src/core/session/session-manager.ts:1306 — SessionManager.mergeTaskFromPair has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, ternaries 6 (8 pts), if/else 4 (5 pts) (nesting depth added 3). Of this number, 22 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MagnetTracker.submitUnderAdmission (cognitive 27) · ×1
  • MagnetTracker.submitUnderAdmission (cognitive 27) src/core/torrent/magnet-tracker.ts:434 — MagnetTracker.submitUnderAdmission has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (21 pts), error handling 3, boolean chains 2, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · TrackerManager.performSyncAndCurate (cognitive 27) · ×1
  • TrackerManager.performSyncAndCurate (cognitive 27) src/core/tracker/tracker-manager.ts:301 — TrackerManager.performSyncAndCurate has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, ternaries 9 (10 pts), if/else 4 (5 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (fetchKind, a function literal at line 325, a function literal at line 439, …). 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 · AppImageNativeHost.install (cognitive 27) · ×1
  • AppImageNativeHost.install (cognitive 27) src/main/bridge/appimage-native-host.ts:282 — AppImageNativeHost.install has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (4 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · appimage-integration.installSelfIntegration (cognitive 27) · ×1
  • appimage-integration.installSelfIntegration (cognitive 27) src/main/platform/appimage-integration.ts:749 — appimage-integration.installSelfIntegration has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 7, ternaries 3, error handling 2 (nesting depth added 2). Of this number, 23 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · task-actions-menu.TaskActionsMenu (cognitive 27) · ×1
  • task-actions-menu.TaskActionsMenu (cognitive 27) src/renderer/routes/downloads/task-actions-menu.tsx:98 — task-actions-menu.TaskActionsMenu has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 34, if/else 22 (26 pts), ternaries 8 (12 pts), error handling 1, loops 1 (nesting depth added 8). 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. This shape REPEATS in the file: one other method here (task-actions-menu.TaskActionsMenu::handleShortcut) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · advanced-panel.DenseField (cognitive 27) · ×1
  • advanced-panel.DenseField (cognitive 27) src/renderer/components/add-task/advanced-panel.tsx:288 — advanced-panel.DenseField has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (20 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 15). None of this is in the body itself: all 27 points belong to 2 function literals inside it that branch (lines 307, 349). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · remote-extension-admission-policy.parseForwarded (cognitive 26) · ×1
  • remote-extension-admission-policy.parseForwarded (cognitive 26) src/server/bridge/remote-extension-admission-policy.ts:304 — remote-extension-admission-policy.parseForwarded has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server-package-utils.tokenizeJavaScript (cognitive 26) · ×1
  • server-package-utils.tokenizeJavaScript (cognitive 26) scripts/server-package-utils.mjs:398 — server-package-utils.tokenizeJavaScript has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TaskInspectorActivityService.recordSample (cognitive 26) · ×1
  • TaskInspectorActivityService.recordSample (cognitive 26) src/core/inspector-activity/task-inspector-activity-service.ts:305 — TaskInspectorActivityService.recordSample has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, ternaries 3 (4 pts), loops 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 · render-installer-images.decodePng (cognitive 26) · ×1
  • render-installer-images.decodePng (cognitive 26) scripts/render-installer-images.mjs:49 — render-installer-images.decodePng has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (7 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aria2-legacy-http.requestMatches (cognitive 26) · ×1
  • aria2-legacy-http.requestMatches (cognitive 26) src/core/engine/aria2/aria2-legacy-http.ts:88 — aria2-legacy-http.requestMatches has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, loops 2, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verified-install.extractVerifiedFfmpeg (cognitive 26) · ×1
  • verified-install.extractVerifiedFfmpeg (cognitive 26) src/core/ffmpeg/verified-install.ts:451 — verified-install.extractVerifiedFfmpeg has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 12, loops 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 550, 525, 501, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · fs-sandbox.resolveDeepInsideSandbox (cognitive 26) · ×1
  • fs-sandbox.resolveDeepInsideSandbox (cognitive 26) src/core/plugin/capabilities/fs-sandbox.ts:64 — fs-sandbox.resolveDeepInsideSandbox has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 4 (6 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · re-add-task.buildDirectReAddParams (cognitive 26) · ×1
  • re-add-task.buildDirectReAddParams (cognitive 26) src/core/task/actions/re-add-task.ts:208 — re-add-task.buildDirectReAddParams has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 6 (7 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 · TaskRecoveryServiceImpl.recover (cognitive 26) · ×1
  • TaskRecoveryServiceImpl.recover (cognitive 26) src/core/task/task-recovery-service.ts:192 — TaskRecoveryServiceImpl.recover has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, loops 4 (5 pts), ternaries 3 (5 pts), error handling 2 (4 pts) (nesting depth added 8). Of this number, 15 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.startEngineAndRestore (cognitive 26) · ×1
  • index.startEngineAndRestore (cognitive 26) src/main/index.ts:1256 — index.startEngineAndRestore has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 4, error handling 4, loops 1 (nesting depth added 2). Of this number, 15 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · advanced-dialog.AdvancedDialog (cognitive 26) · ×1
  • advanced-dialog.AdvancedDialog (cognitive 26) src/renderer/routes/settings/cards/advanced-dialog.tsx:82 — advanced-dialog.AdvancedDialog has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), ternaries 4 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 167, 348, 369, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · appearance-dialog.AppearanceDialog (cognitive 26) · ×1
  • appearance-dialog.AppearanceDialog (cognitive 26) src/renderer/routes/settings/cards/appearance-dialog.tsx:94 — appearance-dialog.AppearanceDialog has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 11, ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 210, 131, 106, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · bit-torrent-dialog.BitTorrentDialog (cognitive 26) · ×1
  • bit-torrent-dialog.BitTorrentDialog (cognitive 26) src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:87 — bit-torrent-dialog.BitTorrentDialog has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10, boolean chains 8, if/else 7 (8 pts) (nesting depth added 1). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 150, 97, 135, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · system-protocols-section.SystemProtocolsSection (cognitive 26) · ×1
  • system-protocols-section.SystemProtocolsSection (cognitive 26) src/renderer/routes/settings/cards/integration/system-protocols-section.tsx:62 — system-protocols-section.SystemProtocolsSection has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 21, if/else 14 (16 pts), ternaries 7 (12 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (system-protocols-section.SystemProtocolsSection::handleOpenSystemSettings) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · motrix-menu-button.ElectronMotrixMenuButton (cognitive 26) · ×1
  • motrix-menu-button.ElectronMotrixMenuButton (cognitive 26) src/renderer/components/window-chrome/motrix-menu-button.tsx:230 — motrix-menu-button.ElectronMotrixMenuButton has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15, boolean chains 7, ternaries 4. Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 325, a function literal at line 309, a function literal at line 239, …). 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 · log-redact.headerNames (cognitive 26) · ×1
  • log-redact.headerNames (cognitive 26) src/shared/lib/log-redact.ts:379 — log-redact.headerNames has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (6 pts), error handling 2 (5 pts), loops 1 (nesting depth added 13). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · log-redact.redactError (cognitive 26) · ×1
  • log-redact.redactError (cognitive 26) src/shared/lib/log-redact.ts:428 — log-redact.redactError has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 6 (8 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BootstrapIPCCodec.validateResponse (cognitive 26) · ×1
  • BootstrapIPCCodec.validateResponse (cognitive 26) packages/safari-bootstrap/Sources/SafariNativeIPC/BootstrapIPCCodec.swift:31 — BootstrapIPCCodec.validateResponse has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 19, if/else 5 (7 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · server-package-utils.scanStaticModuleSpecifiers (cognitive 25) · ×1
  • server-package-utils.scanStaticModuleSpecifiers (cognitive 25) scripts/server-package-utils.mjs:445 — server-package-utils.scanStaticModuleSpecifiers has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetch-builtins.parseLock (cognitive 25) · ×1
  • fetch-builtins.parseLock (cognitive 25) scripts/fetch-builtins.mjs:82 — fetch-builtins.parseLock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · profile-task-inspector-activity.timelineFixture (cognitive 25) · ×1
  • profile-task-inspector-activity.timelineFixture (cognitive 25) scripts/profile-task-inspector-activity.mts:277 — profile-task-inspector-activity.timelineFixture has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 12 (24 pts), boolean chains 1 (nesting depth added 12). None of this is in the body itself: all 25 points belong to one function literal inside it that branches (line 280). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · release-snap-build-set.releaseSnapBuildSet (cognitive 25) · ×1
  • release-snap-build-set.releaseSnapBuildSet (cognitive 25) scripts/release-snap-build-set.mjs:162 — release-snap-build-set.releaseSnapBuildSet has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3 (6 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registry-fetcher.fetchVerifiedPackageBytes (cognitive 25) · ×1
  • registry-fetcher.fetchVerifiedPackageBytes (cognitive 25) src/core/plugin/registry/registry-fetcher.ts:49 — registry-fetcher.fetchVerifiedPackageBytes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, ternaries 1 (3 pts), error handling 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MagnetTracker.retryMetadataUnderMutation (cognitive 25) · ×1
  • MagnetTracker.retryMetadataUnderMutation (cognitive 25) src/core/torrent/magnet-tracker.ts:733 — MagnetTracker.retryMetadataUnderMutation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, error handling 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MotrixNatManager.checkDiagnostics (cognitive 25) · ×1
  • MotrixNatManager.checkDiagnostics (cognitive 25) src/main/nat/motrix-nat-manager.ts:45 — MotrixNatManager.checkDiagnostics has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plugin-diagnostics-page.PluginDiagnosticsPage (cognitive 25) · ×1
  • plugin-diagnostics-page.PluginDiagnosticsPage (cognitive 25) src/renderer/routes/plugins/plugin-diagnostics-page.tsx:118 — plugin-diagnostics-page.PluginDiagnosticsPage has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 9, ternaries 4. Of this number, 20 points are the body's own statements and 5 belong to 4 function literals inside it that branch. 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 · use-directory-preferences-draft.useRevisionedDirectoryDraft.save (cognitive 25) · ×1
  • use-directory-preferences-draft.useRevisionedDirectoryDraft.save (cognitive 25) src/renderer/features/directory-preferences/use-directory-preferences-draft.ts:237 — use-directory-preferences-draft.useRevisionedDirectoryDraft.save has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · json-schema-to-zod.jsonSchemaToZod (cognitive 25) · ×1
  • json-schema-to-zod.jsonSchemaToZod (cognitive 25) REDACTED:28 — json-schema-to-zod.jsonSchemaToZod has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · native-binary-target.detectMach (cognitive 24) · ×1
  • native-binary-target.detectMach (cognitive 24) scripts/native-binary-target.mjs:29 — native-binary-target.detectMach has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 5 (6 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-remote-extension-threat-evidence.validateThreatEvidenceManifest (cognitive 24) · ×1
  • verify-remote-extension-threat-evidence.validateThreatEvidenceManifest (cognitive 24) scripts/verify-remote-extension-threat-evidence.mjs:34 — verify-remote-extension-threat-evidence.validateThreatEvidenceManifest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegacyBtActivationService.prepare (cognitive 24) · ×1
  • LegacyBtActivationService.prepare (cognitive 24) src/core/legacy-import/bt-activation-service.ts:221 — LegacyBtActivationService.prepare has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8, loops 1 (nesting depth added 4). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MagnetTracker.doCleanupCacheEntry (cognitive 24) · ×1
  • MagnetTracker.doCleanupCacheEntry (cognitive 24) src/core/torrent/magnet-tracker.ts:1701 — MagnetTracker.doCleanupCacheEntry has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · TaskRecoveryServiceImpl.applyAction (cognitive 24) · ×1
  • TaskRecoveryServiceImpl.applyAction (cognitive 24) src/core/task/task-recovery-service.ts:429 — TaskRecoveryServiceImpl.applyAction has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TrackerProber.probe (cognitive 24) · ×1
  • TrackerProber.probe (cognitive 24) src/core/tracker/tracker-prober.ts:23 — TrackerProber.probe has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 2 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 42, 27). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · linux-default-apps.resolveInstalledDesktopIds (cognitive 24) · ×1
  • linux-default-apps.resolveInstalledDesktopIds (cognitive 24) src/main/platform/linux-default-apps.ts:154 — linux-default-apps.resolveInstalledDesktopIds has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compact-limit-input.CompactLimitInput (cognitive 24) · ×1
  • compact-limit-input.CompactLimitInput (cognitive 24) src/renderer/routes/settings/cards/compact-limit-input.tsx:45 — compact-limit-input.CompactLimitInput has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 14 (16 pts), boolean chains 6, if/else 2 (nesting depth added 2). Of this number, 14 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · network-dialog.NetworkDialog (cognitive 24) · ×1
  • network-dialog.NetworkDialog (cognitive 24) src/renderer/routes/settings/cards/network-dialog.tsx:96 — network-dialog.NetworkDialog has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 14, if/else 9 (10 pts) (nesting depth added 1). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 135, 163, 121, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · toolbar-search.ToolbarSearch (cognitive 24) · ×1
  • toolbar-search.ToolbarSearch (cognitive 24) src/renderer/components/desktop-kit/toolbar/toolbar-search.tsx:40 — toolbar-search.ToolbarSearch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 4 (6 pts) (nesting depth added 4). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 136, a function literal at line 88, collapseIfIdle, …). 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 · DirectoryPickerController.start (cognitive 24) · ×1
  • DirectoryPickerController.start (cognitive 24) src/renderer/features/web-directory-picker/directory-picker-controller.ts:226 — DirectoryPickerController.start has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · release-signing-input.inventory · ×1
  • release-signing-input.inventory::visit (cognitive 23) scripts/release-signing-input.mjs:392 — release-signing-input.inventory::visit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · credential-store.reconcile (cognitive 23) · ×1
  • credential-store.reconcile (cognitive 23) src/core/bridge/credential-store.ts:1027 — credential-store.reconcile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebSocketBridgeServer.resolveExtensionMbp1Route (cognitive 23) · ×1
  • WebSocketBridgeServer.resolveExtensionMbp1Route (cognitive 23) src/core/bridge/web-socket-bridge-server.ts:940 — WebSocketBridgeServer.resolveExtensionMbp1Route has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 5, boolean chains 3, error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · finalize-removal-safety.selectRemovalSurvivor (cognitive 23) · ×1
  • finalize-removal-safety.selectRemovalSurvivor (cognitive 23) src/core/plugin/finalize/finalize-removal-safety.ts:23 — finalize-removal-safety.selectRemovalSurvivor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 3 (4 pts), loops 1 (nesting depth added 6). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · system-proxy.parseElectronProxyChain (cognitive 23) · ×1
  • system-proxy.parseElectronProxyChain (cognitive 23) REDACTED:15 — system-proxy.parseElectronProxyChain has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (9 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DirectResourceValidatorService.verifyLegacyContent · ×1
  • DirectResourceValidatorService.verifyLegacyContent::verifyRange (cognitive 23) src/core/task/direct-resource-validator.ts:516 — DirectResourceValidatorService.verifyLegacyContent::verifyRange has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 pts), boolean chains 3, ternaries 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 · appimage-integration.parseExecValue (cognitive 23) · ×1
  • appimage-integration.parseExecValue (cognitive 23) src/main/platform/appimage-integration.ts:238 — appimage-integration.parseExecValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 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 · overview-tab.OverviewTab (cognitive 23) · ×1
  • overview-tab.OverviewTab (cognitive 23) src/renderer/routes/downloads/inspector/overview-tab.tsx:121 — overview-tab.OverviewTab has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 10 (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 · notifications-page.NotificationsPage (cognitive 23) · ×1
  • notifications-page.NotificationsPage (cognitive 23) src/renderer/routes/notifications/notifications-page.tsx:163 — notifications-page.NotificationsPage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10, error handling 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 212, runAction, a function literal at line 284, …). 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 · builtin-update-dialog.BuiltinUpdateDialog (cognitive 23) · ×1
  • builtin-update-dialog.BuiltinUpdateDialog (cognitive 23) src/renderer/routes/plugins/components/builtin-update-dialog.tsx:32 — builtin-update-dialog.BuiltinUpdateDialog has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7, ternaries 4 (7 pts), boolean chains 6, error handling 2 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (cancel, a function literal at line 49, confirm, …). 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 · appimage-integration-section.AppImageIntegrationSection (cognitive 23) · ×1
  • appimage-integration-section.AppImageIntegrationSection (cognitive 23) src/renderer/routes/settings/cards/integration/appimage-integration-section.tsx:31 — appimage-integration-section.AppImageIntegrationSection has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (7 pts), if/else 3, error handling 1 (nesting depth added 3). Of this number, 19 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · motrix-menu-button.MenuTree (cognitive 23) · ×1
  • motrix-menu-button.MenuTree (cognitive 23) src/renderer/components/window-chrome/motrix-menu-button.tsx:129 — motrix-menu-button.MenuTree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · directory-preferences-dialog.OpenDirectoryPreferencesDialog (cognitive 23) · ×1
  • directory-preferences-dialog.OpenDirectoryPreferencesDialog (cognitive 23) src/renderer/features/directory-preferences/directory-preferences-dialog.tsx:36 — directory-preferences-dialog.OpenDirectoryPreferencesDialog has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 10. Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (keyDown, save, a function literal at line 73, …). 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 · ServerDirectoryService.locations (cognitive 23) · ×1
  • ServerDirectoryService.locations (cognitive 23) src/server/server-directory-service.ts:120 — ServerDirectoryService.locations has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), boolean chains 2, error handling 2 (nesting depth added 9). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · package-flatpak-companion.parseArgs (cognitive 22) · ×1
  • package-flatpak-companion.parseArgs (cognitive 22) packages/native-host/package-flatpak-companion.mjs:39 — package-flatpak-companion.parseArgs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridge-data-dir-lock.recoverExistingLock (cognitive 22) · ×1
  • bridge-data-dir-lock.recoverExistingLock (cognitive 22) src/core/bridge/bridge-data-dir-lock.ts:308 — bridge-data-dir-lock.recoverExistingLock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 4 (9 pts), ternaries 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginRegistry.setHostLanguageTransaction (cognitive 22) · ×1
  • PluginRegistry.setHostLanguageTransaction (cognitive 22) src/core/plugin/plugin-registry.ts:444 — PluginRegistry.setHostLanguageTransaction has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (5 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FinalizeRecovery.restorePrepared (cognitive 22) · ×1
  • FinalizeRecovery.restorePrepared (cognitive 22) src/core/plugin/finalize/finalize-recovery.ts:673 — FinalizeRecovery.restorePrepared has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5 (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 · DurableFinalizeRuntime.commit (cognitive 22) · ×1
  • DurableFinalizeRuntime.commit (cognitive 22) src/core/session/durable-finalize-runtime.ts:61 — DurableFinalizeRuntime.commit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 3 (4 pts), error handling 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 161, 166). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · command-runner.createCommandRunner (cognitive 22) · ×1
  • command-runner.createCommandRunner (cognitive 22) src/main/cli/command-runner.ts:112 — command-runner.createCommandRunner has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 8, error handling 4 (6 pts) (nesting depth added 2). None of this is in the body itself: all 22 points belong to 8 function literals inside it that branch (lines 180, 199, 125, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ffmpeg-macos-trust.verifyMacFfmpegTrust (cognitive 22) · ×1
  • ffmpeg-macos-trust.verifyMacFfmpegTrust (cognitive 22) src/main/plugin/ffmpeg-macos-trust.ts:11 — ffmpeg-macos-trust.verifyMacFfmpegTrust has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-actions-menu.TaskActionsMenu · ×1
  • task-actions-menu.TaskActionsMenu::handleShortcut (cognitive 22) src/renderer/routes/downloads/task-actions-menu.tsx:216 — task-actions-menu.TaskActionsMenu::handleShortcut has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 3 (6 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (task-actions-menu.TaskActionsMenu) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · task-inspector-drawer.TaskInspectorDrawer (cognitive 22) · ×1
  • task-inspector-drawer.TaskInspectorDrawer (cognitive 22) src/renderer/routes/downloads/task-inspector-drawer.tsx:62 — task-inspector-drawer.TaskInspectorDrawer has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, ternaries 4 (5 pts), if/else 1 (nesting depth added 1). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · bt-peer-geo-section.BtPeerGeoSection (cognitive 22) · ×1
  • bt-peer-geo-section.BtPeerGeoSection (cognitive 22) src/renderer/routes/settings/cards/bt-peer-geo-section.tsx:42 — bt-peer-geo-section.BtPeerGeoSection has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (6 pts), if/else 4 (5 pts), error handling 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · inspector-drawer.InspectorDrawer (cognitive 22) · ×1
  • inspector-drawer.InspectorDrawer (cognitive 22) src/renderer/components/desktop-kit/inspector-drawer.tsx:29 — inspector-drawer.InspectorDrawer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 4, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 87, a function literal at line 169, selectHeight, …). 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 · chart.ChartTooltipContent (cognitive 22) · ×1
  • chart.ChartTooltipContent (cognitive 22) REDACTED:116 — chart.ChartTooltipContent has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (9 pts), if/else 4 (nesting depth added 3). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 199, 146). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · server-process-ownership-authority.readExactBinding (cognitive 22) · ×1
  • server-process-ownership-authority.readExactBinding (cognitive 22) src/server/bridge/server-process-ownership-authority.ts:102 — server-process-ownership-authority.readExactBinding has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 6, boolean chains 2 (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 · check-i18n.buildLogicalFamilies (cognitive 21) · ×1
  • check-i18n.buildLogicalFamilies (cognitive 21) scripts/check-i18n.mjs:101 — check-i18n.buildLogicalFamilies has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-i18n.compareFamilyShapesAndPlaceholders (cognitive 21) · ×1
  • check-i18n.compareFamilyShapesAndPlaceholders (cognitive 21) scripts/check-i18n.mjs:239 — check-i18n.compareFamilyShapesAndPlaceholders has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-i18n.checkI18n (cognitive 21) · ×1
  • check-i18n.checkI18n (cognitive 21) scripts/check-i18n.mjs:285 — check-i18n.checkI18n has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 2 (3 pts), loops 3, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validators.validateHistoryEventInput (cognitive 21) · ×1
  • validators.validateHistoryEventInput (cognitive 21) src/core/inspector-activity/validators.ts:159 — validators.validateHistoryEventInput has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-snap-store-channel.readStoreChannelSnapshot (cognitive 21) · ×1
  • verify-snap-store-channel.readStoreChannelSnapshot (cognitive 21) scripts/verify-snap-store-channel.mjs:79 — verify-snap-store-channel.readStoreChannelSnapshot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-container-publication.verifyIndex (cognitive 21) · ×1
  • verify-container-publication.verifyIndex (cognitive 21) scripts/verify-container-publication.mjs:64 — verify-container-publication.verifyIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Aria2Adapter.removeDownloadResults (cognitive 21) · ×1
  • Aria2Adapter.removeDownloadResults (cognitive 21) src/core/engine/aria2/aria2-adapter.ts:1129 — Aria2Adapter.removeDownloadResults has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (9 pts), ternaries 2 (6 pts), boolean chains 2, error handling 1 (2 pts), if/else 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FfmpegCapabilityHost.run (cognitive 21) · ×1
  • FfmpegCapabilityHost.run (cognitive 21) src/core/plugin/capabilities/ffmpeg.ts:299 — FfmpegCapabilityHost.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, error handling 2, ternaries 2, loops 1 (nesting depth added 2). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (abort, a function literal at line 411, a function literal at line 441, …). 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 · CapabilityBridge.dispatchFfmpeg (cognitive 21) · ×1
  • CapabilityBridge.dispatchFfmpeg (cognitive 21) src/core/plugin/host/capability-bridge.ts:1440 — CapabilityBridge.dispatchFfmpeg has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 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.
D2 · Cognitive Complexity · session-manager.resolveCurrentAria2Rows (cognitive 21) · ×1
  • session-manager.resolveCurrentAria2Rows (cognitive 21) src/core/session/session-manager.ts:126 — session-manager.resolveCurrentAria2Rows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · finalize-task.finalizeBt (cognitive 21) · ×1
  • finalize-task.finalizeBt (cognitive 21) src/core/task/actions/finalize-task.ts:586 — finalize-task.finalizeBt has cognitive complexity 21 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 7, boolean chains 3 (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 · finalize-task.finalizeBtInPlace (cognitive 21) · ×1
  • finalize-task.finalizeBtInPlace (cognitive 21) src/core/task/actions/finalize-task.ts:1056 — finalize-task.finalizeBtInPlace has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (8 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · create-task-handler.handleCreateTaskUnderAdmission · ×1
  • create-task-handler.handleCreateTaskUnderAdmission::createReservedTask (cognitive 21) src/core/task/create-task-handler.ts:1100 — create-task-handler.handleCreateTaskUnderAdmission::createReservedTask has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 4 (6 pts), boolean chains 3 (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. This shape REPEATS in the file: one other method here (create-task-handler.handleCreateTaskUnderAdmission) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · index.makeResolveToMux (cognitive 21) · ×1
  • index.makeResolveToMux (cognitive 21) src/main/bridge/index.ts:121 — index.makeResolveToMux has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). None of this is in the body itself: all 21 points belong to 3 function literals inside it that branch (lines 134, 144, 138). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CliToolService.#probe (cognitive 21) · ×1
  • CliToolService.#probe (cognitive 21) REDACTED:362 — CliToolService.#probe has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 7, if/else 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · commands.registerCommandHandlers (cognitive 21) · ×1
  • commands.registerCommandHandlers (cognitive 21) src/main/ipc/commands.ts:1941 — commands.registerCommandHandlers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (4 pts), error handling 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 6). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 2009, invoke, a function literal at line 1981, …). 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 · ffmpeg-probe-electron.makeElectronFfmpegProbe (cognitive 21) · ×1
  • ffmpeg-probe-electron.makeElectronFfmpegProbe (cognitive 21) src/main/plugin/ffmpeg-probe-electron.ts:67 — ffmpeg-probe-electron.makeElectronFfmpegProbe has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8, boolean chains 5, error handling 4 (5 pts), ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 77). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tile-segmented-control.ForwardedTileSegmentedControl (cognitive 21) · ×1
  • tile-segmented-control.ForwardedTileSegmentedControl (cognitive 21) src/renderer/routes/dashboard/components/tile-segmented-control.tsx:35 — tile-segmented-control.ForwardedTileSegmentedControl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 4, loops 1, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (adjacentEnabledValue, requestValueChange, a function literal at line 136, …). 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 · integration-dialog.IntegrationDialog (cognitive 21) · ×1
  • integration-dialog.IntegrationDialog (cognitive 21) src/renderer/routes/settings/cards/integration/integration-dialog.tsx:58 — integration-dialog.IntegrationDialog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9, ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 85, 72, 124). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · import-run-content.ImportRunResult (cognitive 21) · ×1
  • import-run-content.ImportRunResult (cognitive 21) src/renderer/features/legacy-import/import-run-content.tsx:122 — import-run-content.ImportRunResult has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 7 (nesting depth added 7). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-task-speed-history.useTaskSpeedHistory (cognitive 21) · ×1
  • use-task-speed-history.useTaskSpeedHistory (cognitive 21) src/renderer/hooks/use-task-speed-history.ts:42 — use-task-speed-history.useTaskSpeedHistory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, loops 2, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 97, 61, 120, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-transfer-stats.useTransferStats (cognitive 21) · ×1
  • use-transfer-stats.useTransferStats (cognitive 21) src/renderer/hooks/use-transfer-stats.ts:58 — use-transfer-stats.useTransferStats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). None of this is in the body itself: all 21 points belong to 9 function literals inside it that branch (lines 75, 192, 145, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · operator-admin.listPendingRequests (cognitive 21) · ×1
  • operator-admin.listPendingRequests (cognitive 21) src/server/operator-admin.ts:522 — operator-admin.listPendingRequests has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · log-redact.redactExtraEngineOptions (cognitive 21) · ×1
  • log-redact.redactExtraEngineOptions (cognitive 21) src/shared/lib/log-redact.ts:540 — log-redact.redactExtraEngineOptions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (6 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · log-redact.limitVerboseError (cognitive 21) · ×1
  • log-redact.limitVerboseError (cognitive 21) src/shared/lib/log-redact.ts:757 — log-redact.limitVerboseError has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 6 (8 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · log-redact.limitVerboseValue (cognitive 21) · ×1
  • log-redact.limitVerboseValue (cognitive 21) src/shared/lib/log-redact.ts:910 — log-redact.limitVerboseValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, error handling 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · remote-extension-config.parsePublicUrl (cognitive 20) · ×1
  • remote-extension-config.parsePublicUrl (cognitive 20) src/server/bridge/remote-extension-config.ts:185 — remote-extension-config.parsePublicUrl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 2, error handling 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 · container-platform-metadata.inspectPlatformIndex (cognitive 20) · ×1
  • container-platform-metadata.inspectPlatformIndex (cognitive 20) scripts/container-platform-metadata.mjs:171 — container-platform-metadata.inspectPlatformIndex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · container-publication-state.inspectedImage (cognitive 20) · ×1
  • container-publication-state.inspectedImage (cognitive 20) scripts/container-publication-state.mjs:15 — container-publication-state.inspectedImage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · obsidian-docs-lib.selectPlanDocuments (cognitive 20) · ×1
  • obsidian-docs-lib.selectPlanDocuments (cognitive 20) scripts/obsidian-docs-lib.mjs:613 — obsidian-docs-lib.selectPlanDocuments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 7). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Aria2ProcessOutput.emitLine (cognitive 20) · ×1
  • Aria2ProcessOutput.emitLine (cognitive 20) src/core/engine/aria2/aria2-process-output.ts:109 — Aria2ProcessOutput.emitLine has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (11 pts), if/else 6, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · completed-task-startup-guard.parseSessionRunIntent (cognitive 20) · ×1
  • completed-task-startup-guard.parseSessionRunIntent (cognitive 20) src/core/engine/aria2/completed-task-startup-guard.ts:38 — completed-task-startup-guard.parseSessionRunIntent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 1 (nesting depth added 8). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EngineSupervisor.recover (cognitive 20) · ×1
  • EngineSupervisor.recover (cognitive 20) src/core/engine/engine-supervisor.ts:951 — EngineSupervisor.recover has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeoIPDownloader.download (cognitive 20) · ×1
  • GeoIPDownloader.download (cognitive 20) src/core/geoip/geo-ip-downloader.ts:49 — GeoIPDownloader.download has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4, ternaries 3, boolean chains 1, loops 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CapabilityBridge.applyHookEffects (cognitive 20) · ×1
  • CapabilityBridge.applyHookEffects (cognitive 20) src/core/plugin/host/capability-bridge.ts:1696 — CapabilityBridge.applyHookEffects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 2 (3 pts), loops 2 (nesting depth added 3). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · system-proxy.parseProxyEnvironment (cognitive 20) · ×1
  • system-proxy.parseProxyEnvironment (cognitive 20) REDACTED:58 — system-proxy.parseProxyEnvironment has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 3, if/else 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · get-task-files.createGetTaskFilesHandler (cognitive 20) · ×1
  • get-task-files.createGetTaskFilesHandler (cognitive 20) src/core/task/get-task-files.ts:63 — get-task-files.createGetTaskFilesHandler has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7, loops 3 (5 pts), boolean chains 4, ternaries 3, error handling 1 (nesting depth added 2). None of this is in the body itself: all 20 points belong to 2 function literals inside it that branch (lines 64, 71). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · TrackerManager.init (cognitive 20) · ×1
  • TrackerManager.init (cognitive 20) src/core/tracker/tracker-manager.ts:164 — TrackerManager.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BridgeManager.stopCurrent (cognitive 20) · ×1
  • BridgeManager.stopCurrent (cognitive 20) src/main/bridge/bridge-manager.ts:106 — BridgeManager.stopCurrent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · package-manager.managerBinDirectory (cognitive 20) · ×1
  • package-manager.managerBinDirectory (cognitive 20) src/main/cli/package-manager.ts:387 — package-manager.managerBinDirectory has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 5 (6 pts), boolean chains 4 (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 · CliToolService.#verifyInstall (cognitive 20) · ×1
  • CliToolService.#verifyInstall (cognitive 20) REDACTED:497 — CliToolService.#verifyInstall has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), ternaries 3 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dashboard-tile-frame.DashboardTileFrame (cognitive 20) · ×1
  • dashboard-tile-frame.DashboardTileFrame (cognitive 20) src/renderer/routes/dashboard/components/dashboard-tile-frame.tsx:92 — dashboard-tile-frame.DashboardTileFrame has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 8, if/else 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 216, 179, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · engine-tile.EngineTile (cognitive 20) · ×1
  • engine-tile.EngineTile (cognitive 20) src/renderer/routes/dashboard/tiles/engine-tile.tsx:37 — engine-tile.EngineTile has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · task-row.TaskRowBase (cognitive 20) · ×1
  • task-row.TaskRowBase (cognitive 20) src/renderer/routes/downloads/task-row.tsx:43 — task-row.TaskRowBase has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 12 (15 pts), boolean chains 5 (nesting depth added 3). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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 · speed-limit-section.SpeedLimitSection (cognitive 20) · ×1
  • speed-limit-section.SpeedLimitSection (cognitive 20) src/renderer/routes/settings/cards/speed-limit-section.tsx:121 — speed-limit-section.SpeedLimitSection has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 5, error handling 1. Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (fillFromPeak, a function literal at line 140, a function literal at line 201, …). 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 · trusted-extensions-section.TrustedExtensionsSection (cognitive 20) · ×1
  • trusted-extensions-section.TrustedExtensionsSection (cognitive 20) src/renderer/routes/settings/cards/integration/trusted-extensions-section.tsx:87 — trusted-extensions-section.TrustedExtensionsSection has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 6, if/else 2, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 187, handleAdd, a function literal at line 110, …). 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 · cli-tool-section.CliToolSection (cognitive 20) · ×1
  • cli-tool-section.CliToolSection (cognitive 20) src/renderer/routes/settings/cards/integration/cli-tool-section.tsx:151 — cli-tool-section.CliToolSection has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, ternaries 4, if/else 1. Of this number, 17 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · use-engine-display-status.useEngineDisplayStatus (cognitive 20) · ×1
  • use-engine-display-status.useEngineDisplayStatus (cognitive 20) src/renderer/hooks/use-engine-display-status.ts:53 — use-engine-display-status.useEngineDisplayStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 77, 61, 136, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · operator-extension-pairing.runExtensionPairingTerminal (cognitive 20) · ×1
  • operator-extension-pairing.runExtensionPairingTerminal (cognitive 20) src/server/operator-extension-pairing.ts:112 — operator-extension-pairing.runExtensionPairingTerminal has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · remote-extension-admission-policy.resolveForwardedSource (cognitive 19) · ×1
  • remote-extension-admission-policy.resolveForwardedSource (cognitive 19) src/server/bridge/remote-extension-admission-policy.ts:353 — remote-extension-admission-policy.resolveForwardedSource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build.parseArgs (cognitive 19) · ×1
  • build.parseArgs (cognitive 19) packages/native-host/build.mjs:54 — build.parseArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · assemble-release-artifacts.verifyManifestAssets (cognitive 19) · ×1
  • assemble-release-artifacts.verifyManifestAssets (cognitive 19) scripts/assemble-release-artifacts.mjs:391 — assemble-release-artifacts.verifyManifestAssets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate-third-party-notices.collectRuntimePackages (cognitive 19) · ×1
  • generate-third-party-notices.collectRuntimePackages (cognitive 19) scripts/generate-third-party-notices.mjs:183 — generate-third-party-notices.collectRuntimePackages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SubmitDownloadAdapter.adapt (cognitive 19) · ×1
  • SubmitDownloadAdapter.adapt (cognitive 19) src/core/bridge-receiver/submit-download-adapter.ts:96 — SubmitDownloadAdapter.adapt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 4 (6 pts), boolean chains 1 (nesting depth added 4). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · ExtensionPairingProjectionService.reconcileCommitted (cognitive 19) · ×1
  • ExtensionPairingProjectionService.reconcileCommitted (cognitive 19) src/core/bridge/extension-pairing-projection.ts:373 — ExtensionPairingProjectionService.reconcileCommitted has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 pts), boolean chains 2, loops 2, error handling 1 (nesting depth added 7). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 377). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ReconnectSession.onReconnectResponse (cognitive 19) · ×1
  • ReconnectSession.onReconnectResponse (cognitive 19) src/core/bridge/mbp1/reconnect-session.ts:193 — ReconnectSession.onReconnectResponse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, error handling 2 (3 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.
D2 · Cognitive Complexity · TaskInspectorActivityRuntime.deliverRecoveredAnchor (cognitive 19) · ×1
  • TaskInspectorActivityRuntime.deliverRecoveredAnchor (cognitive 19) src/core/inspector-activity/task-inspector-activity-runtime.ts:752 — TaskInspectorActivityRuntime.deliverRecoveredAnchor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, error handling 2 (nesting depth added 3). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 790). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · source-scanner.readLegacyFile (cognitive 19) · ×1
  • source-scanner.readLegacyFile (cognitive 19) src/core/legacy-import/source-scanner.ts:104 — source-scanner.readLegacyFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, error handling 1, loops 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.
D2 · Cognitive Complexity · http.buildResponse (cognitive 19) · ×1
  • http.buildResponse (cognitive 19) src/core/plugin/capabilities/http.ts:652 — http.buildResponse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (5 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginSecurityService.fetchPolicy · ×1
  • PluginSecurityService.fetchPolicy::download (cognitive 19) src/core/plugin/security/security-service.ts:283 — PluginSecurityService.fetchPolicy::download has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (7 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HookOrchestrator.runBeforeFinalize (cognitive 19) · ×1
  • HookOrchestrator.runBeforeFinalize (cognitive 19) src/core/plugin/hooks/hook-orchestrator.ts:370 — HookOrchestrator.runBeforeFinalize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1 (2 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · quick-js-worker.handleHookEnter (cognitive 19) · ×1
  • quick-js-worker.handleHookEnter (cognitive 19) src/core/plugin/host/quick-js-worker.ts:337 — quick-js-worker.handleHookEnter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 484, 419, 399, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · OperationService.run (cognitive 19) · ×1
  • OperationService.run (cognitive 19) src/core/plugin/operations/operation-service.ts:624 — OperationService.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, error handling 3, ternaries 2 (3 pts), loops 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · delivery-materializer.materializeCandidate (cognitive 19) · ×1
  • delivery-materializer.materializeCandidate (cognitive 19) src/core/plugin/post/delivery-materializer.ts:191 — delivery-materializer.materializeCandidate has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, ternaries 8, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · queries.buildContributionIndex (cognitive 19) · ×1
  • queries.buildContributionIndex (cognitive 19) src/core/plugin/queries.ts:105 — queries.buildContributionIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · direct-resource-validator.redirectRequestUrl (cognitive 19) · ×1
  • direct-resource-validator.redirectRequestUrl (cognitive 19) src/core/task/direct-resource-validator.ts:842 — direct-resource-validator.redirectRequestUrl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MotrixDatabase.commitTerminalHookBoundary (cognitive 19) · ×1
  • MotrixDatabase.commitTerminalHookBoundary (cognitive 19) src/core/session/motrix-database.ts:817 — MotrixDatabase.commitTerminalHookBoundary has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, ternaries 1 (nesting depth added 5). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 823). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · re-add-task.reAddBt (cognitive 19) · ×1
  • re-add-task.reAddBt (cognitive 19) src/core/task/actions/re-add-task.ts:139 — re-add-task.reAddBt has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 4 (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 · MagnetTracker.primeFromDatabase (cognitive 19) · ×1
  • MagnetTracker.primeFromDatabase (cognitive 19) src/core/torrent/magnet-tracker.ts:235 — MagnetTracker.primeFromDatabase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompletedEngineTaskCleanup.observe (cognitive 19) · ×1
  • CompletedEngineTaskCleanup.observe (cognitive 19) src/core/task/completed-engine-task-cleanup.ts:104 — CompletedEngineTaskCleanup.observe has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 6, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · create-task-handler.createAdmittedTask (cognitive 19) · ×1
  • create-task-handler.createAdmittedTask (cognitive 19) src/core/task/create-task-handler.ts:285 — create-task-handler.createAdmittedTask has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 4 (6 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 4). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackerProber.probeUdp (cognitive 19) · ×1
  • TrackerProber.probeUdp (cognitive 19) src/core/tracker/tracker-prober.ts:116 — TrackerProber.probeUdp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, error handling 3, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 130, 150, 125, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.syncNativeMessagingManifests (cognitive 19) · ×1
  • index.syncNativeMessagingManifests (cognitive 19) src/main/bridge/index.ts:342 — index.syncNativeMessagingManifests has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 6, ternaries 3 (6 pts), if/else 3 (5 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · launcher.setupLauncher (cognitive 19) · ×1
  • launcher.setupLauncher (cognitive 19) src/main/launcher.ts:55 — launcher.setupLauncher has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · completion-shutdown.setupCompletionShutdown (cognitive 19) · ×1
  • completion-shutdown.setupCompletionShutdown (cognitive 19) src/main/platform/completion-shutdown.ts:38 — completion-shutdown.setupCompletionShutdown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6 (nesting depth added 3). None of this is in the body itself: all 19 points belong to 7 function literals inside it that branch (lines 58, 76, 48, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · speed-sparkline.SpeedSparkline (cognitive 19) · ×1
  • speed-sparkline.SpeedSparkline (cognitive 19) src/renderer/routes/dashboard/components/speed-sparkline.tsx:38 — speed-sparkline.SpeedSparkline has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9, boolean chains 7, if/else 3. Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 50, 118, 62, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · engine-badge.EngineBadge (cognitive 19) · ×1
  • engine-badge.EngineBadge (cognitive 19) src/renderer/routes/downloads/engine-badge.tsx:7 — engine-badge.EngineBadge has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (16 pts), boolean chains 3 (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 · notifications-page.NotificationRow (cognitive 19) · ×1
  • notifications-page.NotificationRow (cognitive 19) src/renderer/routes/notifications/notifications-page.tsx:40 — notifications-page.NotificationRow has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · use-plugin-install.usePluginInstall.startInstall (cognitive 19) · ×1
  • use-plugin-install.usePluginInstall.startInstall (cognitive 19) src/renderer/routes/plugins/hooks/use-plugin-install.ts:84 — use-plugin-install.usePluginInstall.startInstall has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, error handling 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 · plugin-call-graph-edge.PluginCallGraphEdge (cognitive 19) · ×1
  • plugin-call-graph-edge.PluginCallGraphEdge (cognitive 19) src/renderer/routes/plugins/components/call-graph/plugin-call-graph-edge.tsx:32 — plugin-call-graph-edge.PluginCallGraphEdge has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (10 pts), boolean chains 8, if/else 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · file-list.FileList (cognitive 19) · ×1
  • file-list.FileList (cognitive 19) src/renderer/components/file-list/file-list.tsx:28 — file-list.FileList has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 2. Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 130, toggleSelectAll, toggleFile, …). 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 · remote-extension-route-policy.evaluateRemoteExtensionRoute (cognitive 18) · ×1
  • remote-extension-route-policy.evaluateRemoteExtensionRoute (cognitive 18) src/server/bridge/remote-extension-route-policy.ts:129 — remote-extension-route-policy.evaluateRemoteExtensionRoute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2, error handling 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · obsidian-docs-lib.assertDocumentPair (cognitive 18) · ×1
  • obsidian-docs-lib.assertDocumentPair (cognitive 18) scripts/obsidian-docs-lib.mjs:562 — obsidian-docs-lib.assertDocumentPair has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 5, ternaries 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 · compaction.compactTaskTransferSamples (cognitive 18) · ×1
  • compaction.compactTaskTransferSamples (cognitive 18) src/core/inspector-activity/compaction.ts:64 — compaction.compactTaskTransferSamples has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TaskInspectorActivityService.closeAtExactTerminalTransition (cognitive 18) · ×1
  • TaskInspectorActivityService.closeAtExactTerminalTransition (cognitive 18) src/core/inspector-activity/task-inspector-activity-service.ts:480 — TaskInspectorActivityService.closeAtExactTerminalTransition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, loops 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 · bridge-data-dir-lock.acquireBridgeDataDirLock (cognitive 18) · ×1
  • bridge-data-dir-lock.acquireBridgeDataDirLock (cognitive 18) src/core/bridge/bridge-data-dir-lock.ts:241 — bridge-data-dir-lock.acquireBridgeDataDirLock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 4 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bridge-data-dir-lock.resumeInterruptedRecovery (cognitive 18) · ×1
  • bridge-data-dir-lock.resumeInterruptedRecovery (cognitive 18) src/core/bridge/bridge-data-dir-lock.ts:383 — bridge-data-dir-lock.resumeInterruptedRecovery has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 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 · completed-task-startup-guard.readRunIntent (cognitive 18) · ×1
  • completed-task-startup-guard.readRunIntent (cognitive 18) src/core/engine/aria2/completed-task-startup-guard.ts:81 — completed-task-startup-guard.readRunIntent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegacyImportService.commitAdmission (cognitive 18) · ×1
  • LegacyImportService.commitAdmission (cognitive 18) src/core/legacy-import/import-service.ts:371 — LegacyImportService.commitAdmission has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 2, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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 · hls-parser.parseHlsMaster (cognitive 18) · ×1
  • hls-parser.parseHlsMaster (cognitive 18) REDACTED:59 — hls-parser.parseHlsMaster has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3, boolean chains 2, loops 2 (nesting depth added 5). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · command-graph.snapshotCandidates (cognitive 18) · ×1
  • command-graph.snapshotCandidates (cognitive 18) src/core/plugin/commands/command-graph.ts:265 — command-graph.snapshotCandidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (2 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeFinalizeArtifactOperations.removeIsolated (cognitive 18) · ×1
  • NativeFinalizeArtifactOperations.removeIsolated (cognitive 18) src/core/plugin/finalize/native-artifact-operations.ts:438 — NativeFinalizeArtifactOperations.removeIsolated has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7 (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 · PostDeliveryScheduler.execute (cognitive 18) · ×1
  • PostDeliveryScheduler.execute (cognitive 18) src/core/plugin/post/delivery-scheduler.ts:281 — PostDeliveryScheduler.execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (7 pts), error handling 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · update-scan.scanForUpdates (cognitive 18) · ×1
  • update-scan.scanForUpdates (cognitive 18) src/core/plugin/registry/update-scan.ts:24 — update-scan.scanForUpdates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeMessagingInstaller.syncManifests (cognitive 18) · ×1
  • NativeMessagingInstaller.syncManifests (cognitive 18) src/main/bridge/native-messaging-installer.ts:324 — NativeMessagingInstaller.syncManifests has cognitive complexity 18 (threshold 15). Drivers by points: error handling 2 (6 pts), loops 3 (6 pts), if/else 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shell-environment.resolveExecutable (cognitive 18) · ×1
  • shell-environment.resolveExecutable (cognitive 18) src/main/cli/shell-environment.ts:150 — shell-environment.resolveExecutable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 4 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowManager.recreate (cognitive 18) · ×1
  • WindowManager.recreate (cognitive 18) src/main/window/window-manager.ts:229 — WindowManager.recreate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 250). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MenuManager.walkAndUpdate (cognitive 18) · ×1
  • MenuManager.walkAndUpdate (cognitive 18) src/main/menu/menu-manager.ts:370 — MenuManager.walkAndUpdate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-column-header.TaskColumnHeader (cognitive 18) · ×1
  • task-column-header.TaskColumnHeader (cognitive 18) src/renderer/routes/downloads/task-column-header.tsx:39 — task-column-header.TaskColumnHeader has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 6, boolean chains 4 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 4 function literals inside it that branch (lines 82, 150, 112, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · system-protocols-section.SystemProtocolsSection · ×1
  • system-protocols-section.SystemProtocolsSection::handleOpenSystemSettings (cognitive 18) src/renderer/routes/settings/cards/integration/system-protocols-section.tsx:139 — system-protocols-section.SystemProtocolsSection::handleOpenSystemSettings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (system-protocols-section.SystemProtocolsSection) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · window-chrome.WindowChrome (cognitive 18) · ×1
  • window-chrome.WindowChrome (cognitive 18) src/renderer/components/window-chrome/window-chrome.tsx:158 — window-chrome.WindowChrome has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 5 (6 pts), if/else 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · operation-form.OperationForm (cognitive 18) · ×1
  • operation-form.OperationForm (cognitive 18) src/renderer/features/plugin-operations/operation-form.tsx:39 — operation-form.OperationForm has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (7 pts), if/else 3 (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, 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 · use-notification-toasts.useNotificationToasts (cognitive 18) · ×1
  • use-notification-toasts.useNotificationToasts (cognitive 18) src/renderer/hooks/use-notification-toasts.ts:90 — use-notification-toasts.useNotificationToasts has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 6, boolean chains 4, error handling 1 (nesting depth added 2). None of this is in the body itself: all 18 points belong to 3 function literals inside it that branch (lines 169, 130, 162). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · operator-admin.runOperatorAdmin (cognitive 18) · ×1
  • operator-admin.runOperatorAdmin (cognitive 18) src/server/operator-admin.ts:783 — operator-admin.runOperatorAdmin has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6 (7 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-inspector-activity.findTaskSpeedUpdate (cognitive 18) · ×1
  • task-inspector-activity.findTaskSpeedUpdate (cognitive 18) src/shared/schemas/task-inspector-activity.ts:379 — task-inspector-activity.findTaskSpeedUpdate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteExtensionSurfacePolicy.evaluate (cognitive 17) · ×1
  • RemoteExtensionSurfacePolicy.evaluate (cognitive 17) src/server/bridge/remote-extension-surface-policy.ts:40 — RemoteExtensionSurfacePolicy.evaluate has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 5 (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 · assemble-release-artifacts.collectTargetFiles (cognitive 17) · ×1
  • assemble-release-artifacts.collectTargetFiles (cognitive 17) scripts/assemble-release-artifacts.mjs:298 — assemble-release-artifacts.collectTargetFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ensure-electron-runtime.ensureElectronRuntime (cognitive 17) · ×1
  • ensure-electron-runtime.ensureElectronRuntime (cognitive 17) scripts/ensure-electron-runtime.mjs:149 — ensure-electron-runtime.ensureElectronRuntime has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 3 (5 pts), loops 1 (2 pts), ternaries 1 (2 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.
D2 · Cognitive Complexity · TaskInspectorActivityService.selectOrdinaryCandidate (cognitive 17) · ×1
  • TaskInspectorActivityService.selectOrdinaryCandidate (cognitive 17) src/core/inspector-activity/task-inspector-activity-service.ts:647 — TaskInspectorActivityService.selectOrdinaryCandidate has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TaskInspectorActivityStore.applyCheckpoint (cognitive 17) · ×1
  • TaskInspectorActivityStore.applyCheckpoint (cognitive 17) src/core/inspector-activity/task-inspector-activity-store.ts:339 — TaskInspectorActivityStore.applyCheckpoint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (3 pts), ternaries 3, boolean chains 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.
D2 · Cognitive Complexity · run-remote-extension-release-soak.runRemoteExtensionReleaseSoak (cognitive 17) · ×1
  • run-remote-extension-release-soak.runRemoteExtensionReleaseSoak (cognitive 17) scripts/run-remote-extension-release-soak.mjs:374 — run-remote-extension-release-soak.runRemoteExtensionReleaseSoak has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 6, boolean chains 2, error handling 1 (2 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.
D2 · Cognitive Complexity · Aria2ConfigBuilder.buildArgs (cognitive 17) · ×1
  • Aria2ConfigBuilder.buildArgs (cognitive 17) REDACTED:149 — Aria2ConfigBuilder.buildArgs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LegacyImportService.authorizeMetadataAdmission (cognitive 17) · ×1
  • LegacyImportService.authorizeMetadataAdmission (cognitive 17) src/core/legacy-import/import-service.ts:260 — LegacyImportService.authorizeMetadataAdmission has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 2 function items inside it that branch. 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 · CommandInvokeAudit.cleanupRotations (cognitive 17) · ×1
  • CommandInvokeAudit.cleanupRotations (cognitive 17) src/core/plugin/commands/invoke-audit.ts:191 — CommandInvokeAudit.cleanupRotations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CapabilityBridge.handleStaged (cognitive 17) · ×1
  • CapabilityBridge.handleStaged (cognitive 17) src/core/plugin/host/capability-bridge.ts:1778 — CapabilityBridge.handleStaged has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · finalize-committer.assertRenameFileJournal (cognitive 17) · ×1
  • finalize-committer.assertRenameFileJournal (cognitive 17) src/core/plugin/finalize/finalize-committer.ts:716 — finalize-committer.assertRenameFileJournal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OperationService.catalog (cognitive 17) · ×1
  • OperationService.catalog (cognitive 17) src/core/plugin/operations/operation-service.ts:114 — OperationService.catalog has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (11 pts), boolean chains 4, if/else 2 (nesting depth added 6). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 119, 115, 121, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aria2-proxy-routing.decideAria2ProxyRoute (cognitive 17) · ×1
  • aria2-proxy-routing.decideAria2ProxyRoute (cognitive 17) REDACTED:159 — aria2-proxy-routing.decideAria2ProxyRoute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clear-stopped-tasks.clearStoppedTasks (cognitive 17) · ×1
  • clear-stopped-tasks.clearStoppedTasks (cognitive 17) src/core/task/actions/clear-stopped-tasks.ts:59 — clear-stopped-tasks.clearStoppedTasks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (2 pts), loops 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · re-add-task.reAddTaskUnderMutation (cognitive 17) · ×1
  • re-add-task.reAddTaskUnderMutation (cognitive 17) src/core/task/actions/re-add-task.ts:533 — re-add-task.reAddTaskUnderMutation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 4 (5 pts), ternaries 3, boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · task-recovery-service.determineAction (cognitive 17) · ×1
  • task-recovery-service.determineAction (cognitive 17) src/core/task/task-recovery-service.ts:54 — task-recovery-service.determineAction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (6 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 · tracker-selector.collectSourceUrls (cognitive 17) · ×1
  • tracker-selector.collectSourceUrls (cognitive 17) src/core/tracker/tracker-selector.ts:29 — tracker-selector.collectSourceUrls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tracker-selector.selectTrackers (cognitive 17) · ×1
  • tracker-selector.selectTrackers (cognitive 17) src/core/tracker/tracker-selector.ts:56 — tracker-selector.selectTrackers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3, ternaries 3, boolean chains 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · AppImageNativeHost.disable (cognitive 17) · ×1
  • AppImageNativeHost.disable (cognitive 17) src/main/bridge/appimage-native-host.ts:414 — AppImageNativeHost.disable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (4 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowManager.createBrowserWindow (cognitive 17) · ×1
  • WindowManager.createBrowserWindow (cognitive 17) src/main/window/window-manager.ts:462 — WindowManager.createBrowserWindow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (nesting depth added 2). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 530, a function literal at line 511, preventUntrustedNavigation). 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 · appimage-integration.removeDesktopIdFromMimeApps (cognitive 17) · ×1
  • appimage-integration.removeDesktopIdFromMimeApps (cognitive 17) src/main/platform/appimage-integration.ts:554 — appimage-integration.removeDesktopIdFromMimeApps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · os-bridge.createOsNotificationBridge.handleClick (cognitive 17) · ×1
  • os-bridge.createOsNotificationBridge.handleClick (cognitive 17) src/main/notifications/os-bridge.ts:85 — os-bridge.createOsNotificationBridge.handleClick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · services.createElectronPlatformServices (cognitive 17) · ×1
  • services.createElectronPlatformServices (cognitive 17) src/main/platform/services.ts:11 — services.createElectronPlatformServices has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (6 pts), boolean chains 4 (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 · tray.setupTray.createTray (cognitive 17) · ×1
  • tray.setupTray.createTray (cognitive 17) src/main/platform/tray.ts:85 — tray.setupTray.createTray has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 151, 130, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tasks-tile.TasksTile (cognitive 17) · ×1
  • tasks-tile.TasksTile (cognitive 17) src/renderer/routes/dashboard/tiles/tasks-tile.tsx:509 — tasks-tile.TasksTile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 4 (5 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, 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 · files-tab.FilesTab (cognitive 17) · ×1
  • files-tab.FilesTab (cognitive 17) src/renderer/routes/downloads/inspector/files-tab.tsx:33 — files-tab.FilesTab has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 7 (nesting depth added 3). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-inspector-action-bar.TaskInspectorActionBar (cognitive 17) · ×1
  • task-inspector-action-bar.TaskInspectorActionBar (cognitive 17) src/renderer/routes/downloads/inspector/task-inspector-action-bar.tsx:191 — task-inspector-action-bar.TaskInspectorActionBar has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, ternaries 2, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · registry-install-action.RegistryInstallSession (cognitive 17) · ×1
  • registry-install-action.RegistryInstallSession (cognitive 17) src/renderer/routes/plugins/components/registry-install-action.tsx:23 — registry-install-action.RegistryInstallSession has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 3 (nesting depth added 6). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 37). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · renderer.startCubicGlassRenderer.draw (cognitive 17) · ×1
  • renderer.startCubicGlassRenderer.draw (cognitive 17) src/renderer/components/desktop-kit/cubic-glass/renderer.ts:134 — renderer.startCubicGlassRenderer.draw has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · directory-picker.DirectoryPicker · ×1
  • directory-picker.DirectoryPicker::handlePick (cognitive 17) src/renderer/components/desktop-kit/directory-picker.tsx:155 — directory-picker.DirectoryPicker::handlePick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 3 (6 pts), boolean chains 4, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (directory-picker.DirectoryPicker) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · match.matchesAccelerator (cognitive 17) · ×1
  • match.matchesAccelerator (cognitive 17) src/renderer/shortcuts/match.ts:1 — match.matchesAccelerator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · verify_snap_credential_scope.parse_whoami (cognitive 17) · ×1
  • verify_snap_credential_scope.parse_whoami (cognitive 17) scripts/verify_snap_credential_scope.py:30 — verify_snap_credential_scope.parse_whoami has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readLicenseDirectory (cognitive 17) · ×1
  • readLicenseDirectory (cognitive 17) packages/native-host/package-flatpak-companion.mjs:202 — readLicenseDirectory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (4 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (walk, a function literal at line 212, a function literal at line 204, …). 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 · server-package-utils.readRegexEnd (cognitive 16) · ×1
  • server-package-utils.readRegexEnd (cognitive 16) scripts/server-package-utils.mjs:374 — server-package-utils.readRegexEnd has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepare-flatpak-node-lock.prepareFlatpakNodeLock (cognitive 16) · ×1
  • prepare-flatpak-node-lock.prepareFlatpakNodeLock (cognitive 16) scripts/prepare-flatpak-node-lock.mjs:13 — prepare-flatpak-node-lock.prepareFlatpakNodeLock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 6). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · release-signing-input.parseOptions (cognitive 16) · ×1
  • release-signing-input.parseOptions (cognitive 16) scripts/release-signing-input.mjs:275 — release-signing-input.parseOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stage-electron-app.resolvePackageInstance (cognitive 16) · ×1
  • stage-electron-app.resolvePackageInstance (cognitive 16) scripts/stage-electron-app.mjs:147 — stage-electron-app.resolvePackageInstance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stage-electron-app.assertSafeTree · ×1
  • stage-electron-app.assertSafeTree::walk (cognitive 16) scripts/stage-electron-app.mjs:214 — stage-electron-app.assertSafeTree::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stage-server-app.resolvePackageInstance (cognitive 16) · ×1
  • stage-server-app.resolvePackageInstance (cognitive 16) scripts/stage-server-app.mjs:101 — stage-server-app.resolvePackageInstance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (5 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stage-server-app.assertSafeDirectory · ×1
  • stage-server-app.assertSafeDirectory::walk (cognitive 16) scripts/stage-server-app.mjs:166 — stage-server-app.assertSafeDirectory::walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-pacman-artifact.assertPacmanMetadata (cognitive 16) · ×1
  • verify-pacman-artifact.assertPacmanMetadata (cognitive 16) scripts/verify-pacman-artifact.mjs:22 — verify-pacman-artifact.assertPacmanMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-parser.parseLegacySession (cognitive 16) · ×1
  • session-parser.parseLegacySession (cognitive 16) src/core/legacy-import/session-parser.ts:79 — session-parser.parseLegacySession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 11, loops 4, ternaries 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (session-parser.parseLegacySession::flush) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · LegacyHttpActivationService.sourceContext (cognitive 16) · ×1
  • LegacyHttpActivationService.sourceContext (cognitive 16) src/core/legacy-import/http-activation-service.ts:261 — LegacyHttpActivationService.sourceContext has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dash-parser.expandTimeline (cognitive 16) · ×1
  • dash-parser.expandTimeline (cognitive 16) REDACTED:262 — dash-parser.expandTimeline has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FinalizeRecovery.recoverRenameFile (cognitive 16) · ×1
  • FinalizeRecovery.recoverRenameFile (cognitive 16) src/core/plugin/finalize/finalize-recovery.ts:320 — FinalizeRecovery.recoverRenameFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FinalizeRecovery.restore (cognitive 16) · ×1
  • FinalizeRecovery.restore (cognitive 16) src/core/plugin/finalize/finalize-recovery.ts:493 — FinalizeRecovery.restore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NativeFinalizeArtifactOperations.removeKnown (cognitive 16) · ×1
  • NativeFinalizeArtifactOperations.removeKnown (cognitive 16) src/core/plugin/finalize/native-artifact-operations.ts:543 — NativeFinalizeArtifactOperations.removeKnown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 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 · quick-js-worker.jsValueToVmHandle (cognitive 16) · ×1
  • quick-js-worker.jsValueToVmHandle (cognitive 16) src/core/plugin/host/quick-js-worker.ts:1271 — quick-js-worker.jsValueToVmHandle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, loops 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 4). 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 · DirectRecoveryPlanner.plan (cognitive 16) · ×1
  • DirectRecoveryPlanner.plan (cognitive 16) src/core/session/direct-recovery-planner.ts:142 — DirectRecoveryPlanner.plan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, error handling 1, ternaries 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 · MagnetTracker.getFileSelection (cognitive 16) · ×1
  • MagnetTracker.getFileSelection (cognitive 16) src/core/torrent/magnet-tracker.ts:1042 — MagnetTracker.getFileSelection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · windows-desktop-startup-recovery.recoverDefaultWindowsDesktopBridgeResidue (cognitive 16) · ×1
  • windows-desktop-startup-recovery.recoverDefaultWindowsDesktopBridgeResidue (cognitive 16) src/main/bridge/windows-desktop-startup-recovery.ts:35 — windows-desktop-startup-recovery.recoverDefaultWindowsDesktopBridgeResidue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · appimage-integration.runStartupIntegration (cognitive 16) · ×1
  • appimage-integration.runStartupIntegration (cognitive 16) src/main/platform/appimage-integration.ts:1220 — appimage-integration.runStartupIntegration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (16 pts) (nesting depth added 9). 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 · MenuManager.normalizeElectronSeparators (cognitive 16) · ×1
  • MenuManager.normalizeElectronSeparators (cognitive 16) src/main/menu/menu-manager.ts:395 — MenuManager.normalizeElectronSeparators has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body 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 · tray.setupTray.onSettingsChanged (cognitive 16) · ×1
  • tray.setupTray.onSettingsChanged (cognitive 16) src/main/platform/tray.ts:236 — tray.setupTray.onSettingsChanged has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · activity-calendar-model.activityMonthLabels (cognitive 16) · ×1
  • activity-calendar-model.activityMonthLabels (cognitive 16) src/renderer/routes/dashboard/activity/activity-calendar-model.ts:542 — activity-calendar-model.activityMonthLabels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add-task-dialog-host.AddTaskDialogHost (cognitive 16) · ×1
  • add-task-dialog-host.AddTaskDialogHost (cognitive 16) src/renderer/components/add-task-dialog/add-task-dialog-host.tsx:39 — add-task-dialog-host.AddTaskDialogHost has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 1. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 58, 81, 97, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · blur-highlight.splitHighlightedText (cognitive 16) · ×1
  • blur-highlight.splitHighlightedText (cognitive 16) src/renderer/components/ui/blur-highlight.tsx:73 — blur-highlight.splitHighlightedText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), ternaries 3 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebar.SidebarProvider (cognitive 16) · ×1
  • sidebar.SidebarProvider (cognitive 16) src/renderer/components/ui/sidebar.tsx:53 — sidebar.SidebarProvider has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 4, ternaries 4. Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 103, 73, 82, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-operation-state.useOperationState (cognitive 16) · ×1
  • use-operation-state.useOperationState (cognitive 16) src/renderer/features/plugin-operations/use-operation-state.ts:18 — use-operation-state.useOperationState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, loops 3, error handling 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 16 points belong to 4 function literals inside it that branch (lines 28, 24, 61, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DirectoryPickerController.commitListing (cognitive 16) · ×1
  • DirectoryPickerController.commitListing (cognitive 16) src/renderer/features/web-directory-picker/directory-picker-controller.ts:384 — DirectoryPickerController.commitListing has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 4. Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · use-transport-mirror.useTransportMirror (cognitive 16) · ×1
  • use-transport-mirror.useTransportMirror (cognitive 16) src/renderer/hooks/use-transport-mirror.ts:95 — use-transport-mirror.useTransportMirror has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 2, loops 2, error handling 1, ternaries 1 (nesting depth added 2). None of this is in the body itself: all 16 points belong to 6 function literals inside it that branch (lines 140, 113, 207, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-task-activity.requestSnapshot (cognitive 16) · ×1
  • use-task-activity.requestSnapshot (cognitive 16) src/renderer/hooks/use-task-activity.ts:310 — use-task-activity.requestSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 333, 348, 355). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · use-task-inspector-activity.useTaskInspectorActivity (cognitive 16) · ×1
  • use-task-inspector-activity.useTaskInspectorActivity (cognitive 16) src/renderer/hooks/use-task-inspector-activity.ts:64 — use-task-inspector-activity.useTaskInspectorActivity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, ternaries 2. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 147, 134, 93, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) packages/finalize-fs/src/state.rs:177 — packages/finalize-fs/src/state.rs:177-191 | packages/finalize-fs/src/state.rs:360-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) packages/finalize-fs/src/state.rs:239 — packages/finalize-fs/src/state.rs:239-252 | packages/finalize-fs/src/state.rs:298-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–13 lines × 3) · ×1
  • Duplicated block (9–13 lines × 3) packages/finalize-fs/src/platform/unix/copy.rs:127 — packages/finalize-fs/src/platform/unix/copy.rs:127-139 | packages/finalize-fs/src/platform/unix/copy.rs:200-208 | packages/finalize-fs/src/platform/unix/operations.rs:119-127 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) packages/finalize-fs/src/platform/unix/copy.rs:33 — packages/finalize-fs/src/platform/unix/copy.rs:33-45 | packages/finalize-fs/src/platform/unix/digest.rs:24-36 — 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 (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) packages/finalize-fs/src/platform/unix/mod.rs:105 — packages/finalize-fs/src/platform/unix/mod.rs:105-116 | packages/finalize-fs/src/platform/unix/mod.rs:136-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×1
  • Duplicated block (9 lines × 2) packages/native-host/src/flatpak_companion/secure_fs.rs:206 — packages/native-host/src/flatpak_companion/secure_fs.rs:206-214 | packages/native-host/src/flatpak_companion/secure_fs.rs:248-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
IC1 · Incompleteness & stubs · Markup wires an event to an empty handler · ×1
  • Markup wires an event to an empty handler src/renderer/routes/downloads/task-row.tsx:134 — `onKeyDown` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
P12 · CI test-gate honesty · Test failure does not fail the CI gate · ×1
  • Test failure does not fail the CI gate .github/workflows/ci.yml:251 — `continue-on-error: true` lets the step or job that runs `pnpm test` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (89 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (89 clone groups) src/main/ipc/commands.ts:893 — 89 duplicated blocks under src/ have copies in at least two of the sibling directories core, main, preload, renderer, server, shared — 63 of them are reported below, and 26 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 89 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 89 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 89 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 (29 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (29 clone groups) src/renderer/components/theme-sync.tsx:14 — 29 duplicated blocks under src/renderer/ have copies in at least two of the sibling directories components, features, hooks, lib, routes — 12 of them are reported below, and 17 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 29 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 29 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 29 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 14 sibling directories (26 clone groups) · ×1
  • Duplication concentrated across 14 sibling directories (26 clone groups) src/core/plugin/runtime/plugin-hook-runtime.ts:370 — 26 duplicated blocks under src/core/ have copies in at least two of the sibling directories activity, bridge, bridge-receiver, engine, ffmpeg, inspector-activity (+8 more sibling(s) not listed) — 10 of them are reported below, and 16 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 26 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 26 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 26 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 (9 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (9 clone groups) src/renderer/routes/downloads/inspector/task-tracker-dialog.tsx:69 — 9 duplicated blocks under src/renderer/routes/ have copies in at least two of the sibling directories dashboard, downloads, plugins, settings, trackers — 5 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 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 8 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (5 clone groups) src/core/plugin/grants/grants-manager.ts:162 — 5 duplicated blocks under src/core/plugin/ have copies in at least two of the sibling directories capabilities, commands, grants, hooks, install, manifest (+2 more sibling(s) not listed) — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 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 5 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 (457 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (457 matched lines × 2 locations) scripts/stage-electron-app.mjs:45 — scripts/stage-electron-app.mjs:45 · scripts/stage-server-app.mjs:40 — the two spans are one implementation copied and then locally edited — 2738 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 (234 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (234 matched lines × 2 locations) src/main/ipc/commands.ts:893 — src/main/ipc/commands.ts:893 · src/server/ipc/commands.ts:469 — the two spans are one implementation copied and then locally edited — 1200 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 (182 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (182 matched lines × 2 locations) src/renderer/routes/settings/cards/advanced-dialog.tsx:138 — src/renderer/routes/settings/cards/advanced-dialog.tsx:138 · src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:103 — the two spans are one implementation copied and then locally edited — 758 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 (163 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (163 matched lines × 2 locations) scripts/verify-electron-package.mjs:109 — scripts/verify-electron-package.mjs:109 · scripts/verify-server-package.mjs:56 — the two spans are one implementation copied and then locally edited — 996 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 (158 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (158 matched lines × 2 locations) src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:129 — src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:129 · src/renderer/routes/settings/cards/network-dialog.tsx:142 — the two spans are one implementation copied and then locally edited — 680 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 (131 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (131 matched lines × 2 locations) src/shared/lib/log-redact.ts:455 — src/shared/lib/log-redact.ts:455 · src/shared/lib/log-redact.ts:780 — the two spans are one implementation copied and then locally edited — 642 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (121 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (121 matched lines × 2 locations) src/renderer/routes/settings/cards/appearance-dialog.tsx:384 — src/renderer/routes/settings/cards/appearance-dialog.tsx:384 · src/renderer/routes/settings/cards/network-dialog.tsx:315 — the two spans are one implementation copied and then locally edited — 503 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 (99 identical lines × 2 files) · ×1
  • Wholesale file copy (99 identical lines × 2 files) src/main/plugin/capability-host.ts:1 — src/main/plugin/capability-host.ts:1 · src/server/plugin/capability-host.ts:1 — these 2 files are line-for-line copies of one another — 99 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 with local edits (99 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (99 matched lines × 2 locations) src/renderer/routes/trackers/components/blacklist-tracker-panel.tsx:18 — src/renderer/routes/trackers/components/blacklist-tracker-panel.tsx:18 · src/renderer/routes/trackers/components/effective-tracker-panel.tsx:38 — the two spans are one implementation copied and then locally edited — 604 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 (97 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (97 matched lines × 2 locations) src/core/plugin/capabilities/metadata.ts:66 — src/core/plugin/capabilities/metadata.ts:66 · src/core/plugin/capabilities/storage.ts:76 — the two spans are one implementation copied and then locally edited — 538 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 (89 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (89 matched lines × 2 locations) scripts/assemble-release-artifacts.mjs:472 — scripts/assemble-release-artifacts.mjs:472 · scripts/verify-update-artifacts.mjs:166 — the two spans are one implementation copied and then locally edited — 622 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (78 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (78 matched lines × 2 locations) src/main/index.ts:2680 — src/main/index.ts:2680 · src/server/index.ts:1862 — the two spans are one implementation copied and then locally edited — 362 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 (75 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (75 matched lines × 2 locations) src/main/ipc/queries.ts:240 — src/main/ipc/queries.ts:240 · src/server/ipc/queries.ts:231 — the two spans are one implementation copied and then locally edited — 518 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 (65 lines × 2 locations) · ×1
  • Duplicated block (65 lines × 2 locations) src/main/ipc/commands.ts:789 — src/main/ipc/commands.ts:789 · src/server/ipc/commands.ts:623 — 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 (61 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (61 matched lines × 2 locations) src/main/ipc/commands.ts:353 — src/main/ipc/commands.ts:353 · src/server/ipc/commands.ts:263 — the two spans are one implementation copied and then locally edited — 320 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 (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) src/core/plugin/hooks/hook-orchestrator.ts:225 — src/core/plugin/hooks/hook-orchestrator.ts:225 · src/core/plugin/hooks/hook-orchestrator.ts:391 — the two spans are one implementation copied and then locally edited — 343 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (54 lines × 2 locations) · ×1
  • Duplicated block (54 lines × 2 locations) src/renderer/routes/plugins/hooks/use-plugin-graph.ts:60 — src/renderer/routes/plugins/hooks/use-plugin-graph.ts:60 · src/renderer/routes/plugins/hooks/use-plugin-metadata.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.
R10 · Code Duplication · Duplicated block (50 lines × 2 locations) · ×1
  • Duplicated block (50 lines × 2 locations) src/main/index.ts:2442 — src/main/index.ts:2442 · src/server/index.ts:874 — 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 (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) src/renderer/routes/settings/cards/advanced-dialog.tsx:164 — src/renderer/routes/settings/cards/advanced-dialog.tsx:164 · src/renderer/routes/settings/cards/appearance-dialog.tsx:207 — 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 (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) src/main/plugin/dev-watcher.ts:23 — src/main/plugin/dev-watcher.ts:23 · src/server/plugin/dev-watcher.ts:15 — 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 (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) src/main/ipc/commands.ts:1888 — src/main/ipc/commands.ts:1888 · src/server/ipc/commands.ts:1073 — 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 (38 lines × 2 locations) · ×1
  • Duplicated block (38 lines × 2 locations) src/renderer/routes/settings/cards/network-dialog.tsx:378 — src/renderer/routes/settings/cards/network-dialog.tsx:378 · src/renderer/routes/settings/cards/network-dialog.tsx:439 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×1
  • Duplicated block (37 lines × 2 locations) src/main/ipc/commands.ts:1637 — src/main/ipc/commands.ts:1637 · src/server/ipc/commands.ts:953 — 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 (36 lines × 2 locations) · ×1
  • Duplicated block (36 lines × 2 locations) scripts/electron-package-utils.mjs:31 — scripts/electron-package-utils.mjs:31 · scripts/server-package-utils.mjs:47 — 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 (35 lines × 2 locations) · ×1
  • Duplicated block (35 lines × 2 locations) src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:831 — src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:831 · src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) src/core/plugin/finalize/finalize-committer.ts:602 — src/core/plugin/finalize/finalize-committer.ts:602 · src/core/plugin/finalize/finalize-recovery.ts:781 — 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 with local edits (34 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (34 matched lines × 2 locations) src/renderer/routes/plugins/hooks/use-plugin-detail.ts:19 — src/renderer/routes/plugins/hooks/use-plugin-detail.ts:19 · src/renderer/routes/plugins/hooks/use-plugins.ts:22 — the two spans are one implementation copied and then locally edited — 175 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 (34 lines × 3 locations) · ×1
  • Duplicated block (34 lines × 3 locations) src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:144 — src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:144 · src/renderer/routes/settings/cards/integration/integration-dialog.tsx:118 · src/renderer/routes/settings/cards/network-dialog.tsx:157 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) src/core/legacy-import/bt-activation-service.ts:342 — src/core/legacy-import/bt-activation-service.ts:342 · src/core/legacy-import/http-activation-service.ts:600 — 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.
R2 · Cyclomatic Complexity · Complex function handleCreateTaskUnderAdmission (cyclomatic 115, cognitive 192) · ×1
  • Complex function handleCreateTaskUnderAdmission (cyclomatic 115, cognitive 192) src/core/task/create-task-handler.ts:372 — handleCreateTaskUnderAdmission has cyclomatic complexity 115 and cognitive complexity 192; 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 keyDown (cyclomatic 95, cognitive 113) · ×1
  • Complex function keyDown (cyclomatic 95, cognitive 113) src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:303 — keyDown has cyclomatic complexity 95 and cognitive complexity 113; 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 EngineDiagnosticsDialogHost (cyclomatic 95, cognitive 90) · ×1
  • Complex function EngineDiagnosticsDialogHost (cyclomatic 95, cognitive 90) src/renderer/features/engine-diagnostics/engine-diagnostics-dialog.tsx:140 — EngineDiagnosticsDialogHost has cyclomatic complexity 95 and cognitive complexity 90; 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 restore (cyclomatic 75, cognitive 147) · ×1
  • Complex function restore (cyclomatic 75, cognitive 147) src/core/session/session-manager.ts:641 — restore has cyclomatic complexity 75 and cognitive complexity 147; 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 verifyFlatpakPackaging (cyclomatic 75, cognitive 39) · ×1
  • Complex function verifyFlatpakPackaging (cyclomatic 75, cognitive 39) scripts/verify-flatpak-packaging.mjs:118 — verifyFlatpakPackaging has cyclomatic complexity 75 and cognitive complexity 39; 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 scanLegacySource (cyclomatic 71, cognitive 113) · ×1
  • Complex function scanLegacySource (cyclomatic 71, cognitive 113) src/core/legacy-import/source-scanner.ts:298 — scanLegacySource has cyclomatic complexity 71 and cognitive complexity 113; 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 recover (cyclomatic 65, cognitive 85) · ×1
  • Complex function recover (cyclomatic 65, cognitive 85) src/core/plugin/finalize/finalize-recovery.ts:80 — recover has cyclomatic complexity 65 and cognitive complexity 85; 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 MediaToolsSection (cyclomatic 63, cognitive 57) · ×1
  • Complex function MediaToolsSection (cyclomatic 63, cognitive 57) src/renderer/routes/settings/cards/integration/media-tools-section.tsx:75 — MediaToolsSection has cyclomatic complexity 63 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 invoke (cyclomatic 61, cognitive 89) · ×1
  • Complex function invoke (cyclomatic 61, cognitive 89) e2e/web-directory-picker/fixture-transport.ts:159 — invoke has cyclomatic complexity 61 and cognitive complexity 89; 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 PickerSession (cyclomatic 60, cognitive 53) · ×1
  • Complex function PickerSession (cyclomatic 60, cognitive 53) src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:134 — PickerSession has cyclomatic complexity 60 and cognitive complexity 53; 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 createDownload (cyclomatic 58, cognitive 66) · ×1
  • Complex function createDownload (cyclomatic 58, cognitive 66) src/core/engine/aria2/aria2-adapter.ts:421 — createDownload has cyclomatic complexity 58 and cognitive complexity 66; 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 reconcile (cyclomatic 57, cognitive 71) · ×1
  • Complex function reconcile (cyclomatic 57, cognitive 71) src/core/legacy-import/http-activation-service.ts:762 — reconcile has cyclomatic complexity 57 and cognitive complexity 71; 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 OperationFormContent (cyclomatic 54, cognitive 43) · ×1
  • Complex function OperationFormContent (cyclomatic 54, cognitive 43) src/renderer/features/plugin-operations/operation-form.tsx:102 — OperationFormContent has cyclomatic complexity 54 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 smokeServerImage (cyclomatic 53, cognitive 60) · ×1
  • Complex function smokeServerImage (cyclomatic 53, cognitive 60) REDACTED:928 — smokeServerImage has cyclomatic complexity 53 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function run (cyclomatic 52, cognitive 75) · ×1
  • Complex function run (cyclomatic 52, cognitive 75) src/core/task/media-task-coordinator.ts:236 — run has cyclomatic complexity 52 and cognitive complexity 75; 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 TaskRow (cyclomatic 52, cognitive 64) · ×1
  • Complex function TaskRow (cyclomatic 52, cognitive 64) src/renderer/routes/dashboard/tiles/tasks-tile.tsx:162 — TaskRow has cyclomatic complexity 52 and cognitive complexity 64; 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 swapMagnetMetadataForBtUnderMutation (cyclomatic 50, cognitive 64) · ×1
  • Complex function swapMagnetMetadataForBtUnderMutation (cyclomatic 50, cognitive 64) src/core/torrent/swap-magnet-metadata-for-bt.ts:128 — swapMagnetMetadataForBtUnderMutation has cyclomatic complexity 50 and cognitive complexity 64; 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 DirectoryPicker (cyclomatic 49, cognitive 50) · ×1
  • Complex function DirectoryPicker (cyclomatic 49, cognitive 50) src/renderer/components/desktop-kit/directory-picker.tsx:56 — DirectoryPicker has cyclomatic complexity 49 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 addTorrent (cyclomatic 48, cognitive 53) · ×1
  • Complex function addTorrent (cyclomatic 48, cognitive 53) src/core/engine/aria2/aria2-adapter.ts:847 — addTorrent has cyclomatic complexity 48 and cognitive complexity 53; 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 reconcile (cyclomatic 48, cognitive 52) · ×1
  • Complex function reconcile (cyclomatic 48, cognitive 52) src/core/legacy-import/bt-activation-service.ts:489 — reconcile has cyclomatic complexity 48 and cognitive complexity 52; 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 · src/main/index.ts · ×1
  • src/main/index.ts: 3113 lines of code src/main/index.ts:1 — src/main/index.ts has 3113 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 · src/core/bridge/web-socket-bridge-server.ts · ×1
  • src/core/bridge/web-socket-bridge-server.ts: 2422 lines of code src/core/bridge/web-socket-bridge-server.ts:1 — src/core/bridge/web-socket-bridge-server.ts has 2422 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 · src/core/plugin/host/capability-bridge.ts · ×1
  • src/core/plugin/host/capability-bridge.ts: 2148 lines of code src/core/plugin/host/capability-bridge.ts:1 — src/core/plugin/host/capability-bridge.ts has 2148 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 · src/core/torrent/magnet-tracker.ts · ×1
  • src/core/torrent/magnet-tracker.ts: 2129 lines of code src/core/torrent/magnet-tracker.ts:1 — src/core/torrent/magnet-tracker.ts has 2129 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 · src/server/index.ts · ×1
  • src/server/index.ts: 2055 lines of code src/server/index.ts:1 — src/server/index.ts has 2055 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 · src/core/session/session-manager.ts · ×1
  • src/core/session/session-manager.ts: 1978 lines of code src/core/session/session-manager.ts:1 — src/core/session/session-manager.ts has 1978 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 · src/main/ipc/commands.ts · ×1
  • src/main/ipc/commands.ts: 1948 lines of code src/main/ipc/commands.ts:1 — src/main/ipc/commands.ts has 1948 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 · src/core/plugin/host/quick-js-worker.ts · ×1
  • src/core/plugin/host/quick-js-worker.ts: 1902 lines of code src/core/plugin/host/quick-js-worker.ts:1 — src/core/plugin/host/quick-js-worker.ts has 1902 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 · src/core/session/motrix-database.ts · ×1
  • src/core/session/motrix-database.ts: 1599 lines of code src/core/session/motrix-database.ts:1 — src/core/session/motrix-database.ts has 1599 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 · src/renderer/routes/dashboard/components/dashboard-grid.tsx · ×1
  • src/renderer/routes/dashboard/components/dashboard-grid.tsx: 1538 lines of code src/renderer/routes/dashboard/components/dashboard-grid.tsx:1 — src/renderer/routes/dashboard/components/dashboard-grid.tsx has 1538 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 · src/core/plugin/host/plugin-host.ts · ×1
  • src/core/plugin/host/plugin-host.ts: 1487 lines of code src/core/plugin/host/plugin-host.ts:1 — src/core/plugin/host/plugin-host.ts has 1487 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 · src/core/task/actions/finalize-task.ts · ×1
  • src/core/task/actions/finalize-task.ts: 1432 lines of code src/core/task/actions/finalize-task.ts:1 — src/core/task/actions/finalize-task.ts has 1432 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 · src/core/session/post-delivery-repository.ts · ×1
  • src/core/session/post-delivery-repository.ts: 1384 lines of code src/core/session/post-delivery-repository.ts:1 — src/core/session/post-delivery-repository.ts has 1384 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 · src/core/task/create-task-handler.ts · ×1
  • src/core/task/create-task-handler.ts: 1370 lines of code src/core/task/create-task-handler.ts:1 — src/core/task/create-task-handler.ts has 1370 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 · src/core/task/direct-resource-validator.ts · ×1
  • src/core/task/direct-resource-validator.ts: 1361 lines of code src/core/task/direct-resource-validator.ts:1 — src/core/task/direct-resource-validator.ts has 1361 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 · src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx · ×1
  • src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx: 1285 lines of code src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx:1 — src/renderer/features/web-directory-picker/web-directory-picker-dialog.tsx has 1285 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 · src/core/engine/aria2/aria2-adapter.ts · ×1
  • src/core/engine/aria2/aria2-adapter.ts: 1255 lines of code src/core/engine/aria2/aria2-adapter.ts:1 — src/core/engine/aria2/aria2-adapter.ts has 1255 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 · src/core/task/media-task-coordinator.ts · ×1
  • src/core/task/media-task-coordinator.ts: 1228 lines of code src/core/task/media-task-coordinator.ts:1 — src/core/task/media-task-coordinator.ts has 1228 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 · src/main/platform/appimage-integration.ts · ×1
  • src/main/platform/appimage-integration.ts: 1220 lines of code src/main/platform/appimage-integration.ts:1 — src/main/platform/appimage-integration.ts has 1220 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 · src/renderer/routes/dashboard/activity/activity-calendar.tsx · ×1
  • src/renderer/routes/dashboard/activity/activity-calendar.tsx: 1147 lines of code src/renderer/routes/dashboard/activity/activity-calendar.tsx:1 — src/renderer/routes/dashboard/activity/activity-calendar.tsx has 1147 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 · src/core/bridge/credential-store.ts · ×1
  • src/core/bridge/credential-store.ts: 1096 lines of code src/core/bridge/credential-store.ts:1 — src/core/bridge/credential-store.ts has 1096 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 · src/server/ipc/commands.ts · ×1
  • src/server/ipc/commands.ts: 1067 lines of code src/server/ipc/commands.ts:1 — src/server/ipc/commands.ts has 1067 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 · src/core/bridge/mbp1/pair-session.ts · ×1
  • src/core/bridge/mbp1/pair-session.ts: 1055 lines of code src/core/bridge/mbp1/pair-session.ts:1 — src/core/bridge/mbp1/pair-session.ts has 1055 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 · src/main/bridge/index.ts · ×1
  • src/main/bridge/index.ts: 1048 lines of code src/main/bridge/index.ts:1 — src/main/bridge/index.ts has 1048 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 · src/core/engine/engine-supervisor.ts · ×1
  • src/core/engine/engine-supervisor.ts: 1029 lines of code src/core/engine/engine-supervisor.ts:1 — src/core/engine/engine-supervisor.ts has 1029 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 · src/core/inspector-activity/task-inspector-activity-service.ts · ×1
  • src/core/inspector-activity/task-inspector-activity-service.ts: 1021 lines of code src/core/inspector-activity/task-inspector-activity-service.ts:1 — src/core/inspector-activity/task-inspector-activity-service.ts has 1021 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 · src/core/ffmpeg/verified-install.ts · ×1
  • src/core/ffmpeg/verified-install.ts: 1003 lines of code src/core/ffmpeg/verified-install.ts:1 — src/core/ffmpeg/verified-install.ts has 1003 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 · src/core/legacy-import/http-activation-service.ts · ×1
  • src/core/legacy-import/http-activation-service.ts: 1003 lines of code src/core/legacy-import/http-activation-service.ts:1 — src/core/legacy-import/http-activation-service.ts has 1003 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 · src/core/plugin/plugin-registry.ts · ×1
  • src/core/plugin/plugin-registry.ts: 985 lines of code src/core/plugin/plugin-registry.ts:1 — src/core/plugin/plugin-registry.ts has 985 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 · src/renderer/features/legacy-import/legacy-import-dialog.tsx · ×1
  • src/renderer/features/legacy-import/legacy-import-dialog.tsx: 981 lines of code src/renderer/features/legacy-import/legacy-import-dialog.tsx:1 — src/renderer/features/legacy-import/legacy-import-dialog.tsx has 981 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 · src/shared/lib/log-redact.ts · ×1
  • src/shared/lib/log-redact.ts: 959 lines of code src/shared/lib/log-redact.ts:1 — src/shared/lib/log-redact.ts 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 · src/core/torrent/swap-magnet-metadata-for-bt.ts · ×1
  • src/core/torrent/swap-magnet-metadata-for-bt.ts: 925 lines of code src/core/torrent/swap-magnet-metadata-for-bt.ts:1 — src/core/torrent/swap-magnet-metadata-for-bt.ts has 925 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/core/inspector-activity/task-inspector-activity-runtime.ts · ×1
  • src/core/inspector-activity/task-inspector-activity-runtime.ts: 912 lines of code src/core/inspector-activity/task-inspector-activity-runtime.ts:1 — src/core/inspector-activity/task-inspector-activity-runtime.ts has 912 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 · src/core/bridge/bridge-data-dir-lock.ts · ×1
  • src/core/bridge/bridge-data-dir-lock.ts: 888 lines of code src/core/bridge/bridge-data-dir-lock.ts:1 — src/core/bridge/bridge-data-dir-lock.ts has 888 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 · src/renderer/components/add-task/add-task-form.tsx · ×1
  • src/renderer/components/add-task/add-task-form.tsx: 878 lines of code src/renderer/components/add-task/add-task-form.tsx:1 — src/renderer/components/add-task/add-task-form.tsx has 878 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 · src/core/legacy-import/import-service.ts · ×1
  • src/core/legacy-import/import-service.ts: 854 lines of code src/core/legacy-import/import-service.ts:1 — src/core/legacy-import/import-service.ts 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 · src/renderer/routes/settings/cards/bit-torrent-dialog.tsx · ×1
  • src/renderer/routes/settings/cards/bit-torrent-dialog.tsx: 847 lines of code src/renderer/routes/settings/cards/bit-torrent-dialog.tsx:1 — src/renderer/routes/settings/cards/bit-torrent-dialog.tsx has 847 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 · src/core/bridge/extension-pairing-projection.ts · ×1
  • src/core/bridge/extension-pairing-projection.ts: 832 lines of code src/core/bridge/extension-pairing-projection.ts:1 — src/core/bridge/extension-pairing-projection.ts has 832 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 · src/core/plugin/finalize/finalize-recovery.ts · ×1
  • src/core/plugin/finalize/finalize-recovery.ts: 817 lines of code src/core/plugin/finalize/finalize-recovery.ts:1 — src/core/plugin/finalize/finalize-recovery.ts has 817 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · src/server/operator-admin.ts · ×1
  • src/server/operator-admin.ts: 816 lines of code src/server/operator-admin.ts:1 — src/server/operator-admin.ts has 816 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 (~833 LoC) · ×1
  • Dead file (~833 LoC) scripts/profile-task-inspector-activity.mts — no import path from any entry point (237 application, 68 tooling, 1086 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 (~156 LoC) · ×1
  • Dead file (~156 LoC) scripts/migrate-i18n.mjs — no import path from any entry point (237 application, 68 tooling, 1086 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 (~125 LoC) · ×1
  • Dead file (~125 LoC) src/renderer/components/ui/command.tsx — no import path from any entry point (237 application, 68 tooling, 1086 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 (~121 LoC) · ×1
  • Dead file (~121 LoC) scripts/profile-task-activity.mts — no import path from any entry point (237 application, 68 tooling, 1086 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 (~84 LoC) · ×1
  • Dead file (~84 LoC) src/renderer/components/desktop-kit/sidebar/nav-projects.tsx — no import path from any entry point (237 application, 68 tooling, 1086 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) src/renderer/components/desktop-kit/sidebar/nav-main.tsx — no import path from any entry point (237 application, 68 tooling, 1086 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 (~66 LoC) · ×1
  • Dead file (~66 LoC) src/renderer/routes/plugins/components/plugin-permission-list.tsx — no import path from any entry point (237 application, 68 tooling, 1086 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 (~61 LoC) · ×1
  • Dead file (~61 LoC) src/renderer/components/ui/native-select.tsx — no import path from any entry point (237 application, 68 tooling, 1086 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~37 LoC) · ×1
  • Dead file (~37 LoC) src/renderer/components/desktop-kit/sidebar/nav-secondary.tsx — no import path from any entry point (237 application, 68 tooling, 1086 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 '@electron/notarize' · ×1
  • Unused dependency '@electron/notarize' — Declared in the root 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 'tslib' · ×1
  • Unused dependency 'tslib' — Declared in the root 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 'vaul' · ×1
  • Unused dependency 'vaul' — Declared in the root 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.
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) scripts/smoke-server-package.mjs:67 — `spawn` pipes `stdout` here — it is given no `stdio` option, or `'pipe'` — but nothing in this scope ever reads `child.stdout`, while `child.stderr` is read and the child's end is awaited. Node holds an unread pipe's output only up to its buffer: once the child writes more than that to stdout (measured on Linux: about 128 KB — the 64 KB pipe plus Node's 64 KB read-ahead — and less elsewhere), the child blocks on the write, never exits, and the `close`/`exit` this code waits for never fires. Nothing fails loudly: the promise never settles, the request never returns, and the stuck child holds its resources until something kills it. Consume both streams (`child.stdout.on('data', …)`, or `child.stdout.resume()` to discard it), or stop piping the one you do not want — `stdio: ['pipe', 'pipe', 'inherit']` or `'ignore'` in that slot.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×1
  • Untrusted text written into markup unescaped REDACTED:93 — `Object.entries(THEMES).map(([theme,prefix])=>` ${prefix} [data-chart=${id}] { ${colorConfig.map(([key,itemConfig])=>{…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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.
Minor — 244 finding(s)
D10 · Test Quality · Mock-dominated test · ×96
  • Mock-dominated test: redacts child bindings and keeps the returned child protected src/core/logger.test.ts:177 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: reads settings only after the startup gate resolves src/core/bridge-receiver/default-save-dir.test.ts:117 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: removes a message listener by identity and leaves the others attached src/core/bridge/mbp1/envelope-message-stream.test.ts:479 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: supports the two close listeners the reader and writer each register src/core/bridge/mbp1/envelope-message-stream.test.ts:506 — This test sets up 4 test doubles (for example `vi.fn`) against 3 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: falls back to the system resolver and retries the task once src/core/engine/aria2/dns-fallback-consumer.test.ts:58 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: disposes RPC producers and local subscribers idempotently src/core/engine/aria2/aria2-adapter.test.ts:2313 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: discovers an inactive registry candidate and activates it on Hook demand src/core/plugin/hooks/hook-orchestrator.test.ts:285 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: restores preview piece priority for a lost video-only BT task src/core/session/session-manager.test.ts:1571 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not pause Downloading HTTP task on re-add src/core/session/session-manager.test.ts:2939 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not invoke a post-Hook directly for a preserved output conflict src/core/task/task-recovery-service.test.ts:531 — This test sets up 5 test doubles (for example `vi.fn`) against 3 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: records submission before the first update and completion between rename and durable completion src/core/task/media-task-coordinator.test.ts:1877 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: routes FTP to the FTP task type and skips HTTP plugins and probes src/core/task/create-task-handler.test.ts:189 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: dispatches a download in an existing volume root without trying to create it src/core/task/create-task-handler.test.ts:2011 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 1 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: threads errorDetailKey/errorDetailParams from the committed task into recordTransition src/core/task/actions/shared.test.ts:102 — This test sets up 9 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: records the accepted transition when polling publishes the same generation first src/core/task/actions/shared.test.ts:182 — This test sets up 11 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: rejects a stale transition after the public task switches engine generation src/core/task/actions/shared.test.ts:242 — This test sets up 11 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: commit into Error writes exactly one occurrence row atomically and dispatches it src/core/task/actions/shared.test.ts:288 — This test sets up 11 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: same-status re-commit (Error→Error) writes no occurrence src/core/task/actions/shared.test.ts:359 — This test sets up 11 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: a terminal-to-non-terminal transition (re-add) rides the trailing window src/core/task/actions/shared.test.ts:708 — This test sets up 10 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: re-terminating inside one window still notifies the bridge twice src/core/task/actions/shared.test.ts:745 — This test sets up 8 test doubles (for example `vi.fn`) against 6 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: forces one immediate flush after the fan-out settles src/core/task/actions/pause-all-tasks.test.ts:211 — This test sets up 14 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not force a flush when no task was eligible src/core/task/actions/pause-all-tasks.test.ts:252 — This test sets up 14 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: renames only the indexed payload and reseeds through the restored final name src/core/task/actions/finalize-task.test.ts:868 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: skips cleanup entirely when getTaskFiles returns no unselected files src/core/task/actions/finalize-task.test.ts:1751 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: delivers the occurrence to every registered consumer src/core/task/occurrences/occurrence-dispatcher.test.ts:31 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • + 71 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate src/server/bridge/remote-extension-admission-policy.ts:357 — `!Array.isArray(rawHeaders) || rawHeaders.length > MAX_RAW_HEADER_ENTRIES || rawHeaders.length % 2 !== 0` appears character-identically in 2 files — src/server/bridge/remote-extension-admission-policy.ts, src/server/bridge/remote-extension-host-policy.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/assemble-release-artifacts.mjs:480 — `!Array.isArray(value.files) || value.files.length === 0` appears character-identically in 2 files — scripts/assemble-release-artifacts.mjs, scripts/verify-update-artifacts.mjs. 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 scripts/stage-electron-app.mjs:137 — `!Array.isArray(values) || values.length === 0` appears character-identically in 2 files — scripts/stage-electron-app.mjs, scripts/stage-server-app.mjs. 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 scripts/release-snap-build-set.mjs:185 — `!Number.isSafeInteger(attempts) || attempts < 1 || attempts > 100` appears character-identically in 2 files — scripts/release-snap-build-set.mjs, scripts/verify-snap-store-channel.mjs. 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 scripts/release-snap-build-set.mjs:188 — `!Number.isSafeInteger(delayMs) || delayMs < 0 || delayMs > 300_000` appears character-identically in 2 files — scripts/release-snap-build-set.mjs, scripts/verify-snap-store-channel.mjs. 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 packages/native-host/package-flatpak-companion.mjs:333 — `!Number.isSafeInteger(value) || value < 0` appears character-identically in 6 files — packages/native-host/package-flatpak-companion.mjs, scripts/electron-package-utils.mjs, scripts/server-package-utils.mjs, src/core/bridge/credential-store.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/inspector-activity/validators.ts:54 — `!Number.isSafeInteger(value) || value <= 0` appears character-identically in 4 files — src/core/inspector-activity/validators.ts, src/core/lib/sqlite-integers.ts, src/server/bridge/remote-extension-admission-policy.ts, src/server/plugin/upload-store.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/legacy-import/http-request-context.ts:94 — `!['http:', 'https:'].includes(url.protocol) || url.username || url.password` appears character-identically in 2 files — src/core/legacy-import/http-request-context.ts, src/core/plugin/network/plugin-http-client.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderer/components/byte-unit-sync.tsx:29 — `!active || requestGeneration !== generation` appears character-identically in 2 files — src/renderer/components/byte-unit-sync.tsx, src/renderer/components/reduced-motion-sync.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/release-snap-build-set.mjs:303 — `!allowed.has(option) || value === undefined || value.startsWith('--')` appears character-identically in 2 files — scripts/release-snap-build-set.mjs, scripts/verify-snap-store-channel.mjs. 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 scripts/stage-electron-app.mjs:140 — `!denied && (positive.length === 0 || positive.includes(actual))` appears character-identically in 2 files — scripts/stage-electron-app.mjs, scripts/stage-server-app.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/server/bridge/remote-extension-host-policy.ts:109 — `!isIssuedRemoteExtensionConfig(config) || config.status !== 'enabled'` appears character-identically in 5 files — src/server/bridge/remote-extension-host-policy.ts, src/server/bridge/remote-extension-route-policy.ts, src/server/bridge/remote-extension-startup-log.ts, src/server/bridge/remote-extension-surface-policy.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/assemble-release-artifacts.mjs:494 — `!legacyFile || legacyFile.sha512 !== value.sha512` appears character-identically in 2 files — scripts/assemble-release-artifacts.mjs, scripts/verify-update-artifacts.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderer/routes/settings/cards/advanced-dialog.tsx:198 — `!load.ready || form.formState.isSubmitting` appears character-identically in 5 files — src/renderer/routes/settings/cards/advanced-dialog.tsx, src/renderer/routes/settings/cards/appearance-dialog.tsx, src/renderer/routes/settings/cards/bit-torrent-dialog.tsx, src/renderer/routes/settings/cards/integration/integration-dialog.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderer/features/directory-preferences/directory-preferences-section.tsx:128 — `!mounted.current || current !== generation.current` appears character-identically in 2 files — src/renderer/features/directory-preferences/directory-preferences-section.tsx, src/renderer/features/directory-preferences/use-directory-preferences-draft.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/renderer/routes/plugins/hooks/use-plugin-graph.ts:86 — `!mountedRef.current || requestVersionRef.current !== requestVersion` appears character-identically in 2 files — src/renderer/routes/plugins/hooks/use-plugin-graph.ts, src/renderer/routes/plugins/hooks/use-plugin-metadata.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/main/ipc/queries.ts:361 — `!outputPath || typeof outputPath !== 'string'` appears character-identically in 2 files — src/main/ipc/queries.ts, src/server/ipc/queries.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/legacy-import/bt-activation-service.ts:347 — `!path.isAbsolute(filename) || path.resolve(filename) !== filename || (await realpath(filename)) !== filename` appears character-identically in 2 files — src/core/legacy-import/bt-activation-service.ts, src/core/legacy-import/http-activation-service.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/settings/directory-preferences.ts:47 — `!path.isAbsolute(value) || value.includes('\0')` appears character-identically in 2 files — src/core/settings/directory-preferences.ts, src/server/server-directory-service.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:177 — `!proxyCredentials || proxyEndpoint === null` appears character-identically in 2 files — REDACTED, src/core/engine/engine-supervisor.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/legacy-import/bt-activation-service.ts:180 — `!relative || relative.startsWith('..') || path.isAbsolute(relative)` appears character-identically in 4 files — src/core/legacy-import/bt-activation-service.ts, src/core/legacy-import/http-activation-service.ts, src/core/legacy-import/source-scanner.ts, src/main/legacy-import/desktop-import.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate scripts/stage-electron-app.mjs:225 — `!target || (target !== canonicalRepoRoot && !isInside(canonicalRepoRoot, target))` appears character-identically in 2 files — scripts/stage-electron-app.mjs, scripts/stage-server-app.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/bridge/handlers/read-handlers.ts:82 — `!task || task.status === TaskStatus.Removed` appears character-identically in 2 files — src/core/bridge/handlers/read-handlers.ts, src/core/session/session-manager.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/legacy-import/bt-activation-service.ts:620 — `!this.deps.taskManager.isEngineTaskIdRetired(intent.engineTaskId) && !this.deps.taskManager.getByEngineTaskId(intent.engineTaskId)` appears character-identically in 2 files — src/core/legacy-import/bt-activation-service.ts, src/core/legacy-import/http-activation-service.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/core/legacy-import/source-scanner.ts:258 — `!value || typeof value !== 'object' || Array.isArray(value)` appears character-identically in 3 files — src/core/legacy-import/source-scanner.ts, src/core/plugin/runtime/plugin-hook-runtime.ts, src/core/session/finalize-journal-repository.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×23
  • Silent fallback default in catch scripts/fetch-builtins.mjs:141 — `verifySignature` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/profile-task-inspector-activity.mts:116 — `fileSize` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/bridge/file-pairing-store.ts:30 — `load` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/bridge/mbp1/frames.ts:84 — `base64UrlBytes` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/engine/aria2/aria2-adapter.ts:717 — `getTaskPeers` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/engine/aria2/aria2-adapter.ts:1201 — `getUploadLength` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/engine/aria2/aria2-process-output.ts:194 — `sanitize` swallows every exception into `return '[redacted-url]'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/plugin/capabilities/http-cookies.ts:296 — `cookieHeader` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/plugin/capabilities/i18n.ts:65 — `readDict` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/plugin/plugin-registry.ts:185 — `loadLocale` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/plugin/hooks/audit-view.ts:25 — `sanitizeForAudit.uris` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/plugin/install/plugin-installer.ts:185 — `loadManifestLocale` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/plugin/install/server-ack.ts:71 — `parseAllowlist` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:318 — `inAria2CidrBlock` swallows every exception into `return 'unsupported'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/session/motrix-database.ts:1588 — `parseTrackers` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/session/motrix-database.ts:1600 — `parseUris` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/core/session/motrix-database.ts:1612 — `parsePayload` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/main/bridge/safari-bootstrap-registration.ts:46 — `registerSafariBootstrap` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/renderer/routes/dashboard/tiles/transfer-tile.tsx:80 — `parseByteCount` swallows every exception into `return 0n` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/renderer/routes/downloads/inspector/use-task-actions.ts:52 — `errMsg` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/renderer/components/add-task/pending-create-inputs.ts:25 — `readPendingCreates` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/renderer/platform/web-services.ts:142 — `createWebServices.readClipboard` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/shared/lib/log-redact.ts:392 — `headerNames` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
M4 · Documentation accuracy · README/code drift · ×18
  • README/code drift README.md:90 — README.md names the package `@motrix/plugin-cli`, but no package.json of the workspace declares or depends on it. 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 README.md:112 — README.md runs `pnpm dev`, but no package.json declares a `dev` 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 README.md:114 — README.md runs `pnpm run pack`, but no package.json declares a `pack` 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 README.md:266 — README.md names Electron 44, but the manifest declares `electron` 45.0.0. 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 README.zh-CN.md:88 — README.zh-CN.md names the package `@motrix/plugin-cli`, but no package.json of the workspace declares or depends on it. 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 README.zh-CN.md:110 — README.zh-CN.md runs `pnpm dev`, but no package.json declares a `dev` 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 README.zh-CN.md:112 — README.zh-CN.md runs `pnpm run pack`, but no package.json declares a `pack` 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 docs/docker-server.md:188 — docs/docker-server.md runs `docker compose -f compose.yaml -f compose.aria2-rpc.yaml up -d --wait`, but `compose.aria2-rpc.yaml` does not exist. 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 docs/docker-server.zh-CN.md:173 — docs/docker-server.zh-CN.md runs `docker compose -f compose.yaml -f compose.aria2-rpc.yaml up -d --wait`, but `compose.aria2-rpc.yaml` does not exist. 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 docs/production-builds.md:116 — docs/production-builds.md names Electron 44, but the manifest declares `electron` 45.0.0. 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 e2e/bridge/README.md:21 — e2e/bridge/README.md runs `pnpm build:chromium`, but no package.json declares a `build:chromium` 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 e2e/bridge/README.md:21 — e2e/bridge/README.md runs `pnpm build:firefox`, but no package.json declares a `build:firefox` 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 e2e/bridge/README.zh-CN.md:17 — e2e/bridge/README.zh-CN.md runs `pnpm build:chromium`, but no package.json declares a `build:chromium` 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 e2e/bridge/README.zh-CN.md:18 — e2e/bridge/README.zh-CN.md runs `pnpm build:firefox`, but no package.json declares a `build:firefox` 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 packages/finalize-fs/README.md:211 — packages/finalize-fs/README.md documents the environment variable `SHARING_VIOLATION`, but no code, script or configuration file names it. 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 packages/finalize-fs/README.md:212 — packages/finalize-fs/README.md documents the environment variable `LOCK_VIOLATION`, but no code, script or configuration file names it. 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 packages/finalize-fs/README.md:222 — packages/finalize-fs/README.md documents the environment variable `ERROR_INVALID_FUNCTION`, but no code, script or configuration file names it. 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 packages/finalize-fs/README.md:223 — packages/finalize-fs/README.md documents the environment variable `ERROR_NOT_SUPPORTED`, but no code, script or configuration file names it. 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.
IC1 · Incompleteness & stubs · Disabled test · ×12
  • Disabled test e2e/application-menu.spec.ts:161 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/application-menu.spec.ts:177 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/bridge/appimage-cold-launch.spec.ts:101 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/bridge/appimage-cold-launch.spec.ts:110 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/bridge/native-messaging-registration.spec.ts:15 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/hidden-window-startup.spec.ts:17 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/legacy-bt-activation.spec.ts:53 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/legacy-http-activation.spec.ts:41 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/media-settings.spec.ts:10 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/renderer-recovery-soak.spec.ts:11 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test e2e/renderer-recovery.spec.ts:420 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test tests/integration/community-plugin-install.test.ts:13 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
P2 · Observability · Console output used as the logging channel · ×9
  • Console output used as the logging channel packages/safari-bootstrap/test-integration.mjs:113 — `packages/safari-bootstrap/test-integration.mjs` reports through `console.*` at line 113 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/core/plugin/capabilities/commands.ts:138 — `src/core/plugin/capabilities/commands.ts` reports through `console.*` at line 138 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/renderer/components/add-task/add-task-form.tsx:380 — `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 380 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/renderer/components/add-task/add-task-form.tsx:462 — `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 462 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/renderer/components/add-task/add-task-form.tsx:506 — `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 506 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/renderer/components/add-task/add-task-form.tsx:589 — `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 589 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/renderer/components/add-task/add-task-form.tsx:706 — `src/renderer/components/add-task/add-task-form.tsx` reports through `console.*` at line 706 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/renderer/lib/notification-text.ts:21 — `src/renderer/lib/notification-text.ts` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/renderer/routes/dashboard/components/tile-error-boundary.tsx:45 — `src/renderer/routes/dashboard/components/tile-error-boundary.tsx` reports through `console.*` at line 45 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
X4 · Structured logging · Interpolated log message defeats structured logging · ×7
  • Interpolated log message defeats structured logging src/core/task/actions/shared.ts:226 — `warn` at line 226 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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.
  • Interpolated log message defeats structured logging src/core/task/actions/shared.ts:248 — `warn` at line 248 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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.
  • Interpolated log message defeats structured logging src/core/task/actions/shared.ts:375 — `warn` at line 375 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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.
  • Interpolated log message defeats structured logging src/core/task/actions/shared.ts:384 — `warn` at line 384 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.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('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.
  • Interpolated log message defeats structured logging src/main/window/window-manager.ts:554 — `error` at line 554 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.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('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.
  • Interpolated log message defeats structured logging src/server/index.ts:1785 — `info` at line 1785 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.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('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.
  • Interpolated log message defeats structured logging src/server/bridge/remote-extension-startup-log.ts:39 — `info` at line 39 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.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('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.
IC1 · Incompleteness & stubs · Empty method body · ×5
  • Empty method body src/core/plugin/host/plugin-host.ts:178 — `unsubscribeLocale` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body src/core/plugin/host/plugin-host.ts:180 — `unsubscribeSecurity` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body src/core/plugin/post/delivery-observability.ts:69 — `emit` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body src/renderer/components/desktop-kit/cubic-glass/renderer.ts:28 — `schedule` has an empty body — confirm it's an intentional no-op and not an unfinished method.
  • Empty method body src/shared/i18n-resources.ts:76 — `init` has an empty body — confirm it's an intentional no-op and not an unfinished method.
AX6 · Interface segregation · Fat interface · ×3
  • Fat interface: EngineAdapter (35 required operations) src/core/engine/engine-adapter.ts:192 — `EngineAdapter` declares 35 required operations: `setTaskBtTracker`, `connect`, `disconnect`, `getCapabilities`, `getFeatureReport`, `createDownload`, `pauseTask`, `resumeTask`, `removeTask`, `forceRemoveTask`, `getEngineTaskOptions`, `pauseAll`, `resumeAll`, `changePosition`, `getTaskStatus`, `getTaskFiles`, `changeOption`, `getTaskPieces`, `getTaskPeers`, `getGlobalStats`, `addTorrent`, `getTaskBtTracker`, `removeDownloadResult`, `removeDownloadResults`, `getUploadLength`, `listActiveAndWaiting`, `listWaitingTaskIds`, `listStopped`, `getHistoryCount`, `searchHistory`, `exportSession`, `requeueFromHistory`, `onBtDownloadComplete`, `onDownloadComplete`, `onDownloadError`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: CapabilityHost (16 required operations) src/core/plugin/capabilities/interface.ts:53 — `CapabilityHost` declares 16 required operations: `createLog`, `getTail`, `clearLog`, `setLogVerbose`, `isLogVerbose`, `getLogState`, `subscribeLog`, `appSnapshot`, `i18nSnapshot`, `setLocale`, `onLocaleChange`, `flush`, `fsTaskFor`, `fsStorageFor`, `configFor`, `cookieJarFor`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: SelectionState (16 required operations) src/renderer/components/desktop-kit/selection/types.ts:3 — `SelectionState` declares 16 required operations: `select`, `toggle`, `rangeSelect`, `selectAll`, `clearSelection`, `setItems`, `marqueeSelect`, `marqueeEnd`, `moveFocus`, `focusedSelect`, `shiftMoveFocus`, `focus`, `extendSelection`, `moveSelection`, `isSelected`, `selectedCount`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×2
  • No app-layer HTTPS enforcement detected REDACTED:501 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
  • No app-layer HTTPS enforcement detected src/core/bridge/web-socket-bridge-server.ts:926 — `http.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
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 · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is `(repository root)` (226556 LoC, 2468 module-visible types across 153 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
DM9 · Scattered domain decisions · Rule about [digest, identity] decided in 2 places · ×1
  • Rule about [digest, identity] decided in 2 places — src.core.legacy-import.source-scanner.LegacySnapshotFile's [digest, identity] are judged in src.core.legacy-import.bt-activation-service.LegacyBtActivationService, src.core.legacy-import.source-scanner — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [identity, root] decided in 3 places · ×1
  • Rule about [identity, root] decided in 3 places — src.core.legacy-import.source-scanner.LegacySource's [identity, root] are judged in src.core.legacy-import.bt-activation-service.LegacyBtActivationService, src.core.legacy-import.http-activation-service.LegacyHttpActivationService, src.core.legacy-import.import-service.LegacyImportService — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [code, details] decided in 2 places · ×1
  • Rule about [code, details] decided in 2 places — src.core.plugin.finalize.filesystem-adapter.FinalizeFsError's [code, details] are judged in src.core.plugin.finalize.finalize-committer.FinalizeCommitter, src.core.plugin.finalize.finalize-recovery-errors — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [downloadBytes, uploadBytes] decided in 3 places · ×1
  • Rule about [downloadBytes, uploadBytes] decided in 3 places — src.core.stats.transfer-stats-store.TransferDelta's [downloadBytes, uploadBytes] are judged in src.core.stats.transfer-stats-service.TransferStatsService, src.core.stats.transfer-stats-store, src.core.stats.transfer-stats-store.TransferStatsStore — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
DM9 · Scattered domain decisions · Rule about [endAt, startAt] decided in 2 places · ×1
  • Rule about [endAt, startAt] decided in 2 places — src.renderer.routes.downloads.inspector.activity-chart-model.ActivityPauseBand's [endAt, startAt] are judged in src.renderer.routes.downloads.inspector.activity-chart-model, src.renderer.routes.downloads.inspector.lifetime-transfer-card — the same decision, restated. Every copy is a chance to drift, and copies drift silently because each one looks correct on its own. Move the judgement onto the type that owns the members and let the call sites ask it.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 3/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/finalize-fs`.
R7 · Dead Code · Unused export 'LOCAL_CONTEXT_FILE' · ×1
  • Unused export 'LOCAL_CONTEXT_FILE' scripts/obsidian-docs-lib.mjs:14 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_CREATE_CONTENT_BYTES' · ×1
  • Unused export 'MAX_CREATE_CONTENT_BYTES' scripts/obsidian-docs-lib.mjs:15 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'serverPackageTargets' · ×1
  • Unused export 'serverPackageTargets' scripts/server-package-utils.mjs:510 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_ENVELOPE_BLOCKS' · ×1
  • Unused export 'MAX_ENVELOPE_BLOCKS' REDACTED:59 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'NmTicketWire' · ×1
  • Unused export 'NmTicketWire' src/core/bridge/mbp1/frames.ts:119 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PairHelloFrame' · ×1
  • Unused export 'PairHelloFrame' src/core/bridge/mbp1/frames.ts:150 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PairAcceptFrame' · ×1
  • Unused export 'PairAcceptFrame' src/core/bridge/mbp1/frames.ts:165 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PakeAFrame' · ×1
  • Unused export 'PakeAFrame' src/core/bridge/mbp1/frames.ts:175 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PakeBFrame' · ×1
  • Unused export 'PakeBFrame' src/core/bridge/mbp1/frames.ts:185 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ConfirmAFrame' · ×1
  • Unused export 'ConfirmAFrame' src/core/bridge/mbp1/frames.ts:203 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ConfirmBFrame' · ×1
  • Unused export 'ConfirmBFrame' src/core/bridge/mbp1/frames.ts:213 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CredentialOfferFrame' · ×1
  • Unused export 'CredentialOfferFrame' src/core/bridge/mbp1/frames.ts:228 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CredentialAckFrame' · ×1
  • Unused export 'CredentialAckFrame' src/core/bridge/mbp1/frames.ts:238 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CredentialCommittedFrame' · ×1
  • Unused export 'CredentialCommittedFrame' src/core/bridge/mbp1/frames.ts:247 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ReconnectResponseFrame' · ×1
  • Unused export 'ReconnectResponseFrame' src/core/bridge/mbp1/frames.ts:274 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MAX_SAFE_SQLITE_INTEGER' · ×1
  • Unused export 'MAX_SAFE_SQLITE_INTEGER' src/core/inspector-activity/validators.ts:11 — Nothing ultimately consumes this binding: its only referrer is the re-export in src/core/inspector-activity/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/core/inspector-activity/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'MAX_SAMPLE_FLAGS' · ×1
  • Unused export 'MAX_SAMPLE_FLAGS' src/core/inspector-activity/validators.ts:19 — Nothing ultimately consumes this binding: its only referrer is the re-export in src/core/inspector-activity/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/core/inspector-activity/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'CookieJarError' · ×1
  • Unused export 'CookieJarError' src/core/plugin/capabilities/http-cookies.ts:47 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'BridgeMessageId' · ×1
  • Unused export 'BridgeMessageId' src/core/plugin/host/bridge-protocol.ts:22 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'BridgeHookScope' · ×1
  • Unused export 'BridgeHookScope' src/core/plugin/host/bridge-protocol.ts:79 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'POST_DELIVERY_TOMBSTONE_MAX_BYTES' · ×1
  • Unused export 'POST_DELIVERY_TOMBSTONE_MAX_BYTES' src/core/plugin/post/delivery-retention.ts:23 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PostDeliveryQuotaTombstone' · ×1
  • Unused export 'PostDeliveryQuotaTombstone' src/core/plugin/post/delivery-types.ts:136 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'TRANSFER_PRUNE_INTERVAL_MS' · ×1
  • Unused export 'TRANSFER_PRUNE_INTERVAL_MS' src/core/stats/transfer-stats-service.ts:14 — Nothing ultimately consumes this binding: its only referrer is the re-export in src/core/stats/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/core/stats/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'MAX_WALL_MONOTONIC_DRIFT_MS' · ×1
  • Unused export 'MAX_WALL_MONOTONIC_DRIFT_MS' src/core/stats/transfer-stats-service.ts:16 — Nothing ultimately consumes this binding: its only referrer is the re-export in src/core/stats/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/core/stats/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'MenuContextPatch' · ×1
  • Unused export 'MenuContextPatch' src/main/commands/context-schema.ts:21 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ProtocolRegistrationResult' · ×1
  • Unused export 'ProtocolRegistrationResult' src/main/platform/protocol-manager.ts:49 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ToolbarSeparator' · ×1
  • Unused export 'ToolbarSeparator' src/renderer/components/desktop-kit/toolbar/toolbar.tsx:49 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CopyLinkIcon' · ×1
  • Unused export 'CopyLinkIcon' src/renderer/components/icons/copy-link.tsx:4 — Nothing ultimately consumes this binding: its only referrer is the re-export in src/renderer/components/icons/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/renderer/components/icons/index.ts in the same commit, or the barrel will import a name that no longer exists.
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 11/18 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.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×1
  • Diagnostic log message is built whether or not it is wanted src/core/plugin/hooks/hook-orchestrator.ts:634 — `debug` at line 634 is called with an argument built by `active.map((p) => p.id)` (line 639), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~0.3 `!` null assertions per 1k TypeScript source lines — 58 assertion(s) across the 217035 source line(s) of the 1280 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/core/session/motrix-database.ts (32), src/core/plugin/capabilities/ffmpeg.ts (4), src/core/inspector-activity/task-inspector-activity-runtime.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
X7 · Silent fallback defaults · Silent fallback default on Err · ×1
  • Silent fallback default on Err packages/native-host/src/safari_bootstrap.rs:162 — `motrix_safari_bootstrap_v2` turns every `Err` into `SafariBootstrapResult::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Minor — 43 finding(s)
D10 · Test Quality · Skipped (documented) · ×40
  • Skipped (documented): (unnamed test) src/core/bridge-receiver/task-cookies.integration.test.ts:253 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/file-extension-pairing-projection-store.test.ts:211 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/file-extension-pairing-projection-store.test.ts:231 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/file-extension-pairing-projection-store.test.ts:251 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/credential-store.test.ts:399 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/credential-store.test.ts:446 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/bridge-data-dir-lock.test.ts:94 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/bridge-data-dir-lock.test.ts:128 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/bridge-data-dir-lock.test.ts:150 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/bridge-data-dir-lock.test.ts:241 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/bridge-data-dir-lock.test.ts:282 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/bridge-data-dir-lock.test.ts:345 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/bridge/bridge-data-dir-lock.test.ts:376 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/ffmpeg/verified-install.test.ts:518 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/core/ffmpeg/verified-install.test.ts:574 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/core/plugin/capabilities/ffmpeg-detect.test.ts:29 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/core/plugin/finalize/native-artifact-operations.integration.test.ts:504 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/plugin/finalize/native-artifact-operations.integration.test.ts:635 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/plugin/finalize/finalize-recovery.test.ts:267 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/core/plugin/finalize/finalize-nfs-recovery.integration.test.ts:189 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/core/plugin/finalize/finalize-filesystems.integration.test.ts:237 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/plugin/finalize/finalize-exfat.integration.test.ts:469 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/plugin/finalize/finalize-exfat.integration.test.ts:502 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) src/core/plugin/operations/operation-service.test.ts:358 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/core/plugin/operations/operation-service.test.ts:388 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • + 15 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated · ×3
  • Outdated: libc — `libc` is locked at 0.2.189 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in packages/finalize-fs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated Cargo.lock.
  • Outdated: rustix — `rustix` is locked at 1.1.4 but 1.1.5 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in packages/finalize-fs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustix` and commit the updated Cargo.lock.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in packages/finalize-fs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated Cargo.lock.

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-df91d15896c44150a597ddbd4111f44f/history.json --exit-code 0 --source .8artifacts/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-df91d15896c44150a597ddbd4111f44f/tree.json --exit-code 0 --source .5artifacts/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 .44artifacts/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-update9artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .0artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 34 file(s) — `scripts/vite-production-output.ts`, `src/core/bridge/bridge-data-dir-lock.ts`, `src/core/bridge/credential-store.ts`, `src/core/bridge/extension-identity-resolver.ts`, `src/core/bridge/extension-pairing-projection.ts`, … (+29 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16e29-9038-710d-97c3-eac5ed7a8cc8 · 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