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

blakeblackshear/frigate

Measured 26 October 2026, 18:13 UTC, at code version 0dc0530

Regression: 2 dimensions fell since the last survey Test reliability: not measured

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.

Test reliability is not measured: No runner for the .tsx half of a polyglot repository.

CAI score 45out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey

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

A large codebase: 213,247 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 1.6 person-years · Weakest lens: Accessibility, 37

Findings by how serious they are

169 critical 1879 serious 199 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 18:13 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 ▸

85of 85 dimensions measured by tools.
2207of 2247 findings point to an exact file and line, so you can open each one in the code. The other 40 concern the repository as a whole, such as missing documentation.
85dimensions across 7 lenses, read from 213,247 lines of product code in 4 projects.
Chapters

Executive summary

blakeblackshear/frigate falls short of our standard for a preview release because its Dependencies dimensions are rated Critical, and it has controls that only work with a mouse. It scores 45 out of 100, which alone would earn Adequate, but it is rated Weak: a rating can't sit more than one step above its weakest group.

Accessibility, at 37, is the weakest lens and counts most in the score. The best first step is replacing the two exposed passwords or keys and switching the old ones off, worth about 4 points. Making the controls keyboard-usable would lift Accessibility itself, also worth about 4. Raising Accessibility to 65 would lift the score to about 51.

Thirty-nine controls can't be used without a mouse. Thirty-six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and twenty-six settings leave the servers or containers unsafe. Making the controls work with a keyboard, pinning each tool to an exact version and correcting the unsafe settings would close these risks. Updating the vulnerable packages would fix the three packages with a known security hole, and the 16 pipeline steps that run downloads without checking them need each download checked against a known checksum first. The 15 images with no text description need a text description.

The product code is 213,247 lines, about €230,000 to rebuild.

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

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

If Accessibility rose from 37 to 65, the lowest score rated Strong, the score would rise from 45 to about 51.

Code composition: what the lines of code are
Product code 81%Tests 19%
New since the last survey: 216 findings

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

  • Cyclomatic Complexity · app._restore_masked_camera_paths (cyclomatic 19) frigate/api/app.py
  • Cyclomatic Complexity · webpush.validate_push_endpoint (cyclomatic 19) frigate/comms/webpush.py
  • Cyclomatic Complexity · _AxeleraRuntimeInference.__init__ (cyclomatic 18) REDACTED
  • Cognitive Complexity · env.substitute_frigate_vars (cognitive 26) frigate/util/env.py
  • Cognitive Complexity · services.find_restricted_go2rtc_stream_changes (cognitive 25) frigate/util/services.py
  • Cognitive Complexity · _AxeleraRuntimeInference.__init__ (cognitive 21) REDACTED
  • Cognitive Complexity · motion_search_decode.probe_vod_keyframe_pts (cognitive 18) frigate/jobs/motion_search_decode.py
  • Cognitive Complexity · app._redact_go2rtc_credentials (cognitive 17) frigate/api/app.py
  • Cognitive Complexity · webpush.validate_push_endpoint (cognitive 16) frigate/comms/webpush.py
  • Cognitive Complexity · axelera._resolve_model_json (cognitive 16) REDACTED
  • Cognitive Complexity · recording_coverage.plan_clip (cognitive 16) frigate/util/recording_coverage.py
  • God Classes · FileTooLong: REDACTED REDACTED
  • God Classes · FunctionTooLong: ModelSourcePicker.ModelSourcePicker web/src/components/config-form/theme/fields/ModelSourcePicker.tsx
  • God Classes · FunctionTooLong: CameraPathWidget.CameraPathWidget web/src/components/config-form/theme/widgets/CameraPathWidget.tsx
  • God Classes · FileTooLong: comms/webpush.py frigate/comms/webpush.py
  • God Classes · FileTooLong: detectors/detection_runners.py frigate/detectors/detection_runners.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) frigate/comms/dispatcher.py
  • Code Duplication · Duplicated block (13 lines × 2) frigate/api/media.py
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/auth.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/chat.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/classification.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/classification.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/error-boundary.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/error-boundary.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/error-boundary.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/export.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/face-library.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/face-library.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/face-library.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/face-library.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/face-library.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/history-debug-replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/history-debug-replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/history-debug-replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-auto-stream.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-grid-aspect-modes.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-webrtc-availability.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-webrtc-availability.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-webrtc-availability.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-webrtc-availability.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-webrtc-availability.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-webrtc-availability.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live-webrtc-availability.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/live.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/logs.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/masonry-live-grid.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/masonry-live-grid.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/navigation.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/preview-rollover.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/preview-rollover.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/preview-rollover.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/replay.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/review.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/review.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/review.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/system-health.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/system-health.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/system-health.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/system-health.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/system-health.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/system-health.spec.ts
  • Test Quality · Skipped test: (unnamed test) web/e2e/specs/system-health.spec.ts

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

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

  • Cyclomatic Complexity · notification._validate_push_endpoint (cyclomatic 18) frigate/api/notification.py
  • Cognitive Complexity · env.substitute_frigate_vars (cognitive 26) frigate/config/env.py
  • Cognitive Complexity · BroadcastThread.run (cognitive 21) frigate/output/birdseye.py
  • Cognitive Complexity · BroadcastThread.run (cognitive 21) frigate/output/camera.py
  • Cognitive Complexity · CameraWatchdog.reset_capture_thread (cognitive 18) frigate/video/ffmpeg.py
  • Cognitive Complexity · media_auth.deny_response_for_media_uri (cognitive 17) frigate/api/media_auth.py
  • Cognitive Complexity · ObjectDescriptionProcessor._process_genai_description (cognitive 17) frigate/data_processing/post/object_descriptions.py
  • Cognitive Complexity · notification._validate_push_endpoint (cognitive 16) frigate/api/notification.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) frigate/comms/dispatcher.py
  • Code Duplication · Duplicated block (10–16 lines × 2) frigate/api/app.py
  • Code Duplication · Duplicated block (16 lines × 2) frigate/api/media.py
  • Code Duplication · Duplicated block (11–12 lines × 3) frigate/api/media.py
  • Code Duplication · Duplicated block (11 lines × 2) frigate/api/media.py
  • Code Duplication · Duplicated block (6 lines × 2) frigate/comms/embeddings_updater.py
  • Test Reliability · Flaky test: frigate.test.test_sqlitevecq_embeddings.TestDeleteEmbeddings.test_delete_removes_embeddings
  • Churn × Complexity Hotspots · Hotspot: web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx
  • Churn × Complexity Hotspots · Hotspot: web/src/components/config-form/theme/fields/CameraInputsField.tsx web/src/components/config-form/theme/fields/CameraInputsField.tsx
  • Explicit Debt · TodoComment frigate/api/auth.py
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • IaC & Container Security · Medium IaC: REDACTED REDACTED
  • IaC & Container Security · Medium IaC: CKV_DOCKER_9 REDACTED
  • IaC & Container Security · Medium IaC: REDACTED REDACTED
  • IaC & Container Security · Medium IaC: REDACTED REDACTED
  • Change Coupling · Change coupling: CameraImage.tsx ↔ LivePlayer.tsx web/src/components/camera/CameraImage.tsx
  • Supply-chain Provenance & Signing · REDACTED
  • Code Duplication · Duplicated block (52 lines × 2 locations) web/src/views/live/LiveCameraView.tsx
  • Code Duplication · Duplicated block (51 lines × 2 locations) web/src/views/settings/EnrichmentsSettingsView.tsx
  • Code Duplication · Duplicated block (50 lines × 2 locations) web/src/components/overlay/CreateRoleDialog.tsx
  • Code Duplication · Duplicated block (49 lines × 2 locations) web/src/pages/Settings.tsx
  • Code Duplication · Duplicated block (47 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) web/src/components/player/MsePlayer.tsx
  • Code Duplication · Duplicated block (46 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (45 lines × 2 locations) web/src/components/classification/ClassificationModelEditDialog.tsx
  • Code Duplication · Duplicated block (44 lines × 2 locations) web/src/components/config-form/theme/templates/FieldTemplate.tsx
  • Code Duplication · Duplicated block (44 lines × 2 locations) web/src/components/settings/wizard/Step3StreamConfig.tsx
  • Code Duplication · Duplicated block (43 lines × 2 locations) web/src/components/graph/LineGraph.tsx
  • Code Duplication · Duplicated block (43 lines × 2 locations) web/src/views/settings/TriggerView.tsx
  • Code Duplication · Duplicated block (42 lines × 2 locations) web/src/components/overlay/ExportDialog.tsx
  • Code Duplication · Duplicated block (42 lines × 2 locations) web/src/views/system/CameraMetrics.tsx
  • Code Duplication · Duplicated block (40 lines × 2 locations) web/src/components/settings/MotionMaskEditPane.tsx
  • Code Duplication · Duplicated block (40 lines × 2 locations) web/src/views/settings/CameraManagementView.tsx
  • Code Duplication · Duplicated block with local edits (39 matched lines × 2 locations) web/src/components/config-form/theme/fields/KnownPlatesField.tsx
  • Code Duplication · Duplicated block (39 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (39 lines × 3 locations) web/src/components/settings/CameraStreamingDialog.tsx
  • Code Duplication · Duplicated block (39 lines × 2 locations) web/src/components/ui/heading.tsx
  • Code Duplication · Duplicated block with local edits (38 matched lines × 2 locations) web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx
  • Code Duplication · Duplicated block (38 lines × 2 locations) web/src/components/settings/MotionMaskEditPane.tsx
  • Code Duplication · Duplicated block (38 lines × 2 locations) web/src/pages/FaceLibrary.tsx
  • Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) web/src/components/filter/ExportFilterGroup.tsx
  • Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) web/src/components/filter/ReviewFilterGroup.tsx
  • Code Duplication · Duplicated block (36 lines × 2 locations) web/src/components/card/ExportCard.tsx
  • Code Duplication · Duplicated block with local edits (35 matched lines × 2 locations) web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx
  • Code Duplication · Duplicated block (35 lines × 2 locations) web/src/components/filter/LogSettingsButton.tsx
  • Code Duplication · Duplicated block (35 lines × 2 locations) web/src/hooks/use-overlay-state.tsx
  • Code Duplication · Duplicated block (35 lines × 2 locations) web/src/views/motion-search/MotionSearchDialog.tsx
  • Code Duplication · Duplicated block (34 lines × 2 locations) web/src/components/config-form/theme/fields/LayoutGridField.tsx
  • Code Duplication · Duplicated block (34 lines × 2 locations) web/src/lib/config-schema/transformer.ts
  • Code Duplication · Duplicated block (34 lines × 2 locations) web/src/views/settings/AuthenticationView.tsx
  • Code Duplication · Duplicated block (33 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (33 lines × 2 locations) web/src/components/timeline/EventSegment.tsx
  • Code Duplication · Duplicated block (33 lines × 2 locations) web/src/pages/FaceLibrary.tsx
  • Code Duplication · Duplicated block (33 lines × 2 locations) web/src/views/settings/SingleSectionPage.tsx
  • Code Duplication · Duplicated block (32 lines × 2 locations) web/src/components/config-form/theme/templates/FieldTemplate.tsx
  • Code Duplication · Duplicated block (32 lines × 2 locations) web/src/components/overlay/CustomTimeSelector.tsx
  • Code Duplication · Duplicated block (32 lines × 2 locations) web/src/components/overlay/detail/SearchDetailDialog.tsx
  • Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) web/src/pages/Events.tsx
  • Code Duplication · Duplicated block (32 lines × 2 locations) web/src/views/live/LiveBirdseyeView.tsx
  • Code Duplication · Duplicated block (32 lines × 2 locations) web/src/views/motion-search/MotionSearchView.tsx
  • Code Duplication · Duplicated block (31 lines × 2 locations) web/src/hooks/use-config-override.ts
  • Code Duplication · Duplicated block (31 lines × 2 locations) web/src/views/events/EventView.tsx
  • Code Duplication · Duplicated block (31 lines × 2 locations) web/src/views/live/DraggableGridLayout.tsx
  • Code Duplication · Duplicated block (30 lines × 2 locations) web/src/components/config-form/sectionExtras/CameraReviewStatusToggles.tsx
  • Code Duplication · Duplicated block (30 lines × 4 locations) web/src/views/settings/EnrichmentsSettingsView.tsx
  • Code Duplication · Duplicated block (29 lines × 2 locations) web/src/components/filter/CamerasFilterButton.tsx
  • Code Duplication · Duplicated block (29 lines × 2 locations) web/src/components/filter/SearchFilterGroup.tsx
  • Code Duplication · Duplicated block (29 lines × 2 locations) web/src/components/settings/ObjectMaskEditPane.tsx
  • Code Duplication · Duplicated block (29 lines × 2 locations) web/src/pages/FaceLibrary.tsx
  • Code Duplication · Duplicated block (29 lines × 2 locations) web/src/views/live/LiveBirdseyeView.tsx
  • Code Duplication · Duplicated block (28 lines × 2 locations) web/src/components/overlay/SetPasswordDialog.tsx
  • Code Duplication · Duplicated block (28 lines × 2 locations) web/src/views/live/DraggableGridLayout.tsx
  • Code Duplication · Duplicated block (27 lines × 2 locations) web/src/components/config-form/sectionExtras/BirdseyeCameraReorder.tsx
  • Code Duplication · Duplicated block (27 lines × 2 locations) web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx
  • Code Duplication · Duplicated block (27 lines × 4 locations) web/src/components/settings/ZoneEditPane.tsx
  • Code Duplication · Duplicated block (27 lines × 2 locations) web/src/pages/UIPlayground.tsx
  • Code Duplication · Duplicated block (27 lines × 2 locations) web/src/views/settings/EnrichmentsSettingsView.tsx
  • Code Duplication · Duplicated block (26 lines × 4 locations) web/src/components/menu/GeneralSettings.tsx
  • Code Duplication · Duplicated block (26 lines × 2 locations) web/src/components/overlay/CreateTriggerDialog.tsx
  • Code Duplication · Duplicated block (26 lines × 2 locations) web/src/components/overlay/detail/FaceCreateWizardDialog.tsx
  • Code Duplication · Duplicated block (26 lines × 3 locations) web/src/components/settings/MotionMaskEditPane.tsx
  • Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) web/src/views/events/MotionPreviewsPane.tsx
  • Code Duplication · Duplicated block (26 lines × 2 locations) web/src/views/settings/CameraManagementView.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) web/src/components/config-form/sections/BaseSection.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) web/src/components/overlay/GPUInfoDialog.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) web/src/components/settings/CameraStreamingDialog.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) web/src/components/settings/MotionMaskEditPane.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) web/src/components/timeline/VirtualizedEventSegments.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) web/src/components/timeline/VirtualizedEventSegments.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) web/src/views/live/DraggableGridLayout.tsx
  • Code Duplication · Duplicated block (24 lines × 3 locations) web/src/views/events/EventView.tsx
  • Code Duplication · Duplicated block (23 lines × 3 locations) web/src/components/filter/CameraGroupSelector.tsx
Rebuild cost: about €230,000 · Estimate
Cost to rebuild€77,000 to €390,000, for 1,289 to 4,090 hours of work, about 1.6 person-years for 1 to 4 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 45. 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: 213,247 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.
Raises the score by about 4 points · Low effort · REDACTED Scanning
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 4 points · Medium effort · Keyboard semantics
3
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with error-collector.spec.ts (2).
Raises the score by about 2 points · Low effort · Test Quality

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 €230,000 to build again, about 1.6 person-years of work. Its weakest lens is Accessibility, at 37 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 2 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 102,424 lines over the last 90 days, which is about 415,386 lines a year. At that pace, the extra work comes to an estimated 55.1 to 330.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · 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: 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.

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

The table shows the 40 modules with the most connections; 388 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 frigate.camera2 frigate.comms.event_metadata_updater3 frigate.comms.inter_process4 frigate.config.base5 frigate.config.camera.updater6 frigate.data_processing.types7 frigate.detectors.detector_config8 frigate.jobs.job9 frigate.models10 frigate.util.process11 web.src.components.ui12 web.src.hooks13 web.src.utils14 frigate.config.camera.detect15 frigate.config.camera.ffmpeg16 frigate.config.camera.record17 frigate.config.classification18 frigate.detectors.detection_api19 frigate.config.camera.camera20 frigate.config.config21 frigate22 frigate.comms.dispatcher23 frigate.data_processing.common.license_plate.mixin24 frigate.data_processing.post.api25 frigate.data_processing.real_time.api26 frigate.genai27 frigate.jobs28 frigate.track.tracked_object29 frigate.util30 frigate.data_processing.post.license_plate31 frigate.data_processing.post.object_descriptions32 frigate.data_processing.post.review_descriptions33 frigate.data_processing.post.semantic_trigger34 frigate.data_processing.real_time.custom_classification35 frigate.data_processing.real_time.license_plate36 frigate.ptz.autotrack37 frigate.track38 frigate.track.object_processing39 frigate.video40 frigate.api
1 frigate.camera
2 frigate.comms.event_metadata_updater
3 frigate.comms.inter_process
4 frigate.config.base
5 frigate.config.camera.updater
6 frigate.data_processing.types
7 frigate.detectors.detector_config
8 frigate.jobs.job
9 frigate.models
10 frigate.util.process
11 web.src.components.ui
12 web.src.hooks
13 web.src.utils
14 frigate.config.camera.detect3
15 frigate.config.camera.ffmpeg3
16 frigate.config.camera.record7
17 frigate.config.classification16
18 frigate.detectors.detection_api1
19 frigate.config.camera.camera11214
20 frigate.config.config111115
21 frigate11
22 frigate.comms.dispatcher11
23 frigate.data_processing.common.license_plate.mixin11111
24 frigate.data_processing.post.api21
25 frigate.data_processing.real_time.api22
26 frigate.genai221
27 frigate.jobs11114
28 frigate.track.tracked_object11
29 frigate.util1211
30 frigate.data_processing.post.license_plate112111
31 frigate.data_processing.post.object_descriptions121111
32 frigate.data_processing.post.review_descriptions12111
33 frigate.data_processing.post.semantic_trigger11211
34 frigate.data_processing.real_time.custom_classification122222
35 frigate.data_processing.real_time.license_plate111111
36 frigate.ptz.autotrack12111
37 frigate.track11
38 frigate.track.object_processing11111
39 frigate.video211121
40 frigate.api12461
Uses a module listed above itPart of a loopThe module itself
1 frigate.camera2 frigate.comms.event_metadata_updater3 frigate.comms.inter_process4 frigate.config.base5 frigate.config.camera.updater6 frigate.data_processing.types7 frigate.detectors.detector_config8 frigate.jobs.job9 frigate.models10 frigate.util.process11 web.src.components.ui12 web.src.hooks13 web.src.utils14 frigate.config.camera.detect15 frigate.config.camera.ffmpeg16 frigate.config.camera.record17 frigate.config.classification18 frigate.detectors.detection_api19 frigate.config.camera.camera20 frigate.config.config21 frigate22 frigate.comms.dispatcher23 frigate.data_processing.common.license_plate.mixin24 frigate.data_processing.post.api25 frigate.data_processing.real_time.api26 frigate.genai27 frigate.jobs28 frigate.track.tracked_object29 frigate.util30 frigate.data_processing.post.license_plate31 frigate.data_processing.post.object_descriptions32 frigate.data_processing.post.review_descriptions33 frigate.data_processing.post.semantic_trigger34 frigate.data_processing.real_time.custom_classification35 frigate.data_processing.real_time.license_plate36 frigate.ptz.autotrack37 frigate.track38 frigate.track.object_processing39 frigate.video40 frigate.apifrigate.camera1frigate.comms.event_metadata_updater2frigate.comms.inter_process3frigate.config.base4frigate.config.camera.updater5frigate.data_processing.types6frigate.detectors.detector_config7frigate.jobs.job8frigate.models9frigate.util.process10web.src.components.ui11web.src.hooks12web.src.utils13frigate.config.camera.detect14frigate.config.camera.ffmpeg15frigate.config.camera.record16frigate.config.classification17frigate.detectors.detection_api18frigate.config.camera.camera19frigate.config.config20frigate21frigate.comms.dispatcher22frigate.data_processing.common.license_plate.mixin23frigate.data_processing.post.api24frigate.data_processing.real_time.api25frigate.genai26frigate.jobs27frigate.track.tracked_object28frigate.util29frigate.data_processing.post.license_plate30frigate.data_processing.post.object_descriptions31frigate.data_processing.post.review_descriptions32frigate.data_processing.post.semantic_trigger33frigate.data_processing.real_time.custom_classification34frigate.data_processing.real_time.license_plate35frigate.ptz.autotrack36frigate.track37frigate.track.object_processing38frigate.video39frigate.api4033716111214111115111111111212222111114111211112111121111121111121112222211111112111111111121112112461+388 more modules (most-connected shown)

At a glance — Code Health · 46% · Weak · gated by D1, D2, R3, X4 ·

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

At a glance — Maturity · 70% · Strong ·

At a glance — Readiness · 43% · Adequate · gated by D12, D13, P3, P7 ·

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

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

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection81High / Critical
A02:2025 — Security Misconfiguration64High / Critical
A03:2025 — Software Supply Chain Failures16High / Critical
A07:2025 — Authentication Failures6High / Critical

Roadmap

Immediately resolve the two leaked secrets in configuration and lock files to secure the codebase. Next, address the extensive keyboard accessibility gaps by making custom controls operable and fixing anchor links, while simultaneously adding text alternatives for images, media, and interactive elements. Finally, eliminate the large volume of skipped tests to improve reliability, and establish automated accessibility enforcement in the development toolchain and CI pipeline to prevent future regressions.

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.+4.2 ptsLowREDACTED Scanning
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+3.9 ptsMediumKeyboard semantics
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with error-collector.spec.ts (2).+1.7 ptsLowTest Quality
Resolve the 1 Banned license finding(s) in License Compliance.+1.7 ptsLowLicense Compliance
Resolve the 94 Skipped test finding(s) in Test Quality — start with export.spec.ts (8), navigation.spec.ts (8), live-webrtc-availability.spec.ts (7).+2.9 ptsMediumTest Quality
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.+2.4 ptsMediumText alternatives
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with @axe-core/playwright in tests, then gate axe/pa11y/Lighthouse in CI.+2.1 ptsMediumA11y enforcement
Improve Test Distribution — currently 7.7/10.+1.9 ptsMediumTest Distribution

File quality

Per-file score 0–10 — a quality signature. Of 408 files carrying findings, judged against the Preview bar: 2% slop · 14% mixed · 84% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED0.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED0.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED0.7SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
web/e2e/specs/_meta/error-collector.spec.ts4.0MixedTest Quality: No assertions (empty test): same-origin 5xx response fails the test
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
web/src/components/filter/ReviewFilterGroup.tsx4.8MixedCyclomatic Complexity: ReviewFilterGroup.ReviewFilterGroup (cyclomatic 28)
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: 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 — 169

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

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

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

Could not be resolved — 12

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

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

What we checked — 85 dimensions across the health lenses
D1D2D3D4D6D9D10D12D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D43D44AC1AC2AC3AC4AC5AC6AC7AX10AX2AX3AX4AX6C2GD1IC1M1M2M3M4P1P2P3P4P6P7PF3R1R10R11R2R3R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X26X27X28X29X3X30X4X5

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, 2207 of 2247 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a1796b-33d8-7b7b-835d-9edaca06ec90.

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 JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — web/ (@playwright/test) — a gap in the analyzer, not something this repository is missing. 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.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 497 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 160 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .tsx, and the built-in reliability runner cannot re-run the .tsx test suite(s) — so reliability was not measured for the repository as a whole. The Python (repository root, 156 test files): measured (1 flaky) suite(s) did re-run, and came back with 1 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted.
  • 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 Python distribution dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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. `REDACTED`, `web/src/components/classification/ClassificationModelEditDialog.tsx` 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.
  • AC2 Forms & labels — 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. 36 further occurrence(s) are not listed individually; the score already reflects all 76.
  • AC4 Keyboard semantics — 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. 45 further occurrence(s) are not listed individually; the score already reflects all 85.
  • 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 (REDACTED). compose up failed (exit 18 — an image could not be pulled) — mqtt Pulling mqtt 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: devcontainer Skipped - No image to be pulled mqtt Pulling mqtt 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • IC1 Incompleteness & stubs — 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. 60 further occurrence(s) are not listed individually; the score already reflects all 100.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • P8 Schema migrations — 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. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read 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. 471 further occurrence(s) are not listed individually; the score already reflects all 511.
  • 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. 56 further occurrence(s) are not listed individually; the score already reflects all 96.
  • 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. 21 further occurrence(s) are not listed individually; the score already reflects all 61.
  • 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. 48 further occurrence(s) are not listed individually; the score already reflects all 88.
  • X4 Structured logging — 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. 879 further occurrence(s) are not listed individually; the score already reflects all 919.

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.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • 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.
  • 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 REDACTED (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.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ 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.0 / 10 · rule-coverage 100% · ceiling Prevented

351 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Settings.Settings at 204. A further 2 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 iconUtil.getIconForLabel at 62 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: web/src/utils/iconUtil.tsx (iconUtil.getIconForLabel at 62), frigate/config/camera/updater.py (CameraConfigUpdateSubscriber.__update_config at 28). 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.

Settings.Settings (cyclomatic 204)web/src/pages/Settings.tsx:471
MotionSearchView.MotionSearchView (cyclomatic 179)web/src/views/motion-search/MotionSearchView.tsx:95
BaseSection.ConfigSection (cyclomatic 174)web/src/components/config-form/sections/BaseSection.tsx:198
GeneralMetrics.GeneralMetrics (cyclomatic 148)web/src/views/system/GeneralMetrics.tsx:31
MsePlayer.MSEPlayer (cyclomatic 140)web/src/components/player/MsePlayer.tsx:35

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

What to do

  1. Bring the 129 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with Settings.Settings (cyclomatic 204), MotionSearchView.MotionSearchView (cyclomatic 179), BaseSection.ConfigSection (cyclomatic 174). — 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 129 together lifts Cyclomatic Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive 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

451 method(s) exceeded the cognitive complexity threshold of 15; the worst was Settings.Settings at 252.

ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields (cognitive 28) · ×2web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:67
PolygonCanvas.PolygonCanvas::handleMouseDown (cognitive 21) · ×2web/src/components/settings/PolygonCanvas.tsx:113
Settings.Settings (cognitive 252)web/src/pages/Settings.tsx:471
MasksAndZonesView.MasksAndZonesView (cognitive 217)web/src/views/settings/MasksAndZonesView.tsx:45
MotionSearchView.MotionSearchView (cognitive 203)web/src/views/motion-search/MotionSearchView.tsx:95

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

What to do

  1. Bring the 188 bodies over 30 down to 30 or less in Cognitive Complexity — start with Settings.Settings (cognitive 252), MasksAndZonesView.MasksAndZonesView (cognitive 217), MotionSearchView.MotionSearchView (cognitive 203). — 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 188 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; 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 Classes4.5 / 10Weak✓ 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 4.5 / 10 · rule-coverage 100% · ceiling Prevented

354 god class(es) detected.

FunctionTooLong: Settings.Settings · ×217web/src/pages/Settings.tsx:471
FileTooLong: live/LiveCameraView.tsx · ×97web/src/views/live/LiveCameraView.tsx
ClassTooLong: Settings · ×36web/src/pages/Settings.tsx:1
TooManyMethods: MqttClient · ×4frigate/comms/mqtt.py:39

What to do

  1. Resolve the 217 FunctionTooLong finding(s) in God Classes — start with CameraManagementView.tsx (5), Exports.tsx (4), DetailStream.tsx (4). — One of this dimension's main actionable groups (217 warning-level).
  2. Resolve the 97 FileTooLong finding(s) in God Classes — start with maintainer.py (3), media.py (2), app.py (2). — One of this dimension's main actionable groups (97 warning-level).
  3. Resolve the 36 ClassTooLong finding(s) in God Classes — start with Settings.tsx, MotionSearchView.tsx, MasksAndZonesView.tsx. — One of this dimension's main actionable groups (36 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

145 duplicated block group(s) detected. A further 7 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .tsx (50% 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) · ×11docs/scripts/generate_ui_tabs.py:154
Duplicated block (10 lines × 2) · ×8frigate/api/classification.py:82
Duplicated block (14 lines × 2) · ×7frigate/api/event.py:1170
Duplicated block (11 lines × 2) · ×7frigate/api/auth.py:777
Duplicated block (9 lines × 2) · ×7frigate/comms/webpush.py:543

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

What to do

  1. Resolve the 11 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with generate_ui_tabs.py, event.py, llama_cpp.py. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 8 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with classification.py, media.py, dispatcher.py. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 7 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with event.py (2), media.py, config.py. — One of this dimension's main actionable groups (7 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.

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

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

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

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

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

2 of 163 classes have LCOM4 above 3.

Low cohesion: GenAIClient (LCOM4 8) · ×2frigate/genai/__init__.py:54

What to do

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

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

D9 · Test Distribution7.7 / 10Strong✓ 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 7.7 / 10 · rule-coverage 100% · ceiling Documented

2755 test methods: 2258 unit, 0 integration, 0 BDD, 497 e2e. The JavaScript/TypeScript suite contributes 497 `it`/`test` case(s) across 44 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 2258 test function(s) across 155 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.

What to do

  1. Improve Test Distribution — currently 7.7/10. — 2755 test methods: 2258 unit, 0 integration, 0 BDD, 497 e2e. The JavaScript/TypeScript suite contributes 497 `it`/`test` case(s) across 44 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 2258 test function(s) across 155 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.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality5.8 / 10Adequate✓ 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 5.8 / 10 · rule-coverage 100% · ceiling Prevented

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

No assertions (empty test): same-origin 5xx response fails the test · ×2web/e2e/specs/_meta/error-collector.spec.ts:75
Skipped test: (unnamed test) · ×94web/e2e/specs/auth.spec.ts:88
No assertions: a pinned transcoded stream plays over MSE · ×9web/e2e/specs/live-auto-stream.spec.ts:138

What to do

  1. Resolve the 94 Skipped test finding(s) in Test Quality — start with export.spec.ts (8), navigation.spec.ts (8), live-webrtc-availability.spec.ts (7). — One of this dimension's main actionable groups (94 warning-level).
  2. Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with error-collector.spec.ts (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 9 No assertions finding(s) in Test Quality — start with error-collector.spec.ts (4), live-auto-stream.spec.ts (2), review.spec.ts. — One of this dimension's main actionable groups (9 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.3 2.2 / 10Critical✓ 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 2.2 / 10 · rule-coverage 24% · ceiling Verified

14 outdated, 0 yanked pinned Python distributions. 19 of 79 shipped distributions were graded against pypi.org (0 not published there, 60 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded — PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.

Outdated: nvidia-cublas-cu12 · ×14

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 Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

1 of 208 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 79 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (129 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 24 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. A further 17 direct requirement(s) are installed from a URL or a version-control checkout and publish no licence this pass can read; they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's Python distribution 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.

Banned license: unidecode

What to do

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

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

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

Top hotspots: web/src/pages/Settings.tsx (8×204=1632); web/src/views/motion-search/MotionSearchView.tsx (6×179=1074); web/src/views/recording/RecordingView.tsx (8×124=992)

Hotspot: web/src/pages/Settings.tsx · ×99web/src/pages/Settings.tsx:471

What to do

  1. Resolve the 99 Hotspot finding(s) in Churn × Complexity Hotspots — start with maintainer.py (3), config.py (2), Settings.tsx. — One of this dimension's main actionable groups (99 warning-level).

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

D16 · Bus Factor7.9 / 10Strong✓ Tool-verified

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

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

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

125 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is web/src/views/motion-search/MotionSearchView.tsx. Counted over 548 of the 914 production source files in this repository: 365 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.

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

What to do

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

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

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

34 deducted task-comment markers across 212534 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 · ×33REDACTED:132
FixmeCommentfrigate/api/notification.py:86

What to do

  1. Resolve the 33 TodoComment finding(s) in Explicit Debt — start with error-allowlist.ts (8), models.py (6), image.py (3). — One of this dimension's main actionable groups (33 warning-level).
  2. Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with notification.py. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

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

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

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

81 finding(s): 0 critical, 55 high, 20 medium, 6 low. 32 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 10 file(s) — `REDACTED` (lines 15–19), `docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run` (line 112), `REDACTED` (line 214, line 236), `web/e2e/specs/classification.spec.ts` (line 23, line 34), `web/e2e/specs/clone-camera.spec.ts` (line 25, line 34), … (+5 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 1 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

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

What to do

  1. Resolve the 16 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5), REDACTED (5), REDACTED (3). — One of this dimension's main actionable groups (16 issue-level).
  2. Resolve the 4 REDACTED finding(s) charged to Static Analysis (SAST) — the other 32 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (36 issue-level, 4 of them charged here).
  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 Vulnerabilities7.6 / 10Adequategated by 3 critical findings✓ 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 7.6 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security0.0 / 10Critical✓ Tool-verified

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

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

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

64 finding(s): 0 critical, 26 high, 29 medium, 9 low.

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

7 of 549 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is frigate/service_manager/service.py. Counted over 549 of the 914 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×7frigate/service_manager/service.py:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.4 / 10Stronggated by 31 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: events_query_parameters.py↔Explore.tsx 77%; use-date-locale.ts↔const.ts 75%; BirdseyeLivePlayer.tsx↔LivePlayer.tsx 73%

Change coupling: use-date-locale.ts ↔ const.ts · ×30web/src/hooks/use-date-locale.ts:1
Change-coupling hub: events_query_parameters.py → REDACTED, Explore.tsx, search.ts, SearchView.tsxfrigate/api/defs/query/events_query_parameters.py

What to do

  1. Resolve the 30 Change coupling finding(s) in Change Coupling — start with MotionMaskEditPane.tsx (2), ReviewFilterGroup.tsx (2), SearchResultActions.tsx (2). — One of this dimension's main actionable groups (30 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with events_query_parameters.py. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×15) — web/src/components/camera/CameraImage.tsx:89, web/src/components/card/AnimatedEventCard.tsx:203, web/src/components/card/ClassificationCard.tsx:136, …
  • 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. (×2) — web/src/components/camera/ResizingCameraImage.tsx:103, web/src/components/player/JSMpegPlayer.tsx:248
  • Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — web/src/pages/Exports.tsx:686

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.5 / 10Adequate✓ Tool-verified

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

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

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

  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. — web/src/components/button/DownloadVideoButton.tsx:55
  • This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — web/src/components/card/SearchThumbnail.tsx:102
  • 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. (×15) — web/src/components/chat/ChatMessage.tsx:126, web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:806, web/src/components/config-form/theme/fields/HardwarePicker.tsx:158, …
  • 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. (×10) — web/src/components/chat/ChatSettings.tsx:61, web/src/components/config-form/theme/fields/ModelSourcePicker.tsx:150, web/src/components/config-form/theme/fields/StreamSourceSelector.tsx:151, …
  • This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×4) — web/src/components/icons/AddFaceIcon.tsx:13, web/src/components/icons/SearchSourceIcon.tsx:14, web/src/components/icons/SubFilterIcon.tsx:14, …
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). — REDACTED:929
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×3) — web/src/components/overlay/CustomTimeSelector.tsx:146, web/src/components/overlay/CustomTimeSelector.tsx:217, web/src/components/overlay/ShareTimestampDialog.tsx:335
  • This <circle> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×2) — web/src/components/overlay/ObjectTrackOverlay.tsx:446, web/src/components/overlay/detail/ObjectPath.tsx:115
  • 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) — web/src/components/overlay/detail/AnnotationOffsetSlider.tsx:170, web/src/components/overlay/detail/AnnotationSettingsPane.tsx:178
  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — web/src/components/overlay/dialog/OptionAndInputDialog.tsx:144

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure6.4 / 10Strong✓ Tool-verified

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

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

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

  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×2) — web/index.html:6, web/login.html:6

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.7 / 10Critical✓ Tool-verified

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

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

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

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×39) — web/src/components/card/AnimatedEventCard.tsx:191, web/src/components/card/ClassificationCard.tsx:117, web/src/components/card/ExportCard.tsx:62, …
  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. — web/src/components/config-form/sections/BaseSection.tsx:785

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness6.4 / 10Adequate✓ Tool-verified

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.

  • The scrollbar role requires aria-controls, aria-valuenow to convey its state. Add it. (×4) — web/src/components/timeline/ReviewTimeline.tsx:378, web/src/components/timeline/ReviewTimeline.tsx:416, web/src/components/timeline/ReviewTimeline.tsx:455, …

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety5.1 / 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.

  • <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×13) — web/src/components/card/ClassificationCard.tsx:411, web/src/components/graph/CombinedStorageGraph.tsx:264, web/src/components/graph/CombinedStorageGraph.tsx:308, …
  • <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×3) — web/src/pages/Chat.tsx:415, web/src/pages/Chat.tsx:416, web/src/pages/Chat.tsx:417
  • `.arrow` moves (`transition: transform 0.2s`) 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. — docs/src/components/ModelConfigDropdown/styles.module.css:158
  • `.toggle::before` moves (`transition: transform var(--ifm-transition-fast, 200ms) ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — docs/src/components/FaqItem/styles.module.css:40
  • `.inputError` moves (`animation: shake 0.3s ease-in-out`) 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. — docs/src/components/DockerComposeGenerator/styles.module.css:90

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

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

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

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

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

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with @axe-core/playwright in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition4.0 / 10Weak✓ Tool-verified

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

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

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

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.
AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

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

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

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.

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 — DRF permission classes, django-guardian or django-rules permissions, a casbin or oso policy, or roles and permissions declared once — and consult them where access is checked (permission_classes, @permission_required, Depends), so the rule set is reviewable and testable on its own.
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.

  • `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — web/src/components/card/ClassificationCard.tsx:489
  • Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×5) — web/src/components/menu/AccountSettings.tsx:127, web/src/views/recording/RecordingView.tsx:1329, web/src/views/settings/MasksAndZonesView.tsx:306, …
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×34) — web/e2e/specs/_meta/error-collector.spec.ts:27, web/e2e/specs/_meta/error-collector.spec.ts:57, web/e2e/specs/_meta/error-collector.spec.ts:79, …

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)6.5 / 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.

  • 697 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • 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.
  • Review the README against recent changes; refresh the parts that drifted.
M2 · Architecture documentation5.0 / 10Adequate✓ 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 structure8.0 / 10Strong✓ 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.

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

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

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

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

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

P2 · Observability7.5 / 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 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `docker/main`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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

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

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

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • 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.

  • Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P6 · Release Hygiene8.0 / 10Strong✓ 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.

  • The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.

What to do

  • Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
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.

  • `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — REDACTED:191, frigate/embeddings/onnx/base_embedding.py:69
  • `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — frigate/plus.py:166, frigate/plus.py:175

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.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

  • 129 duplicated blocks under web/src/ have copies in at least two of the sibling directories components, hooks, pages, utils, views — 85 of them are reported below, and 44 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 129 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 129 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 129 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. — web/src/components/overlay/CustomTimeSelector.tsx:85
  • 79 duplicated blocks under web/src/components/ have copies in at least two of the sibling directories auth, button, camera, card, chat, classification (+14 more sibling(s) not listed) — 44 of them are reported below, and 35 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 79 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 79 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 79 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. — web/src/components/overlay/detail/TrackingDetails.tsx:839
  • 27 duplicated blocks under web/src/views/ have copies in at least two of the sibling directories classification, events, live, motion-search, recording, search (+2 more sibling(s) not listed) — 20 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 27 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 27 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 27 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. — web/src/views/motion-search/MotionSearchView.tsx:448
  • 9 of the duplicated blocks reported below have copies in at least two of the sibling directories fields, templates, widgets under web/src/components/config-form/theme/. 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. — web/src/components/config-form/theme/fields/LiveStreamsField.tsx:71
  • web/src/components/config-form/theme/fields/CameraInputsField.tsx:45 · web/src/components/config-form/theme/fields/ModelsField.tsx:69 — the two spans are one implementation copied and then locally edited — 1089 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. — web/src/components/config-form/theme/fields/CameraInputsField.tsx:45
  • web/src/components/overlay/detail/TrackingDetails.tsx:839 · web/src/components/timeline/DetailStream.tsx:723 — the two spans are one implementation copied and then locally edited — 986 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. — web/src/components/overlay/detail/TrackingDetails.tsx:839
  • web/src/components/overlay/CreateUserDialog.tsx:66 · web/src/components/overlay/SetPasswordDialog.tsx:65 — the two spans are one implementation copied and then locally edited — 722 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. — web/src/components/overlay/CreateUserDialog.tsx:66
  • web/src/components/filter/ReviewFilterGroup.tsx:141 · web/src/components/filter/SearchFilterGroup.tsx:131 — the two spans are one implementation copied and then locally edited — 810 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. — web/src/components/filter/ReviewFilterGroup.tsx:141
  • web/src/components/ui/context-menu.tsx:7 · web/src/components/ui/dropdown-menu.tsx:7 — the two spans are one implementation copied and then locally edited — 846 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. — web/src/components/ui/context-menu.tsx:7
  • web/src/components/settings/MotionMaskEditPane.tsx:132 · web/src/components/settings/ObjectMaskEditPane.tsx:114 — the two spans are one implementation copied and then locally edited — 762 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. — web/src/components/settings/MotionMaskEditPane.tsx:132
  • web/src/components/overlay/CustomTimeSelector.tsx:85 · web/src/views/motion-search/MotionSearchDialog.tsx:580 — the two spans are one implementation copied and then locally edited — 790 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. — web/src/components/overlay/CustomTimeSelector.tsx:85
  • web/src/components/overlay/CreateRoleDialog.tsx:48 · web/src/components/overlay/EditRoleCamerasDialog.tsx:42 — the two spans are one implementation copied and then locally edited — 736 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. — web/src/components/overlay/CreateRoleDialog.tsx:48
  • web/src/components/config-form/theme/fields/KnownPlatesField.tsx:244 · web/src/components/config-form/theme/fields/ReplaceRulesField.tsx:80 — the two spans are one implementation copied and then locally edited — 663 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. — web/src/components/config-form/theme/fields/KnownPlatesField.tsx:244
  • web/src/components/overlay/ExportDialog.tsx:117 · web/src/components/overlay/MobileReviewSettingsDrawer.tsx:153 — the two spans are one implementation copied and then locally edited — 692 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. — web/src/components/overlay/ExportDialog.tsx:117
  • web/src/components/timeline/EventReviewTimeline.tsx:25 · web/src/components/timeline/MotionReviewTimeline.tsx:28 — the two spans are one implementation copied and then locally edited — 579 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. — web/src/components/timeline/EventReviewTimeline.tsx:25
  • web/src/components/classification/ClassificationModelWizardDialog.tsx:33 · web/src/components/trigger/TriggerWizardDialog.tsx:45 — the two spans are one implementation copied and then locally edited — 578 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. — web/src/components/classification/ClassificationModelWizardDialog.tsx:33
  • web/src/components/ws/WsMessageFeed.tsx:296 · web/src/components/ws/WsMessageFeed.tsx:456 — the two spans are one implementation copied and then locally edited — 571 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. — web/src/components/ws/WsMessageFeed.tsx:296
  • web/src/components/overlay/detail/AnnotationOffsetSlider.tsx:53 · web/src/components/overlay/detail/AnnotationSettingsPane.tsx:56 — the two spans are one implementation copied and then locally edited — 558 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. — web/src/components/overlay/detail/AnnotationOffsetSlider.tsx:53
  • web/src/components/overlay/CreateTriggerDialog.tsx:140 · web/src/components/trigger/wizard/Step3ThresholdAndActions.tsx:58 — the two spans are one implementation copied and then locally edited — 493 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. — web/src/components/overlay/CreateTriggerDialog.tsx:140
  • web/src/components/overlay/ClassificationSelectionDialog.tsx:89 · web/src/components/overlay/FaceSelectionDialog.tsx:48 — the two spans are one implementation copied and then locally edited — 544 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. — web/src/components/overlay/ClassificationSelectionDialog.tsx:89
  • REDACTED:77 · web/src/components/overlay/dialog/TrainFilterDialog.tsx:31 — the two spans are one implementation copied and then locally edited — 429 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. — REDACTED:77
  • web/src/components/filter/ReviewActionGroup.tsx:35 · web/src/components/filter/SearchActionGroup.tsx:30 — the two spans are one implementation copied and then locally edited — 472 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. — web/src/components/filter/ReviewActionGroup.tsx:35
  • web/src/components/filter/CamerasFilterButton.tsx:97 · web/src/components/filter/SearchFilterGroup.tsx:322 — the two spans are one implementation copied and then locally edited — 389 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. — web/src/components/filter/CamerasFilterButton.tsx:97
  • web/src/components/ui/dialog.tsx:9 · web/src/components/ui/sheet.tsx:10 — the two spans are one implementation copied and then locally edited — 432 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. — web/src/components/ui/dialog.tsx:9
  • web/src/components/config-form/theme/fields/LiveStreamsField.tsx:71 · web/src/components/config-form/theme/widgets/PTZPresetsWidget.tsx:53 — the two spans are one implementation copied and then locally edited — 404 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. — web/src/components/config-form/theme/fields/LiveStreamsField.tsx:71
  • web/src/components/overlay/CreateTriggerDialog.tsx:91 · web/src/components/trigger/wizard/Step1NameAndType.tsx:52 — the two spans are one implementation copied and then locally edited — 479 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. — web/src/components/overlay/CreateTriggerDialog.tsx:91
  • web/src/components/trigger/wizard/Step1NameAndType.tsx:36 · web/src/components/trigger/wizard/Step2ConfigureData.tsx:26 — the two spans are one implementation copied and then locally edited — 399 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. — web/src/components/trigger/wizard/Step1NameAndType.tsx:36
  • web/src/components/timeline/VirtualizedEventSegments.tsx:25 · web/src/components/timeline/VirtualizedMotionSegments.tsx:29 — 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. — web/src/components/timeline/VirtualizedEventSegments.tsx:25
  • web/src/pages/Replay.tsx:590 · web/src/views/settings/ObjectSettingsView.tsx:315 — 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. — web/src/pages/Replay.tsx:590
  • web/src/components/config-form/sectionExtras/BirdseyeCameraReorder.tsx:38 · web/src/views/settings/CameraManagementView.tsx:121 — 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. — web/src/components/config-form/sectionExtras/BirdseyeCameraReorder.tsx:38
  • web/src/views/live/DraggableGridLayout.tsx:787 · web/src/views/live/LiveDashboardView.tsx:580 — the two spans are one implementation copied and then locally edited — 352 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. — web/src/views/live/DraggableGridLayout.tsx:787
  • web/src/views/settings/MasksAndZonesView.tsx:347 · web/src/views/settings/MasksAndZonesView.tsx:412 — 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. — web/src/views/settings/MasksAndZonesView.tsx:347
  • web/src/views/settings/MasksAndZonesView.tsx:804 · web/src/views/settings/MasksAndZonesView.tsx:884 · web/src/views/settings/MasksAndZonesView.tsx:966 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — web/src/views/settings/MasksAndZonesView.tsx:804
  • web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1034 · web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1097 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1034
  • web/src/components/card/ReviewCard.tsx:261 · web/src/components/card/ReviewCard.tsx:337 — the two spans are one implementation copied and then locally edited — 283 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. — web/src/components/card/ReviewCard.tsx:261
  • web/src/components/menu/SearchResultActions.tsx:89 · web/src/components/timeline/EventMenu.tsx:53 — 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. — web/src/components/menu/SearchResultActions.tsx:89
  • web/src/components/overlay/detail/AnnotationSettingsPane.tsx:155 · web/src/views/settings/MotionTunerView.tsx:208 — the two spans are one implementation copied and then locally edited — 249 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. — web/src/components/overlay/detail/AnnotationSettingsPane.tsx:155
  • web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx:63 · web/src/components/settings/wizard/Step3StreamConfig.tsx:256 — the two spans are one implementation copied and then locally edited — 382 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. — web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx:63
  • web/src/views/live/LiveCameraView.tsx:1499 · web/src/views/live/LiveCameraView.tsx:1889 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — web/src/views/live/LiveCameraView.tsx:1499
  • web/src/components/settings/ObjectMaskEditPane.tsx:267 · web/src/components/settings/ZoneEditPane.tsx:502 — 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. — web/src/components/settings/ObjectMaskEditPane.tsx:267

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.5 / 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.

  • web/src/components/overlay/DebugDrawingLayer.tsx:3 imports konva/lib/Node, 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. — web/src/components/overlay/DebugDrawingLayer.tsx:3
  • web/src/components/settings/PolygonDrawer.tsx:18 imports konva/lib/types, 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. — web/src/components/settings/PolygonDrawer.tsx:18
  • web/src/utils/canvasUtil.ts:1 imports konva/lib/types, 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. — web/src/utils/canvasUtil.ts:1

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity5.0 / 10Adequate✓ Tool-verified

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

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

  • FrigateCameraFeatures has cyclomatic complexity 103 and cognitive complexity 104; 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. — web/src/views/live/LiveCameraView.tsx:1012
  • FieldTemplate has cyclomatic complexity 101 and cognitive complexity 115; 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. — web/src/components/config-form/theme/templates/FieldTemplate.tsx:60
  • ConfigSection has cyclomatic complexity 88 and cognitive complexity 70; 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. — web/src/components/config-form/sections/BaseSection.tsx:198
  • MotionSearchView has cyclomatic complexity 76 and cognitive complexity 69; 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. — web/src/views/motion-search/MotionSearchView.tsx:95
  • (anonymous) has cyclomatic complexity 73 and cognitive complexity 156; 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. — web/src/views/settings/MasksAndZonesView.tsx:256
  • LiveCameraView has cyclomatic complexity 71 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/views/live/LiveCameraView.tsx:133
  • GeneralSettings has cyclomatic complexity 67 and cognitive complexity 63; 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. — web/src/components/menu/GeneralSettings.tsx:88
  • LivePlayer has cyclomatic complexity 67 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/components/player/LivePlayer.tsx:63
  • RecordingView has cyclomatic complexity 64 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/views/recording/RecordingView.tsx:106
  • ObjectDetailsTab has cyclomatic complexity 56 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/components/overlay/detail/SearchDetailDialog.tsx:690
  • (anonymous) has cyclomatic complexity 55 and cognitive complexity 81; 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:255
  • buildClonedCameraPayloads has cyclomatic complexity 54 and cognitive complexity 86; 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. — web/src/utils/cameraClone.ts:472
  • ReviewTimeline has cyclomatic complexity 50 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/components/timeline/ReviewTimeline.tsx:50
  • ExportContent has cyclomatic complexity 49 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/components/overlay/ExportDialog.tsx:413
  • TrackingDetails has cyclomatic complexity 45 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/components/overlay/detail/TrackingDetails.tsx:68
  • FfmpegArgsWidget has cyclomatic complexity 43 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/components/config-form/theme/widgets/FfmpegArgsWidget.tsx:104
  • PolygonItem has cyclomatic complexity 42 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/components/settings/PolygonItem.tsx:57
  • LiveContextMenu has cyclomatic complexity 42 and cognitive complexity 33; 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. — web/src/components/menu/LiveContextMenu.tsx:75
  • ObjectFieldTemplate has cyclomatic complexity 41 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:40

What to do

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

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

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

  • web/src/pages/Settings.tsx has 2019 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Settings.tsx:1
  • web/src/views/live/LiveCameraView.tsx has 1929 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/live/LiveCameraView.tsx:1
  • web/src/components/overlay/detail/SearchDetailDialog.tsx has 1765 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/overlay/detail/SearchDetailDialog.tsx:1
  • web/src/views/events/EventView.tsx has 1629 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/events/EventView.tsx:1
  • web/src/views/motion-search/MotionSearchView.tsx has 1531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/motion-search/MotionSearchView.tsx:1
  • web/src/pages/Exports.tsx has 1442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Exports.tsx:1
  • web/src/components/overlay/ExportDialog.tsx has 1424 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/overlay/ExportDialog.tsx:1
  • web/src/components/config-form/sections/BaseSection.tsx has 1337 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/config-form/sections/BaseSection.tsx:1
  • web/src/views/settings/CameraManagementView.tsx has 1331 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/settings/CameraManagementView.tsx:1
  • web/src/views/recording/RecordingView.tsx has 1302 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/recording/RecordingView.tsx:1
  • web/src/components/overlay/detail/TrackingDetails.tsx has 1188 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/overlay/detail/TrackingDetails.tsx:1
  • web/src/views/classification/ModelTrainingView.tsx has 1152 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/classification/ModelTrainingView.tsx:1
  • REDACTED has 1116 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • web/src/views/settings/Go2RtcStreamsSettingsView.tsx has 1111 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1
  • web/src/components/timeline/DetailStream.tsx has 1050 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/timeline/DetailStream.tsx:1
  • web/src/pages/FaceLibrary.tsx has 1042 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/FaceLibrary.tsx:1
  • web/src/components/settings/ZoneEditPane.tsx has 1031 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/settings/ZoneEditPane.tsx:1
  • web/src/views/live/DraggableGridLayout.tsx has 1010 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/live/DraggableGridLayout.tsx:1
  • web/src/components/filter/CameraGroupSelector.tsx has 1007 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/filter/CameraGroupSelector.tsx:1
  • web/src/views/settings/MasksAndZonesView.tsx has 998 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/settings/MasksAndZonesView.tsx:1
  • web/src/components/settings/CloneCameraDialog.tsx has 991 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/settings/CloneCameraDialog.tsx:1
  • web/src/views/events/MotionPreviewsPane.tsx has 973 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/events/MotionPreviewsPane.tsx:1
  • REDACTED has 961 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • web/src/components/settings/wizard/Step3StreamConfig.tsx has 942 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/settings/wizard/Step3StreamConfig.tsx:1
  • web/src/hooks/use-config-override.ts has 935 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/hooks/use-config-override.ts:1
  • web/src/views/system/GeneralMetrics.tsx has 933 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/system/GeneralMetrics.tsx:1
  • web/src/utils/configUtil.ts has 864 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/utils/configUtil.ts:1
  • web/src/views/settings/TriggerView.tsx has 852 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/settings/TriggerView.tsx:1
  • web/src/components/player/dynamic/DynamicVideoPlayer.tsx has 820 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/player/dynamic/DynamicVideoPlayer.tsx:1
  • web/src/utils/cameraClone.ts has 812 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/utils/cameraClone.ts:1
  • web/src/components/player/MsePlayer.tsx has 797 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/player/MsePlayer.tsx:1
  • web/src/components/menu/GeneralSettings.tsx has 792 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/menu/GeneralSettings.tsx:1
  • web/src/views/settings/AuthenticationView.tsx has 789 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/settings/AuthenticationView.tsx:1
  • web/src/api/ws.ts has 788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/api/ws.ts:1
  • web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx has 780 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:1
  • web/src/components/overlay/MobileReviewSettingsDrawer.tsx has 771 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/overlay/MobileReviewSettingsDrawer.tsx:1
  • web/src/views/settings/ProfilesView.tsx has 733 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/views/settings/ProfilesView.tsx:1
  • web/src/components/ui/sidebar.tsx has 725 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/components/ui/sidebar.tsx:1
  • web/src/lib/config-schema/transformer.ts has 713 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/lib/config-schema/transformer.ts:1
  • web/src/pages/Replay.tsx has 711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Replay.tsx:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R5 · Dependency Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each 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.6 / 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 38 application, 9 tooling and 70 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (38 application, 9 tooling, 70 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 (×18) — web/src/views/settings/EnrichmentsSettingsView.tsx, web/src/components/camera/DebugCameraImage.tsx, web/src/components/camera/ResizingCameraImage.tsx, …
  • Nothing imports this binding — it is safe to review for removal. (×21) — web/src/api/ws.ts:713, web/src/components/config-form/ConfigForm.tsx:370, web/src/components/config-form/sections/ConfigSectionTemplate.tsx:33, …

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 Hygiene8.0 / 10Strong✓ 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. — web/src/views/live/DraggableGridLayout.tsx:23

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports6.3 / 10Adequate✓ Tool-verified

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

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

  • web/src/components/config-form/section-configs/objects.ts → web/src/utils/configUtil.ts → web/src/components/config-form/sectionConfigs.ts → web/src/components/config-form/section-configs/objects.ts (one verified cycle inside a mutually-dependent group of 5 files) — web/src/components/config-form/section-configs/objects.ts:2
  • web/src/components/filter/ReviewFilterGroup.tsx → web/src/components/overlay/MobileReviewSettingsDrawer.tsx → web/src/components/filter/ReviewFilterGroup.tsx — web/src/components/filter/ReviewFilterGroup.tsx:17

What to do

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

Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

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

  • Set: Referrer-Policy, X-Content-Type-Options. Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−1.5 on this card.) — REDACTED:81

What to do

  • Add Content-Security-Policy, Strict-Transport-Security, X-Frame-Options beside the headers already set; Content-Security-Policy is the one that pays for itself first, then Strict-Transport-Security, then nosniff and a frame policy.
X1 · Async correctness7.8 / 10Strong✓ Tool-verified

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.

  • `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape. — web/src/views/settings/UiSettingsView.tsx:155
  • The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception. — frigate/api/fastapi_app.py:88

What to do

  • `async` callback passed to `forEach`
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document1.4 / 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.

  • `buildOverrides` is exported and takes `current: unknown` from its caller, and it calls itself at line 241 (`buildOverrides`) with a piece of `current` (and at line 269) — and nowhere in `buildOverrides` 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 `buildOverrides` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/utils/configUtil.ts:241
  • `flattenOverrides` is exported and takes `value: JsonValue | undefined` from its caller, and it calls itself at line 374 (`flattenOverrides`) with a piece of `value` — and nowhere in `flattenOverrides` 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 `flattenOverrides` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/utils/configUtil.ts:374
  • `unsetWithWildcard` is exported and takes `obj: Record<string, unknown>` from its caller, and it calls itself at line 403 (`unsetWithWildcard`) with a piece of `obj` — and nowhere in `unsetWithWildcard` 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 `unsetWithWildcard` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/utils/configUtil.ts:403
  • `requiresRestartForOverrides` is exported, takes a document from its caller (line 489) and hands it to `hasMatchAtPath`, which calls itself at line 464 (`hasMatchAtPath`) with a piece of `value` (and at line 468, line 479, line 483) — and nowhere in `hasMatchAtPath` 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 `hasMatchAtPath` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/utils/configUtil.ts:464
  • `applySchemaDefaults` is exported and takes `formData: Record<string, unknown>` from its caller, and it calls itself at line 789 (`applySchemaDefaults`) with a piece of `formData` — and nowhere in `applySchemaDefaults` 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 `applySchemaDefaults` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/lib/config-schema/transformer.ts:789
  • `normalizeConfigValue` is exported, takes a document from its caller (line 45) and hands it to `stripInternalFields`, which calls itself at line 27 (`stripInternalFields`) with a piece of `value` (and at line 37) — and nowhere in `stripInternalFields` 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 `stripInternalFields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/hooks/use-config-override.ts:27
  • `deepNormalizeValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 82 (`deepNormalizeValue`) with a piece of `value` (and at line 86) — and nowhere in `deepNormalizeValue` 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 `deepNormalizeValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/components/config-form/theme/utils/overrides.ts:82
  • `sanitizeOverridesForSection` is exported, takes a document from its caller (line 396) and hands it to `flattenRecordWithDots`, which calls itself at line 457 (`flattenRecordWithDots`) with a piece of `value` — and nowhere in `flattenRecordWithDots` 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 `flattenRecordWithDots` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — web/src/components/config-form/sections/section-special-cases.ts:457
  • `deep_merge` is public and takes `dct1: dict` from its caller, and it calls itself at line 108 (`deep_merge`) with a piece of `dct1` — and nowhere in `deep_merge` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `deep_merge` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frigate/util/builtin.py:108
  • `flatten_config_data` is public and takes `config_data: dict[str, Any]` from its caller, and it calls itself at line 263 (`flatten_config_data`) with a piece of `config_data` — and nowhere in `flatten_config_data` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `flatten_config_data` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frigate/util/builtin.py:263
  • `has_non_finite_number` is public and takes `value: Any` from its caller, and it calls itself at line 520 (`has_non_finite_number`) with a piece of `value` (and at line 522) — and nowhere in `has_non_finite_number` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `has_non_finite_number` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frigate/util/builtin.py:520

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 propagation4.8 / 10Adequate✓ Tool-verified

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

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 1/8 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.
  • `detectReolinkCamera` 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 })`. — web/src/utils/cameraUtil.ts:44
  • `fetchCameraSnapshot` 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 })`. — web/src/utils/snapshotUtil.ts:19
  • `grabVideoSnapshot` 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 })`. — web/src/utils/snapshotUtil.ts:114
  • `probeCamera` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. — web/src/hooks/use-health-checks.ts:67
  • `fetcher` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`. (×2) — web/src/components/setup/SetupDetector.tsx:85, web/src/components/config-form/theme/fields/ModelSourcePicker.tsx:71
  • `checkSourceExists` 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 })`. — web/src/components/player/GenericVideoPlayer.tsx:32

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 materialisation7.4 / 10Strong✓ 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 254 is called with an argument built by `tuple(np.round(self.obj_data["…"]).flatten().astype(int))` (line 256), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/track/tracked_object.py:254
  • `debug` at line 286 is called with an argument built by `list(monitored)` (line 286), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/stats/hardware.py:286
  • `debug` at line 699 is called with an argument built by `sorted(codecs)` (line 702), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/record/export.py:699
  • `debug` at line 834 is called with an argument built by `tuple(np.round(velocities).flatten().astype(int))` (line 835), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/ptz/autotrack.py:834
  • `debug` at line 883 is called with an argument built by `tuple(np.round(velocities, 2).flatten().astype(int))` (line 884), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/ptz/autotrack.py:883
  • `debug` at line 1109 is called with an argument built by `tuple(predicted_box)` (line 1109), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/ptz/autotrack.py:1109
  • `debug` at line 1110 is called with an argument built by `tuple(np.round(average_velocity).flatten().astype(int))` (line 1111), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/ptz/autotrack.py:1110
  • `debug` at line 1155 is called with an argument built by `tuple(zoom_predicted_box)` (line 1156), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/ptz/autotrack.py:1155
  • `debug` at line 264 is called with an argument built by `[{ "…" : o.get("…"), "…" : o.get("…") } for o in (tracked_objects or[])]` (line 271), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/jobs/vlm_watch.py:264
  • `debug` at line 500 is called with an argument built by `list(message.keys())` (line 503), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/genai/plugins/ollama.py:500
  • `debug` at line 403 is called with an argument built by `[h.key for h in found]` (line 403), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/detectors/hardware.py:403
  • `debug` at line 1487 is called with an argument built by `list(plate_box)` (line 1487), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/data_processing/common/license_plate/mixin.py:1487
  • `debug` at line 485 is called with an argument built by `"…".join(allowed)` (line 488), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/comms/webpush.py:485
  • `debug` at line 319 is called with an argument built by `[r for r in route]` (line 319), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/api/auth.py:319
  • `debug` at line 1344 is called with an argument built by `json.dumps(tool_args, indent = 2)` (line 1345), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/api/chat.py:1344
  • `debug` at line 752 is called with an argument built by `sorted(video_codecs)` (line 759), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — frigate/api/media.py:752

What to do

  • In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X3 · Exception handling6.0 / 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.

  • 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. (×32) — web/src/views/settings/AuthenticationView.tsx:792, web/src/views/recording/RecordingView.tsx:685, web/src/views/motion-search/MotionSearchView.tsx:739, …
  • `.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. (×7) — web/src/views/live/LiveCameraView.tsx:615, web/src/pages/Events.tsx:172, web/src/pages/Logs.tsx:393, …
  • `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. — web/src/utils/webrtcProbe.ts:120

What to do

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

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

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

X4 · Structured logging3.3 / 10Weak✓ Tool-verified

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

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

  • `info` at line 224 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:224
  • `info` at line 228 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:228
  • `info` at line 234 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:234
  • `info` at line 242 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:242
  • `warning` at line 347 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:347
  • `warning` at line 440 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:440
  • `info` at line 447 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:447
  • `info` at line 469 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:469
  • `info` at line 496 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:496
  • `error` at line 500 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:500
  • `info` at line 515 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:515
  • `info` at line 520 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:520
  • `info` at line 524 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:524
  • `info` at line 564 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:564
  • `error` at line 566 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — generate_config_translations.py:566
  • `info` at line 156 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:156
  • `debug` at line 160 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:160
  • `info` at line 249 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:249
  • `info` at line 257 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:257
  • `info` at line 264 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:264
  • `info` at line 274 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:274
  • `info` at line 465 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:465
  • `info` at line 613 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:613
  • `info` at line 632 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/app.py:632
  • `debug` at line 51 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/ffmpeg_presets.py:51
  • `warning` at line 69 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — frigate/ffmpeg_presets.py:69
  • `error` at line 168 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — frigate/plus.py:168
  • `error` at line 177 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — frigate/plus.py:177
  • `warning` at line 166 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:166
  • `debug` at line 183 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:183
  • `debug` at line 241 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:241
  • `error` at line 323 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:323
  • `info` at line 354 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:354
  • `debug` at line 357 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:357
  • `debug` at line 399 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:399
  • `debug` at line 434 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/storage.py:434
  • `info` at line 197 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/video/detect.py:197
  • `info` at line 202 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — frigate/video/detect.py:202
  • `debug` at line 320 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/video/detect.py:320
  • `debug` at line 369 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — frigate/video/detect.py:369

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types5.9 / 10Adequate✓ 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.

  • 1/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~0.3 `!` null assertions per 1k TypeScript source lines — 45 assertion(s) across the 140178 source line(s) of the 601 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: web/src/views/settings/MasksAndZonesView.tsx (10), web/src/views/classification/ModelTrainingView.tsx (6), web/src/components/settings/CameraWizardDialog.tsx (4). 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 Health46%Weak — gated by D1, D2, R3, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture68%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity70%StrongSolid.
Readiness43%Adequate — gated by D12, D13, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security65%Adequate — gated by D29, D31, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility37%Weak — gated by AC1, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
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 — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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 — Repo shows no audit-logging mechanism (an audit-log table or model — a class or table named for it — django-simple-history, django-auditlog, django-reversion, django-pghistory or SQLAlchemy-Continuum recording each change, or an event-sourced store beside one) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
  • C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 39 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — mqtt Pulling mqtt 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: devcontainer Skipped - No image to be pulled mqtt Pulling mqtt 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: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half has no runner
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Python, TypeScript not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Aggregate roots were found in only one source directory (frigate), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • 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.
  • D5 Coupling — Not applicable — this npm build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • 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 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 14 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 25 value object(s); its 14 aggregate(s) are ORM models only — persistence, not behaviour: a CRUD model, measured, not claimed as DDD
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P8 Schema migrations — Peewee is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript and Python runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R4 Test Coverage — 70 test file(s) reach none of 560 production file(s) via imports — exercised outside the JS import graph (integration/bundled), not import-reachable
  • 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 — 169 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 11 more in this group — see findings.md.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×34
  • Click handler on a non-interactive <div> web/src/components/card/AnimatedEventCard.tsx:191 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ClassificationCard.tsx:117 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ExportCard.tsx:62 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ExportCard.tsx:290 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ReviewCard.tsx:144 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ReviewCard.tsx:291 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ReviewCard.tsx:303 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ReviewCard.tsx:315 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/card/ReviewCard.tsx:366 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/classification/wizard/Step2StateArea.tsx:302 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/classification/wizard/Step3ChooseExamples.tsx:658 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/dynamic/CameraFeatureToggle.tsx:49 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/filter/CamerasFilterButton.tsx:195 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/filter/ExportActionGroup.tsx:336 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/filter/ReviewActionGroup.tsx:152 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/filter/SearchActionGroup.tsx:125 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/filter/SearchActionGroup.tsx:134 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/icons/AddFaceIcon.tsx:13 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/icons/FrigatePlusIcon.tsx:14 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/icons/SearchSourceIcon.tsx:14 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/icons/SubFilterIcon.tsx:14 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/menu/LiveContextMenu.tsx:314 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/menu/LiveContextMenu.tsx:327 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/menu/LiveContextMenu.tsx:335 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> web/src/components/menu/LiveContextMenu.tsx:344 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • + 9 more in this group — see findings.md.
D31 · IaC & Container Security · High IaC · ×26
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 1 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×15
  • <img> without a text alternative web/src/components/camera/CameraImage.tsx:89 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/card/AnimatedEventCard.tsx:203 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/card/ClassificationCard.tsx:136 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/card/ExportCard.tsx:311 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/card/ReviewCard.tsx:160 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/card/SearchThumbnail.tsx:102 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/overlay/detail/SearchDetailDialog.tsx:364 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/overlay/detail/TrackingDetails.tsx:754 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/player/PreviewPlayer.tsx:275 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/player/PreviewPlayer.tsx:549 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/player/PreviewThumbnailPlayer.tsx:234 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/player/PreviewThumbnailPlayer.tsx:457 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/player/VideoControls.tsx:408 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/components/preview/ScrubbablePreview.tsx:433 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative web/src/views/classification/ModelSelectionView.tsx:332 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels · Custom control with no accessible name on <div> · ×4
  • Custom control with no accessible name on <div> web/src/components/icons/AddFaceIcon.tsx:13 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> web/src/components/icons/SearchSourceIcon.tsx:14 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> web/src/components/icons/SubFilterIcon.tsx:14 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> web/src/components/mobile/OverflowStrip.tsx:132 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC5 · ARIA correctness · role="scrollbar" missing required aria-controls, aria-valuenow · ×4
  • role="scrollbar" missing required aria-controls, aria-valuenow web/src/components/timeline/ReviewTimeline.tsx:378 — The scrollbar role requires aria-controls, aria-valuenow to convey its state. Add it.
  • role="scrollbar" missing required aria-controls, aria-valuenow web/src/components/timeline/ReviewTimeline.tsx:416 — The scrollbar role requires aria-controls, aria-valuenow to convey its state. Add it.
  • role="scrollbar" missing required aria-controls, aria-valuenow web/src/components/timeline/ReviewTimeline.tsx:455 — The scrollbar role requires aria-controls, aria-valuenow to convey its state. Add it.
  • role="scrollbar" missing required aria-controls, aria-valuenow web/src/components/timeline/SummaryTimeline.tsx:350 — The scrollbar role requires aria-controls, aria-valuenow to convey its state. Add it.
AC2 · Forms & labels · <input> without a programmatic label · ×3
  • <input> without a programmatic label web/src/components/overlay/CustomTimeSelector.tsx:146 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label web/src/components/overlay/CustomTimeSelector.tsx:217 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label web/src/components/overlay/ShareTimestampDialog.tsx:335 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D30 · Dependency Vulnerabilities · High CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control with no accessible name on <circle> · ×2
  • Custom control with no accessible name on <circle> web/src/components/overlay/ObjectTrackOverlay.tsx:446 — This <circle> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <circle> web/src/components/overlay/detail/ObjectPath.tsx:115 — This <circle> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure · Viewport restricts zoom · ×2
  • Viewport restricts zoom web/index.html:6 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom web/login.html:6 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics · Click handler on a non-interactive <img> · ×2
  • Click handler on a non-interactive <img> web/src/components/card/SearchThumbnail.tsx:102 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <img> web/src/components/overlay/ImagePicker.tsx:116 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Click handler on a non-interactive <circle> · ×2
  • Click handler on a non-interactive <circle> web/src/components/overlay/ObjectTrackOverlay.tsx:446 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <circle> web/src/components/overlay/detail/ObjectPath.tsx:115 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D10 · Test Quality · No assertions (empty test) · ×2
  • No assertions (empty test): same-origin 5xx response fails the test web/e2e/specs/_meta/error-collector.spec.ts:75 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): allowlisted 5xx passes web/e2e/specs/_meta/error-collector.spec.ts:105 — 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
AC2 · Forms & labels · Link with no accessible name · ×1
  • Link with no accessible name web/src/components/button/DownloadVideoButton.tsx:55 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels · Custom control with no accessible name on <img> · ×1
  • Custom control with no accessible name on <img> web/src/components/card/SearchThumbnail.tsx:102 — This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×1
  • <button> with no accessible text REDACTED:929 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels · <label> that labels no control · ×1
  • <label> that labels no control web/src/components/overlay/dialog/OptionAndInputDialog.tsx:144 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×1
  • Click handler on a non-interactive <span> web/src/components/indicators/Chip.tsx:68 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D11 · Test Reliability · Flaky test · ×1
  • Flaky test: frigate.test.test_sqlitevecq_regexp.TestRegexpFunction.test_catastrophic_pattern_is_time_bounded — Passed 1×, failed 2× across repeated runs.
D14 · License Compliance · Banned license · ×1
  • Banned license: unidecode — `unidecode` 1.4.0 is published on PyPI under `GPL-2.0-or-later`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception.
D28 · Secrets (history) · 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 'react-resizable' · ×1
  • Unlisted import 'react-resizable' web/src/views/live/DraggableGridLayout.tsx:23 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (3 files) · ×1
  • Import cycle (3 files) web/src/components/config-form/section-configs/objects.ts:2 — web/src/components/config-form/section-configs/objects.ts → web/src/utils/configUtil.ts → web/src/components/config-form/sectionConfigs.ts → web/src/components/config-form/section-configs/objects.ts (one verified cycle inside a mutually-dependent group of 5 files)
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) web/src/components/filter/ReviewFilterGroup.tsx:17 — web/src/components/filter/ReviewFilterGroup.tsx → web/src/components/overlay/MobileReviewSettingsDrawer.tsx → web/src/components/filter/ReviewFilterGroup.tsx
Serious — 1879 finding(s)
D3 · God Classes · FunctionTooLong · ×217
  • FunctionTooLong: Settings.Settings web/src/pages/Settings.tsx:471 — FunctionTooLong — Settings runs 1151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1051 over it, 11.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MotionSearchView.MotionSearchView web/src/views/motion-search/MotionSearchView.tsx:95 — FunctionTooLong — MotionSearchView runs 1141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1041 over it, 11.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: BaseSection.ConfigSection web/src/components/config-form/sections/BaseSection.tsx:198 — FunctionTooLong — ConfigSection runs 936 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 836 over it, 9.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: LiveCameraView.FrigateCameraFeatures web/src/views/live/LiveCameraView.tsx:1012 — FunctionTooLong — FrigateCameraFeatures runs 878 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 778 over it, 8.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SearchDetailDialog.ObjectDetailsTab web/src/components/overlay/detail/SearchDetailDialog.tsx:690 — FunctionTooLong — ObjectDetailsTab runs 848 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 748 over it, 8.48× 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: MasksAndZonesView.MasksAndZonesView web/src/views/settings/MasksAndZonesView.tsx:45 — FunctionTooLong — MasksAndZonesView runs 782 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 682 over it, 7.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CloneCameraDialog.CloneCameraDialog web/src/components/settings/CloneCameraDialog.tsx:86 — FunctionTooLong — CloneCameraDialog runs 760 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 660 over it, 7.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.
  • FunctionTooLong: Step3StreamConfig.Step3StreamConfig web/src/components/settings/wizard/Step3StreamConfig.tsx:73 — FunctionTooLong — Step3StreamConfig runs 751 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 651 over it, 7.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: RecordingView.RecordingView web/src/views/recording/RecordingView.tsx:106 — FunctionTooLong — RecordingView runs 740 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 640 over it, 7.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: InputWithTags.InputWithTags REDACTED:71 — FunctionTooLong — InputWithTags runs 727 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 627 over it, 7.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: GeneralMetrics.GeneralMetrics web/src/views/system/GeneralMetrics.tsx:31 — FunctionTooLong — GeneralMetrics runs 718 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 618 over it, 7.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ZoneEditPane.ZoneEditPane web/src/components/settings/ZoneEditPane.tsx:56 — FunctionTooLong — ZoneEditPane runs 708 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 608 over it, 7.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.
  • FunctionTooLong: TriggerView.TriggerView web/src/views/settings/TriggerView.tsx:84 — FunctionTooLong — TriggerView runs 645 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 545 over it, 6.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: GeneralSettings.GeneralSettings web/src/components/menu/GeneralSettings.tsx:88 — FunctionTooLong — GeneralSettings runs 619 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 519 over it, 6.19× 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: LiveCameraView.LiveCameraView web/src/views/live/LiveCameraView.tsx:133 — FunctionTooLong — LiveCameraView runs 617 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 517 over it, 6.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: AuthenticationView.AuthenticationView web/src/views/settings/AuthenticationView.tsx:44 — FunctionTooLong — AuthenticationView runs 606 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 506 over it, 6.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: DraggableGridLayout.DraggableGridLayout web/src/views/live/DraggableGridLayout.tsx:115 — FunctionTooLong — DraggableGridLayout runs 595 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 495 over it, 5.95× 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: Exports.Exports web/src/pages/Exports.tsx:77 — FunctionTooLong — Exports runs 593 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 493 over it, 5.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: EventView.MotionReview web/src/views/events/EventView.tsx:993 — FunctionTooLong — MotionReview runs 591 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 491 over it, 5.91× 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: MobileReviewSettingsDrawer.MobileReviewSettingsDrawer web/src/components/overlay/MobileReviewSettingsDrawer.tsx:90 — FunctionTooLong — MobileReviewSettingsDrawer runs 579 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 479 over it, 5.79× 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: TrackingDetails.TrackingDetails web/src/components/overlay/detail/TrackingDetails.tsx:68 — FunctionTooLong — TrackingDetails runs 566 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 466 over it, 5.66× 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: ProfilesView.ProfilesView web/src/views/settings/ProfilesView.tsx:71 — FunctionTooLong — ProfilesView runs 556 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 456 over it, 5.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MsePlayer.MSEPlayer web/src/components/player/MsePlayer.tsx:35 — FunctionTooLong — MSEPlayer 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: ClassificationModelEditDialog.ClassificationModelEditDialog web/src/components/classification/ClassificationModelEditDialog.tsx:75 — FunctionTooLong — ClassificationModelEditDialog runs 530 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 430 over it, 5.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: DynamicVideoPlayer.DynamicVideoPlayer web/src/components/player/dynamic/DynamicVideoPlayer.tsx:87 — FunctionTooLong — DynamicVideoPlayer runs 511 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 411 over it, 5.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 192 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×99
  • Hotspot: web/src/pages/Settings.tsx web/src/pages/Settings.tsx:471 — web/src/pages/Settings.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 204 in Settings.Settings at line 471. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/pages/Settings.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: web/src/views/motion-search/MotionSearchView.tsx web/src/views/motion-search/MotionSearchView.tsx:95 — web/src/views/motion-search/MotionSearchView.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 179 in MotionSearchView.MotionSearchView at line 95. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/views/motion-search/MotionSearchView.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: web/src/views/recording/RecordingView.tsx web/src/views/recording/RecordingView.tsx:106 — web/src/views/recording/RecordingView.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in RecordingView.RecordingView at line 106. 4 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/views/recording/RecordingView.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: frigate/config/config.py frigate/config/config.py:1025 — frigate/config/config.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in FrigateConfig.post_validation at line 1025. 2 of those changes were fix/bug commits, and the other 10 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/config/config.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frigate/video/ffmpeg.py frigate/video/ffmpeg.py:355 — frigate/video/ffmpeg.py changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in CameraWatchdog.run at line 355. 5 of those changes were fix/bug commits, and the other 10 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/video/ffmpeg.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: web/src/components/player/MsePlayer.tsx web/src/components/player/MsePlayer.tsx:35 — web/src/components/player/MsePlayer.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 140 in MsePlayer.MSEPlayer at line 35. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/player/MsePlayer.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: web/src/components/config-form/sections/BaseSection.tsx web/src/components/config-form/sections/BaseSection.tsx:198 — web/src/components/config-form/sections/BaseSection.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 174 in BaseSection.ConfigSection at line 198. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/config-form/sections/BaseSection.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: web/src/views/live/LiveCameraView.tsx web/src/views/live/LiveCameraView.tsx:133 — web/src/views/live/LiveCameraView.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 139 in LiveCameraView.LiveCameraView at line 133. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/views/live/LiveCameraView.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: web/src/components/player/dynamic/DynamicVideoPlayer.tsx web/src/components/player/dynamic/DynamicVideoPlayer.tsx:87 — web/src/components/player/dynamic/DynamicVideoPlayer.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 133 in DynamicVideoPlayer.DynamicVideoPlayer at line 87. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/player/dynamic/DynamicVideoPlayer.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: web/src/components/settings/ZoneEditPane.tsx web/src/components/settings/ZoneEditPane.tsx:56 — web/src/components/settings/ZoneEditPane.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 114 in ZoneEditPane.ZoneEditPane at line 56. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/settings/ZoneEditPane.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: frigate/record/maintainer.py frigate/record/maintainer.py:283 — frigate/record/maintainer.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in RecordingMaintainer.move_files at line 283. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/record/maintainer.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: web/src/components/overlay/ExportDialog.tsx web/src/components/overlay/ExportDialog.tsx:413 — web/src/components/overlay/ExportDialog.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in ExportDialog.ExportContent at line 413. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/overlay/ExportDialog.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: frigate/review/maintainer.py frigate/review/maintainer.py:782 — frigate/review/maintainer.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in ReviewSegmentMaintainer.run at line 782. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/review/maintainer.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frigate/video/detect.py frigate/video/detect.py:242 — frigate/video/detect.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in detect.process_frames at line 242. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/video/detect.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:70 — web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in NotificationsSettingsExtras.NotificationsSettingsExtras at line 70. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.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: frigate/api/auth.py frigate/api/auth.py:716 — frigate/api/auth.py changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in auth.auth at line 716. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/api/auth.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: web/src/views/live/DraggableGridLayout.tsx web/src/views/live/DraggableGridLayout.tsx:115 — web/src/views/live/DraggableGridLayout.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 110 in DraggableGridLayout.DraggableGridLayout at line 115. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/views/live/DraggableGridLayout.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: web/src/views/live/LiveDashboardView.tsx web/src/views/live/LiveDashboardView.tsx:69 — web/src/views/live/LiveDashboardView.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in LiveDashboardView.LiveDashboardView at line 69. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/views/live/LiveDashboardView.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: frigate/api/app.py frigate/api/app.py:1054 — frigate/api/app.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in app.config_set at line 1054. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/api/app.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: web/src/components/settings/wizard/Step3StreamConfig.tsx web/src/components/settings/wizard/Step3StreamConfig.tsx:73 — web/src/components/settings/wizard/Step3StreamConfig.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in Step3StreamConfig.Step3StreamConfig at line 73. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/settings/wizard/Step3StreamConfig.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: web/src/components/config-form/theme/templates/FieldTemplate.tsx web/src/components/config-form/theme/templates/FieldTemplate.tsx:60 — web/src/components/config-form/theme/templates/FieldTemplate.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 132 in FieldTemplate.FieldTemplate at line 60. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- web/src/components/config-form/theme/templates/FieldTemplate.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: frigate/api/media.py frigate/api/media.py:208 — frigate/api/media.py changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in media.latest_frame at line 208. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/api/media.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:193 — REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in OnvifController._init_onvif at line 193. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06: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: REDACTED REDACTED:71 — REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 173 in InputWithTags.InputWithTags at line 71. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06: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: frigate/util/services.py frigate/util/services.py:508 — frigate/util/services.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in services.get_intel_gpu_stats at line 508. 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-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 06:25:21 -06:00' --until='2026-10-26 06:25:21 -06:00' --full-history --no-merges -- frigate/util/services.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 74 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×97
  • FileTooLong: live/LiveCameraView.tsx web/src/views/live/LiveCameraView.tsx — FileTooLong — 1652 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1152 over it, 3.30× 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: pages/Settings.tsx web/src/pages/Settings.tsx — FileTooLong — 1638 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: Settings (471-2044). The bar is 500 significant lines; this is 1138 over it, 3.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: detail/SearchDetailDialog.tsx web/src/components/overlay/detail/SearchDetailDialog.tsx — FileTooLong — 1483 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 983 over it, 2.97× 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: api/media.py frigate/api/media.py — FileTooLong — 1449 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 949 over it, 2.90× 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: events/EventView.tsx web/src/views/events/EventView.tsx — FileTooLong — 1370 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 870 over it, 2.74× 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: api/chat.py frigate/api/chat.py — FileTooLong — 1345 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 845 over it, 2.69× 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: util/services.py frigate/util/services.py — FileTooLong — 1271 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 771 over it, 2.54× 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: motion-search/MotionSearchView.tsx web/src/views/motion-search/MotionSearchView.tsx — FileTooLong — 1260 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: MotionSearchView (95-1626). The bar is 500 significant lines; this is 760 over it, 2.52× 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: overlay/ExportDialog.tsx web/src/components/overlay/ExportDialog.tsx — FileTooLong — 1229 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 729 over it, 2.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: api/app.py frigate/api/app.py — FileTooLong — 1220 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 720 over it, 2.44× 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: pages/Exports.tsx web/src/pages/Exports.tsx — FileTooLong — 1206 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 706 over it, 2.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: settings/CameraManagementView.tsx web/src/views/settings/CameraManagementView.tsx — FileTooLong — 1120 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 620 over it, 2.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: sections/BaseSection.tsx web/src/components/config-form/sections/BaseSection.tsx — FileTooLong — 1081 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: ConfigSection (198-1422). The bar is 500 significant lines; this is 581 over it, 2.16× 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: recording/RecordingView.tsx web/src/views/recording/RecordingView.tsx — FileTooLong — 1042 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: RecordingView (106-1145). The bar is 500 significant lines; this is 542 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: license_plate/mixin.py frigate/data_processing/common/license_plate/mixin.py — FileTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 525 over it, 2.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: config/config.py frigate/config/config.py — FileTooLong — 1018 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 518 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: record/export.py frigate/record/export.py — FileTooLong — 1016 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 516 over it, 2.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 996 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 496 over it, 1.99× 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: classification/ModelTrainingView.tsx web/src/views/classification/ModelTrainingView.tsx — FileTooLong — 968 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 468 over it, 1.94× 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: comms/dispatcher.py frigate/comms/dispatcher.py — FileTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 461 over it, 1.92× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 957 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 457 over it, 1.91× 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: settings/Go2RtcStreamsSettingsView.tsx web/src/views/settings/Go2RtcStreamsSettingsView.tsx — FileTooLong — 955 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 455 over it, 1.91× 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: ptz/autotrack.py frigate/ptz/autotrack.py — FileTooLong — 938 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 438 over it, 1.88× 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: util/image.py frigate/util/image.py — FileTooLong — 937 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 437 over it, 1.87× 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: detail/TrackingDetails.tsx web/src/components/overlay/detail/TrackingDetails.tsx — FileTooLong — 936 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: TrackingDetails (68-912). The bar is 500 significant lines; this is 436 over it, 1.87× 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.
  • + 72 more in this group — see findings.md.
D10 · Test Quality · Skipped test · ×94
  • Skipped test: (unnamed test) web/e2e/specs/auth.spec.ts:88 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/chat.spec.ts:393 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/classification.spec.ts:125 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/classification.spec.ts:215 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts:57 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts:108 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts:191 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts:225 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/command-menu.spec.ts:271 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts:59 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts:106 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts:160 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts:184 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts:210 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/config-editor.spec.ts:272 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/error-boundary.spec.ts:109 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/error-boundary.spec.ts:133 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/error-boundary.spec.ts:153 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts:81 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts:232 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts:265 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/explore.spec.ts:285 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/export.spec.ts:21 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/export.spec.ts:405 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) web/e2e/specs/export.spec.ts:538 — Skipped — switched off by test.skip
  • + 69 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×39
  • Swallowed exception (empty catch) web/src/views/settings/AuthenticationView.tsx:792 — 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) web/src/views/recording/RecordingView.tsx:685 — 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) web/src/views/motion-search/MotionSearchView.tsx:739 — 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) web/src/views/motion-search/MotionSearchView.tsx:762 — 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) web/src/views/live/LiveCameraView.tsx:615 — `.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) web/src/views/live/LiveCameraView.tsx:1151 — 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) web/src/views/live/LiveDashboardView.tsx:247 — 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) web/src/views/events/EventView.tsx:724 — 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) web/src/views/events/MotionPreviewsPane.tsx:969 — 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) web/src/utils/cameraUtil.ts:97 — 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) web/src/utils/chatUtil.ts: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) web/src/utils/chatUtil.ts:174 — 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) web/src/utils/chatUtil.ts:273 — 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) web/src/utils/chatUtil.ts:342 — 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) web/src/utils/setupWizard.ts:16 — 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) web/src/utils/webrtcProbe.ts:52 — 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) web/src/utils/webrtcProbe.ts:57 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/utils/wsUtil.ts:48 — 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) web/src/pages/ConfigEditor.tsx:105 — 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) web/src/pages/Events.tsx:172 — `.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) web/src/pages/Logs.tsx:393 — `.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) web/src/pages/Replay.tsx:227 — `.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) web/src/hooks/use-session-persistence.ts:32 — 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) web/src/components/ws/WsMessageFeed.tsx:92 — 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) web/src/components/ws/WsMessageRow.tsx:204 — 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.
  • + 14 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×36
  • ClassTooLong: Settings web/src/pages/Settings.tsx:1 — ClassTooLong — 1151 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 751 over it, 2.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: MotionSearchView web/src/views/motion-search/MotionSearchView.tsx:1 — ClassTooLong — 1141 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 741 over it, 2.85× 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: MasksAndZonesView web/src/views/settings/MasksAndZonesView.tsx:1 — ClassTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 382 over it, 1.96× 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: CloneCameraDialog web/src/components/settings/CloneCameraDialog.tsx:1 — ClassTooLong — 760 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 360 over it, 1.90× 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: Step3StreamConfig web/src/components/settings/wizard/Step3StreamConfig.tsx:1 — ClassTooLong — 751 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 351 over it, 1.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RecordingView web/src/views/recording/RecordingView.tsx:1 — ClassTooLong — 740 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 340 over it, 1.85× 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: InputWithTags REDACTED:1 — ClassTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 327 over it, 1.82× 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: GeneralMetrics web/src/views/system/GeneralMetrics.tsx:1 — ClassTooLong — 718 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 318 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ZoneEditPane web/src/components/settings/ZoneEditPane.tsx:1 — ClassTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 308 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: TriggerView web/src/views/settings/TriggerView.tsx:1 — ClassTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 245 over it, 1.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: GeneralSettings web/src/components/menu/GeneralSettings.tsx:1 — ClassTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 219 over it, 1.55× 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: LiveCameraView web/src/views/live/LiveCameraView.tsx:1 — ClassTooLong — 617 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 217 over it, 1.54× 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: AuthenticationView web/src/views/settings/AuthenticationView.tsx:1 — ClassTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 206 over it, 1.52× 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: DraggableGridLayout web/src/views/live/DraggableGridLayout.tsx:1 — ClassTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 195 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: Exports web/src/pages/Exports.tsx:1 — ClassTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 193 over it, 1.48× 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: MobileReviewSettingsDrawer web/src/components/overlay/MobileReviewSettingsDrawer.tsx:1 — ClassTooLong — 579 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 179 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: TrackingDetails web/src/components/overlay/detail/TrackingDetails.tsx:1 — ClassTooLong — 566 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 166 over it, 1.42× 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: ProfilesView web/src/views/settings/ProfilesView.tsx:1 — ClassTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 156 over it, 1.39× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ClassificationModelEditDialog web/src/components/classification/ClassificationModelEditDialog.tsx:1 — ClassTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 130 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DynamicVideoPlayer web/src/components/player/dynamic/DynamicVideoPlayer.tsx:1 — ClassTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 111 over it, 1.28× 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: SearchView web/src/views/search/SearchView.tsx:1 — ClassTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 107 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: Step3ChooseExamples web/src/components/classification/wizard/Step3ChooseExamples.tsx:1 — ClassTooLong — 488 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 88 over it, 1.22× 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: NotificationsSettingsExtras web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:1 — ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 86 over it, 1.22× 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: FieldTemplate web/src/components/config-form/theme/templates/FieldTemplate.tsx:1 — ClassTooLong — 483 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 83 over it, 1.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: LiveDashboardView web/src/views/live/LiveDashboardView.tsx:1 — ClassTooLong — 469 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 69 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.
  • + 11 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×33
  • TodoComment REDACTED:132 — // TODO: search history from browser storage — 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 web/src/components/classification/wizard/Step3ChooseExamples.tsx:349 — // TODO: In the future, we might want to let users select specific cameras — 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 web/e2e/fixtures/error-allowlist.ts:46 — // Each is a TODO(real-bug): the mock should be extended so these endpoints — 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 web/e2e/fixtures/error-allowlist.ts:53 — // TODO(real-bug): ApiMocker registers "**/api/reviews**" (plural) but the — 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 web/e2e/fixtures/error-allowlist.ts:59 — // TODO(real-bug): /api/stats/history is not mocked; the system page fetches — 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 web/e2e/fixtures/error-allowlist.ts:64 — // TODO(real-bug): /api/event_ids is not mocked; the explore/search page — 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 web/e2e/fixtures/error-allowlist.ts:69 — // TODO(real-bug): /api/sub_labels?split_joined=1 returns 500; the mock — 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 web/e2e/fixtures/error-allowlist.ts:75 — // TODO(real-bug): MediaMocker handles /api/*/latest.jpg but the app also — 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 web/e2e/fixtures/error-allowlist.ts:88 — // handler. TODO(real-bug): add WsMocker support for jsmpeg WebSocket — 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 web/e2e/fixtures/error-allowlist.ts:108 — // TODO(real-bug): A dialog somewhere in the app renders <DialogContent> — 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 frigate/models.py:25 — # TODO remove when columns can be dropped without rebuilding table — 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 frigate/models.py:28 — # TODO remove when columns can be dropped without rebuilding table — 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 frigate/models.py:36 — # TODO remove when columns can be dropped without rebuilding table — 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 frigate/models.py:39 — # TODO remove when columns can be dropped without rebuilding table — 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 frigate/models.py:42 — # TODO remove when columns can be dropped without rebuilding table — 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 frigate/models.py:46 — # TODO remove when columns can be dropped without rebuilding table — 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 frigate/util/image.py:656 — # TODO: this should be based on the size after resize now — 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 frigate/util/image.py:886 — # TODO: does this copy the numpy array? — 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 frigate/util/image.py:897 — # TODO: does this copy the numpy array? — 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 frigate/util/object.py:200 — # TODO not sure how to handle case where cluster is larger than expected region — 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 frigate/util/object.py:397 — # TODO: see if we can do this with numpy — 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 frigate/track/norfair_tracker.py:579 — # TODO: stationary objects won't have embeddings — 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 frigate/record/cleanup.py:196 — # TODO: expire segments based on segment stats according to config — 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 frigate/record/maintainer.py:1051 — # TODO: update this to store list of active objects at some point — 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 frigate/ptz/autotrack.py:350 — # TODO: take zooming into account too — 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.
  • + 8 more in this group — see findings.md.
D35 · Change Coupling · Change coupling · ×30
  • Change coupling: use-date-locale.ts ↔ const.ts web/src/hooks/use-date-locale.ts:1 — `web/src/hooks/use-date-locale.ts` and `web/src/lib/const.ts` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `a745070b` proper belarusian locale support (#24112); `88f944fe` feat: add Traditional Chinese (zh-Hant) language option (#23322); `c4b74c91` Miscellaneous fixes (#23155) — run `git show` on any of them.
  • Change coupling: BirdseyeLivePlayer.tsx ↔ LivePlayer.tsx web/src/components/player/BirdseyeLivePlayer.tsx:1 — `web/src/components/player/BirdseyeLivePlayer.tsx` and `web/src/components/player/LivePlayer.tsx` change together 73% of the time (11 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `0977fa5e` Improve camera group live view grids (#24461); `c371fc0c` Miscellaneous Fixes (#20866); `d6f5d2b0` Classification Model UI Refactor (#20602) — run `git show` on any of them.
  • Change coupling: LineGraph.tsx ↔ SystemGraph.tsx web/src/components/graph/LineGraph.tsx:1 — `web/src/components/graph/LineGraph.tsx` and `web/src/components/graph/SystemGraph.tsx` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `acc740a9` Update deps (#24324); `4b6fa494` Miscellaneous fixes (#23335); `f44f485f` Improve metrics UI performance (#22691) — run `git show` on any of them.
  • Change coupling: MotionMaskEditPane.tsx ↔ ObjectMaskEditPane.tsx web/src/components/settings/MotionMaskEditPane.tsx:1 — `web/src/components/settings/MotionMaskEditPane.tsx` and `web/src/components/settings/ObjectMaskEditPane.tsx` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `2ed70bd6` Profiles fixes (#23306); `5059311c` Mask/zone editor fixes (#22732); `324953d3` UI tweaks (#22405) — run `git show` on any of them.
  • Change coupling: MotionMaskEditPane.tsx ↔ ZoneEditPane.tsx web/src/components/settings/MotionMaskEditPane.tsx:1 — `web/src/components/settings/MotionMaskEditPane.tsx` and `web/src/components/settings/ZoneEditPane.tsx` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `2ed70bd6` Profiles fixes (#23306); `5059311c` Mask/zone editor fixes (#22732); `324953d3` UI tweaks (#22405) — run `git show` on any of them.
  • Change coupling: LiveBirdseyeView.tsx ↔ LiveCameraView.tsx web/src/views/live/LiveBirdseyeView.tsx:1 — `web/src/views/live/LiveBirdseyeView.tsx` and `web/src/views/live/LiveCameraView.tsx` change together 69% of the time (11 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `0977fa5e` Improve camera group live view grids (#24461); `4974defe` Dynamically detect if full screen is supported (#13197); `1da934e6` Dynamically detect if full screen is supported (#13197) — run `git show` on any of them.
  • Change coupling: AccountSettings.tsx ↔ GeneralSettings.tsx web/src/components/menu/AccountSettings.tsx:1 — `web/src/components/menu/AccountSettings.tsx` and `web/src/components/menu/GeneralSettings.tsx` change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `be79ad89` hide set password menu option when native auth is disabled (#22439); `152e5852` Authentication improvements (#21194); `e6d1ad0a` Theme scrollbars with tailwind-scrollbar (#11723) — run `git show` on any of them.
  • Change coupling: ollama.py ↔ openai.py frigate/genai/plugins/ollama.py:1 — `frigate/genai/plugins/ollama.py` and `frigate/genai/plugins/openai.py` change together 62% of the time (15 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `eccd10cd` Implement annotated frames for GenAI Review (#24379); `66a24172` Support Dynamic Thinking Models (#23281); `d9c1ea90` Chat improvements (#23195) (at that commit the files were still `frigate/genai/ollama.py` and `frigate/genai/openai.py`) — run `git show` on any of them.
  • Change coupling: EventSegment.tsx ↔ EventView.tsx web/src/components/timeline/EventSegment.tsx:1 — `web/src/components/timeline/EventSegment.tsx` and `web/src/views/events/EventView.tsx` change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `901002a0` Add zoom icons to timeline (#20717); `d6e93d03` Make all corners less rounded on mobile (#11068); `7fac91dc` UI tweaks and bugfixes (#10775) — run `git show` on any of them.
  • Change coupling: HlsVideoPlayer.tsx ↔ DynamicVideoController.ts web/src/components/player/HlsVideoPlayer.tsx:1 — `web/src/components/player/HlsVideoPlayer.tsx` and `web/src/components/player/dynamic/DynamicVideoController.ts` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `c1b56b51` Backport 0.19 iOS HLS fixes (#24147); `423ee2fe` Feature: Share Timestamped URL for Camera Footage History (#22537); `592c245d` Fixes (#21061) — run `git show` on any of them.
  • Change coupling: MsePlayer.tsx ↔ WebRTCPlayer.tsx web/src/components/player/MsePlayer.tsx:1 — `web/src/components/player/MsePlayer.tsx` and `web/src/components/player/WebRTCPlayer.tsx` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `81530392` Miscellaneous Fixes (#21005); `658b0a06` Improve live view console errors (#20340); `7f7eefef` Live view improvements (#20177) — run `git show` on any of them.
  • Change coupling: WebRTCPlayer.tsx ↔ LiveCameraView.tsx web/src/components/player/WebRTCPlayer.tsx:1 — `web/src/components/player/WebRTCPlayer.tsx` and `web/src/views/live/LiveCameraView.tsx` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0977fa5e` Improve camera group live view grids (#24461); `7f7eefef` Live view improvements (#20177); `3f0a9548` Try webrtc when mse fails with decoding error (#11745) — run `git show` on any of them.
  • Change coupling: EventReviewTimeline.tsx ↔ use-draggable-element.ts web/src/components/timeline/EventReviewTimeline.tsx:1 — `web/src/components/timeline/EventReviewTimeline.tsx` and `web/src/hooks/use-draggable-element.ts` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `41593345` option to show motion only on motion timeline (#10626); `70825bc9` rename vars and change which div is absolutely positioned (#10358) (at that commit the file was still `web/src/hooks/use-handle-dragging.ts`); `05a66ce9` Timeline handlebar tweaks (#10336) (at that commit the file was still `web/src/hooks/use-handle-dragging.ts`) — run `git show` on any of them.
  • Change coupling: audio.py ↔ record.py frigate/events/audio.py:1 — `frigate/events/audio.py` and `frigate/record/record.py` change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `20104761` Require setting process priority for FrigateProcess (#19207); `542bf05b` Handle SIGINT with forkserver (#18860); `e832bb4b` Fix go2rtc init (#18708) — run `git show` on any of them.
  • Change coupling: gemini.py ↔ ollama.py frigate/genai/plugins/gemini.py:1 — `frigate/genai/plugins/gemini.py` and `frigate/genai/plugins/ollama.py` change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `eccd10cd` Implement annotated frames for GenAI Review (#24379); `66a24172` Support Dynamic Thinking Models (#23281); `d9c1ea90` Chat improvements (#23195) (at that commit the files were still `frigate/genai/gemini.py` and `frigate/genai/ollama.py`) — run `git show` on any of them.
  • Change coupling: event.py ↔ search.ts frigate/api/event.py:1 — `frigate/api/event.py` and `web/src/types/search.ts` change together 56% of the time (15 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `06967fec` Fix explore paging for non-date sorts (#24392); `6a0e31dc` Add object classification attributes to Tracked Object Details (#21348); `bf22d89f` Improve Face Library Management (#17213) — run `git show` on any of them.
  • Change coupling: centroid_tracker.py ↔ ffmpeg.py frigate/track/centroid_tracker.py:1 — `frigate/track/centroid_tracker.py` and `frigate/video/ffmpeg.py` change together 55% of the time (36 of the 65 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 36 shared commits counted here, the most recent 3 are `45e90303` Round robin SHM management (#15027) (at that commit the file was still `frigate/video.py`); `0b858419` re-enable init delay (#8283) (at that commit the file was still `frigate/video.py`); `ae0aba44` Improve tracking (#6516) (at that commit the file was still `frigate/video.py`) — run `git show` on any of them.
  • Change coupling: maintainer.py ↔ timeline.py frigate/events/maintainer.py:1 — `frigate/events/maintainer.py` and `frigate/timeline.py` change together 54% of the time (13 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `60052e5f` Miscellaneous Fixes (0.17 beta) (#21355); `54900ae3` Properly call super() in subclasses (#14124); `5b0c1e5b` Fix event entries (#14093) — run `git show` on any of them.
  • Change coupling: MotionReviewTimeline.tsx ↔ MotionSegment.tsx web/src/components/timeline/MotionReviewTimeline.tsx:1 — `web/src/components/timeline/MotionReviewTimeline.tsx` and `web/src/components/timeline/MotionSegment.tsx` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `61549a01` No recordings indicator on History timeline (#20715); `4ebc4f6d` Implement support for no recordings indicator on timeline (#18363); `5c33cdba` Timeline performance improvements (#12070) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ SearchView.tsx REDACTED:1 — `REDACTED` and `web/src/views/search/SearchView.tsx` change together 50% of the time (11 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `6a0e31dc` Add object classification attributes to Tracked Object Details (#21348); `530b69b8` Miscellaneous fixes (#20833); `124cc4c9` Rename identifier field (#17128) — run `git show` on any of them.
  • Change coupling: ModelSelectionView.tsx ↔ ModelTrainingView.tsx web/src/views/classification/ModelSelectionView.tsx:1 — `web/src/views/classification/ModelSelectionView.tsx` and `web/src/views/classification/ModelTrainingView.tsx` change together 50% of the time (11 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `819e8de1` Revert modal changes (#23001); `d8f70b7f` Fix dismissable layer regression (#22995); `bf099c3e` Miscellaneous fixes (0.17 beta) (#21655) — run `git show` on any of them.
  • Change coupling: ReviewFilterGroup.tsx ↔ NavItem.tsx web/src/components/filter/ReviewFilterGroup.tsx:1 — `web/src/components/filter/ReviewFilterGroup.tsx` and `web/src/components/navigation/NavItem.tsx` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `9be59510` UI tweaks (#10998); `13cac082` UI tweaks (#10946); `fb7cfe54` Implement camera stats graphs (#10831) — run `git show` on any of them.
  • Change coupling: ReviewFilterGroup.tsx ↔ Sidebar.tsx web/src/components/filter/ReviewFilterGroup.tsx:1 — `web/src/components/filter/ReviewFilterGroup.tsx` and `web/src/components/navigation/Sidebar.tsx` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e6d1ad0a` Theme scrollbars with tailwind-scrollbar (#11723); `9be59510` UI tweaks (#10998); `13cac082` UI tweaks (#10946) — run `git show` on any of them.
  • Change coupling: EventMenu.tsx ↔ RecordingView.tsx web/src/components/timeline/EventMenu.tsx:1 — `web/src/components/timeline/EventMenu.tsx` and `web/src/views/recording/RecordingView.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `ec44398b` Miscellaneous fixes (#23295); `530b69b8` Miscellaneous fixes (#20833); `63042b9c` Review stream tweaks (#20662) — run `git show` on any of them.
  • Change coupling: SearchResultActions.tsx ↔ EventMenu.tsx web/src/components/menu/SearchResultActions.tsx:1 — `web/src/components/menu/SearchResultActions.tsx` and `web/src/components/timeline/EventMenu.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `ec44398b` Miscellaneous fixes (#23295); `d556ff8d` Tweaks (#23292); `32daf6f4` Miscellaneous fixes (#23217) — run `git show` on any of them.
  • + 5 more in this group — see findings.md.
D31 · IaC & Container Security · Medium IaC · ×29
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 4 more in this group — see findings.md.
AC2 · Forms & labels · <Select> field component without a label · ×14
  • <Select> field component without a label web/src/components/chat/ChatSettings.tsx:61 — 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 web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:806 — 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.
  • <Select> field component without a label web/src/components/config-form/theme/fields/HardwarePicker.tsx:158 — 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.
  • <Select> field component without a label web/src/components/config-form/theme/fields/ModelSourcePicker.tsx:150 — 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 web/src/components/config-form/theme/widgets/GenAIBackedModelSizeWidget.tsx:51 — 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.
  • <Select> field component without a label web/src/components/overlay/ExportDialog.tsx:497 — 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 web/src/components/overlay/ExportDialog.tsx:1073 — 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.
  • <Select> field component without a label web/src/components/overlay/ExportDialog.tsx:1376 — 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.
  • <Select> field component without a label web/src/components/overlay/MultiExportDialog.tsx:310 — 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.
  • <Select> field component without a label web/src/components/overlay/RoleChangeDialog.tsx:87 — 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.
  • <Select> field component without a label web/src/components/overlay/detail/ObjectPathPlotter.tsx:149 — 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.
  • <Select> field component without a label web/src/components/overlay/detail/ObjectPathPlotter.tsx:161 — 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.
  • <Select> field component without a label web/src/components/overlay/dialog/DeleteCameraDialog.tsx:108 — 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.
  • <Select> field component without a label web/src/components/overlay/dialog/OptionAndInputDialog.tsx:124 — 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.
AC6 · Visual & motion safety · Focus outline removed inline · ×13
  • Focus outline removed inline web/src/components/card/ClassificationCard.tsx:411 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web/src/components/graph/CombinedStorageGraph.tsx:264 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web/src/components/graph/CombinedStorageGraph.tsx:308 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline REDACTED:749 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline REDACTED:843 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline REDACTED:872 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline REDACTED:896 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline REDACTED:929 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web/src/components/overlay/detail/AnnotationOffsetSlider.tsx:197 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web/src/views/system/GeneralMetrics.tsx:719 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web/src/views/system/StorageMetrics.tsx:142 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web/src/views/system/StorageMetrics.tsx:190 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline web/src/views/system/StorageMetrics.tsx:214 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×11
  • Duplicated block (8 lines × 2) docs/scripts/generate_ui_tabs.py:154 — docs/scripts/generate_ui_tabs.py:154-165 | docs/scripts/generate_ui_tabs.py:277-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/generate_ui_tabs.py:168` calls `_ensure_imports` and `docs/scripts/generate_ui_tabs.py:285` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) frigate/api/event.py:1552 — frigate/api/event.py:1552-1559 | frigate/api/event.py:1609-1616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) frigate/genai/plugins/llama_cpp.py:806 — frigate/genai/plugins/llama_cpp.py:806-813 | frigate/genai/plugins/llama_cpp.py:870-877 — 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) frigate/object_detection/base.py:129 — frigate/object_detection/base.py:129-136 | frigate/object_detection/base.py:203-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) frigate/ptz/autotrack.py:463 — frigate/ptz/autotrack.py:463-470 | frigate/ptz/autotrack.py:491-498 — 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) frigate/record/cleanup.py:260 — frigate/record/cleanup.py:260-267 | frigate/record/cleanup.py:403-410 — 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) frigate/util/object.py:153 — frigate/util/object.py:153-160 | frigate/util/object.py:443-450 — 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) frigate/util/services.py:766 — frigate/util/services.py:766-773 | frigate/util/services.py:798-805 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) frigate/data_processing/common/face/detector.py:111 — frigate/data_processing/common/face/detector.py:111-118 | frigate/data_processing/real_time/bird.py:73-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) REDACTED:103 — REDACTED:103-110 | REDACTED:181-188 — 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) frigate/output/birdseye.py:239 — frigate/output/birdseye.py:239-246 | frigate/output/camera.py:89-96 — before extracting anything, compare `frigate/output/birdseye.py` and `frigate/output/camera.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×11
  • Recursive walk over a caller-supplied document has no depth cap web/src/utils/configUtil.ts:241 — `buildOverrides` is exported and takes `current: unknown` from its caller, and it calls itself at line 241 (`buildOverrides`) with a piece of `current` (and at line 269) — and nowhere in `buildOverrides` 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 `buildOverrides` 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 web/src/utils/configUtil.ts:374 — `flattenOverrides` is exported and takes `value: JsonValue | undefined` from its caller, and it calls itself at line 374 (`flattenOverrides`) with a piece of `value` — and nowhere in `flattenOverrides` 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 `flattenOverrides` 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 web/src/utils/configUtil.ts:403 — `unsetWithWildcard` is exported and takes `obj: Record<string, unknown>` from its caller, and it calls itself at line 403 (`unsetWithWildcard`) with a piece of `obj` — and nowhere in `unsetWithWildcard` 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 `unsetWithWildcard` 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 web/src/utils/configUtil.ts:464 — `requiresRestartForOverrides` is exported, takes a document from its caller (line 489) and hands it to `hasMatchAtPath`, which calls itself at line 464 (`hasMatchAtPath`) with a piece of `value` (and at line 468, line 479, line 483) — and nowhere in `hasMatchAtPath` 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 `hasMatchAtPath` 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 web/src/lib/config-schema/transformer.ts:789 — `applySchemaDefaults` is exported and takes `formData: Record<string, unknown>` from its caller, and it calls itself at line 789 (`applySchemaDefaults`) with a piece of `formData` — and nowhere in `applySchemaDefaults` 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 `applySchemaDefaults` 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 web/src/hooks/use-config-override.ts:27 — `normalizeConfigValue` is exported, takes a document from its caller (line 45) and hands it to `stripInternalFields`, which calls itself at line 27 (`stripInternalFields`) with a piece of `value` (and at line 37) — and nowhere in `stripInternalFields` 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 `stripInternalFields` 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 web/src/components/config-form/theme/utils/overrides.ts:82 — `deepNormalizeValue` is exported and takes `value: unknown` from its caller, and it calls itself at line 82 (`deepNormalizeValue`) with a piece of `value` (and at line 86) — and nowhere in `deepNormalizeValue` 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 `deepNormalizeValue` 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 web/src/components/config-form/sections/section-special-cases.ts:457 — `sanitizeOverridesForSection` is exported, takes a document from its caller (line 396) and hands it to `flattenRecordWithDots`, which calls itself at line 457 (`flattenRecordWithDots`) with a piece of `value` — and nowhere in `flattenRecordWithDots` 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 `flattenRecordWithDots` 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 frigate/util/builtin.py:108 — `deep_merge` is public and takes `dct1: dict` from its caller, and it calls itself at line 108 (`deep_merge`) with a piece of `dct1` — and nowhere in `deep_merge` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `deep_merge` 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 frigate/util/builtin.py:263 — `flatten_config_data` is public and takes `config_data: dict[str, Any]` from its caller, and it calls itself at line 263 (`flatten_config_data`) with a piece of `config_data` — and nowhere in `flatten_config_data` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `flatten_config_data` 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 frigate/util/builtin.py:520 — `has_non_finite_number` is public and takes `value: Any` from its caller, and it calls itself at line 520 (`has_non_finite_number`) with a piece of `value` (and at line 522) — and nowhere in `has_non_finite_number` 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. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `has_non_finite_number` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D10 · Test Quality · No assertions · ×9
  • No assertions: a pinned transcoded stream plays over MSE web/e2e/specs/live-auto-stream.spec.ts:138 — 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: a stale pin falls back to Auto web/e2e/specs/live-auto-stream.spec.ts:261 — 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: timeline renders time markers web/e2e/specs/review.spec.ts:201 — 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: unmute deletes the row's hidden state web/e2e/specs/system-health.spec.ts:259 — 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: picking Exclude on the primary row drops the #video= fragment entirely web/e2e/specs/settings/go2rtc-streams.spec.ts:205 — 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: clean page passes web/e2e/specs/_meta/error-collector.spec.ts:16 — 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: console.error fails the test when not allowlisted web/e2e/specs/_meta/error-collector.spec.ts:23 — 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: console.error is silenced when allowlisted via expectedErrors web/e2e/specs/_meta/error-collector.spec.ts:43 — 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: uncaught pageerror fails the test web/e2e/specs/_meta/error-collector.spec.ts:56 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×8
  • Duplicated block (10 lines × 2) frigate/api/classification.py:82 — frigate/api/classification.py:82-91 | frigate/api/classification.py:698-707 — 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) frigate/api/media.py:1528 — frigate/api/media.py:1528-1537 | frigate/api/media.py:1719-1728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/media.py:1528` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) frigate/comms/dispatcher.py:949 — frigate/comms/dispatcher.py:949-958 | frigate/comms/dispatcher.py:991-1001 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/comms/dispatcher.py:949` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) frigate/data_processing/real_time/custom_classification.py:272 — frigate/data_processing/real_time/custom_classification.py:272-281 | frigate/data_processing/real_time/custom_classification.py:580-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/data_processing/real_time/custom_classification.py:580` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) REDACTED:823 — REDACTED:823-832 | frigate/util/model.py:94-103 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:818` calls `dist2bbox` and `frigate/util/model.py:91` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) frigate/genai/plugins/gemini.py:79 — frigate/genai/plugins/gemini.py:79-88 | frigate/genai/plugins/openai.py:29-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) frigate/record/export.py:1265 — frigate/record/export.py:1265-1274 | frigate/record/export.py:1391-1400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/record/export.py:1265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) frigate/record/maintainer.py:635 — frigate/record/maintainer.py:635-644 | frigate/record/maintainer.py:683-692 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) frigate/api/event.py:1170 — frigate/api/event.py:1170-1183 | frigate/api/event.py:1266-1279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/event.py:1170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) frigate/api/event.py:1969 — frigate/api/event.py:1969-1982 | frigate/api/event.py:2107-2120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) frigate/api/media.py:1559 — frigate/api/media.py:1559-1572 | frigate/api/media.py:1749-1762 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/media.py:1559` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) frigate/config/config.py:149 — frigate/config/config.py:149-162 | frigate/config/config.py:214-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) frigate/genai/plugins/llama_cpp.py:350 — frigate/genai/plugins/llama_cpp.py:350-363 | frigate/genai/plugins/llama_cpp.py:475-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:538 — REDACTED:538-551 | REDACTED:668-681 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) frigate/util/classification.py:406 — frigate/util/classification.py:406-419 | frigate/util/classification.py:765-778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×7
  • Duplicated block (11 lines × 2) frigate/api/auth.py:777 — frigate/api/auth.py:777-787 | frigate/api/auth.py:874-884 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) frigate/api/event.py:2003 — frigate/api/event.py:2003-2013 | frigate/api/event.py:2157-2167 — 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) frigate/comms/embeddings_updater.py:46 — frigate/comms/embeddings_updater.py:46-56 | frigate/comms/inter_process.py:42-52 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) frigate/record/export.py:1108 — frigate/record/export.py:1108-1118 | frigate/record/export.py:1357-1367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/record/export.py:1108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) frigate/track/centroid_tracker.py:119 — frigate/track/centroid_tracker.py:119-129 | frigate/track/norfair_tracker.py:509-519 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `frigate/track/norfair_tracker.py:521` calls `on_active` and `frigate/track/centroid_tracker.py:131` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) frigate/util/config.py:347 — frigate/util/config.py:347-357 | frigate/util/config.py:381-391 — 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) frigate/util/config.py:563 — frigate/util/config.py:563-573 | frigate/util/config.py:605-615 — 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) · ×7
  • Duplicated block (9 lines × 2) frigate/comms/webpush.py:543 — frigate/comms/webpush.py:543-551 | frigate/comms/webpush.py:656-664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) REDACTED:293 — REDACTED:293-301 | frigate/util/model.py:194-202 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:293` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) frigate/motion/frigate_motion.py:21 — frigate/motion/frigate_motion.py:21-29 | frigate/motion/improved_motion.py:29-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `frigate/motion/frigate_motion.py:30` calls `zeros` and `frigate/motion/improved_motion.py:38` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) frigate/motion/frigate_motion.py:116 — frigate/motion/frigate_motion.py:116-124 | frigate/motion/improved_motion.py:148-156 — 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 (9 lines × 2) frigate/track/norfair_tracker.py:414 — frigate/track/norfair_tracker.py:414-422 | frigate/track/norfair_tracker.py:446-454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) frigate/video/ffmpeg.py:408 — frigate/video/ffmpeg.py:408-416 | frigate/video/ffmpeg.py:424-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) frigate/api/export.py:1158 — frigate/api/export.py:1158-1166 | frigate/api/review.py:729-737 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X2 · Cancellation propagation · Async function without AbortSignal · ×7
  • Async function without AbortSignal: detectReolinkCamera web/src/utils/cameraUtil.ts:44 — `detectReolinkCamera` 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: fetchCameraSnapshot web/src/utils/snapshotUtil.ts:19 — `fetchCameraSnapshot` 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: grabVideoSnapshot web/src/utils/snapshotUtil.ts:114 — `grabVideoSnapshot` 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: probeCamera web/src/hooks/use-health-checks.ts:67 — `probeCamera` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: fetcher web/src/components/setup/SetupDetector.tsx:85 — `fetcher` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
  • Async function without AbortSignal: checkSourceExists web/src/components/player/GenericVideoPlayer.tsx:32 — `checkSourceExists` 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: fetcher web/src/components/config-form/theme/fields/ModelSourcePicker.tsx:71 — `fetcher` awaits `axios.get(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios.get(url, { signal })`.
AC2 · Forms & labels · <RadioGroup> field component without a label · ×6
  • <RadioGroup> field component without a label web/src/components/config-form/theme/fields/StreamSourceSelector.tsx:151 — 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.
  • <RadioGroup> field component without a label web/src/components/config-form/theme/widgets/FfmpegArgsWidget.tsx:322 — 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.
  • <RadioGroup> field component without a label web/src/components/filter/SearchFilterGroup.tsx:584 — 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.
  • <RadioGroup> field component without a label web/src/components/overlay/DebugReplayDialog.tsx:73 — 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.
  • <RadioGroup> field component without a label web/src/components/overlay/ExportDialog.tsx:1017 — 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.
  • <RadioGroup> field component without a label web/src/components/overlay/ShareTimestampDialog.tsx:146 — 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.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×6
  • Animation without a prefers-reduced-motion guard web/src/pages/Chat.tsx:415 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard web/src/pages/Chat.tsx:416 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard web/src/pages/Chat.tsx:417 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard docs/src/components/ModelConfigDropdown/styles.module.css:158 — `.arrow` moves (`transition: transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard docs/src/components/FaqItem/styles.module.css:40 — `.toggle::before` moves (`transition: transform var(--ifm-transition-fast, 200ms) ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard docs/src/components/DockerComposeGenerator/styles.module.css:90 — `.inputError` moves (`animation: shake 0.3s ease-in-out`) 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×6
  • Duplicated block (5 lines × 2) frigate/api/media.py:578 — frigate/api/media.py:578-586 | frigate/util/audio.py:121-125 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) frigate/config/config.py:1091 — frigate/config/config.py:1091-1095 | frigate/config/config.py:1255-1261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) frigate/data_processing/real_time/custom_classification.py:262 — frigate/data_processing/real_time/custom_classification.py:262-266 | frigate/util/classification.py:597-601 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) frigate/events/cleanup.py:191 — frigate/events/cleanup.py:191-195 | frigate/events/cleanup.py:322-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) frigate/util/builtin.py:360 — frigate/util/builtin.py:360-364 | frigate/util/builtin.py:382-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) frigate/util/config.py:763 — frigate/util/config.py:763-767 | frigate/util/config.py:818-822 — 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.
AC2 · Forms & labels · <Textarea> field component without a label · ×5
  • <Textarea> field component without a label web/src/components/chat/ChatMessage.tsx:126 — 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.
  • <Textarea> field component without a label web/src/components/overlay/ExportDialog.tsx:1106 — 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.
  • <Textarea> field component without a label web/src/components/overlay/ExportDialog.tsx:1412 — 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.
  • <Textarea> field component without a label web/src/components/overlay/MultiExportDialog.tsx:294 — 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.
  • <Textarea> field component without a label web/src/components/overlay/detail/SearchDetailDialog.tsx:1733 — 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×5
  • Duplicated block (21 lines × 2) frigate/api/media.py:1507 — frigate/api/media.py:1507-1527 | frigate/api/media.py:1695-1715 — 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 (21 lines × 2) frigate/embeddings/onnx/face_embedding.py:41 — frigate/embeddings/onnx/face_embedding.py:41-61 | frigate/embeddings/onnx/face_embedding.py:136-156 — 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 (21 lines × 2) frigate/record/export.py:1300 — frigate/record/export.py:1300-1320 | frigate/record/export.py:1409-1429 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/record/export.py:1300` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (21 lines × 2) frigate/review/maintainer.py:1017 — frigate/review/maintainer.py:1017-1037 | frigate/review/maintainer.py:1044-1064 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/review/maintainer.py:1017` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) frigate/comms/event_metadata_updater.py:29 — frigate/comms/event_metadata_updater.py:29-49 | frigate/comms/recordings_updater.py:29-49 — 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 (18 lines × 2) · ×5
  • Duplicated block (18 lines × 2) frigate/api/auth.py:1217 — frigate/api/auth.py:1217-1234 | frigate/api/auth.py:1393-1410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) frigate/api/event.py:283 — frigate/api/event.py:283-300 | frigate/api/event.py:741-758 — 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 (18 lines × 2) frigate/data_processing/common/license_plate/mixin.py:1241 — frigate/data_processing/common/license_plate/mixin.py:1241-1258 | frigate/data_processing/common/license_plate/mixin.py:1353-1370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/data_processing/common/license_plate/mixin.py:1353` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `frigate/data_processing/common/license_plate/mixin.py:1351` calls `resize` and `frigate/data_processing/common/license_plate/mixin.py:1239` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (18 lines × 2) frigate/track/centroid_tracker.py:93 — frigate/track/centroid_tracker.py:93-110 | frigate/track/norfair_tracker.py:472-489 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) frigate/track/object_processing.py:423 — frigate/track/object_processing.py:423-440 | frigate/track/object_processing.py:519-536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) frigate/api/classification.py:954 — frigate/api/classification.py:954-969 | frigate/api/classification.py:1039-1054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) frigate/embeddings/onnx/jina_v1_embedding.py:119 — frigate/embeddings/onnx/jina_v1_embedding.py:119-134 | frigate/embeddings/onnx/jina_v2_embedding.py:133-148 — before extracting anything, compare `frigate/embeddings/onnx/jina_v1_embedding.py` and `frigate/embeddings/onnx/jina_v2_embedding.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/embeddings/onnx/jina_v1_embedding.py:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) frigate/record/export.py:997 — frigate/record/export.py:997-1012 | frigate/record/export.py:1069-1084 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) frigate/track/centroid_tracker.py:75 — frigate/track/centroid_tracker.py:75-90 | frigate/track/norfair_tracker.py:454-469 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) frigate/util/image.py:514 — frigate/util/image.py:514-529 | frigate/util/image.py:562-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
IC1 · Incompleteness & stubs · Both branches are identical · ×5
  • Both branches are identical — the condition decides nothing web/src/components/menu/AccountSettings.tsx:127 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing web/src/views/recording/RecordingView.tsx:1329 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing web/src/views/settings/MasksAndZonesView.tsx:306 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing web/src/views/settings/MasksAndZonesView.tsx:371 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing web/src/views/settings/MasksAndZonesView.tsx:436 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×4
  • TooManyMethods: MqttClient frigate/comms/mqtt.py:39 — 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: Dispatcher frigate/comms/dispatcher.py:63 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: FrigateApp frigate/app.py:103 — 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: RecordingExporter frigate/record/export.py:299 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×4
  • Duplicated block (24 lines × 2) REDACTED:208 — REDACTED:208-231 | REDACTED:243-266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:208` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) frigate/api/event.py:190 — frigate/api/event.py:190-213 | frigate/api/event.py:624-647 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (24 lines × 2) frigate/api/event.py:1332 — frigate/api/event.py:1332-1355 | frigate/api/event.py:1391-1414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) frigate/util/config.py:316 — frigate/util/config.py:316-339 | frigate/util/config.py:361-384 — 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 (13 lines × 2) · ×4
  • Duplicated block (13 lines × 2) frigate/api/media.py:351 — frigate/api/media.py:351-363 | frigate/api/media.py:367-379 — 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 (13 lines × 2) frigate/data_processing/common/face/recognizer.py:222 — frigate/data_processing/common/face/recognizer.py:222-234 | frigate/data_processing/common/face/recognizer.py:340-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) frigate/detectors/plugins/openvino.py:82 — frigate/detectors/plugins/openvino.py:82-94 | frigate/detectors/plugins/openvino.py:102-114 — 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 (13 lines × 2) frigate/comms/object_detector_signaler.py:17 — frigate/comms/object_detector_signaler.py:17-29 | frigate/comms/zmq_proxy.py:21-33 — 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 (7 lines × 2) · ×4
  • Duplicated block (7 lines × 2) frigate/api/chat.py:184 — frigate/api/chat.py:184-190 | frigate/api/chat.py:1119-1125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) frigate/api/media.py:846 — frigate/api/media.py:846-852 | frigate/api/preview.py:130-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/media.py:846` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) frigate/detectors/plugins/deepx.py:684 — frigate/detectors/plugins/deepx.py:684-690 | frigate/detectors/plugins/deepx.py:707-713 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) frigate/plus.py:163 — frigate/plus.py:163-169 | frigate/plus.py:172-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×4
  • Outbound HTTP without resilience REDACTED:191 — `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience frigate/embeddings/onnx/base_embedding.py:69 — `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience frigate/plus.py:166 — `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience frigate/plus.py:175 — `requests.post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) docs/scripts/generate_ui_tabs.py:109 — docs/scripts/generate_ui_tabs.py:109-128 | docs/scripts/generate_ui_tabs.py:228-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `docs/scripts/generate_ui_tabs.py:251` calls `_normalize_whitespace` and `docs/scripts/generate_ui_tabs.py:130` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (20 lines × 2) frigate/api/event.py:1982 — frigate/api/event.py:1982-2001 | frigate/api/event.py:2167-2186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/event.py:1982` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) frigate/data_processing/real_time/custom_classification.py:74 — frigate/data_processing/real_time/custom_classification.py:74-93 | frigate/data_processing/real_time/custom_classification.py:442-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `Interpreter` names `ai_edge_litert.interpreter` in one and `tflite_runtime.interpreter` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `frigate/data_processing/real_time/custom_classification.py:70` calls `now`, `timestamp` and `frigate/data_processing/real_time/custom_classification.py:437` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) docs/scripts/generate_ui_tabs.py:564 — docs/scripts/generate_ui_tabs.py:564-570 | docs/scripts/generate_ui_tabs.py:602-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `docs/scripts/generate_ui_tabs.py:564` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) frigate/review/maintainer.py:139 — frigate/review/maintainer.py:139-144 | frigate/review/maintainer.py:154-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `frigate/review/maintainer.py:138` calls `now`, `timestamp` and `frigate/review/maintainer.py:153` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) frigate/output/birdseye.py:258 — frigate/output/birdseye.py:258-263 | frigate/output/camera.py:108-113 — before extracting anything, compare `frigate/output/birdseye.py` and `frigate/output/camera.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
R11 · Import Boundaries · Boundary violation [package · ×3
  • Boundary violation [package:third-party-deep-import] web/src/components/overlay/DebugDrawingLayer.tsx:3 — web/src/components/overlay/DebugDrawingLayer.tsx:3 imports konva/lib/Node, 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] web/src/components/settings/PolygonDrawer.tsx:18 — web/src/components/settings/PolygonDrawer.tsx:18 imports konva/lib/types, 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] web/src/utils/canvasUtil.ts:1 — web/src/utils/canvasUtil.ts:1 imports konva/lib/types, 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.
AC1 · Text alternatives · <canvas> without a text alternative · ×2
  • <canvas> without a text alternative web/src/components/camera/ResizingCameraImage.tsx:103 — 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.
  • <canvas> without a text alternative web/src/components/player/JSMpegPlayer.tsx:248 — 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 · <Slider> field component without a label · ×2
  • <Slider> field component without a label web/src/components/overlay/detail/AnnotationOffsetSlider.tsx:170 — 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.
  • <Slider> field component without a label web/src/components/overlay/detail/AnnotationSettingsPane.tsx:178 — 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.
D2 · Cognitive Complexity · ObjectFieldTemplate.ObjectFieldTemplate · ×2
  • ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields (cognitive 28) web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:67 — ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (7 pts), boolean chains 5 (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: 2 other methods here (ObjectFieldTemplate.ObjectFieldTemplate, ObjectFieldTemplate.ObjectFieldTemplate::renderGroupedFields) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
  • ObjectFieldTemplate.ObjectFieldTemplate::renderGroupedFields (cognitive 16) web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:318 — ObjectFieldTemplate.ObjectFieldTemplate::renderGroupedFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), ternaries 1 (2 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. This shape REPEATS in the file: 2 other methods here (ObjectFieldTemplate.ObjectFieldTemplate, ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · PolygonCanvas.PolygonCanvas · ×2
  • PolygonCanvas.PolygonCanvas::handleMouseDown (cognitive 21) web/src/components/settings/PolygonCanvas.tsx:113 — PolygonCanvas.PolygonCanvas::handleMouseDown has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6 (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 (PolygonCanvas.PolygonCanvas::addPointToPolygon) 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.
  • PolygonCanvas.PolygonCanvas::addPointToPolygon (cognitive 16) web/src/components/settings/PolygonCanvas.tsx:73 — PolygonCanvas.PolygonCanvas::addPointToPolygon has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, ternaries 1 (2 pts), 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. This shape REPEATS in the file: one other method here (PolygonCanvas.PolygonCanvas::handleMouseDown) 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 (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) frigate/api/classification.py:380 — frigate/api/classification.py:380-406 | frigate/api/classification.py:936-962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/classification.py:380` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (27 lines × 2) frigate/api/event.py:224 — frigate/api/event.py:224-250 | frigate/api/event.py:670-696 — 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 (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) frigate/data_processing/common/face/recognizer.py:197 — frigate/data_processing/common/face/recognizer.py:197-218 | frigate/data_processing/common/face/recognizer.py:315-336 — 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 (22 lines × 2) frigate/embeddings/onnx/jina_v1_embedding.py:184 — frigate/embeddings/onnx/jina_v1_embedding.py:184-205 | frigate/embeddings/onnx/jina_v2_embedding.py:74-95 — before extracting anything, compare `frigate/embeddings/onnx/jina_v1_embedding.py` and `frigate/embeddings/onnx/jina_v2_embedding.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/embeddings/onnx/jina_v1_embedding.py:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×2
  • Duplicated block (17–19 lines × 2) docs/scripts/lib/yaml_extractor.py:84 — docs/scripts/lib/yaml_extractor.py:84-100 | docs/scripts/lib/yaml_extractor.py:211-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17–19 lines × 2) frigate/events/cleanup.py:123 — frigate/events/cleanup.py:123-141 | frigate/events/cleanup.py:260-276 — 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 (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) frigate/api/motion_search.py:209 — frigate/api/motion_search.py:209-225 | frigate/api/motion_search.py:280-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17–18 lines × 2) frigate/embeddings/onnx/jina_v1_embedding.py:160 — frigate/embeddings/onnx/jina_v1_embedding.py:160-177 | frigate/embeddings/onnx/lpr_embedding.py:35-51 — before extracting anything, compare `frigate/embeddings/onnx/jina_v1_embedding.py` and `frigate/embeddings/onnx/lpr_embedding.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) frigate/api/review.py:239 — frigate/api/review.py:239-255 | frigate/api/review.py:337-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) frigate/output/birdseye.py:266 — frigate/output/birdseye.py:266-282 | frigate/output/camera.py:116-132 — before extracting anything, compare `frigate/output/birdseye.py` and `frigate/output/camera.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) REDACTED:596 — REDACTED:596-611 | frigate/detectors/plugins/openvino.py:218-234 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:614` calls `zeros` and `frigate/detectors/plugins/openvino.py:236` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16–17 lines × 2) frigate/genai/plugins/gemini.py:152 — frigate/genai/plugins/gemini.py:152-168 | frigate/genai/plugins/gemini.py:203-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/genai/plugins/gemini.py:152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×2
  • Duplicated block (14–16 lines × 2) frigate/api/event.py:2130 — frigate/api/event.py:2130-2145 | frigate/api/event.py:2248-2261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–16 lines × 2) frigate/config/camera/onvif.py:76 — frigate/config/camera/onvif.py:76-91 | frigate/config/camera/zone.py:93-106 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) frigate/config/config.py:164 — frigate/config/config.py:164-178 | frigate/config/config.py:236-250 — 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 (15 lines × 2) frigate/embeddings/onnx/jina_v1_embedding.py:53 — frigate/embeddings/onnx/jina_v1_embedding.py:53-67 | frigate/embeddings/onnx/jina_v2_embedding.py:63-77 — before extracting anything, compare `frigate/embeddings/onnx/jina_v1_embedding.py` and `frigate/embeddings/onnx/jina_v2_embedding.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/embeddings/onnx/jina_v1_embedding.py:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) frigate/api/classification.py:974 — frigate/api/classification.py:974-986 | frigate/api/classification.py:1143-1156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/classification.py:1143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `frigate/api/classification.py:1157` calls `safe_join`, `invalid_name_response` and `frigate/api/classification.py:988` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13–14 lines × 2) frigate/record/maintainer.py:297 — frigate/record/maintainer.py:297-309 | frigate/record/maintainer.py:366-379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×2
  • Duplicated block (12–14 lines × 2) frigate/api/event.py:250 — frigate/api/event.py:250-263 | frigate/api/event.py:655-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–14 lines × 2) frigate/camera/maintainer.py:191 — frigate/camera/maintainer.py:191-204 | frigate/camera/maintainer.py:227-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) frigate/camera/state.py:210 — frigate/camera/state.py:210-222 | frigate/camera/state.py:237-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/camera/state.py:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–13 lines × 2) frigate/record/maintainer.py:414 — frigate/record/maintainer.py:414-426 | frigate/record/maintainer.py:431-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/record/maintainer.py:414` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: GenAIClient (LCOM4 8) frigate/genai/__init__.py:54 — GenAIClient's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HailoDetector (LCOM4 4) REDACTED:261 — HailoDetector's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R10 · Code Duplication · Duplicated block with local edits (91 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (91 matched lines × 2 locations) web/src/components/overlay/ClassificationSelectionDialog.tsx:89 — web/src/components/overlay/ClassificationSelectionDialog.tsx:89 · web/src/components/overlay/FaceSelectionDialog.tsx:48 — the two spans are one implementation copied and then locally edited — 544 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 (91 matched lines × 2 locations) REDACTED:77 — REDACTED:77 · web/src/components/overlay/dialog/TrainFilterDialog.tsx:31 — the two spans are one implementation copied and then locally edited — 429 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 (88 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (88 matched lines × 2 locations) web/src/components/filter/CamerasFilterButton.tsx:97 — web/src/components/filter/CamerasFilterButton.tsx:97 · web/src/components/filter/SearchFilterGroup.tsx:322 — the two spans are one implementation copied and then locally edited — 389 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 (88 matched lines × 2 locations) web/src/components/ui/dialog.tsx:9 — web/src/components/ui/dialog.tsx:9 · web/src/components/ui/sheet.tsx:10 — the two spans are one implementation copied and then locally edited — 432 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 (81 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (81 matched lines × 2 locations) web/src/components/overlay/CreateTriggerDialog.tsx:91 — web/src/components/overlay/CreateTriggerDialog.tsx:91 · web/src/components/trigger/wizard/Step1NameAndType.tsx:52 — the two spans are one implementation copied and then locally edited — 479 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 (81 matched lines × 2 locations) web/src/components/trigger/wizard/Step1NameAndType.tsx:36 — web/src/components/trigger/wizard/Step1NameAndType.tsx:36 · web/src/components/trigger/wizard/Step2ConfigureData.tsx:26 — the two spans are one implementation copied and then locally edited — 399 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) web/src/components/card/ReviewCard.tsx:261 — web/src/components/card/ReviewCard.tsx:261 · web/src/components/card/ReviewCard.tsx:337 — the two spans are one implementation copied and then locally edited — 283 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) web/src/components/overlay/detail/AnnotationSettingsPane.tsx:155 — web/src/components/overlay/detail/AnnotationSettingsPane.tsx:155 · web/src/views/settings/MotionTunerView.tsx:208 — the two spans are one implementation copied and then locally edited — 249 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 (~26 LoC) · ×2
  • Dead file (~26 LoC) web/src/components/icons/SearchSourceIcon.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~26 LoC) web/src/components/icons/SubFilterIcon.tsx — no import path from any entry point (38 application, 9 tooling, 70 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
AC1 · Text alternatives · <video> without a captions track · ×1
  • <video> without a captions track web/src/pages/Exports.tsx:686 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC4 · Keyboard semantics · Anchor without href · ×1
  • Anchor without href web/src/components/config-form/sections/BaseSection.tsx:785 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 390 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 · Settings.Settings (cyclomatic 204) · ×1
  • Settings.Settings (cyclomatic 204) web/src/pages/Settings.tsx:471 — Settings.Settings has cyclomatic complexity 204 (threshold 15). Of this number, 36 points are the body's own statements and 168 belong to 50 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 · MotionSearchView.MotionSearchView (cyclomatic 179) · ×1
  • MotionSearchView.MotionSearchView (cyclomatic 179) web/src/views/motion-search/MotionSearchView.tsx:95 — MotionSearchView.MotionSearchView has cyclomatic complexity 179 (threshold 15). Of this number, 67 points are the body's own statements and 112 belong to 40 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 · BaseSection.ConfigSection (cyclomatic 174) · ×1
  • BaseSection.ConfigSection (cyclomatic 174) web/src/components/config-form/sections/BaseSection.tsx:198 — BaseSection.ConfigSection has cyclomatic complexity 174 (threshold 15). Of this number, 82 points are the body's own statements and 92 belong to 26 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 · GeneralMetrics.GeneralMetrics (cyclomatic 148) · ×1
  • GeneralMetrics.GeneralMetrics (cyclomatic 148) web/src/views/system/GeneralMetrics.tsx:31 — GeneralMetrics.GeneralMetrics has cyclomatic complexity 148 (threshold 15). Of this number, 37 points are the body's own statements and 111 belong to 49 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 · MsePlayer.MSEPlayer (cyclomatic 140) · ×1
  • MsePlayer.MSEPlayer (cyclomatic 140) web/src/components/player/MsePlayer.tsx:35 — MsePlayer.MSEPlayer has cyclomatic complexity 140 (threshold 15). Most of this is not in the body itself: 1 of the 140 points is its own statement and the rest belongs to 39 function items inside it that branch (a function literal at line 582, a function literal at line 779, a function literal at line 189, …). 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 · LiveCameraView.LiveCameraView (cyclomatic 139) · ×1
  • LiveCameraView.LiveCameraView (cyclomatic 139) web/src/views/live/LiveCameraView.tsx:133 — LiveCameraView.LiveCameraView has cyclomatic complexity 139 (threshold 15). Of this number, 63 points are the body's own statements and 76 belong to 22 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 · MasksAndZonesView.MasksAndZonesView (cyclomatic 134) · ×1
  • MasksAndZonesView.MasksAndZonesView (cyclomatic 134) web/src/views/settings/MasksAndZonesView.tsx:45 — MasksAndZonesView.MasksAndZonesView has cyclomatic complexity 134 (threshold 15). Of this number, 23 points are the body's own statements and 111 belong to 21 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 · DynamicVideoPlayer.DynamicVideoPlayer (cyclomatic 133) · ×1
  • DynamicVideoPlayer.DynamicVideoPlayer (cyclomatic 133) web/src/components/player/dynamic/DynamicVideoPlayer.tsx:87 — DynamicVideoPlayer.DynamicVideoPlayer has cyclomatic complexity 133 (threshold 15). Of this number, 30 points are the body's own statements and 103 belong to 32 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 · FieldTemplate.FieldTemplate (cyclomatic 132) · ×1
  • FieldTemplate.FieldTemplate (cyclomatic 132) web/src/components/config-form/theme/templates/FieldTemplate.tsx:60 — FieldTemplate.FieldTemplate has cyclomatic complexity 132 (threshold 15). Of this number, 99 points are the body's own statements and 33 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 · LiveCameraView.FrigateCameraFeatures (cyclomatic 132) · ×1
  • LiveCameraView.FrigateCameraFeatures (cyclomatic 132) web/src/views/live/LiveCameraView.tsx:1012 — LiveCameraView.FrigateCameraFeatures has cyclomatic complexity 132 (threshold 15). Of this number, 103 points are the body's own statements and 29 belong to 21 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 · RecordingView.RecordingView (cyclomatic 124) · ×1
  • RecordingView.RecordingView (cyclomatic 124) web/src/views/recording/RecordingView.tsx:106 — RecordingView.RecordingView has cyclomatic complexity 124 (threshold 15). Of this number, 55 points are the body's own statements and 69 belong to 26 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 · SearchView.SearchView (cyclomatic 119) · ×1
  • SearchView.SearchView (cyclomatic 119) web/src/views/search/SearchView.tsx:59 — SearchView.SearchView has cyclomatic complexity 119 (threshold 15). Of this number, 43 points are the body's own statements and 76 belong to 25 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 · SearchDetailDialog.ObjectDetailsTab (cyclomatic 118) · ×1
  • SearchDetailDialog.ObjectDetailsTab (cyclomatic 118) web/src/components/overlay/detail/SearchDetailDialog.tsx:690 — SearchDetailDialog.ObjectDetailsTab has cyclomatic complexity 118 (threshold 15). Of this number, 54 points are the body's own statements and 64 belong to 36 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 · ZoneEditPane.ZoneEditPane (cyclomatic 114) · ×1
  • ZoneEditPane.ZoneEditPane (cyclomatic 114) web/src/components/settings/ZoneEditPane.tsx:56 — ZoneEditPane.ZoneEditPane has cyclomatic complexity 114 (threshold 15). Of this number, 26 points are the body's own statements and 88 belong to 24 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 · TrackingDetails.TrackingDetails (cyclomatic 112) · ×1
  • TrackingDetails.TrackingDetails (cyclomatic 112) web/src/components/overlay/detail/TrackingDetails.tsx:68 — TrackingDetails.TrackingDetails has cyclomatic complexity 112 (threshold 15). Of this number, 39 points are the body's own statements and 73 belong to 16 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 · DraggableGridLayout.DraggableGridLayout (cyclomatic 110) · ×1
  • DraggableGridLayout.DraggableGridLayout (cyclomatic 110) web/src/views/live/DraggableGridLayout.tsx:115 — DraggableGridLayout.DraggableGridLayout has cyclomatic complexity 110 (threshold 15). Of this number, 31 points are the body's own statements and 79 belong to 28 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 · ExportDialog.ExportContent (cyclomatic 109) · ×1
  • ExportDialog.ExportContent (cyclomatic 109) web/src/components/overlay/ExportDialog.tsx:413 — ExportDialog.ExportContent has cyclomatic complexity 109 (threshold 15). Of this number, 49 points are the body's own statements and 60 belong to 23 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 · HlsVideoPlayer.HlsVideoPlayer (cyclomatic 104) · ×1
  • HlsVideoPlayer.HlsVideoPlayer (cyclomatic 104) web/src/components/player/HlsVideoPlayer.tsx:76 — HlsVideoPlayer.HlsVideoPlayer has cyclomatic complexity 104 (threshold 15). Of this number, 25 points are the body's own statements and 79 belong to 31 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 · LivePlayer.LivePlayer (cyclomatic 104) · ×1
  • LivePlayer.LivePlayer (cyclomatic 104) web/src/components/player/LivePlayer.tsx:63 — LivePlayer.LivePlayer has cyclomatic complexity 104 (threshold 15). Of this number, 66 points are the body's own statements and 38 belong to 13 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 · camera.onvif_probe (cyclomatic 102) · ×1
  • camera.onvif_probe (cyclomatic 102) REDACTED:738 — camera.onvif_probe has cyclomatic complexity 102 (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 · Step2ProbeOrSnapshot.Step2ProbeOrSnapshot (cyclomatic 102) · ×1
  • Step2ProbeOrSnapshot.Step2ProbeOrSnapshot (cyclomatic 102) web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx:32 — Step2ProbeOrSnapshot.Step2ProbeOrSnapshot has cyclomatic complexity 102 (threshold 15). Most of this is not in the body itself: 13 of the 102 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 56, 176, 360, …). 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 · Step3StreamConfig.Step3StreamConfig (cyclomatic 100) · ×1
  • Step3StreamConfig.Step3StreamConfig (cyclomatic 100) web/src/components/settings/wizard/Step3StreamConfig.tsx:73 — Step3StreamConfig.Step3StreamConfig has cyclomatic complexity 100 (threshold 15). Of this number, 16 points are the body's own statements and 84 belong to 23 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 · CloneCameraDialog.CloneCameraDialog (cyclomatic 93) · ×1
  • CloneCameraDialog.CloneCameraDialog (cyclomatic 93) web/src/components/settings/CloneCameraDialog.tsx:86 — CloneCameraDialog.CloneCameraDialog has cyclomatic complexity 93 (threshold 15). Most of this is not in the body itself: 14 of the 93 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 369, 626, 245, …). 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 · Explore.Explore (cyclomatic 91) · ×1
  • Explore.Explore (cyclomatic 91) web/src/pages/Explore.tsx:41 — Explore.Explore has cyclomatic complexity 91 (threshold 15). Of this number, 40 points are the body's own statements and 51 belong to 13 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 · LiveDashboardView.LiveDashboardView (cyclomatic 88) · ×1
  • LiveDashboardView.LiveDashboardView (cyclomatic 88) web/src/views/live/LiveDashboardView.tsx:69 — LiveDashboardView.LiveDashboardView has cyclomatic complexity 88 (threshold 15). Of this number, 35 points are the body's own statements and 53 belong to 16 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 · PolygonItem.PolygonItem (cyclomatic 83) · ×1
  • PolygonItem.PolygonItem (cyclomatic 83) web/src/components/settings/PolygonItem.tsx:57 — PolygonItem.PolygonItem has cyclomatic complexity 83 (threshold 15). Of this number, 40 points are the body's own statements and 43 belong to 9 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 · FrigateConfig.post_validation (cyclomatic 82) · ×1
  • FrigateConfig.post_validation (cyclomatic 82) frigate/config/config.py:1025 — FrigateConfig.post_validation has cyclomatic complexity 82 (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 · Exports.Exports (cyclomatic 82) · ×1
  • Exports.Exports (cyclomatic 82) web/src/pages/Exports.tsx:77 — Exports.Exports has cyclomatic complexity 82 (threshold 15). Of this number, 26 points are the body's own statements and 56 belong to 28 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 · GeneralSettings.GeneralSettings (cyclomatic 81) · ×1
  • GeneralSettings.GeneralSettings (cyclomatic 81) web/src/components/menu/GeneralSettings.tsx:88 — GeneralSettings.GeneralSettings has cyclomatic complexity 81 (threshold 15). Of this number, 68 points are the body's own statements and 13 belong to 8 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 · Step3ChooseExamples.Step3ChooseExamples (cyclomatic 78) · ×1
  • Step3ChooseExamples.Step3ChooseExamples (cyclomatic 78) web/src/components/classification/wizard/Step3ChooseExamples.tsx:46 — Step3ChooseExamples.Step3ChooseExamples has cyclomatic complexity 78 (threshold 15). Of this number, 22 points are the body's own statements and 56 belong to 21 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 · Events.Events (cyclomatic 78) · ×1
  • Events.Events (cyclomatic 78) web/src/pages/Events.tsx:38 — Events.Events has cyclomatic complexity 78 (threshold 15). Most of this is not in the body itself: 9 of the 78 points are its own statements and the rest belongs to 33 function literals inside it that branch (lines 229, 429, 527, …). 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 · EventView.MotionReview (cyclomatic 77) · ×1
  • EventView.MotionReview (cyclomatic 77) web/src/views/events/EventView.tsx:993 — EventView.MotionReview has cyclomatic complexity 77 (threshold 15). Of this number, 30 points are the body's own statements and 47 belong to 21 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 · NotificationsSettingsExtras.NotificationsSettingsExtras (cyclomatic 76) · ×1
  • NotificationsSettingsExtras.NotificationsSettingsExtras (cyclomatic 76) web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:70 — NotificationsSettingsExtras.NotificationsSettingsExtras has cyclomatic complexity 76 (threshold 15). Of this number, 26 points are the body's own statements and 50 belong to 28 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 · Logs.Logs (cyclomatic 76) · ×1
  • Logs.Logs (cyclomatic 76) web/src/pages/Logs.tsx:59 — Logs.Logs has cyclomatic complexity 76 (threshold 15). Most of this is not in the body itself: 9 of the 76 points are its own statements and the rest belongs to 21 function literals inside it that branch (lines 421, 139, 204, …). 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 · TriggerView.TriggerView (cyclomatic 74) · ×1
  • TriggerView.TriggerView (cyclomatic 74) web/src/views/settings/TriggerView.tsx:84 — TriggerView.TriggerView has cyclomatic complexity 74 (threshold 15). Of this number, 16 points are the body's own statements and 58 belong to 19 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 · ReviewSegmentMaintainer.run (cyclomatic 73) · ×1
  • ReviewSegmentMaintainer.run (cyclomatic 73) frigate/review/maintainer.py:782 — ReviewSegmentMaintainer.run has cyclomatic complexity 73 (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 · ModelTrainingView.ModelTrainingView (cyclomatic 73) · ×1
  • ModelTrainingView.ModelTrainingView (cyclomatic 73) web/src/views/classification/ModelTrainingView.tsx:83 — ModelTrainingView.ModelTrainingView has cyclomatic complexity 73 (threshold 15). Of this number, 36 points are the body's own statements and 37 belong to 16 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 · MotionPreviewsPane.MotionPreviewClip (cyclomatic 72) · ×1
  • MotionPreviewsPane.MotionPreviewClip (cyclomatic 72) web/src/views/events/MotionPreviewsPane.tsx:229 — MotionPreviewsPane.MotionPreviewClip has cyclomatic complexity 72 (threshold 15). Most of this is not in the body itself: 14 of the 72 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 456, 355, 412, …). 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 · FfmpegArgsWidget.FfmpegArgsWidget (cyclomatic 71) · ×1
  • FfmpegArgsWidget.FfmpegArgsWidget (cyclomatic 71) web/src/components/config-form/theme/widgets/FfmpegArgsWidget.tsx:104 — FfmpegArgsWidget.FfmpegArgsWidget has cyclomatic complexity 71 (threshold 15). Of this number, 40 points are the body's own statements and 31 belong to 6 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 · MobileReviewSettingsDrawer.MobileReviewSettingsDrawer (cyclomatic 69) · ×1
  • MobileReviewSettingsDrawer.MobileReviewSettingsDrawer (cyclomatic 69) web/src/components/overlay/MobileReviewSettingsDrawer.tsx:90 — MobileReviewSettingsDrawer.MobileReviewSettingsDrawer has cyclomatic complexity 69 (threshold 15). Of this number, 40 points are the body's own statements and 29 belong to 10 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 · Chat.ChatPage (cyclomatic 69) · ×1
  • Chat.ChatPage (cyclomatic 69) web/src/pages/Chat.tsx:53 — Chat.ChatPage has cyclomatic complexity 69 (threshold 15). Of this number, 18 points are the body's own statements and 51 belong to 14 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 · ReviewTimeline.ReviewTimeline (cyclomatic 68) · ×1
  • ReviewTimeline.ReviewTimeline (cyclomatic 68) web/src/components/timeline/ReviewTimeline.tsx:50 — ReviewTimeline.ReviewTimeline has cyclomatic complexity 68 (threshold 15). Of this number, 48 points are the body's own statements and 20 belong to 9 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 · ProfilesView.ProfilesView (cyclomatic 65) · ×1
  • ProfilesView.ProfilesView (cyclomatic 65) web/src/views/settings/ProfilesView.tsx:71 — ProfilesView.ProfilesView has cyclomatic complexity 65 (threshold 15). Of this number, 20 points are the body's own statements and 45 belong to 11 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 · event.events_search (cyclomatic 63) · ×1
  • event.events_search (cyclomatic 63) frigate/api/event.py:533 — event.events_search has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AuthenticationView.AuthenticationView (cyclomatic 62) · ×1
  • AuthenticationView.AuthenticationView (cyclomatic 62) web/src/views/settings/AuthenticationView.tsx:44 — AuthenticationView.AuthenticationView has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 15 of the 62 points are its own statements and the rest belongs to 25 function items inside it that branch (a function literal at line 457, a function literal at line 654, a function literal at line 88, …). 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 · DetailStream.DetailStream (cyclomatic 61) · ×1
  • DetailStream.DetailStream (cyclomatic 61) web/src/components/timeline/DetailStream.tsx:46 — DetailStream.DetailStream has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 7 of the 61 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 196, 148, 178, …). 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 · OnvifController._init_onvif (cyclomatic 60) · ×1
  • OnvifController._init_onvif (cyclomatic 60) REDACTED:193 — OnvifController._init_onvif has cyclomatic complexity 60 (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 · LiveContextMenu.LiveContextMenu (cyclomatic 60) · ×1
  • LiveContextMenu.LiveContextMenu (cyclomatic 60) web/src/components/menu/LiveContextMenu.tsx:75 — LiveContextMenu.LiveContextMenu has cyclomatic complexity 60 (threshold 15). Of this number, 40 points are the body's own statements and 20 belong to 8 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 · CameraWatchdog.run (cyclomatic 59) · ×1
  • CameraWatchdog.run (cyclomatic 59) frigate/video/ffmpeg.py:355 — CameraWatchdog.run 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 · generate_config_translations.main (cyclomatic 59) · ×1
  • generate_config_translations.main (cyclomatic 59) generate_config_translations.py:213 — generate_config_translations.main 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 · MotionSearchROICanvas.MotionSearchROICanvas (cyclomatic 59) · ×1
  • MotionSearchROICanvas.MotionSearchROICanvas (cyclomatic 59) web/src/views/motion-search/MotionSearchROICanvas.tsx:22 — MotionSearchROICanvas.MotionSearchROICanvas has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 14 of the 59 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 122, 208, 69, …). 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 · LicensePlateProcessingMixin.lpr_process (cyclomatic 58) · ×1
  • LicensePlateProcessingMixin.lpr_process (cyclomatic 58) frigate/data_processing/common/license_plate/mixin.py:1219 — LicensePlateProcessingMixin.lpr_process has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeminiClient.chat_with_tools_stream (cyclomatic 57) · ×1
  • GeminiClient.chat_with_tools_stream (cyclomatic 57) frigate/genai/plugins/gemini.py:491 — GeminiClient.chat_with_tools_stream has cyclomatic complexity 57 (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 · ClassificationModelEditDialog.ClassificationModelEditDialog (cyclomatic 57) · ×1
  • ClassificationModelEditDialog.ClassificationModelEditDialog (cyclomatic 57) web/src/components/classification/ClassificationModelEditDialog.tsx:75 — ClassificationModelEditDialog.ClassificationModelEditDialog has cyclomatic complexity 57 (threshold 15). Of this number, 19 points are the body's own statements and 38 belong to 13 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 · GenAIModelWidget.GenAIModelWidget (cyclomatic 57) · ×1
  • GenAIModelWidget.GenAIModelWidget (cyclomatic 57) web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx:51 — GenAIModelWidget.GenAIModelWidget has cyclomatic complexity 57 (threshold 15). Of this number, 22 points are the body's own statements and 35 belong to 11 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 · WebRTCPlayer.WebRtcPlayer (cyclomatic 57) · ×1
  • WebRTCPlayer.WebRtcPlayer (cyclomatic 57) web/src/components/player/WebRTCPlayer.tsx:32 — WebRTCPlayer.WebRtcPlayer 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 24 function items inside it that branch (a function literal at line 375, a function literal at line 92, a function literal at line 368, …). 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 · PreviewThumbnailPlayer.PreviewThumbnailPlayer (cyclomatic 57) · ×1
  • PreviewThumbnailPlayer.PreviewThumbnailPlayer (cyclomatic 57) web/src/components/player/PreviewThumbnailPlayer.tsx:43 — PreviewThumbnailPlayer.PreviewThumbnailPlayer has cyclomatic complexity 57 (threshold 15). Of this number, 31 points are the body's own statements and 26 belong to 11 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 · event.events (cyclomatic 56) · ×1
  • event.events (cyclomatic 56) frigate/api/event.py:97 — event.events has cyclomatic complexity 56 (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 · LiveBirdseyeView.LiveBirdseyeView (cyclomatic 56) · ×1
  • LiveBirdseyeView.LiveBirdseyeView (cyclomatic 56) web/src/views/live/LiveBirdseyeView.tsx:34 — LiveBirdseyeView.LiveBirdseyeView has cyclomatic complexity 56 (threshold 15). Of this number, 22 points are the body's own statements and 34 belong to 7 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 · GeminiClient.chat_with_tools (cyclomatic 55) · ×1
  • GeminiClient.chat_with_tools (cyclomatic 55) frigate/genai/plugins/gemini.py:235 — GeminiClient.chat_with_tools 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 · CameraWizardDialog.CameraWizardDialog (cyclomatic 55) · ×1
  • CameraWizardDialog.CameraWizardDialog (cyclomatic 55) web/src/components/settings/CameraWizardDialog.tsx:82 — CameraWizardDialog.CameraWizardDialog has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 8 of the 55 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 176, a function literal at line 114, a function literal at line 282, …). 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 · TrackedObject.update (cyclomatic 54) · ×1
  • TrackedObject.update (cyclomatic 54) frigate/track/tracked_object.py:130 — TrackedObject.update has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Step4Validation.Step4Validation (cyclomatic 54) · ×1
  • Step4Validation.Step4Validation (cyclomatic 54) web/src/components/settings/wizard/Step4Validation.tsx:33 — Step4Validation.Step4Validation has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 8 of the 54 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 275, 157, 200, …). 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 · cameraClone.buildClonedCameraPayloads (cyclomatic 54) · ×1
  • cameraClone.buildClonedCameraPayloads (cyclomatic 54) web/src/utils/cameraClone.ts:472 — cameraClone.buildClonedCameraPayloads has cyclomatic complexity 54 (threshold 15). Of this number, 52 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 · ClassificationCard.GroupedClassificationCard (cyclomatic 53) · ×1
  • ClassificationCard.GroupedClassificationCard (cyclomatic 53) web/src/components/card/ClassificationCard.tsx:207 — ClassificationCard.GroupedClassificationCard has cyclomatic complexity 53 (threshold 15). Of this number, 30 points are the body's own statements and 23 belong to 9 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 · MotionMaskEditPane.MotionMaskEditPane (cyclomatic 53) · ×1
  • MotionMaskEditPane.MotionMaskEditPane (cyclomatic 53) web/src/components/settings/MotionMaskEditPane.tsx:49 — MotionMaskEditPane.MotionMaskEditPane has cyclomatic complexity 53 (threshold 15). Of this number, 16 points are the body's own statements and 37 belong to 11 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 · ObjectMaskEditPane.ObjectMaskEditPane (cyclomatic 53) · ×1
  • ObjectMaskEditPane.ObjectMaskEditPane (cyclomatic 53) web/src/components/settings/ObjectMaskEditPane.tsx:56 — ObjectMaskEditPane.ObjectMaskEditPane has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 14 of the 53 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 170, a function literal at line 254, 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 · config.migrate_018_0 (cyclomatic 51) · ×1
  • config.migrate_018_0 (cyclomatic 51) frigate/util/config.py:709 — config.migrate_018_0 has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · detect.process_frames (cyclomatic 51) · ×1
  • detect.process_frames (cyclomatic 51) frigate/video/detect.py:242 — detect.process_frames has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrackingDetails.LifecycleIconRow (cyclomatic 51) · ×1
  • TrackingDetails.LifecycleIconRow (cyclomatic 51) web/src/components/overlay/detail/TrackingDetails.tsx:925 — TrackingDetails.LifecycleIconRow has cyclomatic complexity 51 (threshold 15). Of this number, 29 points are the body's own statements and 22 belong to 11 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 · CameraState.update (cyclomatic 50) · ×1
  • CameraState.update (cyclomatic 50) frigate/camera/state.py:340 — CameraState.update has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · generate_config_translations.extract_translations_from_schema (cyclomatic 49) · ×1
  • generate_config_translations.extract_translations_from_schema (cyclomatic 49) generate_config_translations.py:35 — generate_config_translations.extract_translations_from_schema has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CameraStreamingDialog.CameraStreamingDialog (cyclomatic 49) · ×1
  • CameraStreamingDialog.CameraStreamingDialog (cyclomatic 49) web/src/components/settings/CameraStreamingDialog.tsx:54 — CameraStreamingDialog.CameraStreamingDialog has cyclomatic complexity 49 (threshold 15). Of this number, 22 points are the body's own statements and 27 belong to 4 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 · EventView.DetectionReview (cyclomatic 49) · ×1
  • EventView.DetectionReview (cyclomatic 49) web/src/views/events/EventView.tsx:576 — EventView.DetectionReview has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 15 of the 49 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 791, 759, 731, …). 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 · calendar-range.DateRangePicker (cyclomatic 48) · ×1
  • calendar-range.DateRangePicker (cyclomatic 48) web/src/components/ui/calendar-range.tsx:84 — calendar-range.DateRangePicker has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 10 of the 48 points are its own statements and the rest belongs to 10 function items inside it that branch (getPresetRange, resetValues, areRangesEqual, …). 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 · RecordingMaintainer.move_files (cyclomatic 47) · ×1
  • RecordingMaintainer.move_files (cyclomatic 47) frigate/record/maintainer.py:283 — RecordingMaintainer.move_files has cyclomatic complexity 47 (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 · PolygonDrawer.PolygonDrawer (cyclomatic 46) · ×1
  • PolygonDrawer.PolygonDrawer (cyclomatic 46) web/src/components/settings/PolygonDrawer.tsx:36 — PolygonDrawer.PolygonDrawer has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 14 function items inside it that branch (groupDragBound, handleMouseOverPoint, handleMouseOutPoint, …). 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-draggable-element.useDraggableElement (cyclomatic 46) · ×1
  • use-draggable-element.useDraggableElement (cyclomatic 46) web/src/hooks/use-draggable-element.ts:44 — use-draggable-element.useDraggableElement has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 287, 504, 436, …). 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 · FaceLibrary.FaceLibrary (cyclomatic 46) · ×1
  • FaceLibrary.FaceLibrary (cyclomatic 46) web/src/pages/FaceLibrary.tsx:77 — FaceLibrary.FaceLibrary has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 14 of the 46 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 303, 197, 225, …). 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 · MotionPreviewsPane.MotionPreviewsPane (cyclomatic 45) · ×1
  • MotionPreviewsPane.MotionPreviewsPane (cyclomatic 45) web/src/views/events/MotionPreviewsPane.tsx:718 — MotionPreviewsPane.MotionPreviewsPane has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 9 of the 45 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 812, 1034, 1085, …). 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 · MotionSearchDialog.MotionSearchDialog (cyclomatic 44) · ×1
  • MotionSearchDialog.MotionSearchDialog (cyclomatic 44) web/src/views/motion-search/MotionSearchDialog.tsx:88 — MotionSearchDialog.MotionSearchDialog has cyclomatic complexity 44 (threshold 15). Of this number, 32 points are the body's own statements and 12 belong to 7 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 · VideoControls.VideoControls (cyclomatic 43) · ×1
  • VideoControls.VideoControls (cyclomatic 43) web/src/components/player/VideoControls.tsx:84 — VideoControls.VideoControls has cyclomatic complexity 43 (threshold 15). Of this number, 20 points are the body's own statements and 23 belong to 7 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 · MotionSegment.MotionSegment (cyclomatic 43) · ×1
  • MotionSegment.MotionSegment (cyclomatic 43) web/src/components/timeline/MotionSegment.tsx:33 — MotionSegment.MotionSegment has cyclomatic complexity 43 (threshold 15). Of this number, 32 points are the body's own statements and 11 belong to 8 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 · Go2RtcStreamsSettingsView.Go2RtcStreamsSettingsView (cyclomatic 42) · ×1
  • Go2RtcStreamsSettingsView.Go2RtcStreamsSettingsView (cyclomatic 42) web/src/views/settings/Go2RtcStreamsSettingsView.tsx:109 — Go2RtcStreamsSettingsView.Go2RtcStreamsSettingsView has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 11 of the 42 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 176, 195, 233, …). 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 · EventView.EventView (cyclomatic 41) · ×1
  • EventView.EventView (cyclomatic 41) web/src/views/events/EventView.tsx:128 — EventView.EventView has cyclomatic complexity 41 (threshold 15). Of this number, 19 points are the body's own statements and 22 belong to 9 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 · transformer.normalizeNullableSchema (cyclomatic 40) · ×1
  • transformer.normalizeNullableSchema (cyclomatic 40) web/src/lib/config-schema/transformer.ts:61 — transformer.normalizeNullableSchema has cyclomatic complexity 40 (threshold 15). Of this number, 35 points are the body's own statements and 5 belong to 5 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 · CameraMetrics.CameraMetrics (cyclomatic 40) · ×1
  • CameraMetrics.CameraMetrics (cyclomatic 40) web/src/views/system/CameraMetrics.tsx:35 — CameraMetrics.CameraMetrics has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 69, 321, 178, …). 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 · LayoutGridField.GridLayoutObjectFieldTemplate (cyclomatic 39) · ×1
  • LayoutGridField.GridLayoutObjectFieldTemplate (cyclomatic 39) web/src/components/config-form/theme/fields/LayoutGridField.tsx:132 — LayoutGridField.GridLayoutObjectFieldTemplate 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 12 function items inside it that branch (a function literal at line 320, renderGroupedGridLayout, a function literal at line 232, …). 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 · configUtil.buildOverrides (cyclomatic 39) · ×1
  • configUtil.buildOverrides (cyclomatic 39) web/src/utils/configUtil.ts:205 — configUtil.buildOverrides 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 · UiSettingsView.UiSettingsView (cyclomatic 39) · ×1
  • UiSettingsView.UiSettingsView (cyclomatic 39) web/src/views/settings/UiSettingsView.tsx:142 — UiSettingsView.UiSettingsView has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 8 of the 39 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 259, 215, 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.
D1 · Cyclomatic Complexity · OpenAIClient.chat_with_tools_stream (cyclomatic 38) · ×1
  • OpenAIClient.chat_with_tools_stream (cyclomatic 38) frigate/genai/plugins/openai.py:360 — OpenAIClient.chat_with_tools_stream has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OutputProcess.run (cyclomatic 38) · ×1
  • OutputProcess.run (cyclomatic 38) frigate/output/output.py:122 — OutputProcess.run has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScrubbablePreview.VideoPreview (cyclomatic 38) · ×1
  • ScrubbablePreview.VideoPreview (cyclomatic 38) web/src/components/preview/ScrubbablePreview.tsx:28 — ScrubbablePreview.VideoPreview has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 6 of the 38 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 87, 68, 174, …). 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 · ExportCard.ExportCard (cyclomatic 38) · ×1
  • ExportCard.ExportCard (cyclomatic 38) web/src/components/card/ExportCard.tsx:117 — ExportCard.ExportCard has cyclomatic complexity 38 (threshold 15). Of this number, 18 points are the body's own statements and 20 belong to 8 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 · SummaryTimeline.SummaryTimeline (cyclomatic 38) · ×1
  • SummaryTimeline.SummaryTimeline (cyclomatic 38) web/src/components/timeline/SummaryTimeline.tsx:25 — SummaryTimeline.SummaryTimeline has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 275, 188, 238, …). 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 · Replay.Replay (cyclomatic 38) · ×1
  • Replay.Replay (cyclomatic 38) web/src/pages/Replay.tsx:113 — Replay.Replay has cyclomatic complexity 38 (threshold 15). Of this number, 26 points are the body's own statements and 12 belong to 5 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 · MediaSyncSettingsView.MediaSyncSettingsView (cyclomatic 38) · ×1
  • MediaSyncSettingsView.MediaSyncSettingsView (cyclomatic 38) web/src/views/settings/MediaSyncSettingsView.tsx:20 — MediaSyncSettingsView.MediaSyncSettingsView has cyclomatic complexity 38 (threshold 15). Of this number, 26 points are the body's own statements and 12 belong to 4 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 · ObjectTrackOverlay.ObjectTrackOverlay (cyclomatic 37) · ×1
  • ObjectTrackOverlay.ObjectTrackOverlay (cyclomatic 37) web/src/components/overlay/ObjectTrackOverlay.tsx:49 — ObjectTrackOverlay.ObjectTrackOverlay has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 422, 212, 346, …). 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 · ChatMessage.MessageBubble (cyclomatic 36) · ×1
  • ChatMessage.MessageBubble (cyclomatic 36) web/src/components/chat/ChatMessage.tsx:55 — ChatMessage.MessageBubble has cyclomatic complexity 36 (threshold 15). Of this number, 22 points are the body's own statements and 14 belong to 7 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 · ConfigEditor.ConfigEditor (cyclomatic 36) · ×1
  • ConfigEditor.ConfigEditor (cyclomatic 36) web/src/pages/ConfigEditor.tsx:29 — ConfigEditor.ConfigEditor has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 5 of the 36 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 110, 55, 180, …). 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 · ObjectFieldTemplate.ObjectFieldTemplate (cyclomatic 35) · ×1
  • ObjectFieldTemplate.ObjectFieldTemplate (cyclomatic 35) web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:40 — ObjectFieldTemplate.ObjectFieldTemplate has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields) 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 · Step1NameCamera.Step1NameCamera (cyclomatic 35) · ×1
  • Step1NameCamera.Step1NameCamera (cyclomatic 35) web/src/components/settings/wizard/Step1NameCamera.tsx:50 — Step1NameCamera.Step1NameCamera has cyclomatic complexity 35 (threshold 15). Of this number, 23 points are the body's own statements and 12 belong to 8 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 · MultiExportDialog.MultiExportDialog (cyclomatic 34) · ×1
  • MultiExportDialog.MultiExportDialog (cyclomatic 34) web/src/components/overlay/MultiExportDialog.tsx:61 — MultiExportDialog.MultiExportDialog 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 5 function literals inside it that branch (lines 170, 86, 160, …). 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 · SingleSectionPage.SingleSectionPage (cyclomatic 34) · ×1
  • SingleSectionPage.SingleSectionPage (cyclomatic 34) web/src/views/settings/SingleSectionPage.tsx:64 — SingleSectionPage.SingleSectionPage has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ImprovedMotionDetector.detect (cyclomatic 33) · ×1
  • ImprovedMotionDetector.detect (cyclomatic 33) frigate/motion/improved_motion.py:55 — ImprovedMotionDetector.detect has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReviewSegmentMaintainer.update_existing_segment (cyclomatic 33) · ×1
  • ReviewSegmentMaintainer.update_existing_segment (cyclomatic 33) frigate/review/maintainer.py:556 — ReviewSegmentMaintainer.update_existing_segment has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AnimatedEventCard.AnimatedEventCard (cyclomatic 33) · ×1
  • AnimatedEventCard.AnimatedEventCard (cyclomatic 33) web/src/components/card/AnimatedEventCard.tsx:33 — AnimatedEventCard.AnimatedEventCard has cyclomatic complexity 33 (threshold 15). Of this number, 17 points are the body's own statements and 16 belong to 8 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 · CameraReviewClassification.CameraReviewClassification (cyclomatic 33) · ×1
  • CameraReviewClassification.CameraReviewClassification (cyclomatic 33) web/src/components/config-form/sectionExtras/CameraReviewClassification.tsx:32 — CameraReviewClassification.CameraReviewClassification has cyclomatic complexity 33 (threshold 15). Of this number, 18 points are the body's own statements and 15 belong to 12 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 · SearchFilterGroup.SearchFilterGroup (cyclomatic 33) · ×1
  • SearchFilterGroup.SearchFilterGroup (cyclomatic 33) web/src/components/filter/SearchFilterGroup.tsx:39 — SearchFilterGroup.SearchFilterGroup has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 9 of the 33 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 66, 143, 52, …). 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 · PreviewPlayer.PreviewVideoPlayer (cyclomatic 33) · ×1
  • PreviewPlayer.PreviewVideoPlayer (cyclomatic 33) web/src/components/player/PreviewPlayer.tsx:121 — PreviewPlayer.PreviewVideoPlayer has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 209, 298, 185, …). 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 · Live.Live (cyclomatic 33) · ×1
  • Live.Live (cyclomatic 33) web/src/pages/Live.tsx:16 — Live.Live 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 8 function literals inside it that branch (lines 92, 137, 111, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · configUtil.prepareSectionSavePayload (cyclomatic 33) · ×1
  • configUtil.prepareSectionSavePayload (cyclomatic 33) web/src/utils/configUtil.ts:638 — configUtil.prepareSectionSavePayload has cyclomatic complexity 33 (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 · CameraManagementView.CameraManagementView (cyclomatic 33) · ×1
  • CameraManagementView.CameraManagementView (cyclomatic 33) web/src/views/settings/CameraManagementView.tsx:91 — CameraManagementView.CameraManagementView has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 157, 133, 107, …). 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 · SetPasswordDialog.SetPasswordDialog (cyclomatic 32) · ×1
  • SetPasswordDialog.SetPasswordDialog (cyclomatic 32) web/src/components/overlay/SetPasswordDialog.tsx:47 — SetPasswordDialog.SetPasswordDialog has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 291, a function literal at line 388, a function literal at line 149, …). 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 · CameraPathWidget.CameraPathWidget (cyclomatic 32) · ×1
  • CameraPathWidget.CameraPathWidget (cyclomatic 32) web/src/components/config-form/theme/widgets/CameraPathWidget.tsx:43 — CameraPathWidget.CameraPathWidget has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 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 · CameraInputsField.CameraInputsField (cyclomatic 32) · ×1
  • CameraInputsField.CameraInputsField (cyclomatic 32) web/src/components/config-form/theme/fields/CameraInputsField.tsx:107 — CameraInputsField.CameraInputsField has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 309, 417, 291, …). 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 · KnownPlatesField.KnownPlatesField (cyclomatic 32) · ×1
  • KnownPlatesField.KnownPlatesField (cyclomatic 32) web/src/components/config-form/theme/fields/KnownPlatesField.tsx:217 — KnownPlatesField.KnownPlatesField has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 290, 228, 324, …). 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 · LiveStreamsField.LiveStreamsField (cyclomatic 32) · ×1
  • LiveStreamsField.LiveStreamsField (cyclomatic 32) web/src/components/config-form/theme/fields/LiveStreamsField.tsx:330 — LiveStreamsField.LiveStreamsField has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 456, a function literal at line 342, a function literal at line 365, …). 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 · SearchFilterDialog.SearchFilterDialog (cyclomatic 32) · ×1
  • SearchFilterDialog.SearchFilterDialog (cyclomatic 32) REDACTED:58 — SearchFilterDialog.SearchFilterDialog 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 6 function literals inside it that branch (lines 90, 196, 79, …). 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 · CommandMenu.CommandMenu (cyclomatic 32) · ×1
  • CommandMenu.CommandMenu (cyclomatic 32) web/src/components/menu/CommandMenu.tsx:93 — CommandMenu.CommandMenu has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 115, a function literal at line 156, 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.
D1 · Cyclomatic Complexity · DetailActionsMenu.DetailActionsMenu (cyclomatic 32) · ×1
  • DetailActionsMenu.DetailActionsMenu (cyclomatic 32) web/src/components/overlay/detail/DetailActionsMenu.tsx:33 — DetailActionsMenu.DetailActionsMenu has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 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 · JSMpegPlayer.JSMpegPlayer (cyclomatic 32) · ×1
  • JSMpegPlayer.JSMpegPlayer (cyclomatic 32) web/src/components/player/JSMpegPlayer.tsx:21 — JSMpegPlayer.JSMpegPlayer has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 63, 195, 113, …). 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 · ui_generator.generate_ui_content (cyclomatic 31) · ×1
  • ui_generator.generate_ui_content (cyclomatic 31) docs/scripts/lib/ui_generator.py:100 — ui_generator.generate_ui_content 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 · app.config_set (cyclomatic 31) · ×1
  • app.config_set (cyclomatic 31) frigate/api/app.py:1054 — app.config_set 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 · chat._execute_find_similar_objects (cyclomatic 31) · ×1
  • chat._execute_find_similar_objects (cyclomatic 31) frigate/api/chat.py:370 — chat._execute_find_similar_objects has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CameraState.get_current_frame (cyclomatic 31) · ×1
  • CameraState.get_current_frame (cyclomatic 31) frigate/camera/state.py:87 — CameraState.get_current_frame 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 · LicensePlateProcessingMixin._process_license_plate (cyclomatic 31) · ×1
  • LicensePlateProcessingMixin._process_license_plate (cyclomatic 31) frigate/data_processing/common/license_plate/mixin.py:207 — LicensePlateProcessingMixin._process_license_plate 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 · Step2StateArea.Step2StateArea (cyclomatic 31) · ×1
  • Step2StateArea.Step2StateArea (cyclomatic 31) web/src/components/classification/wizard/Step2StateArea.tsx:37 — Step2StateArea.Step2StateArea has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 179, 68, 91, …). 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 · Go2RtcStreamsSettingsView.StreamUrlEntry (cyclomatic 31) · ×1
  • Go2RtcStreamsSettingsView.StreamUrlEntry (cyclomatic 31) web/src/views/settings/Go2RtcStreamsSettingsView.tsx:816 — Go2RtcStreamsSettingsView.StreamUrlEntry has cyclomatic complexity 31 (threshold 15). Of this number, 17 points are the body's own statements and 14 belong to 9 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 · TrackedObjectProcessor.run (cyclomatic 30) · ×1
  • TrackedObjectProcessor.run (cyclomatic 30) frigate/track/object_processing.py:755 — TrackedObjectProcessor.run 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 · WrapIfAdditionalTemplate.WrapIfAdditionalTemplate (cyclomatic 30) · ×1
  • WrapIfAdditionalTemplate.WrapIfAdditionalTemplate (cyclomatic 30) REDACTED:26 — WrapIfAdditionalTemplate.WrapIfAdditionalTemplate has cyclomatic complexity 30 (threshold 15). Of this number, 24 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 · CreateTriggerDialog.CreateTriggerDialog (cyclomatic 30) · ×1
  • CreateTriggerDialog.CreateTriggerDialog (cyclomatic 30) web/src/components/overlay/CreateTriggerDialog.tsx:70 — CreateTriggerDialog.CreateTriggerDialog has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 13 of the 30 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 102, a function literal at line 82, …). 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 · SearchDetailDialog.SearchDetailDialog (cyclomatic 30) · ×1
  • SearchDetailDialog.SearchDetailDialog (cyclomatic 30) web/src/components/overlay/detail/SearchDetailDialog.tsx:439 — SearchDetailDialog.SearchDetailDialog has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 belong to 7 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 · streamIssues.getStreamIssues (cyclomatic 30) · ×1
  • streamIssues.getStreamIssues (cyclomatic 30) web/src/utils/streamIssues.ts:91 — streamIssues.getStreamIssues 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 · ws._materialize_for_ws (cyclomatic 29) · ×1
  • ws._materialize_for_ws (cyclomatic 29) frigate/comms/ws.py:392 — ws._materialize_for_ws has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LlamaCppClient._get_model_info (cyclomatic 29) · ×1
  • LlamaCppClient._get_model_info (cyclomatic 29) frigate/genai/plugins/llama_cpp.py:185 — LlamaCppClient._get_model_info has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LlamaCppClient.chat_with_tools_stream (cyclomatic 29) · ×1
  • LlamaCppClient.chat_with_tools_stream (cyclomatic 29) frigate/genai/plugins/llama_cpp.py:891 — LlamaCppClient.chat_with_tools_stream has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BirdsEyeFrameManager.update_frame (cyclomatic 29) · ×1
  • BirdsEyeFrameManager.update_frame (cyclomatic 29) frigate/output/birdseye.py:464 — BirdsEyeFrameManager.update_frame has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SearchFilterDialog.RecognizedLicensePlatesFilterContent (cyclomatic 29) · ×1
  • SearchFilterDialog.RecognizedLicensePlatesFilterContent (cyclomatic 29) REDACTED:911 — SearchFilterDialog.RecognizedLicensePlatesFilterContent has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (filterItems, handleSelect, handleSelectAllVisible, …). 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 · CreateUserDialog.CreateUserDialog (cyclomatic 29) · ×1
  • CreateUserDialog.CreateUserDialog (cyclomatic 29) web/src/components/overlay/CreateUserDialog.tsx:60 — CreateUserDialog.CreateUserDialog has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 213, 308, 73, …). 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 · logUtil.parseLogLines (cyclomatic 29) · ×1
  • logUtil.parseLogLines (cyclomatic 29) web/src/utils/logUtil.ts:13 — logUtil.parseLogLines 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 3 function literals inside it that branch (lines 147, 83, 16). 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 · MqttClient._publish_retained_state (cyclomatic 28) · ×1
  • MqttClient._publish_retained_state (cyclomatic 28) frigate/comms/mqtt.py:141 — MqttClient._publish_retained_state 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 · RecordingMaintainer.validate_and_move_segment (cyclomatic 28) · ×1
  • RecordingMaintainer.validate_and_move_segment (cyclomatic 28) frigate/record/maintainer.py:590 — RecordingMaintainer.validate_and_move_segment 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 · CameraGroupSelector.CameraGroupEdit (cyclomatic 28) · ×1
  • CameraGroupSelector.CameraGroupEdit (cyclomatic 28) web/src/components/filter/CameraGroupSelector.tsx:734 — CameraGroupSelector.CameraGroupEdit has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 802, 954, 1006, …). 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 · ExportActionGroup.ExportActionGroup (cyclomatic 28) · ×1
  • ExportActionGroup.ExportActionGroup (cyclomatic 28) web/src/components/filter/ExportActionGroup.tsx:35 — ExportActionGroup.ExportActionGroup has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 195, 119, 165, …). 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 · ReviewFilterGroup.ReviewFilterGroup (cyclomatic 28) · ×1
  • ReviewFilterGroup.ReviewFilterGroup (cyclomatic 28) web/src/components/filter/ReviewFilterGroup.tsx:53 — ReviewFilterGroup.ReviewFilterGroup has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 70, 84, 107, …). 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 · FrigatePlusDialog.FrigatePlusDialog (cyclomatic 28) · ×1
  • FrigatePlusDialog.FrigatePlusDialog (cyclomatic 28) web/src/components/overlay/dialog/FrigatePlusDialog.tsx:33 — FrigatePlusDialog.FrigatePlusDialog has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body's own statements and 7 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 · DetailStream.LifecycleItem (cyclomatic 28) · ×1
  • DetailStream.LifecycleItem (cyclomatic 28) web/src/components/timeline/DetailStream.tsx:777 — DetailStream.LifecycleItem has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to 7 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 · SemanticTriggerProcessor.process_data (cyclomatic 27) · ×1
  • SemanticTriggerProcessor.process_data (cyclomatic 27) frigate/data_processing/post/semantic_trigger.py:65 — SemanticTriggerProcessor.process_data 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 · FaceRealTimeProcessor.process_frame (cyclomatic 27) · ×1
  • FaceRealTimeProcessor.process_frame (cyclomatic 27) frigate/data_processing/real_time/face.py:95 — FaceRealTimeProcessor.process_frame 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 · ReviewCard.ReviewCard (cyclomatic 27) · ×1
  • ReviewCard.ReviewCard (cyclomatic 27) web/src/components/card/ReviewCard.tsx:50 — ReviewCard.ReviewCard has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 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 · GenAIRolesWidget.GenAIRolesWidget (cyclomatic 27) · ×1
  • GenAIRolesWidget.GenAIRolesWidget (cyclomatic 27) web/src/components/config-form/theme/widgets/GenAIRolesWidget.tsx:55 — GenAIRolesWidget.GenAIRolesWidget has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 128, capabilityOf, a function literal at line 176, …). 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 · ExportDialog.ExportDialog (cyclomatic 27) · ×1
  • ExportDialog.ExportDialog (cyclomatic 27) web/src/components/overlay/ExportDialog.tsx:102 — ExportDialog.ExportDialog 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 5 function literals inside it that branch (lines 146, 128, 245, …). 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 · ImagePicker.ImagePicker (cyclomatic 27) · ×1
  • ImagePicker.ImagePicker (cyclomatic 27) web/src/components/overlay/ImagePicker.tsx:29 — ImagePicker.ImagePicker has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 54, a function literal at line 174, a function literal at line 69, …). 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-camera-activity.useCameraMotionNextTimestamp (cyclomatic 27) · ×1
  • use-camera-activity.useCameraMotionNextTimestamp (cyclomatic 27) web/src/hooks/use-camera-activity.ts:205 — use-camera-activity.useCameraMotionNextTimestamp has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 217, 290, 256, …). 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-keyboard-listener.useKeyboardListener (cyclomatic 27) · ×1
  • use-keyboard-listener.useKeyboardListener (cyclomatic 27) web/src/hooks/use-keyboard-listener.tsx:20 — use-keyboard-listener.useKeyboardListener has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 34, 95, 26). 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 · transformer.resolveSchemaRefs (cyclomatic 27) · ×1
  • transformer.resolveSchemaRefs (cyclomatic 27) web/src/lib/config-schema/transformer.ts:243 — transformer.resolveSchemaRefs 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 · System.System (cyclomatic 27) · ×1
  • System.System (cyclomatic 27) web/src/pages/System.tsx:49 — System.System has cyclomatic complexity 27 (threshold 15). Of this number, 20 points are the body's own statements and 7 belong to 5 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 · chatUtil.streamChatCompletion (cyclomatic 27) · ×1
  • chatUtil.streamChatCompletion (cyclomatic 27) web/src/utils/chatUtil.ts:58 — chatUtil.streamChatCompletion has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 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 · health.enrichmentRows (cyclomatic 27) · ×1
  • health.enrichmentRows (cyclomatic 27) web/src/utils/health.ts:608 — health.enrichmentRows has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 618). 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 · EnrichmentMetrics.EnrichmentMetrics (cyclomatic 27) · ×1
  • EnrichmentMetrics.EnrichmentMetrics (cyclomatic 27) web/src/views/system/EnrichmentMetrics.tsx:23 — EnrichmentMetrics.EnrichmentMetrics has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 41, 167, 116, …). 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 · auth.auth (cyclomatic 26) · ×1
  • auth.auth (cyclomatic 26) frigate/api/auth.py:716 — auth.auth has cyclomatic complexity 26 (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 · chat._execute_get_recap (cyclomatic 26) · ×1
  • chat._execute_get_recap (cyclomatic 26) frigate/api/chat.py:1108 — chat._execute_get_recap 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 · OpenAIClient.chat_with_tools (cyclomatic 26) · ×1
  • OpenAIClient.chat_with_tools (cyclomatic 26) frigate/genai/plugins/openai.py:239 — OpenAIClient.chat_with_tools 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 · services.get_intel_gpu_stats (cyclomatic 26) · ×1
  • services.get_intel_gpu_stats (cyclomatic 26) frigate/util/services.py:508 — services.get_intel_gpu_stats 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 · SwitchesWidget.SwitchesWidget (cyclomatic 26) · ×1
  • SwitchesWidget.SwitchesWidget (cyclomatic 26) web/src/components/config-form/theme/widgets/SwitchesWidget.tsx:75 — SwitchesWidget.SwitchesWidget 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 11 function items inside it that branch (a function literal at line 91, a function literal at line 98, a function literal at line 145, …). 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 · InputWithTags.InputWithTags (cyclomatic 26) · ×1
  • InputWithTags.InputWithTags (cyclomatic 26) REDACTED:71 — InputWithTags.InputWithTags 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. This shape REPEATS in the file: one other method here (InputWithTags.InputWithTags::formatFilterValues) 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 · PtzControlPanel.PtzControlPanel (cyclomatic 26) · ×1
  • PtzControlPanel.PtzControlPanel (cyclomatic 26) web/src/components/overlay/PtzControlPanel.tsx:38 — PtzControlPanel.PtzControlPanel 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 one function literal inside it that branches (line 84). 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 · DetailStream.ReviewGroup (cyclomatic 26) · ×1
  • DetailStream.ReviewGroup (cyclomatic 26) web/src/components/timeline/DetailStream.tsx:384 — DetailStream.ReviewGroup has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 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 · EventSegment.EventSegment (cyclomatic 26) · ×1
  • EventSegment.EventSegment (cyclomatic 26) web/src/components/timeline/EventSegment.tsx:37 — EventSegment.EventSegment has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 170, 227, 134, …). 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 · CameraManagementView.CameraStatusSelect (cyclomatic 26) · ×1
  • CameraManagementView.CameraStatusSelect (cyclomatic 26) web/src/views/settings/CameraManagementView.tsx:531 — CameraManagementView.CameraStatusSelect has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 559). 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 · Embeddings.sync_triggers (cyclomatic 25) · ×1
  • Embeddings.sync_triggers (cyclomatic 25) frigate/embeddings/embeddings.py:453 — Embeddings.sync_triggers 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 · media.sync_recordings (cyclomatic 25) · ×1
  • media.sync_recordings (cyclomatic 25) frigate/util/media.py:111 — media.sync_recordings 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 · services._read_intel_drm_fdinfo (cyclomatic 25) · ×1
  • services._read_intel_drm_fdinfo (cyclomatic 25) frigate/util/services.py:374 — services._read_intel_drm_fdinfo 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 · Step1NameAndDefine.Step1NameAndDefine (cyclomatic 25) · ×1
  • Step1NameAndDefine.Step1NameAndDefine (cyclomatic 25) web/src/components/classification/wizard/Step1NameAndDefine.tsx:55 — Step1NameAndDefine.Step1NameAndDefine has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 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 70, a function literal at line 138, a function literal at line 231, …). 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 · ModelsField.ModelsField (cyclomatic 25) · ×1
  • ModelsField.ModelsField (cyclomatic 25) web/src/components/config-form/theme/fields/ModelsField.tsx:101 — ModelsField.ModelsField has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 337, 262, 157, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · WebPushClient.publish (cyclomatic 24) · ×1
  • WebPushClient.publish (cyclomatic 24) frigate/comms/webpush.py:324 — WebPushClient.publish 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 · EventProcessor.handle_object_detection (cyclomatic 24) · ×1
  • EventProcessor.handle_object_detection (cyclomatic 24) frigate/events/maintainer.py:141 — EventProcessor.handle_object_detection 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 · util.stats_snapshot (cyclomatic 24) · ×1
  • util.stats_snapshot (cyclomatic 24) frigate/stats/util.py:248 — util.stats_snapshot 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 · ScrubbablePreview.InProgressPreview (cyclomatic 24) · ×1
  • ScrubbablePreview.InProgressPreview (cyclomatic 24) web/src/components/preview/ScrubbablePreview.tsx:301 — ScrubbablePreview.InProgressPreview has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 328, 360, 404, …). 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 · ClassificationCard.ClassificationCard (cyclomatic 24) · ×1
  • ClassificationCard.ClassificationCard (cyclomatic 24) web/src/components/card/ClassificationCard.tsx:62 — ClassificationCard.ClassificationCard has cyclomatic complexity 24 (threshold 15). Of this number, 15 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 · SearchResultActions.SearchResultActions (cyclomatic 24) · ×1
  • SearchResultActions.SearchResultActions (cyclomatic 24) web/src/components/menu/SearchResultActions.tsx:48 — SearchResultActions.SearchResultActions has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 belong to 4 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 · HardwarePicker.HardwarePicker (cyclomatic 24) · ×1
  • HardwarePicker.HardwarePicker (cyclomatic 24) web/src/components/config-form/theme/fields/HardwarePicker.tsx:33 — HardwarePicker.HardwarePicker has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 86, 195, 114, …). 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 · CameraGroupSelector.NewGroupDialog (cyclomatic 24) · ×1
  • CameraGroupSelector.NewGroupDialog (cyclomatic 24) web/src/components/filter/CameraGroupSelector.tsx:335 — CameraGroupSelector.NewGroupDialog has cyclomatic complexity 24 (threshold 15). Of this number, 17 points are the body's own statements and 7 belong to 4 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 · HealthProblemRow.HealthProblemRow (cyclomatic 24) · ×1
  • HealthProblemRow.HealthProblemRow (cyclomatic 24) web/src/components/health/HealthProblemRow.tsx:50 — HealthProblemRow.HealthProblemRow 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 · ImportUiSettingsDialog.ImportUiSettingsDialog (cyclomatic 24) · ×1
  • ImportUiSettingsDialog.ImportUiSettingsDialog (cyclomatic 24) web/src/components/overlay/dialog/ImportUiSettingsDialog.tsx:34 — ImportUiSettingsDialog.ImportUiSettingsDialog has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 7 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 · WsMessageRow.getPayloadSummary (cyclomatic 24) · ×1
  • WsMessageRow.getPayloadSummary (cyclomatic 24) web/src/components/ws/WsMessageRow.tsx:95 — WsMessageRow.getPayloadSummary has cyclomatic complexity 24 (threshold 15). 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, 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-webrtc-availability.useWebRTCGloballyAvailable (cyclomatic 24) · ×1
  • use-webrtc-availability.useWebRTCGloballyAvailable (cyclomatic 24) web/src/hooks/use-webrtc-availability.ts:106 — use-webrtc-availability.useWebRTCGloballyAvailable has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 219, 188, 238, …). 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 · RecordingView.Timeline (cyclomatic 24) · ×1
  • RecordingView.Timeline (cyclomatic 24) web/src/views/recording/RecordingView.tsx:1164 — RecordingView.Timeline has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 5 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 · app.config (cyclomatic 23) · ×1
  • app.config (cyclomatic 23) frigate/api/app.py:314 — app.config 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 · chat._execute_search_objects_semantic (cyclomatic 23) · ×1
  • chat._execute_search_objects_semantic (cyclomatic 23) frigate/api/chat.py:252 — chat._execute_search_objects_semantic has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WebPushClient.send_alert (cyclomatic 23) · ×1
  • WebPushClient.send_alert (cyclomatic 23) frigate/comms/webpush.py:535 — WebPushClient.send_alert 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 · config.verify_profile_overrides_match_base (cyclomatic 23) · ×1
  • config.verify_profile_overrides_match_base (cyclomatic 23) frigate/config/config.py:437 — config.verify_profile_overrides_match_base 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 · analyze_recording_keyframes.analyze (cyclomatic 23) · ×1
  • analyze_recording_keyframes.analyze (cyclomatic 23) testing-scripts/analyze_recording_keyframes.py:189 — analyze_recording_keyframes.analyze 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 · CustomTimeSelector.CustomTimeSelector (cyclomatic 23) · ×1
  • CustomTimeSelector.CustomTimeSelector (cyclomatic 23) web/src/components/overlay/CustomTimeSelector.tsx:23 — CustomTimeSelector.CustomTimeSelector has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 52, 62, 152, …). 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 · cameraClone.stripAutoDefaultFilters (cyclomatic 23) · ×1
  • cameraClone.stripAutoDefaultFilters (cyclomatic 23) web/src/utils/cameraClone.ts:62 — cameraClone.stripAutoDefaultFilters has cyclomatic complexity 23 (threshold 15). 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, 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._config_set_in_memory (cyclomatic 22) · ×1
  • app._config_set_in_memory (cyclomatic 22) frigate/api/app.py:916 — app._config_set_in_memory 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 · camera.ffprobe (cyclomatic 22) · ×1
  • camera.ffprobe (cyclomatic 22) REDACTED:298 — camera.ffprobe 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 · media.latest_frame (cyclomatic 22) · ×1
  • media.latest_frame (cyclomatic 22) frigate/api/media.py:208 — media.latest_frame 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 · review.review_summary (cyclomatic 22) · ×1
  • review.review_summary (cyclomatic 22) frigate/api/review.py:221 — review.review_summary 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 · EdgeTpuTfl.__init__ (cyclomatic 22) · ×1
  • EdgeTpuTfl.__init__ (cyclomatic 22) frigate/detectors/plugins/edgetpu_tfl.py:49 — EdgeTpuTfl.__init__ 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 · EmbeddingMaintainer._process_finalized (cyclomatic 22) · ×1
  • EmbeddingMaintainer._process_finalized (cyclomatic 22) frigate/embeddings/maintainer.py:585 — EmbeddingMaintainer._process_finalized 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 · OllamaClient.chat_with_tools_stream (cyclomatic 22) · ×1
  • OllamaClient.chat_with_tools_stream (cyclomatic 22) frigate/genai/plugins/ollama.py:571 — OllamaClient.chat_with_tools_stream 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 · StorageMaintainer.reduce_storage_consumption (cyclomatic 22) · ×1
  • StorageMaintainer.reduce_storage_consumption (cyclomatic 22) frigate/storage.py:246 — StorageMaintainer.reduce_storage_consumption 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 · config.migrate_frigate_config (cyclomatic 22) · ×1
  • config.migrate_frigate_config (cyclomatic 22) frigate/util/config.py:193 — config.migrate_frigate_config 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 · config.migrate_014 (cyclomatic 22) · ×1
  • config.migrate_014 (cyclomatic 22) frigate/util/config.py:312 — config.migrate_014 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 · config.migrate_015_0 (cyclomatic 22) · ×1
  • config.migrate_015_0 (cyclomatic 22) frigate/util/config.py:399 — config.migrate_015_0 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 · ffmpeg.run_ffmpeg_with_progress (cyclomatic 22) · ×1
  • ffmpeg.run_ffmpeg_with_progress (cyclomatic 22) frigate/util/ffmpeg.py:90 — ffmpeg.run_ffmpeg_with_progress 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 · media.sync_exports (cyclomatic 22) · ×1
  • media.sync_exports (cyclomatic 22) frigate/util/media.py:638 — media.sync_exports 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 · Statusbar.Statusbar (cyclomatic 22) · ×1
  • Statusbar.Statusbar (cyclomatic 22) web/src/components/Statusbar.tsx:25 — Statusbar.Statusbar has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClassificationSelectionDialog.ClassificationSelectionDialog (cyclomatic 22) · ×1
  • ClassificationSelectionDialog.ClassificationSelectionDialog (cyclomatic 22) web/src/components/overlay/ClassificationSelectionDialog.tsx:44 — ClassificationSelectionDialog.ClassificationSelectionDialog 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 9 function literals inside it that branch (lines 78, 107, 174, …). 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 · SetupComplete.SetupComplete (cyclomatic 22) · ×1
  • SetupComplete.SetupComplete (cyclomatic 22) web/src/components/setup/SetupComplete.tsx:29 — SetupComplete.SetupComplete 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 4 function literals inside it that branch (lines 88, 105, 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 · SetupDetector.SetupDetector (cyclomatic 22) · ×1
  • SetupDetector.SetupDetector (cyclomatic 22) web/src/components/setup/SetupDetector.tsx:45 — SetupDetector.SetupDetector 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 4 function literals inside it that branch (lines 122, 188, 69, …). 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 · DetailStream.ObjectTimeline (cyclomatic 22) · ×1
  • DetailStream.ObjectTimeline (cyclomatic 22) web/src/components/timeline/DetailStream.tsx:991 — DetailStream.ObjectTimeline has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 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 · VirtualizedMotionSegments.VirtualizedMotionSegments (cyclomatic 22) · ×1
  • VirtualizedMotionSegments.VirtualizedMotionSegments (cyclomatic 22) web/src/components/timeline/VirtualizedMotionSegments.tsx:47 — VirtualizedMotionSegments.VirtualizedMotionSegments has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 108, 157, 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.
D1 · Cyclomatic Complexity · use-camera-activity.useCameraActivity (cyclomatic 22) · ×1
  • use-camera-activity.useCameraActivity (cyclomatic 22) web/src/hooks/use-camera-activity.ts:47 — use-camera-activity.useCameraActivity has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 117, 105, 87, …). 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 · StorageMetrics.StorageMetrics (cyclomatic 22) · ×1
  • StorageMetrics.StorageMetrics (cyclomatic 22) web/src/views/system/StorageMetrics.tsx:30 — StorageMetrics.StorageMetrics 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 4 function literals inside it that branch (lines 94, 42, 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 · RecordingExporter._build_chapter_metadata_file (cyclomatic 21) · ×1
  • RecordingExporter._build_chapter_metadata_file (cyclomatic 21) frigate/record/export.py:883 — RecordingExporter._build_chapter_metadata_file 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 · NorfairTracker.match_and_update (cyclomatic 21) · ×1
  • NorfairTracker.match_and_update (cyclomatic 21) frigate/track/norfair_tracker.py:541 — NorfairTracker.match_and_update 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 · ObjectFieldTemplate.ObjectFieldTemplate · ×1
  • ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields (cyclomatic 21) web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:67 — ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields 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. This shape REPEATS in the file: one other method here (ObjectFieldTemplate.ObjectFieldTemplate) 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 · section-special-cases.modifyObjectsSchema (cyclomatic 21) · ×1
  • section-special-cases.modifyObjectsSchema (cyclomatic 21) web/src/components/config-form/sections/section-special-cases.ts:165 — section-special-cases.modifyObjectsSchema 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 · AccountSettings.AccountSettings (cyclomatic 21) · ×1
  • AccountSettings.AccountSettings (cyclomatic 21) web/src/components/menu/AccountSettings.tsx:38 — AccountSettings.AccountSettings has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 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 · OnvifProbeResults.OnvifProbeResults (cyclomatic 21) · ×1
  • OnvifProbeResults.OnvifProbeResults (cyclomatic 21) web/src/components/settings/wizard/OnvifProbeResults.tsx:33 — OnvifProbeResults.OnvifProbeResults 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 · transformer.generateUiSchema (cyclomatic 21) · ×1
  • transformer.generateUiSchema (cyclomatic 21) web/src/lib/config-schema/transformer.ts:451 — transformer.generateUiSchema has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 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 · ModelTrainingView.LibrarySelector (cyclomatic 21) · ×1
  • ModelTrainingView.LibrarySelector (cyclomatic 21) web/src/views/classification/ModelTrainingView.tsx:589 — ModelTrainingView.LibrarySelector has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 603, 738, 743, …). 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 · chat._execute_get_event_image (cyclomatic 20) · ×1
  • chat._execute_get_event_image (cyclomatic 20) frigate/api/chat.py:876 — chat._execute_get_event_image 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 · LicensePlatePostProcessor.process_data (cyclomatic 20) · ×1
  • LicensePlatePostProcessor.process_data (cyclomatic 20) frigate/data_processing/post/license_plate.py:60 — LicensePlatePostProcessor.process_data 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 · MemryXDetector.check_and_prepare_model (cyclomatic 20) · ×1
  • MemryXDetector.check_and_prepare_model (cyclomatic 20) REDACTED:246 — MemryXDetector.check_and_prepare_model 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 · LlamaCppClient.embed (cyclomatic 20) · ×1
  • LlamaCppClient.embed (cyclomatic 20) frigate/genai/plugins/llama_cpp.py:709 — LlamaCppClient.embed 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 · classification._load_event_classification_crop (cyclomatic 20) · ×1
  • classification._load_event_classification_crop (cyclomatic 20) frigate/util/classification.py:895 — classification._load_event_classification_crop 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 · media.sync_event_thumbnails (cyclomatic 20) · ×1
  • media.sync_event_thumbnails (cyclomatic 20) frigate/util/media.py:369 — media.sync_event_thumbnails 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 · ClassificationModelWizardDialog.ClassificationModelWizardDialog (cyclomatic 20) · ×1
  • ClassificationModelWizardDialog.ClassificationModelWizardDialog (cyclomatic 20) web/src/components/classification/ClassificationModelWizardDialog.tsx:93 — ClassificationModelWizardDialog.ClassificationModelWizardDialog has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 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 · ReviewActionGroup.ReviewActionGroup (cyclomatic 20) · ×1
  • ReviewActionGroup.ReviewActionGroup (cyclomatic 20) web/src/components/filter/ReviewActionGroup.tsx:34 — ReviewActionGroup.ReviewActionGroup has cyclomatic complexity 20 (threshold 15). Of this number, 16 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 · ObjectPathPlotter.ObjectPathPlotter (cyclomatic 20) · ×1
  • ObjectPathPlotter.ObjectPathPlotter (cyclomatic 20) web/src/components/overlay/detail/ObjectPathPlotter.tsx:29 — ObjectPathPlotter.ObjectPathPlotter has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 47, a function literal at line 71, a function literal at line 115, …). 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 · EventMenu.EventMenu (cyclomatic 20) · ×1
  • EventMenu.EventMenu (cyclomatic 20) web/src/components/timeline/EventMenu.tsx:32 — EventMenu.EventMenu has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WsMessageRow.WsMessageRow (cyclomatic 20) · ×1
  • WsMessageRow.WsMessageRow (cyclomatic 20) web/src/components/ws/WsMessageRow.tsx:299 — WsMessageRow.WsMessageRow has cyclomatic complexity 20 (threshold 15). Of this number, 10 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 · app._restore_masked_camera_paths (cyclomatic 19) · ×1
  • app._restore_masked_camera_paths (cyclomatic 19) frigate/api/app.py:773 — app._restore_masked_camera_paths has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · camera.reolink_detect (cyclomatic 19) · ×1
  • camera.reolink_detect (cyclomatic 19) REDACTED:508 — camera.reolink_detect 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 · camera.delete_camera (cyclomatic 19) · ×1
  • camera.delete_camera (cyclomatic 19) REDACTED:1245 — camera.delete_camera 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 · chat.chat_completion (cyclomatic 19) · ×1
  • chat.chat_completion (cyclomatic 19) frigate/api/chat.py:1449 — chat.chat_completion 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 · event.update_trigger_embedding (cyclomatic 19) · ×1
  • event.update_trigger_embedding (cyclomatic 19) frigate/api/event.py:2043 — event.update_trigger_embedding 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 · export.export_recordings_batch (cyclomatic 19) · ×1
  • export.export_recordings_batch (cyclomatic 19) frigate/api/export.py:660 — export.export_recordings_batch 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 · media.event_snapshot_clean (cyclomatic 19) · ×1
  • media.event_snapshot_clean (cyclomatic 19) frigate/api/media.py:1305 — media.event_snapshot_clean 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 · record.all_recordings_summary (cyclomatic 19) · ×1
  • record.all_recordings_summary (cyclomatic 19) frigate/api/record.py:75 — record.all_recordings_summary 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 · webpush.validate_push_endpoint (cyclomatic 19) · ×1
  • webpush.validate_push_endpoint (cyclomatic 19) frigate/comms/webpush.py:54 — webpush.validate_push_endpoint 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 · ReviewDescriptionProcessor.handle_request (cyclomatic 19) · ×1
  • ReviewDescriptionProcessor.handle_request (cyclomatic 19) frigate/data_processing/post/review_descriptions.py:230 — ReviewDescriptionProcessor.handle_request 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 · OnvifController.get_camera_status (cyclomatic 19) · ×1
  • OnvifController.get_camera_status (cyclomatic 19) REDACTED:931 — OnvifController.get_camera_status 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 · object_names.get_categorized_object_names (cyclomatic 19) · ×1
  • object_names.get_categorized_object_names (cyclomatic 19) frigate/util/object_names.py:22 — object_names.get_categorized_object_names 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 · GenAIBackedModelWidget.GenAIBackedModelWidget (cyclomatic 19) · ×1
  • GenAIBackedModelWidget.GenAIBackedModelWidget (cyclomatic 19) web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx:30 — GenAIBackedModelWidget.GenAIBackedModelWidget has cyclomatic complexity 19 (threshold 15). 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 53, 44, 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 · ReplaceRulesField.ReplaceRulesField (cyclomatic 19) · ×1
  • ReplaceRulesField.ReplaceRulesField (cyclomatic 19) web/src/components/config-form/theme/fields/ReplaceRulesField.tsx:44 — ReplaceRulesField.ReplaceRulesField has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 6 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 · section-special-cases.sanitizeOverridesForSection (cyclomatic 19) · ×1
  • section-special-cases.sanitizeOverridesForSection (cyclomatic 19) web/src/components/config-form/sections/section-special-cases.ts:396 — section-special-cases.sanitizeOverridesForSection has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 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 · BirdseyeCameraReorder.BirdseyeCameraReorder (cyclomatic 19) · ×1
  • BirdseyeCameraReorder.BirdseyeCameraReorder (cyclomatic 19) web/src/components/config-form/sectionExtras/BirdseyeCameraReorder.tsx:18 — BirdseyeCameraReorder.BirdseyeCameraReorder has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 71, 49, 25, …). 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 · SearchFilterDialog.SnapshotClipFilterContent (cyclomatic 19) · ×1
  • SearchFilterDialog.SnapshotClipFilterContent (cyclomatic 19) REDACTED:675 — SearchFilterDialog.SnapshotClipFilterContent has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 6 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 · InputWithTags.InputWithTags · ×1
  • InputWithTags.InputWithTags::formatFilterValues (cyclomatic 19) REDACTED:423 — InputWithTags.InputWithTags::formatFilterValues has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (InputWithTags.InputWithTags) 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 · KeyframeAnalysisSection.KeyframeAnalysisSection (cyclomatic 19) · ×1
  • KeyframeAnalysisSection.KeyframeAnalysisSection (cyclomatic 19) web/src/components/overlay/KeyframeAnalysisSection.tsx:16 — KeyframeAnalysisSection.KeyframeAnalysisSection 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 5 function literals inside it that branch (lines 60, 50, 31, …). 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 · SetupHwAccel.SetupHwAccel (cyclomatic 19) · ×1
  • SetupHwAccel.SetupHwAccel (cyclomatic 19) web/src/components/setup/SetupHwAccel.tsx:34 — SetupHwAccel.SetupHwAccel 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 4 function items inside it that branch (a function literal at line 88, a function literal at line 128, a function literal at line 52, …). 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 · TriggerWizardDialog.TriggerWizardDialog (cyclomatic 19) · ×1
  • TriggerWizardDialog.TriggerWizardDialog (cyclomatic 19) web/src/components/trigger/TriggerWizardDialog.tsx:107 — TriggerWizardDialog.TriggerWizardDialog has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 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 · dateUtil.formatUnixTimestampToDateTime (cyclomatic 19) · ×1
  • dateUtil.formatUnixTimestampToDateTime (cyclomatic 19) web/src/utils/dateUtil.ts:134 — dateUtil.formatUnixTimestampToDateTime 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 · CameraManagementView.CameraDetailsEditor (cyclomatic 19) · ×1
  • CameraManagementView.CameraDetailsEditor (cyclomatic 19) web/src/views/settings/CameraManagementView.tsx:722 — CameraManagementView.CameraDetailsEditor has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 793, 743, 774). 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 · MotionTunerView.MotionTunerView (cyclomatic 19) · ×1
  • MotionTunerView.MotionTunerView (cyclomatic 19) web/src/views/settings/MotionTunerView.tsx:38 — MotionTunerView.MotionTunerView has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 103, 67, 91, …). 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 · generate_ui_tabs.process_file (cyclomatic 18) · ×1
  • generate_ui_tabs.process_file (cyclomatic 18) docs/scripts/generate_ui_tabs.py:55 — generate_ui_tabs.process_file 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 · generate_ui_tabs.regenerate_file (cyclomatic 18) · ×1
  • generate_ui_tabs.regenerate_file (cyclomatic 18) docs/scripts/generate_ui_tabs.py:183 — generate_ui_tabs.regenerate_file 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 · yaml_extractor.extract_config_tabs_blocks (cyclomatic 18) · ×1
  • yaml_extractor.extract_config_tabs_blocks (cyclomatic 18) docs/scripts/lib/yaml_extractor.py:134 — yaml_extractor.extract_config_tabs_blocks 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 · app.config_save (cyclomatic 18) · ×1
  • app.config_save (cyclomatic 18) frigate/api/app.py:637 — app.config_save 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 · auth.resolve_role (cyclomatic 18) · ×1
  • auth.resolve_role (cyclomatic 18) frigate/api/auth.py:570 — auth.resolve_role 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 · chat._execute_create_export (cyclomatic 18) · ×1
  • chat._execute_create_export (cyclomatic 18) frigate/api/chat.py:801 — chat._execute_create_export has cyclomatic complexity 18 (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 · chat._execute_pending_tools (cyclomatic 18) · ×1
  • chat._execute_pending_tools (cyclomatic 18) frigate/api/chat.py:1301 — chat._execute_pending_tools 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 · CameraMaintainer.run (cyclomatic 18) · ×1
  • CameraMaintainer.run (cyclomatic 18) frigate/camera/maintainer.py:242 — CameraMaintainer.run 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 · ObjectDescriptionProcessor.__handle_frame_update (cyclomatic 18) · ×1
  • ObjectDescriptionProcessor.__handle_frame_update (cyclomatic 18) frigate/data_processing/post/object_descriptions.py:60 — ObjectDescriptionProcessor.__handle_frame_update 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 · FaceRealTimeProcessor.handle_request (cyclomatic 18) · ×1
  • FaceRealTimeProcessor.handle_request (cyclomatic 18) frigate/data_processing/real_time/face.py:273 — FaceRealTimeProcessor.handle_request 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 · detection_runners.get_optimized_runner (cyclomatic 18) · ×1
  • detection_runners.get_optimized_runner (cyclomatic 18) frigate/detectors/detection_runners.py:770 — detection_runners.get_optimized_runner has cyclomatic complexity 18 (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 · _AxeleraRuntimeInference.__init__ (cyclomatic 18) · ×1
  • _AxeleraRuntimeInference.__init__ (cyclomatic 18) REDACTED:349 — _AxeleraRuntimeInference.__init__ 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 · GenAIClient.generate_review_description (cyclomatic 18) · ×1
  • GenAIClient.generate_review_description (cyclomatic 18) frigate/genai/__init__.py:102 — GenAIClient.generate_review_description has cyclomatic complexity 18 (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 · RecordingMaintainer.run (cyclomatic 18) · ×1
  • RecordingMaintainer.run (cyclomatic 18) frigate/record/maintainer.py:1070 — RecordingMaintainer.run 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 · NorfairTracker.update_position (cyclomatic 18) · ×1
  • NorfairTracker.update_position (cyclomatic 18) frigate/track/norfair_tracker.py:368 — NorfairTracker.update_position 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 · config.migrate_models (cyclomatic 18) · ×1
  • config.migrate_models (cyclomatic 18) frigate/util/config.py:950 — config.migrate_models 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 · live_streams.raw_transcode_streams (cyclomatic 18) · ×1
  • live_streams.raw_transcode_streams (cyclomatic 18) frigate/util/live_streams.py:77 — live_streams.raw_transcode_streams 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 · ws.applyCameraActivity (cyclomatic 18) · ×1
  • ws.applyCameraActivity (cyclomatic 18) web/src/api/ws.ts:156 — ws.applyCameraActivity 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 · CameraImage.CameraImage (cyclomatic 18) · ×1
  • CameraImage.CameraImage (cyclomatic 18) web/src/components/camera/CameraImage.tsx:18 — CameraImage.CameraImage has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 57, handleImageLoad, a function literal at line 39). 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 · ResizingCameraImage.CameraImage (cyclomatic 18) · ×1
  • ResizingCameraImage.CameraImage (cyclomatic 18) web/src/components/camera/ResizingCameraImage.tsx:17 — ResizingCameraImage.CameraImage has cyclomatic complexity 18 (threshold 15). Of this number, 10 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 · ExportCard.ActiveExportJobCard (cyclomatic 18) · ×1
  • ExportCard.ActiveExportJobCard (cyclomatic 18) web/src/components/card/ExportCard.tsx:458 — ExportCard.ActiveExportJobCard has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 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 · PTZPresetsWidget.PTZPresetsWidget (cyclomatic 18) · ×1
  • PTZPresetsWidget.PTZPresetsWidget (cyclomatic 18) web/src/components/config-form/theme/widgets/PTZPresetsWidget.tsx:28 — PTZPresetsWidget.PTZPresetsWidget has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: 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 · MotionRegionFilterGrid.MotionRegionFilterGrid (cyclomatic 18) · ×1
  • MotionRegionFilterGrid.MotionRegionFilterGrid (cyclomatic 18) web/src/components/filter/MotionRegionFilterGrid.tsx:16 — MotionRegionFilterGrid.MotionRegionFilterGrid 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 6 function literals inside it that branch (lines 62, 30, 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.
D1 · Cyclomatic Complexity · GenericVideoPlayer.GenericVideoPlayer (cyclomatic 18) · ×1
  • GenericVideoPlayer.GenericVideoPlayer (cyclomatic 18) web/src/components/player/GenericVideoPlayer.tsx:19 — GenericVideoPlayer.GenericVideoPlayer 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 3 function literals inside it that branch (lines 61, 32, 47). 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 · DebugReplayDialog.DebugReplayDialog (cyclomatic 18) · ×1
  • DebugReplayDialog.DebugReplayDialog (cyclomatic 18) web/src/components/overlay/DebugReplayDialog.tsx:160 — DebugReplayDialog.DebugReplayDialog has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 214, 176, 190, …). 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 · QualitySelector.useQualitySubtitles (cyclomatic 18) · ×1
  • QualitySelector.useQualitySubtitles (cyclomatic 18) web/src/components/player/QualitySelector.tsx:51 — QualitySelector.useQualitySubtitles 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 2 function literals inside it that branch (lines 60, 103). 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 · ReviewFilterGroup.GeneralFilterContent (cyclomatic 18) · ×1
  • ReviewFilterGroup.GeneralFilterContent (cyclomatic 18) web/src/components/filter/ReviewFilterGroup.tsx:442 — ReviewFilterGroup.GeneralFilterContent has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 532, 579, 457, …). 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 · MotionReviewTimeline.MotionReviewTimeline (cyclomatic 18) · ×1
  • MotionReviewTimeline.MotionReviewTimeline (cyclomatic 18) web/src/components/timeline/MotionReviewTimeline.tsx:58 — MotionReviewTimeline.MotionReviewTimeline has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 138, 149, 117, …). 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 · EnrichmentsSettingsView.EnrichmentsSettingsView (cyclomatic 18) · ×1
  • EnrichmentsSettingsView.EnrichmentsSettingsView (cyclomatic 18) web/src/views/settings/EnrichmentsSettingsView.tsx:57 — EnrichmentsSettingsView.EnrichmentsSettingsView has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 135, 86, 157, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · __main__.main (cyclomatic 17) · ×1
  • __main__.main (cyclomatic 17) frigate/__main__.py:17 — __main__.main 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 · auth.get_remote_addr (cyclomatic 17) · ×1
  • auth.get_remote_addr (cyclomatic 17) frigate/api/auth.py:310 — auth.get_remote_addr 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 · chat._execute_tool_internal (cyclomatic 17) · ×1
  • chat._execute_tool_internal (cyclomatic 17) frigate/api/chat.py:951 — chat._execute_tool_internal 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 · event.create_trigger_embedding (cyclomatic 17) · ×1
  • event.create_trigger_embedding (cyclomatic 17) frigate/api/event.py:1890 — event.create_trigger_embedding 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 · record.no_recordings (cyclomatic 17) · ×1
  • record.no_recordings (cyclomatic 17) frigate/api/record.py:400 — record.no_recordings 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 · CameraActivityManager.update_activity (cyclomatic 17) · ×1
  • CameraActivityManager.update_activity (cyclomatic 17) frigate/camera/activity_manager.py:98 — CameraActivityManager.update_activity 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 · Dispatcher.reapply_runtime_state_to_config (cyclomatic 17) · ×1
  • Dispatcher.reapply_runtime_state_to_config (cyclomatic 17) frigate/comms/dispatcher.py:616 — Dispatcher.reapply_runtime_state_to_config 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 · AudioTranscriptionRealTimeProcessor.__process_audio_stream (cyclomatic 17) · ×1
  • AudioTranscriptionRealTimeProcessor.__process_audio_stream (cyclomatic 17) frigate/data_processing/real_time/audio_transcription.py:128 — AudioTranscriptionRealTimeProcessor.__process_audio_stream 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 · CustomStateClassificationProcessor.process_frame (cyclomatic 17) · ×1
  • CustomStateClassificationProcessor.process_frame (cyclomatic 17) frigate/data_processing/real_time/custom_classification.py:195 — CustomStateClassificationProcessor.process_frame 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 · deepx.read_ppu_layout (cyclomatic 17) · ×1
  • deepx.read_ppu_layout (cyclomatic 17) frigate/detectors/plugins/deepx.py:406 — deepx.read_ppu_layout 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 · OllamaClient._build_request_params (cyclomatic 17) · ×1
  • OllamaClient._build_request_params (cyclomatic 17) frigate/genai/plugins/ollama.py:433 — OllamaClient._build_request_params 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 · TimelineProcessor.handle_object_detection (cyclomatic 17) · ×1
  • TimelineProcessor.handle_object_detection (cyclomatic 17) frigate/timeline.py:81 — TimelineProcessor.handle_object_detection 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 · camera_cleanup.cleanup_camera_files (cyclomatic 17) · ×1
  • camera_cleanup.cleanup_camera_files (cyclomatic 17) frigate/util/camera_cleanup.py:105 — camera_cleanup.cleanup_camera_files 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 · config.apply_section_update (cyclomatic 17) · ×1
  • config.apply_section_update (cyclomatic 17) frigate/util/config.py:1142 — config.apply_section_update has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · media.sync_event_snapshots (cyclomatic 17) · ×1
  • media.sync_event_snapshots (cyclomatic 17) frigate/util/media.py:276 — media.sync_event_snapshots 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 · media.sync_previews (cyclomatic 17) · ×1
  • media.sync_previews (cyclomatic 17) frigate/util/media.py:555 — media.sync_previews 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 · rknn_converter.convert_onnx_to_rknn (cyclomatic 17) · ×1
  • rknn_converter.convert_onnx_to_rknn (cyclomatic 17) frigate/util/rknn_converter.py:171 — rknn_converter.convert_onnx_to_rknn 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 · object_dataset.worst_offenders (cyclomatic 17) · ×1
  • object_dataset.worst_offenders (cyclomatic 17) testing-scripts/object_dataset.py:532 — object_dataset.worst_offenders 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 · OptionalFieldWidget.OptionalFieldWidget (cyclomatic 17) · ×1
  • OptionalFieldWidget.OptionalFieldWidget (cyclomatic 17) web/src/components/config-form/theme/widgets/OptionalFieldWidget.tsx:11 — OptionalFieldWidget.OptionalFieldWidget has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 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 · OnvifProfileWidget.OnvifProfileWidget (cyclomatic 17) · ×1
  • OnvifProfileWidget.OnvifProfileWidget (cyclomatic 17) web/src/components/config-form/theme/widgets/OnvifProfileWidget.tsx:19 — OnvifProfileWidget.OnvifProfileWidget has cyclomatic complexity 17 (threshold 15). Of this number, 13 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 · CamerasFilterButton.CamerasFilterContent (cyclomatic 17) · ×1
  • CamerasFilterButton.CamerasFilterContent (cyclomatic 17) web/src/components/filter/CamerasFilterButton.tsx:160 — CamerasFilterButton.CamerasFilterContent has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 221, 210, 184). 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 · CreateRoleDialog.CreateRoleDialog (cyclomatic 17) · ×1
  • CreateRoleDialog.CreateRoleDialog (cyclomatic 17) web/src/components/overlay/CreateRoleDialog.tsx:47 — CreateRoleDialog.CreateRoleDialog has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 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 · use-config-schema.extractSectionSchema (cyclomatic 17) · ×1
  • use-config-schema.extractSectionSchema (cyclomatic 17) web/src/hooks/use-config-schema.ts:27 — use-config-schema.extractSectionSchema 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 · Exports.AllExportsView (cyclomatic 17) · ×1
  • Exports.AllExportsView (cyclomatic 17) web/src/pages/Exports.tsx:915 — Exports.AllExportsView has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 5 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 · FaceLibrary.FaceAttemptGroup (cyclomatic 17) · ×1
  • FaceLibrary.FaceAttemptGroup (cyclomatic 17) web/src/pages/FaceLibrary.tsx:842 — FaceLibrary.FaceAttemptGroup 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 10 function literals inside it that branch (lines 928, 865, 911, …). 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 · wsUtil.extractCameraName (cyclomatic 17) · ×1
  • wsUtil.extractCameraName (cyclomatic 17) web/src/utils/wsUtil.ts:19 — wsUtil.extractCameraName 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 · ObjectSettingsView.ObjectSettingsView (cyclomatic 17) · ×1
  • ObjectSettingsView.ObjectSettingsView (cyclomatic 17) web/src/views/settings/ObjectSettingsView.tsx:47 — ObjectSettingsView.ObjectSettingsView has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 4 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 · classification.train_face (cyclomatic 16) · ×1
  • classification.train_face (cyclomatic 16) frigate/api/classification.py:155 — classification.train_face 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 · classification.get_custom_attributes (cyclomatic 16) · ×1
  • classification.get_custom_attributes (cyclomatic 16) frigate/api/classification.py:755 — classification.get_custom_attributes 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 · event.set_attributes (cyclomatic 16) · ×1
  • event.set_attributes (cyclomatic 16) frigate/api/event.py:1447 — event.set_attributes 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 · Dispatcher._receive (cyclomatic 16) · ×1
  • Dispatcher._receive (cyclomatic 16) frigate/comms/dispatcher.py:237 — Dispatcher._receive 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 · CameraConfig._get_ffmpeg_cmd (cyclomatic 16) · ×1
  • CameraConfig._get_ffmpeg_cmd (cyclomatic 16) frigate/config/camera/camera.py:278 — CameraConfig._get_ffmpeg_cmd 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 · RuntimeFilterConfig.__init__ (cyclomatic 16) · ×1
  • RuntimeFilterConfig.__init__ (cyclomatic 16) frigate/config/config.py:191 — RuntimeFilterConfig.__init__ 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 · review_annotations.build_timeline (cyclomatic 16) · ×1
  • review_annotations.build_timeline (cyclomatic 16) frigate/data_processing/post/review_annotations.py:212 — review_annotations.build_timeline 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 · HailoDetector.detect_raw (cyclomatic 16) · ×1
  • HailoDetector.detect_raw (cyclomatic 16) REDACTED:394 — HailoDetector.detect_raw 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 · llama_cpp._stats_from_llama_cpp_chunk (cyclomatic 16) · ×1
  • llama_cpp._stats_from_llama_cpp_chunk (cyclomatic 16) frigate/genai/plugins/llama_cpp.py:24 — llama_cpp._stats_from_llama_cpp_chunk 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 · MotionSearchRunner._search_runs (cyclomatic 16) · ×1
  • MotionSearchRunner._search_runs (cyclomatic 16) frigate/jobs/motion_search.py:745 — MotionSearchRunner._search_runs 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 · PtzAutoTracker._process_move_queue (cyclomatic 16) · ×1
  • PtzAutoTracker._process_move_queue (cyclomatic 16) frigate/ptz/autotrack.py:709 — PtzAutoTracker._process_move_queue 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 · PtzAutoTracker._should_zoom_in (cyclomatic 16) · ×1
  • PtzAutoTracker._should_zoom_in (cyclomatic 16) frigate/ptz/autotrack.py:941 — PtzAutoTracker._should_zoom_in 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 · OnvifController.get_camera_info (cyclomatic 16) · ×1
  • OnvifController.get_camera_info (cyclomatic 16) REDACTED:840 — OnvifController.get_camera_info 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 · ActiveObjects.__init__ (cyclomatic 16) · ×1
  • ActiveObjects.__init__ (cyclomatic 16) frigate/review/maintainer.py:196 — ActiveObjects.__init__ 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 · HardwareStats._scan_enrichments (cyclomatic 16) · ×1
  • HardwareStats._scan_enrichments (cyclomatic 16) frigate/stats/hardware.py:409 — HardwareStats._scan_enrichments 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 · hardware._hwaccel_hardware (cyclomatic 16) · ×1
  • hardware._hwaccel_hardware (cyclomatic 16) frigate/stats/hardware.py:211 — hardware._hwaccel_hardware 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 · CentroidTracker.match_and_update (cyclomatic 16) · ×1
  • CentroidTracker.match_and_update (cyclomatic 16) frigate/track/centroid_tracker.py:140 — CentroidTracker.match_and_update 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 · media.sync_review_thumbnails (cyclomatic 16) · ×1
  • media.sync_review_thumbnails (cyclomatic 16) frigate/util/media.py:470 — media.sync_review_thumbnails 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 · object_dataset.main (cyclomatic 16) · ×1
  • object_dataset.main (cyclomatic 16) testing-scripts/object_dataset.py:856 — object_dataset.main 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 · ChatComposer.ChatComposer (cyclomatic 16) · ×1
  • ChatComposer.ChatComposer (cyclomatic 16) web/src/components/chat/ChatComposer.tsx:41 — ChatComposer.ChatComposer has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item 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 · CameraGroupSelector.CameraGroupSelector (cyclomatic 16) · ×1
  • CameraGroupSelector.CameraGroupSelector (cyclomatic 16) web/src/components/filter/CameraGroupSelector.tsx:90 — CameraGroupSelector.CameraGroupSelector has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 102, a function literal at line 123, groupButtons, …). 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 · CombinedStorageGraph.CombinedStorageGraph (cyclomatic 16) · ×1
  • CombinedStorageGraph.CombinedStorageGraph (cyclomatic 16) web/src/components/graph/CombinedStorageGraph.tsx:47 — CombinedStorageGraph.CombinedStorageGraph has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 294, 57, 100, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ImageEntry.ImageEntry (cyclomatic 16) · ×1
  • ImageEntry.ImageEntry (cyclomatic 16) web/src/components/input/ImageEntry.tsx:25 — ImageEntry.ImageEntry 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 6 function literals inside it that branch (lines 86, 129, 36, …). 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 · FaceSelectionDialog.FaceSelectionDialog (cyclomatic 16) · ×1
  • FaceSelectionDialog.FaceSelectionDialog (cyclomatic 16) web/src/components/overlay/FaceSelectionDialog.tsx:39 — FaceSelectionDialog.FaceSelectionDialog has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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 · FaceCreateWizardDialog.CreateFaceWizardDialog (cyclomatic 16) · ×1
  • FaceCreateWizardDialog.CreateFaceWizardDialog (cyclomatic 16) web/src/components/overlay/detail/FaceCreateWizardDialog.tsx:36 — FaceCreateWizardDialog.CreateFaceWizardDialog has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 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 · PolygonCanvas.PolygonCanvas · ×1
  • PolygonCanvas.PolygonCanvas::handleMouseDown (cyclomatic 16) web/src/components/settings/PolygonCanvas.tsx:113 — PolygonCanvas.PolygonCanvas::handleMouseDown 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 · ZoneEditPane.ZoneObjectSelector (cyclomatic 16) · ×1
  • ZoneEditPane.ZoneObjectSelector (cyclomatic 16) web/src/components/settings/ZoneEditPane.tsx:981 — ZoneEditPane.ZoneObjectSelector 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 7 function literals inside it that branch (lines 1004, 1073, 998, …). 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 · SetupRecording.SetupRecording (cyclomatic 16) · ×1
  • SetupRecording.SetupRecording (cyclomatic 16) web/src/components/setup/SetupRecording.tsx:24 — SetupRecording.SetupRecording has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WsMessageRow.getTrackedObjectUpdateSummary (cyclomatic 16) · ×1
  • WsMessageRow.getTrackedObjectUpdateSummary (cyclomatic 16) web/src/components/ws/WsMessageRow.tsx:156 — WsMessageRow.getTrackedObjectUpdateSummary 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 · use-user-persistence.useUserPersistence (cyclomatic 16) · ×1
  • use-user-persistence.useUserPersistence (cyclomatic 16) web/src/hooks/use-user-persistence.ts:71 — use-user-persistence.useUserPersistence has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 129, 113, 90, …). 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 · transformer.applySchemaDefaults (cyclomatic 16) · ×1
  • transformer.applySchemaDefaults (cyclomatic 16) web/src/lib/config-schema/transformer.ts:734 — transformer.applySchemaDefaults has cyclomatic complexity 16 (threshold 15). 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, 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 · Exports.CaseView (cyclomatic 16) · ×1
  • Exports.CaseView (cyclomatic 16) web/src/pages/Exports.tsx:1063 — Exports.CaseView has cyclomatic complexity 16 (threshold 15). Of this number, 11 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 · SetupWizard.SetupWizard (cyclomatic 16) · ×1
  • SetupWizard.SetupWizard (cyclomatic 16) web/src/pages/SetupWizard.tsx:125 — SetupWizard.SetupWizard has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (renderStep, a function literal at line 155, 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.
D1 · Cyclomatic Complexity · chatUtil.getFindSimilarObjectsFromToolCalls (cyclomatic 16) · ×1
  • chatUtil.getFindSimilarObjectsFromToolCalls (cyclomatic 16) web/src/utils/chatUtil.ts:307 — chatUtil.getFindSimilarObjectsFromToolCalls 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 · MotionSearchDialog.SearchRangeSelector (cyclomatic 16) · ×1
  • MotionSearchDialog.SearchRangeSelector (cyclomatic 16) web/src/views/motion-search/MotionSearchDialog.tsx:520 — MotionSearchDialog.SearchRangeSelector 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 9 function literals inside it that branch (lines 532, 547, 557, …). 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.
D17 · Explicit Debt · FixmeComment · ×1
  • FixmeComment frigate/api/notification.py:86 — # FIXME: For FastAPI the remote-user is not being populated — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · Settings.Settings (cognitive 252) · ×1
  • Settings.Settings (cognitive 252) web/src/pages/Settings.tsx:471 — Settings.Settings has cognitive complexity 252 (threshold 15). Drivers by points: if/else 84 (130 pts), boolean chains 65, ternaries 20 (26 pts), loops 13 (24 pts), error handling 4 (7 pts) (nesting depth added 66). Of this number, 28 points are the body's own statements and 224 belong to 50 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 · MasksAndZonesView.MasksAndZonesView (cognitive 217) · ×1
  • MasksAndZonesView.MasksAndZonesView (cognitive 217) web/src/views/settings/MasksAndZonesView.tsx:45 — MasksAndZonesView.MasksAndZonesView has cognitive complexity 217 (threshold 15). Drivers by points: if/else 43 (80 pts), ternaries 20 (52 pts), boolean chains 43, loops 15 (42 pts) (nesting depth added 96). Most of this is not in the body itself: 15 of the 217 points are its own statements and the rest belongs to 21 function items inside it that branch (a function literal at line 256, a function literal at line 123, a function literal at line 521, …). 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 · MotionSearchView.MotionSearchView (cognitive 203) · ×1
  • MotionSearchView.MotionSearchView (cognitive 203) web/src/views/motion-search/MotionSearchView.tsx:95 — MotionSearchView.MotionSearchView has cognitive complexity 203 (threshold 15). Drivers by points: if/else 73 (87 pts), boolean chains 61, ternaries 34 (52 pts), error handling 3 (nesting depth added 32). Of this number, 73 points are the body's own statements and 130 belong to 40 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 · generate_config_translations.main (cognitive 199) · ×1
  • generate_config_translations.main (cognitive 199) generate_config_translations.py:213 — generate_config_translations.main has cognitive complexity 199 (threshold 15). Drivers by points: if/else 49 (181 pts), loops 4 (9 pts), error handling 3 (6 pts), boolean chains 3 (nesting depth added 140). 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 · camera.onvif_probe (cognitive 186) · ×1
  • camera.onvif_probe (cognitive 186) REDACTED:738 — camera.onvif_probe has cognitive complexity 186 (threshold 15). Drivers by points: if/else 38 (80 pts), error handling 18 (34 pts), boolean chains 30, ternaries 13 (28 pts), loops 5 (14 pts) (nesting depth added 82). 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 · FrigateConfig.post_validation (cognitive 178) · ×1
  • FrigateConfig.post_validation (cognitive 178) frigate/config/config.py:1025 — FrigateConfig.post_validation has cognitive complexity 178 (threshold 15). Drivers by points: if/else 47 (100 pts), loops 23 (48 pts), ternaries 4 (18 pts), boolean chains 8, error handling 1 (4 pts) (nesting depth added 95). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseSection.ConfigSection (cognitive 166) · ×1
  • BaseSection.ConfigSection (cognitive 166) web/src/components/config-form/sections/BaseSection.tsx:198 — BaseSection.ConfigSection has cognitive complexity 166 (threshold 15). Drivers by points: boolean chains 60, if/else 47 (55 pts), ternaries 39 (49 pts), error handling 2 (nesting depth added 18). Of this number, 62 points are the body's own statements and 104 belong to 26 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 · generate_config_translations.extract_translations_from_schema (cognitive 158) · ×1
  • generate_config_translations.extract_translations_from_schema (cognitive 158) generate_config_translations.py:35 — generate_config_translations.extract_translations_from_schema has cognitive complexity 158 (threshold 15). Drivers by points: if/else 37 (151 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 117). 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 · FieldTemplate.FieldTemplate (cognitive 147) · ×1
  • FieldTemplate.FieldTemplate (cognitive 147) web/src/components/config-form/theme/templates/FieldTemplate.tsx:60 — FieldTemplate.FieldTemplate has cognitive complexity 147 (threshold 15). Drivers by points: if/else 40 (64 pts), boolean chains 59, ternaries 15 (24 pts) (nesting depth added 33). Of this number, 112 points are the body's own statements and 35 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 · MsePlayer.MSEPlayer (cognitive 147) · ×1
  • MsePlayer.MSEPlayer (cognitive 147) web/src/components/player/MsePlayer.tsx:35 — MsePlayer.MSEPlayer has cognitive complexity 147 (threshold 15). Drivers by points: if/else 74 (94 pts), boolean chains 38, ternaries 6 (8 pts), error handling 2 (5 pts), loops 1 (2 pts) (nesting depth added 26). None of this is in the body itself: all 147 points belong to 39 function items inside it that branch (a function literal at line 582, a function literal at line 189, a function literal at line 779, …). 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 · ReviewSegmentMaintainer.run (cognitive 141) · ×1
  • ReviewSegmentMaintainer.run (cognitive 141) frigate/review/maintainer.py:782 — ReviewSegmentMaintainer.run has cognitive complexity 141 (threshold 15). Drivers by points: if/else 34 (106 pts), boolean chains 18, loops 6 (17 pts) (nesting depth added 83). 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 · LiveCameraView.LiveCameraView (cognitive 138) · ×1
  • LiveCameraView.LiveCameraView (cognitive 138) web/src/views/live/LiveCameraView.tsx:133 — LiveCameraView.LiveCameraView has cognitive complexity 138 (threshold 15). Drivers by points: if/else 52 (64 pts), boolean chains 45, ternaries 18 (28 pts), match/switch 1 (nesting depth added 22). Of this number, 42 points are the body's own statements and 96 belong to 22 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 · CameraWatchdog.run (cognitive 135) · ×1
  • CameraWatchdog.run (cognitive 135) frigate/video/ffmpeg.py:355 — CameraWatchdog.run has cognitive complexity 135 (threshold 15). Drivers by points: if/else 35 (96 pts), loops 7 (20 pts), ternaries 3 (10 pts), boolean chains 9 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detect.process_frames (cognitive 132) · ×1
  • detect.process_frames (cognitive 132) frigate/video/detect.py:242 — detect.process_frames has cognitive complexity 132 (threshold 15). Drivers by points: if/else 36 (84 pts), loops 12 (34 pts), ternaries 2 (7 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackingDetails.TrackingDetails (cognitive 130) · ×1
  • TrackingDetails.TrackingDetails (cognitive 130) web/src/components/overlay/detail/TrackingDetails.tsx:68 — TrackingDetails.TrackingDetails has cognitive complexity 130 (threshold 15). Drivers by points: if/else 54 (67 pts), boolean chains 36, ternaries 16 (23 pts), loops 3 (4 pts) (nesting depth added 21). Of this number, 34 points are the body's own statements and 96 belong to 16 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 · RecordingView.RecordingView (cognitive 128) · ×1
  • RecordingView.RecordingView (cognitive 128) web/src/views/recording/RecordingView.tsx:106 — RecordingView.RecordingView has cognitive complexity 128 (threshold 15). Drivers by points: if/else 42 (55 pts), boolean chains 40, ternaries 23 (32 pts), error handling 1 (nesting depth added 22). Of this number, 49 points are the body's own statements and 79 belong to 26 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 · GeneralMetrics.GeneralMetrics (cognitive 128) · ×1
  • GeneralMetrics.GeneralMetrics (cognitive 128) web/src/views/system/GeneralMetrics.tsx:31 — GeneralMetrics.GeneralMetrics has cognitive complexity 128 (threshold 15). Drivers by points: if/else 78 (79 pts), boolean chains 35, ternaries 14 (nesting depth added 1). Of this number, 22 points are the body's own statements and 106 belong to 49 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 · LicensePlateProcessingMixin.lpr_process (cognitive 120) · ×1
  • LicensePlateProcessingMixin.lpr_process (cognitive 120) frigate/data_processing/common/license_plate/mixin.py:1219 — LicensePlateProcessingMixin.lpr_process has cognitive complexity 120 (threshold 15). Drivers by points: if/else 44 (96 pts), boolean chains 9, loops 3 (8 pts), ternaries 4 (6 pts), error handling 1 (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 · TrackedObject.update (cognitive 119) · ×1
  • TrackedObject.update (cognitive 119) frigate/track/tracked_object.py:130 — TrackedObject.update has cognitive complexity 119 (threshold 15). Drivers by points: if/else 40 (103 pts), boolean chains 14, loops 2 (nesting depth added 63). 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 · SearchView.SearchView (cognitive 115) · ×1
  • SearchView.SearchView (cognitive 115) web/src/views/search/SearchView.tsx:59 — SearchView.SearchView has cognitive complexity 115 (threshold 15). Drivers by points: boolean chains 53, if/else 35 (43 pts), ternaries 12 (18 pts), match/switch 1 (nesting depth added 14). Of this number, 34 points are the body's own statements and 81 belong to 25 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 · GeminiClient.chat_with_tools_stream (cognitive 110) · ×1
  • GeminiClient.chat_with_tools_stream (cognitive 110) frigate/genai/plugins/gemini.py:491 — GeminiClient.chat_with_tools_stream has cognitive complexity 110 (threshold 15). Drivers by points: if/else 28 (66 pts), boolean chains 12, error handling 4 (12 pts), loops 5 (10 pts), ternaries 3 (10 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloneCameraDialog.CloneCameraDialog (cognitive 109) · ×1
  • CloneCameraDialog.CloneCameraDialog (cognitive 109) web/src/components/settings/CloneCameraDialog.tsx:86 — CloneCameraDialog.CloneCameraDialog has cognitive complexity 109 (threshold 15). Drivers by points: if/else 33 (44 pts), boolean chains 30, ternaries 13 (21 pts), loops 6 (8 pts), error handling 2 (6 pts) (nesting depth added 25). Most of this is not in the body itself: 9 of the 109 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 369, 245, 114, …). 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 · HlsVideoPlayer.HlsVideoPlayer (cognitive 108) · ×1
  • HlsVideoPlayer.HlsVideoPlayer (cognitive 108) web/src/components/player/HlsVideoPlayer.tsx:76 — HlsVideoPlayer.HlsVideoPlayer has cognitive complexity 108 (threshold 15). Drivers by points: if/else 57 (76 pts), boolean chains 27, ternaries 5 (nesting depth added 19). Of this number, 16 points are the body's own statements and 92 belong to 31 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 · DynamicVideoPlayer.DynamicVideoPlayer (cognitive 108) · ×1
  • DynamicVideoPlayer.DynamicVideoPlayer (cognitive 108) web/src/components/player/dynamic/DynamicVideoPlayer.tsx:87 — DynamicVideoPlayer.DynamicVideoPlayer has cognitive complexity 108 (threshold 15). Drivers by points: if/else 49 (56 pts), boolean chains 41, ternaries 11 (nesting depth added 7). Of this number, 21 points are the body's own statements and 87 belong to 32 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 · TriggerView.TriggerView (cognitive 107) · ×1
  • TriggerView.TriggerView (cognitive 107) web/src/views/settings/TriggerView.tsx:84 — TriggerView.TriggerView has cognitive complexity 107 (threshold 15). Drivers by points: ternaries 21 (52 pts), boolean chains 33, if/else 18 (22 pts) (nesting depth added 35). Of this number, 17 points are the body's own statements and 90 belong to 19 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 · ExportDialog.ExportContent (cognitive 105) · ×1
  • ExportDialog.ExportContent (cognitive 105) web/src/components/overlay/ExportDialog.tsx:413 — ExportDialog.ExportContent has cognitive complexity 105 (threshold 15). Drivers by points: boolean chains 40, if/else 30 (35 pts), ternaries 22 (28 pts), error handling 1, match/switch 1 (nesting depth added 11). Of this number, 45 points are the body's own statements and 60 belong to 23 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 · PolygonItem.PolygonItem (cognitive 105) · ×1
  • PolygonItem.PolygonItem (cognitive 105) web/src/components/settings/PolygonItem.tsx:57 — PolygonItem.PolygonItem has cognitive complexity 105 (threshold 15). Drivers by points: ternaries 20 (37 pts), if/else 21 (34 pts), boolean chains 30, loops 1 (4 pts) (nesting depth added 33). Of this number, 29 points are the body's own statements and 76 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Step2ProbeOrSnapshot.Step2ProbeOrSnapshot (cognitive 104) · ×1
  • Step2ProbeOrSnapshot.Step2ProbeOrSnapshot (cognitive 104) web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx:32 — Step2ProbeOrSnapshot.Step2ProbeOrSnapshot has cognitive complexity 104 (threshold 15). Drivers by points: boolean chains 44, if/else 31 (41 pts), error handling 6 (9 pts), ternaries 7 (9 pts), loops 1 (nesting depth added 15). Most of this is not in the body itself: 10 of the 104 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 56, 176, 360, …). 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 · Step3StreamConfig.Step3StreamConfig (cognitive 103) · ×1
  • Step3StreamConfig.Step3StreamConfig (cognitive 103) web/src/components/settings/wizard/Step3StreamConfig.tsx:73 — Step3StreamConfig.Step3StreamConfig has cognitive complexity 103 (threshold 15). Drivers by points: boolean chains 48, ternaries 16 (31 pts), if/else 18 (21 pts), error handling 2 (3 pts) (nesting depth added 19). Most of this is not in the body itself: 12 of the 103 points are its own statements and the rest belongs to 23 function literals inside it that branch (lines 246, 416, 220, …). 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 · SearchDetailDialog.ObjectDetailsTab (cognitive 100) · ×1
  • SearchDetailDialog.ObjectDetailsTab (cognitive 100) web/src/components/overlay/detail/SearchDetailDialog.tsx:690 — SearchDetailDialog.ObjectDetailsTab has cognitive complexity 100 (threshold 15). Drivers by points: boolean chains 44, if/else 34 (35 pts), ternaries 17 (20 pts), error handling 1 (nesting depth added 4). Of this number, 36 points are the body's own statements and 64 belong to 36 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 · DraggableGridLayout.DraggableGridLayout (cognitive 99) · ×1
  • DraggableGridLayout.DraggableGridLayout (cognitive 99) web/src/views/live/DraggableGridLayout.tsx:115 — DraggableGridLayout.DraggableGridLayout has cognitive complexity 99 (threshold 15). Drivers by points: boolean chains 41, if/else 27 (34 pts), ternaries 13 (19 pts), loops 3 (5 pts) (nesting depth added 15). Of this number, 18 points are the body's own statements and 81 belong to 28 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 · GeminiClient.chat_with_tools (cognitive 94) · ×1
  • GeminiClient.chat_with_tools (cognitive 94) frigate/genai/plugins/gemini.py:235 — GeminiClient.chat_with_tools has cognitive complexity 94 (threshold 15). Drivers by points: if/else 25 (57 pts), boolean chains 11, error handling 4 (11 pts), loops 4 (8 pts), ternaries 2 (7 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Step3ChooseExamples.Step3ChooseExamples (cognitive 94) · ×1
  • Step3ChooseExamples.Step3ChooseExamples (cognitive 94) web/src/components/classification/wizard/Step3ChooseExamples.tsx:46 — Step3ChooseExamples.Step3ChooseExamples has cognitive complexity 94 (threshold 15). Drivers by points: if/else 32 (38 pts), boolean chains 28, ternaries 9 (22 pts), error handling 4 (6 pts) (nesting depth added 21). Of this number, 32 points are the body's own statements and 62 belong to 21 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 · ZoneEditPane.ZoneEditPane (cognitive 94) · ×1
  • ZoneEditPane.ZoneEditPane (cognitive 94) web/src/components/settings/ZoneEditPane.tsx:56 — ZoneEditPane.ZoneEditPane has cognitive complexity 94 (threshold 15). Drivers by points: boolean chains 41, if/else 33 (36 pts), ternaries 14 (17 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 77 belong to 24 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 · Events.Events (cognitive 93) · ×1
  • Events.Events (cognitive 93) web/src/pages/Events.tsx:38 — Events.Events has cognitive complexity 93 (threshold 15). Drivers by points: if/else 49 (58 pts), boolean chains 17, ternaries 11 (17 pts), match/switch 1 (nesting depth added 15). Most of this is not in the body itself: 13 of the 93 points are its own statements and the rest belongs to 33 function literals inside it that branch (lines 429, 229, 606, …). 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 · event.events_search (cognitive 92) · ×1
  • event.events_search (cognitive 92) frigate/api/event.py:533 — event.events_search has cognitive complexity 92 (threshold 15). Drivers by points: if/else 49 (72 pts), loops 5 (10 pts), boolean chains 8, error handling 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LivePlayer.LivePlayer (cognitive 90) · ×1
  • LivePlayer.LivePlayer (cognitive 90) web/src/components/player/LivePlayer.tsx:63 — LivePlayer.LivePlayer has cognitive complexity 90 (threshold 15). Drivers by points: boolean chains 49, if/else 31 (36 pts), ternaries 5 (nesting depth added 5). Of this number, 51 points are the body's own statements and 39 belong to 13 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 · OnvifController._init_onvif (cognitive 88) · ×1
  • OnvifController._init_onvif (cognitive 88) REDACTED:193 — OnvifController._init_onvif has cognitive complexity 88 (threshold 15). Drivers by points: if/else 32 (51 pts), error handling 12 (18 pts), boolean chains 15, loops 2, ternaries 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Explore.Explore (cognitive 88) · ×1
  • Explore.Explore (cognitive 88) web/src/pages/Explore.tsx:41 — Explore.Explore has cognitive complexity 88 (threshold 15). Drivers by points: boolean chains 39, if/else 24 (28 pts), ternaries 14 (19 pts), match/switch 1 (2 pts) (nesting depth added 10). Of this number, 35 points are the body's own statements and 53 belong to 13 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 · config.migrate_018_0 (cognitive 86) · ×1
  • config.migrate_018_0 (cognitive 86) frigate/util/config.py:709 — config.migrate_018_0 has cognitive complexity 86 (threshold 15). Drivers by points: if/else 30 (63 pts), boolean chains 16, loops 4 (7 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecordingMaintainer.move_files (cognitive 85) · ×1
  • RecordingMaintainer.move_files (cognitive 85) frigate/record/maintainer.py:283 — RecordingMaintainer.move_files has cognitive complexity 85 (threshold 15). Drivers by points: if/else 19 (42 pts), loops 17 (27 pts), ternaries 3 (8 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Logs.Logs (cognitive 85) · ×1
  • Logs.Logs (cognitive 85) web/src/pages/Logs.tsx:59 — Logs.Logs has cognitive complexity 85 (threshold 15). Drivers by points: if/else 33 (39 pts), ternaries 16 (27 pts), boolean chains 17, error handling 2 (nesting depth added 17). Most of this is not in the body itself: 12 of the 85 points are its own statements and the rest belongs to 21 function literals inside it that branch (lines 421, 139, 204, …). 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 · cameraClone.buildClonedCameraPayloads (cognitive 85) · ×1
  • cameraClone.buildClonedCameraPayloads (cognitive 85) web/src/utils/cameraClone.ts:472 — cameraClone.buildClonedCameraPayloads has cognitive complexity 85 (threshold 15). Drivers by points: if/else 31 (60 pts), boolean chains 13, loops 3 (6 pts), ternaries 4 (6 pts) (nesting depth added 34). Of this number, 82 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 · CameraState.update (cognitive 83) · ×1
  • CameraState.update (cognitive 83) frigate/camera/state.py:340 — CameraState.update has cognitive complexity 83 (threshold 15). Drivers by points: if/else 23 (44 pts), loops 12 (21 pts), boolean chains 15, ternaries 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Chat.ChatPage (cognitive 82) · ×1
  • Chat.ChatPage (cognitive 82) web/src/pages/Chat.tsx:53 — Chat.ChatPage has cognitive complexity 82 (threshold 15). Drivers by points: if/else 25 (38 pts), boolean chains 22, ternaries 14 (16 pts), loops 4 (6 pts) (nesting depth added 17). Most of this is not in the body itself: 13 of the 82 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 188, renderMessage, a function literal at line 121, …). 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 · Exports.Exports (cognitive 82) · ×1
  • Exports.Exports (cognitive 82) web/src/pages/Exports.tsx:77 — Exports.Exports has cognitive complexity 82 (threshold 15). Drivers by points: if/else 32 (34 pts), boolean chains 33, ternaries 9 (10 pts), error handling 4, match/switch 1 (nesting depth added 3). Of this number, 26 points are the body's own statements and 56 belong to 28 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 · ProfilesView.ProfilesView (cognitive 82) · ×1
  • ProfilesView.ProfilesView (cognitive 82) web/src/views/settings/ProfilesView.tsx:71 — ProfilesView.ProfilesView has cognitive complexity 82 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 25, ternaries 11 (19 pts), loops 4 (7 pts), error handling 4 (nesting depth added 21). Of this number, 17 points are the body's own statements and 65 belong to 11 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 · Embeddings.sync_triggers (cognitive 81) · ×1
  • Embeddings.sync_triggers (cognitive 81) frigate/embeddings/embeddings.py:453 — Embeddings.sync_triggers has cognitive complexity 81 (threshold 15). Drivers by points: if/else 14 (56 pts), error handling 3 (14 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ModelTrainingView.ModelTrainingView (cognitive 78) · ×1
  • ModelTrainingView.ModelTrainingView (cognitive 78) web/src/views/classification/ModelTrainingView.tsx:83 — ModelTrainingView.ModelTrainingView has cognitive complexity 78 (threshold 15). Drivers by points: boolean chains 35, if/else 23 (29 pts), ternaries 8 (13 pts), match/switch 1 (nesting depth added 11). Of this number, 33 points are the body's own statements and 45 belong to 16 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 · services._read_intel_drm_fdinfo (cognitive 77) · ×1
  • services._read_intel_drm_fdinfo (cognitive 77) frigate/util/services.py:374 — services._read_intel_drm_fdinfo has cognitive complexity 77 (threshold 15). Drivers by points: if/else 11 (35 pts), error handling 6 (21 pts), loops 5 (14 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiveDashboardView.LiveDashboardView (cognitive 77) · ×1
  • LiveDashboardView.LiveDashboardView (cognitive 77) web/src/views/live/LiveDashboardView.tsx:69 — LiveDashboardView.LiveDashboardView has cognitive complexity 77 (threshold 15). Drivers by points: boolean chains 39, if/else 20 (23 pts), ternaries 7 (14 pts), error handling 1 (nesting depth added 10). Of this number, 20 points are the body's own statements and 57 belong to 16 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 · FfmpegArgsWidget.FfmpegArgsWidget (cognitive 76) · ×1
  • FfmpegArgsWidget.FfmpegArgsWidget (cognitive 76) web/src/components/config-form/theme/widgets/FfmpegArgsWidget.tsx:104 — FfmpegArgsWidget.FfmpegArgsWidget has cognitive complexity 76 (threshold 15). Drivers by points: ternaries 21 (33 pts), boolean chains 24, if/else 18 (19 pts) (nesting depth added 13). Of this number, 40 points are the body's own statements and 36 belong to 6 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 · ReviewSegmentMaintainer.update_existing_segment (cognitive 74) · ×1
  • ReviewSegmentMaintainer.update_existing_segment (cognitive 74) frigate/review/maintainer.py:556 — ReviewSegmentMaintainer.update_existing_segment has cognitive complexity 74 (threshold 15). Drivers by points: if/else 21 (53 pts), loops 3 (9 pts), boolean chains 6, error handling 2 (6 pts) (nesting depth added 42). 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 · NotificationsSettingsExtras.NotificationsSettingsExtras (cognitive 71) · ×1
  • NotificationsSettingsExtras.NotificationsSettingsExtras (cognitive 71) web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:70 — NotificationsSettingsExtras.NotificationsSettingsExtras has cognitive complexity 71 (threshold 15). Drivers by points: if/else 29 (34 pts), boolean chains 21, ternaries 14 (16 pts) (nesting depth added 7). Of this number, 22 points are the body's own statements and 49 belong to 28 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 · DetailStream.DetailStream (cognitive 71) · ×1
  • DetailStream.DetailStream (cognitive 71) web/src/components/timeline/DetailStream.tsx:46 — DetailStream.DetailStream has cognitive complexity 71 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 20, ternaries 4 (8 pts), loops 4 (6 pts) (nesting depth added 18). Most of this is not in the body itself: 6 of the 71 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 196, 86, 148, …). 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 · CameraWizardDialog.CameraWizardDialog (cognitive 70) · ×1
  • CameraWizardDialog.CameraWizardDialog (cognitive 70) web/src/components/settings/CameraWizardDialog.tsx:82 — CameraWizardDialog.CameraWizardDialog has cognitive complexity 70 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 26, ternaries 4 (10 pts), match/switch 1 (nesting depth added 16). Most of this is not in the body itself: 6 of the 70 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 176, a function literal at line 282, a function literal at line 144, …). 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 · MotionPreviewsPane.MotionPreviewClip (cognitive 70) · ×1
  • MotionPreviewsPane.MotionPreviewClip (cognitive 70) web/src/views/events/MotionPreviewsPane.tsx:229 — MotionPreviewsPane.MotionPreviewClip has cognitive complexity 70 (threshold 15). Drivers by points: if/else 30 (35 pts), boolean chains 26, ternaries 6 (8 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 12 of the 70 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 456, 412, 443, …). 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 · BirdsEyeFrameManager.update_frame (cognitive 69) · ×1
  • BirdsEyeFrameManager.update_frame (cognitive 69) frigate/output/birdseye.py:464 — BirdsEyeFrameManager.update_frame has cognitive complexity 69 (threshold 15). Drivers by points: if/else 23 (52 pts), loops 3 (9 pts), boolean chains 8 (nesting depth added 35). 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 · event.events (cognitive 68) · ×1
  • event.events (cognitive 68) frigate/api/event.py:97 — event.events has cognitive complexity 68 (threshold 15). Drivers by points: if/else 44 (55 pts), boolean chains 6, loops 3 (6 pts), ternaries 1 (nesting depth added 14). 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 · CameraState.get_current_frame (cognitive 67) · ×1
  • CameraState.get_current_frame (cognitive 67) frigate/camera/state.py:87 — CameraState.get_current_frame has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 8 (21 pts), ternaries 4 (12 pts), boolean chains 5 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIClient.chat_with_tools_stream (cognitive 67) · ×1
  • OpenAIClient.chat_with_tools_stream (cognitive 67) frigate/genai/plugins/openai.py:360 — OpenAIClient.chat_with_tools_stream has cognitive complexity 67 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 9, loops 3 (6 pts), error handling 3 (5 pts), ternaries 1 (5 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LiveCameraView.FrigateCameraFeatures (cognitive 67) · ×1
  • LiveCameraView.FrigateCameraFeatures (cognitive 67) web/src/views/live/LiveCameraView.tsx:1012 — LiveCameraView.FrigateCameraFeatures has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 44, if/else 14, ternaries 3 (6 pts), error handling 3 (nesting depth added 3). Of this number, 49 points are the body's own statements and 18 belong to 21 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 · OutputProcess.run (cognitive 66) · ×1
  • OutputProcess.run (cognitive 66) frigate/output/output.py:122 — OutputProcess.run has cognitive complexity 66 (threshold 15). Drivers by points: if/else 21 (44 pts), loops 8 (13 pts), boolean chains 9 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventView.MotionReview (cognitive 66) · ×1
  • EventView.MotionReview (cognitive 66) web/src/views/events/EventView.tsx:993 — EventView.MotionReview has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 29, if/else 23 (27 pts), ternaries 7 (10 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 47 belong to 21 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 · WebRTCPlayer.WebRtcPlayer (cognitive 65) · ×1
  • WebRTCPlayer.WebRtcPlayer (cognitive 65) web/src/components/player/WebRTCPlayer.tsx:32 — WebRTCPlayer.WebRtcPlayer has cognitive complexity 65 (threshold 15). Drivers by points: if/else 36 (44 pts), boolean chains 11, ternaries 5 (9 pts), error handling 1 (nesting depth added 12). Most of this is not in the body itself: 2 of the 65 points are its own statements and the rest belongs to 24 function items inside it that branch (a function literal at line 375, a function literal at line 92, a function literal at line 368, …). 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 · ui_generator.generate_ui_content (cognitive 63) · ×1
  • ui_generator.generate_ui_content (cognitive 63) docs/scripts/lib/ui_generator.py:100 — ui_generator.generate_ui_content has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (47 pts), loops 5 (10 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneralSettings.GeneralSettings (cognitive 63) · ×1
  • GeneralSettings.GeneralSettings (cognitive 63) web/src/components/menu/GeneralSettings.tsx:88 — GeneralSettings.GeneralSettings has cognitive complexity 63 (threshold 15). Drivers by points: ternaries 35, boolean chains 25, if/else 2, error handling 1. Of this number, 52 points are the body's own statements and 11 belong to 8 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 · use-draggable-element.useDraggableElement (cognitive 63) · ×1
  • use-draggable-element.useDraggableElement (cognitive 63) web/src/hooks/use-draggable-element.ts:44 — use-draggable-element.useDraggableElement has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (48 pts), boolean chains 9, ternaries 3 (6 pts) (nesting depth added 27). None of this is in the body itself: all 63 points belong to 6 function literals inside it that branch (lines 287, 504, 436, …). 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 · LicensePlateProcessingMixin._process_license_plate (cognitive 61) · ×1
  • LicensePlateProcessingMixin._process_license_plate (cognitive 61) frigate/data_processing/common/license_plate/mixin.py:207 — LicensePlateProcessingMixin._process_license_plate has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 9 (18 pts), error handling 1 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClassificationModelEditDialog.ClassificationModelEditDialog (cognitive 61) · ×1
  • ClassificationModelEditDialog.ClassificationModelEditDialog (cognitive 61) web/src/components/classification/ClassificationModelEditDialog.tsx:75 — ClassificationModelEditDialog.ClassificationModelEditDialog has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 18, ternaries 9 (11 pts), error handling 2 (3 pts), loops 1 (2 pts) (nesting depth added 11). Of this number, 16 points are the body's own statements and 45 belong to 13 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 · LiveBirdseyeView.LiveBirdseyeView (cognitive 61) · ×1
  • LiveBirdseyeView.LiveBirdseyeView (cognitive 61) web/src/views/live/LiveBirdseyeView.tsx:34 — LiveBirdseyeView.LiveBirdseyeView has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (28 pts), ternaries 12 (20 pts), boolean chains 11, loops 1 (2 pts) (nesting depth added 16). Of this number, 19 points are the body's own statements and 42 belong to 7 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 · AuthenticationView.AuthenticationView (cognitive 61) · ×1
  • AuthenticationView.AuthenticationView (cognitive 61) web/src/views/settings/AuthenticationView.tsx:44 — AuthenticationView.AuthenticationView has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 26, ternaries 12 (21 pts), if/else 12, error handling 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 13 of the 61 points are its own statements and the rest belongs to 25 function items inside it that branch (a function literal at line 457, a function literal at line 654, a function literal at line 788, …). 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 · configUtil.buildOverrides (cognitive 60) · ×1
  • configUtil.buildOverrides (cognitive 60) web/src/utils/configUtil.ts:205 — configUtil.buildOverrides has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 6 (15 pts), boolean chains 10, loops 2 (5 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackedObjectProcessor.run (cognitive 59) · ×1
  • TrackedObjectProcessor.run (cognitive 59) frigate/track/object_processing.py:755 — TrackedObjectProcessor.run has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 7 (13 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MqttClient._publish_retained_state (cognitive 58) · ×1
  • MqttClient._publish_retained_state (cognitive 58) frigate/comms/mqtt.py:141 — MqttClient._publish_retained_state has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 19 (43 pts), if/else 3 (7 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transformer.normalizeNullableSchema (cognitive 58) · ×1
  • transformer.normalizeNullableSchema (cognitive 58) web/src/lib/config-schema/transformer.ts:61 — transformer.normalizeNullableSchema has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (25 pts), ternaries 6 (20 pts), boolean chains 11, loops 1 (2 pts) (nesting depth added 25). Of this number, 53 points are the body's own statements and 5 belong to 5 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 · SemanticTriggerProcessor.process_data (cognitive 56) · ×1
  • SemanticTriggerProcessor.process_data (cognitive 56) frigate/data_processing/post/semantic_trigger.py:65 — SemanticTriggerProcessor.process_data has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (39 pts), ternaries 3 (8 pts), boolean chains 5, error handling 1 (3 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.
D2 · Cognitive Complexity · config.migrate_015_0 (cognitive 56) · ×1
  • config.migrate_015_0 (cognitive 56) frigate/util/config.py:399 — config.migrate_015_0 has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (46 pts), ternaries 2 (7 pts), boolean chains 2, loops 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch 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.config_set (cognitive 55) · ×1
  • app.config_set (cognitive 55) frigate/api/app.py:1054 — app.config_set has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (35 pts), loops 2 (7 pts), error handling 5 (6 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.verify_profile_overrides_match_base (cognitive 55) · ×1
  • config.verify_profile_overrides_match_base (cognitive 55) frigate/config/config.py:437 — config.verify_profile_overrides_match_base has cognitive complexity 55 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 6 (17 pts), ternaries 2 (8 pts), boolean chains 7 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmbeddingMaintainer._process_finalized (cognitive 55) · ×1
  • EmbeddingMaintainer._process_finalized (cognitive 55) frigate/embeddings/maintainer.py:585 — EmbeddingMaintainer._process_finalized has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 6 (16 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobileReviewSettingsDrawer.MobileReviewSettingsDrawer (cognitive 54) · ×1
  • MobileReviewSettingsDrawer.MobileReviewSettingsDrawer (cognitive 54) web/src/components/overlay/MobileReviewSettingsDrawer.tsx:90 — MobileReviewSettingsDrawer.MobileReviewSettingsDrawer has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 25, if/else 21 (23 pts), ternaries 4, error handling 2 (nesting depth added 2). Of this number, 29 points are the body's own statements and 25 belong to 10 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 · MotionSearchROICanvas.MotionSearchROICanvas (cognitive 54) · ×1
  • MotionSearchROICanvas.MotionSearchROICanvas (cognitive 54) web/src/views/motion-search/MotionSearchROICanvas.tsx:22 — MotionSearchROICanvas.MotionSearchROICanvas has cognitive complexity 54 (threshold 15). Drivers by points: if/else 24, boolean chains 17, ternaries 10 (12 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 10 of the 54 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 122, 208, 69, …). 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 · ClassificationCard.GroupedClassificationCard (cognitive 53) · ×1
  • ClassificationCard.GroupedClassificationCard (cognitive 53) web/src/components/card/ClassificationCard.tsx:207 — ClassificationCard.GroupedClassificationCard has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 26, if/else 16 (17 pts), ternaries 9 (10 pts) (nesting depth added 2). Of this number, 26 points are the body's own statements and 27 belong to 9 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 · GenAIModelWidget.GenAIModelWidget (cognitive 53) · ×1
  • GenAIModelWidget.GenAIModelWidget (cognitive 53) web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx:51 — GenAIModelWidget.GenAIModelWidget has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 19, if/else 18, ternaries 13 (15 pts), error handling 1 (nesting depth added 2). Of this number, 20 points are the body's own statements and 33 belong to 11 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 · PreviewThumbnailPlayer.PreviewThumbnailPlayer (cognitive 53) · ×1
  • PreviewThumbnailPlayer.PreviewThumbnailPlayer (cognitive 53) web/src/components/player/PreviewThumbnailPlayer.tsx:43 — PreviewThumbnailPlayer.PreviewThumbnailPlayer has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 24, if/else 18 (21 pts), ternaries 8 (nesting depth added 3). Of this number, 25 points are the body's own statements and 28 belong to 11 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 · Step4Validation.Step4Validation (cognitive 53) · ×1
  • Step4Validation.Step4Validation (cognitive 53) web/src/components/settings/wizard/Step4Validation.tsx:33 — Step4Validation.Step4Validation has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 22, if/else 15 (18 pts), ternaries 7 (10 pts), error handling 2, loops 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 53 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 275, 157, 200, …). 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 · yaml_extractor.extract_config_tabs_blocks (cognitive 52) · ×1
  • yaml_extractor.extract_config_tabs_blocks (cognitive 52) docs/scripts/lib/yaml_extractor.py:134 — yaml_extractor.extract_config_tabs_blocks has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (41 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 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 · ObjectMaskEditPane.ObjectMaskEditPane (cognitive 52) · ×1
  • ObjectMaskEditPane.ObjectMaskEditPane (cognitive 52) web/src/components/settings/ObjectMaskEditPane.tsx:56 — ObjectMaskEditPane.ObjectMaskEditPane has cognitive complexity 52 (threshold 15). Drivers by points: boolean chains 23, if/else 17 (19 pts), ternaries 6 (8 pts), error handling 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 12 of the 52 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 170, a function literal at line 254, 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 · MotionMaskEditPane.MotionMaskEditPane (cognitive 51) · ×1
  • MotionMaskEditPane.MotionMaskEditPane (cognitive 51) web/src/components/settings/MotionMaskEditPane.tsx:49 — MotionMaskEditPane.MotionMaskEditPane has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 21, if/else 16 (17 pts), ternaries 6 (9 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 13 of the 51 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 181, a function literal at line 249, a function literal at line 111, …). 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 · chat._execute_get_recap (cognitive 50) · ×1
  • chat._execute_get_recap (cognitive 50) frigate/api/chat.py:1108 — chat._execute_get_recap has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (34 pts), error handling 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PolygonDrawer.PolygonDrawer (cognitive 50) · ×1
  • PolygonDrawer.PolygonDrawer (cognitive 50) web/src/components/settings/PolygonDrawer.tsx:36 — PolygonDrawer.PolygonDrawer has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (26 pts), ternaries 12 (16 pts), boolean chains 7, loops 1 (nesting depth added 8). Most of this is not in the body itself: 11 of the 50 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 246, a function literal at line 235, groupDragBound, …). 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 · FaceLibrary.FaceLibrary (cognitive 50) · ×1
  • FaceLibrary.FaceLibrary (cognitive 50) web/src/pages/FaceLibrary.tsx:77 — FaceLibrary.FaceLibrary has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 15, ternaries 5 (8 pts), match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 10 of the 50 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 303, 197, 165, …). 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 · CameraStreamingDialog.CameraStreamingDialog (cognitive 49) · ×1
  • CameraStreamingDialog.CameraStreamingDialog (cognitive 49) web/src/components/settings/CameraStreamingDialog.tsx:54 — CameraStreamingDialog.CameraStreamingDialog has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 29, ternaries 9 (13 pts), if/else 7 (nesting depth added 4). Of this number, 16 points are the body's own statements and 33 belong to 4 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 · camera.ffprobe (cognitive 48) · ×1
  • camera.ffprobe (cognitive 48) REDACTED:298 — camera.ffprobe has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (32 pts), error handling 3 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ws._materialize_for_ws (cognitive 48) · ×1
  • ws._materialize_for_ws (cognitive 48) frigate/comms/ws.py:392 — ws._materialize_for_ws has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (38 pts), ternaries 4 (8 pts), loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LlamaCppClient.chat_with_tools_stream (cognitive 48) · ×1
  • LlamaCppClient.chat_with_tools_stream (cognitive 48) frigate/genai/plugins/llama_cpp.py:891 — LlamaCppClient.chat_with_tools_stream has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 9, error handling 3 (4 pts), ternaries 1 (4 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StorageMaintainer.reduce_storage_consumption (cognitive 48) · ×1
  • StorageMaintainer.reduce_storage_consumption (cognitive 48) frigate/storage.py:246 — StorageMaintainer.reduce_storage_consumption has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 8 (16 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · logUtil.parseLogLines (cognitive 48) · ×1
  • logUtil.parseLogLines (cognitive 48) web/src/utils/logUtil.ts:13 — logUtil.parseLogLines has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (34 pts), ternaries 4 (11 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 22). Most of this is not in the body itself: 3 of the 48 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 147, 83, 16). 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 · RecordingMaintainer.validate_and_move_segment (cognitive 47) · ×1
  • RecordingMaintainer.validate_and_move_segment (cognitive 47) frigate/record/maintainer.py:590 — RecordingMaintainer.validate_and_move_segment has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (37 pts), ternaries 3 (6 pts), boolean chains 3, 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 · __main__.main (cognitive 45) · ×1
  • __main__.main (cognitive 45) frigate/__main__.py:17 — __main__.main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 9 (29 pts), error handling 3 (6 pts), loops 2 (5 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReviewDescriptionProcessor.handle_request (cognitive 45) · ×1
  • ReviewDescriptionProcessor.handle_request (cognitive 45) frigate/data_processing/post/review_descriptions.py:230 — ReviewDescriptionProcessor.handle_request has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · object_dataset.worst_offenders (cognitive 45) · ×1
  • object_dataset.worst_offenders (cognitive 45) testing-scripts/object_dataset.py:532 — object_dataset.worst_offenders has cognitive complexity 45 (threshold 15). Drivers by points: if/else 8 (19 pts), ternaries 4 (17 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Go2RtcStreamsSettingsView.Go2RtcStreamsSettingsView (cognitive 45) · ×1
  • Go2RtcStreamsSettingsView.Go2RtcStreamsSettingsView (cognitive 45) web/src/views/settings/Go2RtcStreamsSettingsView.tsx:109 — Go2RtcStreamsSettingsView.Go2RtcStreamsSettingsView has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 13, loops 7, ternaries 4 (5 pts), error handling 1 (nesting depth added 7). Most of this is not in the body itself: 8 of the 45 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 195, 176, 233, …). 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 · LlamaCppClient._get_model_info (cognitive 44) · ×1
  • LlamaCppClient._get_model_info (cognitive 44) frigate/genai/plugins/llama_cpp.py:185 — LlamaCppClient._get_model_info has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 4 (8 pts), boolean chains 6, ternaries 3 (6 pts), error handling 3 (5 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 · app._config_set_in_memory (cognitive 43) · ×1
  • app._config_set_in_memory (cognitive 43) frigate/api/app.py:916 — app._config_set_in_memory has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 4 (6 pts), boolean chains 2, error handling 1 (nesting depth added 22). 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 · CameraMaintainer.run (cognitive 43) · ×1
  • CameraMaintainer.run (cognitive 43) frigate/camera/maintainer.py:242 — CameraMaintainer.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 5 (23 pts), loops 8 (18 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventProcessor.handle_object_detection (cognitive 43) · ×1
  • EventProcessor.handle_object_detection (cognitive 43) frigate/events/maintainer.py:141 — EventProcessor.handle_object_detection has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 8 (16 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImprovedMotionDetector.detect (cognitive 43) · ×1
  • ImprovedMotionDetector.detect (cognitive 43) frigate/motion/improved_motion.py:55 — ImprovedMotionDetector.detect has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 10, ternaries 3 (7 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LayoutGridField.GridLayoutObjectFieldTemplate (cognitive 43) · ×1
  • LayoutGridField.GridLayoutObjectFieldTemplate (cognitive 43) web/src/components/config-form/theme/fields/LayoutGridField.tsx:132 — LayoutGridField.GridLayoutObjectFieldTemplate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 10, ternaries 6 (nesting depth added 3). Most of this is not in the body itself: 5 of the 43 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 320, a function literal at line 232, a function literal at line 325, …). 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 · JSMpegPlayer.JSMpegPlayer (cognitive 43) · ×1
  • JSMpegPlayer.JSMpegPlayer (cognitive 43) web/src/components/player/JSMpegPlayer.tsx:21 — JSMpegPlayer.JSMpegPlayer has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 9, ternaries 4 (8 pts), error handling 1 (3 pts) (nesting depth added 16). Most of this is not in the body itself: 2 of the 43 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 63, 195, 113, …). 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 · app.config (cognitive 42) · ×1
  • app.config (cognitive 42) frigate/api/app.py:314 — app.config has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 9 (16 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · media.latest_frame (cognitive 42) · ×1
  • media.latest_frame (cognitive 42) frigate/api/media.py:208 — media.latest_frame has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 21). 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 · config.migrate_014 (cognitive 42) · ×1
  • config.migrate_014 (cognitive 42) frigate/util/config.py:312 — config.migrate_014 has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (41 pts), loops 1 (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 · streamIssues.getStreamIssues (cognitive 42) · ×1
  • streamIssues.getStreamIssues (cognitive 42) web/src/utils/streamIssues.ts:91 — streamIssues.getStreamIssues has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 9 (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 · FaceRealTimeProcessor.process_frame (cognitive 41) · ×1
  • FaceRealTimeProcessor.process_frame (cognitive 41) frigate/data_processing/real_time/face.py:95 — FaceRealTimeProcessor.process_frame has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (35 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrubbablePreview.VideoPreview (cognitive 41) · ×1
  • ScrubbablePreview.VideoPreview (cognitive 41) web/src/components/preview/ScrubbablePreview.tsx:28 — ScrubbablePreview.VideoPreview has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (29 pts), boolean chains 12 (nesting depth added 6). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 87, 68, 200, …). 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 · EventView.EventView (cognitive 41) · ×1
  • EventView.EventView (cognitive 41) web/src/views/events/EventView.tsx:128 — EventView.EventView has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 12, ternaries 4 (6 pts) (nesting depth added 5). Most of this is not in the body itself: 10 of the 41 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 209, 156, 255, …). 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 · app.config_save (cognitive 40) · ×1
  • app.config_save (cognitive 40) frigate/api/app.py:637 — app.config_save has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (22 pts), error handling 6 (9 pts), loops 2 (5 pts), ternaries 1 (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 · ObjectDescriptionProcessor.__handle_frame_update (cognitive 40) · ×1
  • ObjectDescriptionProcessor.__handle_frame_update (cognitive 40) frigate/data_processing/post/object_descriptions.py:60 — ObjectDescriptionProcessor.__handle_frame_update has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 5, ternaries 1 (5 pts), error handling 1 (4 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ffmpeg.run_ffmpeg_with_progress (cognitive 40) · ×1
  • ffmpeg.run_ffmpeg_with_progress (cognitive 40) frigate/util/ffmpeg.py:90 — ffmpeg.run_ffmpeg_with_progress has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (21 pts), error handling 6 (14 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MotionPreviewsPane.MotionPreviewsPane (cognitive 40) · ×1
  • MotionPreviewsPane.MotionPreviewsPane (cognitive 40) web/src/views/events/MotionPreviewsPane.tsx:718 — MotionPreviewsPane.MotionPreviewsPane has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 12, ternaries 9 (10 pts), error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 40 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 812, 1034, 1012, …). 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 · EventView.DetectionReview (cognitive 40) · ×1
  • EventView.DetectionReview (cognitive 40) web/src/views/events/EventView.tsx:576 — EventView.DetectionReview has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 16, ternaries 4 (5 pts), error handling 1, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 10 of the 40 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 791, 731, 759, …). 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 · MotionSearchRunner._search_runs (cognitive 39) · ×1
  • MotionSearchRunner._search_runs (cognitive 39) frigate/jobs/motion_search.py:745 — MotionSearchRunner._search_runs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 5 (11 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transformer.resolveSchemaRefs (cognitive 39) · ×1
  • transformer.resolveSchemaRefs (cognitive 39) web/src/lib/config-schema/transformer.ts:243 — transformer.resolveSchemaRefs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MotionSearchDialog.MotionSearchDialog (cognitive 39) · ×1
  • MotionSearchDialog.MotionSearchDialog (cognitive 39) web/src/views/motion-search/MotionSearchDialog.tsx:88 — MotionSearchDialog.MotionSearchDialog has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (10 pts), ternaries 9 (nesting depth added 1). Of this number, 25 points are the body's own statements and 14 belong to 7 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 · record.all_recordings_summary (cognitive 38) · ×1
  • record.all_recordings_summary (cognitive 38) frigate/api/record.py:75 — record.all_recordings_summary has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 4 (7 pts), ternaries 2 (4 pts), boolean chains 3 (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 · media.sync_recordings (cognitive 38) · ×1
  • media.sync_recordings (cognitive 38) frigate/util/media.py:111 — media.sync_recordings has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (23 pts), loops 5 (7 pts), error handling 3 (5 pts), boolean chains 3 (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 · services.get_intel_gpu_stats (cognitive 38) · ×1
  • services.get_intel_gpu_stats (cognitive 38) frigate/util/services.py:508 — services.get_intel_gpu_stats has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 4 (6 pts), boolean chains 5 (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 · chatUtil.streamChatCompletion (cognitive 38) · ×1
  • chatUtil.streamChatCompletion (cognitive 38) web/src/utils/chatUtil.ts:58 — chatUtil.streamChatCompletion has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (24 pts), error handling 3 (6 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 11). Of this number, 30 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._restore_masked_camera_paths (cognitive 37) · ×1
  • app._restore_masked_camera_paths (cognitive 37) frigate/api/app.py:773 — app._restore_masked_camera_paths has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (27 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chat._execute_find_similar_objects (cognitive 37) · ×1
  • chat._execute_find_similar_objects (cognitive 37) frigate/api/chat.py:370 — chat._execute_find_similar_objects has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 6, ternaries 3 (6 pts), error handling 2, loops 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, 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 · ObjectFieldTemplate.ObjectFieldTemplate (cognitive 37) · ×1
  • ObjectFieldTemplate.ObjectFieldTemplate (cognitive 37) web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:40 — ObjectFieldTemplate.ObjectFieldTemplate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24 (38 pts), boolean chains 19, ternaries 13 (17 pts), loops 7 (13 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (ObjectFieldTemplate.ObjectFieldTemplate::stripExcludedFields, ObjectFieldTemplate.ObjectFieldTemplate::renderGroupedFields) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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 · MultiExportDialog.MultiExportDialog (cognitive 37) · ×1
  • MultiExportDialog.MultiExportDialog (cognitive 37) web/src/components/overlay/MultiExportDialog.tsx:61 — MultiExportDialog.MultiExportDialog has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 10, ternaries 5 (6 pts), error handling 1 (nesting depth added 3). 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 literals inside it that branch (lines 170, 86, 160, …). 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 · SearchFilterDialog.RecognizedLicensePlatesFilterContent (cognitive 37) · ×1
  • SearchFilterDialog.RecognizedLicensePlatesFilterContent (cognitive 37) REDACTED:911 — SearchFilterDialog.RecognizedLicensePlatesFilterContent has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 11, boolean chains 8, error handling 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 13 of the 37 points are its own statements and the rest belongs to 6 function items inside it that branch (filterItems, handleSelect, handleSelectAllVisible, …). 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 · MotionSegment.MotionSegment (cognitive 37) · ×1
  • MotionSegment.MotionSegment (cognitive 37) web/src/components/timeline/MotionSegment.tsx:33 — MotionSegment.MotionSegment has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 24, ternaries 8 (11 pts), if/else 2 (nesting depth added 3). Of this number, 28 points are the body's own statements and 9 belong to 8 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 · SummaryTimeline.SummaryTimeline (cognitive 37) · ×1
  • SummaryTimeline.SummaryTimeline (cognitive 37) web/src/components/timeline/SummaryTimeline.tsx:25 — SummaryTimeline.SummaryTimeline has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 9, ternaries 3 (nesting depth added 4). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 275, 188, 238, …). 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 · ObjectTrackOverlay.ObjectTrackOverlay (cognitive 36) · ×1
  • ObjectTrackOverlay.ObjectTrackOverlay (cognitive 36) web/src/components/overlay/ObjectTrackOverlay.tsx:49 — ObjectTrackOverlay.ObjectTrackOverlay has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 14, if/else 12 (14 pts), ternaries 6, loops 2 (nesting depth added 2). Most of this is not in the body itself: 4 of the 36 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 346, 139, 212, …). 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 · TrackingDetails.LifecycleIconRow (cognitive 36) · ×1
  • TrackingDetails.LifecycleIconRow (cognitive 36) web/src/components/overlay/detail/TrackingDetails.tsx:925 — TrackingDetails.LifecycleIconRow has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 24, ternaries 10 (11 pts), if/else 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 19 belong to 11 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 · WsMessageRow.getPayloadSummary (cognitive 36) · ×1
  • WsMessageRow.getPayloadSummary (cognitive 36) web/src/components/ws/WsMessageRow.tsx:95 — WsMessageRow.getPayloadSummary has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 9, ternaries 3 (4 pts), error handling 1 (nesting depth added 13). Of this number, 32 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 · transformer.generateUiSchema (cognitive 36) · ×1
  • transformer.generateUiSchema (cognitive 36) web/src/lib/config-schema/transformer.ts:451 — transformer.generateUiSchema has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 3, loops 1 (nesting depth added 16). Of this number, 32 points are the body's own statements and 4 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 · configUtil.prepareSectionSavePayload (cognitive 36) · ×1
  • configUtil.prepareSectionSavePayload (cognitive 36) web/src/utils/configUtil.ts:638 — configUtil.prepareSectionSavePayload has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 9, ternaries 8 (9 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CameraMetrics.CameraMetrics (cognitive 36) · ×1
  • CameraMetrics.CameraMetrics (cognitive 36) web/src/views/system/CameraMetrics.tsx:35 — CameraMetrics.CameraMetrics has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 16, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 69, 178, 96, …). 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 · RuntimeFilterConfig.__init__ (cognitive 35) · ×1
  • RuntimeFilterConfig.__init__ (cognitive 35) frigate/config/config.py:191 — RuntimeFilterConfig.__init__ has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 4 (16 pts), if/else 10 (15 pts), loops 2 (3 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 · CentroidTracker.match_and_update (cognitive 35) · ×1
  • CentroidTracker.match_and_update (cognitive 35) frigate/track/centroid_tracker.py:140 — CentroidTracker.match_and_update has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 8 (16 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 · config.apply_section_update (cognitive 35) · ×1
  • config.apply_section_update (cognitive 35) frigate/util/config.py:1142 — config.apply_section_update has cognitive complexity 35 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 7 (14 pts), error handling 2 (3 pts) (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · media.sync_event_thumbnails (cognitive 35) · ×1
  • media.sync_event_thumbnails (cognitive 35) frigate/util/media.py:369 — media.sync_event_thumbnails has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (7 pts), error handling 2 (3 pts), boolean chains 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 · ReviewTimeline.ReviewTimeline (cognitive 35) · ×1
  • ReviewTimeline.ReviewTimeline (cognitive 35) web/src/components/timeline/ReviewTimeline.tsx:50 — ReviewTimeline.ReviewTimeline has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 23, if/else 9, match/switch 2, ternaries 1. Of this number, 21 points are the body's own statements and 14 belong to 9 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 · Replay.Replay (cognitive 35) · ×1
  • Replay.Replay (cognitive 35) web/src/pages/Replay.tsx:113 — Replay.Replay has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 19, ternaries 7 (10 pts), if/else 5, loops 1 (nesting depth added 3). Of this number, 26 points are the body's own statements and 9 belong to 5 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 · RecordingView.Timeline (cognitive 35) · ×1
  • RecordingView.Timeline (cognitive 35) web/src/views/recording/RecordingView.tsx:1164 — RecordingView.Timeline has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 13 (23 pts), if/else 5 (8 pts), boolean chains 4 (nesting depth added 13). Of this number, 23 points are the body's own statements and 12 belong to 5 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 · yaml_extractor.extract_yaml_blocks (cognitive 34) · ×1
  • yaml_extractor.extract_yaml_blocks (cognitive 34) docs/scripts/lib/yaml_extractor.py:28 — yaml_extractor.extract_yaml_blocks has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 22). 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 · ProfileManager._apply_profile_overrides (cognitive 34) · ×1
  • ProfileManager._apply_profile_overrides (cognitive 34) frigate/config/profile_manager.py:344 — ProfileManager._apply_profile_overrides has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LicensePlatePostProcessor.process_data (cognitive 34) · ×1
  • LicensePlatePostProcessor.process_data (cognitive 34) frigate/data_processing/post/license_plate.py:60 — LicensePlatePostProcessor.process_data has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 2 (4 pts), boolean chains 2, error handling 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 · OpenAIClient.chat_with_tools (cognitive 34) · ×1
  • OpenAIClient.chat_with_tools (cognitive 34) frigate/genai/plugins/openai.py:239 — OpenAIClient.chat_with_tools has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5 (12 pts), error handling 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.get_relative_coordinates (cognitive 34) · ×1
  • config.get_relative_coordinates (cognitive 34) frigate/util/config.py:1038 — config.get_relative_coordinates has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 20). 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.sync_exports (cognitive 34) · ×1
  • media.sync_exports (cognitive 34) frigate/util/media.py:638 — media.sync_exports has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 6 (8 pts), error handling 2 (3 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 · KnownPlatesField.KnownPlatesField (cognitive 34) · ×1
  • KnownPlatesField.KnownPlatesField (cognitive 34) web/src/components/config-form/theme/fields/KnownPlatesField.tsx:217 — KnownPlatesField.KnownPlatesField has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, if/else 7 (10 pts), loops 3 (4 pts), ternaries 3 (nesting depth added 4). Most of this is not in the body itself: 7 of the 34 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 290, 324, 406, …). 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 · LiveContextMenu.LiveContextMenu (cognitive 34) · ×1
  • LiveContextMenu.LiveContextMenu (cognitive 34) web/src/components/menu/LiveContextMenu.tsx:75 — LiveContextMenu.LiveContextMenu has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 16, if/else 10, ternaries 8. Of this number, 16 points are the body's own statements and 18 belong to 8 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 · use-config-override.useCamerasOverridingSection (cognitive 34) · ×1
  • use-config-override.useCamerasOverridingSection (cognitive 34) web/src/hooks/use-config-override.ts:775 — use-config-override.useCamerasOverridingSection has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 21). None of this is in the body itself: all 34 points belong to one function literal inside it that branches (line 780). 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 · dateUtil.getDurationFromTimestamps (cognitive 34) · ×1
  • dateUtil.getDurationFromTimestamps (cognitive 34) web/src/utils/dateUtil.ts:241 — dateUtil.getDurationFromTimestamps has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 3 (12 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Dispatcher._on_object_mask_command (cognitive 33) · ×1
  • Dispatcher._on_object_mask_command (cognitive 33) frigate/comms/dispatcher.py:1251 — Dispatcher._on_object_mask_command has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (5 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WebPushClient.send_alert (cognitive 33) · ×1
  • WebPushClient.send_alert (cognitive 33) frigate/comms/webpush.py:535 — WebPushClient.send_alert has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5, loops 3 (4 pts), ternaries 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProfileManager._publish_updates (cognitive 33) · ×1
  • ProfileManager._publish_updates (cognitive 33) frigate/config/profile_manager.py:399 — ProfileManager._publish_updates has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (7 pts), ternaries 1 (5 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 · deepx.read_ppu_layout (cognitive 33) · ×1
  • deepx.read_ppu_layout (cognitive 33) frigate/detectors/plugins/deepx.py:406 — deepx.read_ppu_layout has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (7 pts), error handling 2 (5 pts), boolean chains 3 (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 · EdgeTpuTfl.__init__ (cognitive 33) · ×1
  • EdgeTpuTfl.__init__ (cognitive 33) frigate/detectors/plugins/edgetpu_tfl.py:49 — EdgeTpuTfl.__init__ has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (7 pts), boolean chains 5, loops 2 (4 pts), error handling 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 · RecordingMaintainer.run (cognitive 33) · ×1
  • RecordingMaintainer.run (cognitive 33) frigate/record/maintainer.py:1070 — RecordingMaintainer.run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (2 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 · CameraReviewClassification.CameraReviewClassification (cognitive 33) · ×1
  • CameraReviewClassification.CameraReviewClassification (cognitive 33) web/src/components/config-form/sectionExtras/CameraReviewClassification.tsx:32 — CameraReviewClassification.CameraReviewClassification has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 13, ternaries 9 (12 pts), if/else 8 (nesting depth added 3). Of this number, 16 points are the body's own statements and 17 belong to 12 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 · CommandMenu.CommandMenu (cognitive 33) · ×1
  • CommandMenu.CommandMenu (cognitive 33) web/src/components/menu/CommandMenu.tsx:93 — CommandMenu.CommandMenu has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 10, loops 5 (6 pts), ternaries 4 (5 pts) (nesting depth added 6). Most of this is not in the body itself: 2 of the 33 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 156, a function literal at line 115, 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 · use-camera-activity.useCameraMotionNextTimestamp (cognitive 33) · ×1
  • use-camera-activity.useCameraMotionNextTimestamp (cognitive 33) web/src/hooks/use-camera-activity.ts:205 — use-camera-activity.useCameraMotionNextTimestamp has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 11, loops 2 (nesting depth added 7). None of this is in the body itself: all 33 points belong to 4 function literals inside it that branch (lines 217, 290, 256, …). 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 · MediaSyncSettingsView.MediaSyncSettingsView (cognitive 33) · ×1
  • MediaSyncSettingsView.MediaSyncSettingsView (cognitive 33) web/src/views/settings/MediaSyncSettingsView.tsx:20 — MediaSyncSettingsView.MediaSyncSettingsView has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 22, if/else 5, ternaries 4 (5 pts), error handling 1 (nesting depth added 1). Of this number, 22 points are the body's own statements and 11 belong to 4 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 · chat.chat_completion (cognitive 32) · ×1
  • chat.chat_completion (cognitive 32) frigate/api/chat.py:1449 — chat.chat_completion has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3, ternaries 1 (3 pts), loops 2, error handling 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 · media.event_snapshot_clean (cognitive 32) · ×1
  • media.event_snapshot_clean (cognitive 32) frigate/api/media.py:1305 — media.event_snapshot_clean has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (2 pts), ternaries 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 · review.review_summary (cognitive 32) · ×1
  • review.review_summary (cognitive 32) frigate/api/review.py:221 — review.review_summary has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 5 (9 pts), boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · WebPushClient.publish (cognitive 32) · ×1
  • WebPushClient.publish (cognitive 32) frigate/comms/webpush.py:324 — WebPushClient.publish has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 5, 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 · GenAIClient.generate_review_description (cognitive 32) · ×1
  • GenAIClient.generate_review_description (cognitive 32) frigate/genai/__init__.py:102 — GenAIClient.generate_review_description has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 4 (9 pts), loops 2 (6 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 · PtzAutoTracker._process_move_queue (cognitive 32) · ×1
  • PtzAutoTracker._process_move_queue (cognitive 32) frigate/ptz/autotrack.py:709 — PtzAutoTracker._process_move_queue has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 5, error handling 1 (2 pts), loops 2 (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 · PtzAutoTracker._get_zoom_amount (cognitive 32) · ×1
  • PtzAutoTracker._get_zoom_amount (cognitive 32) frigate/ptz/autotrack.py:1170 — PtzAutoTracker._get_zoom_amount has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 3 (10 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MultiprocessingWaiter.run (cognitive 32) · ×1
  • MultiprocessingWaiter.run (cognitive 32) frigate/service_manager/multiprocessing_waiter.py:49 — MultiprocessingWaiter.run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 6 (12 pts), error handling 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runtime_deps._extract_archive (cognitive 32) · ×1
  • runtime_deps._extract_archive (cognitive 32) frigate/util/runtime_deps.py:322 — runtime_deps._extract_archive has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (10 pts), boolean chains 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 · ConfigEditor.ConfigEditor (cognitive 32) · ×1
  • ConfigEditor.ConfigEditor (cognitive 32) web/src/pages/ConfigEditor.tsx:29 — ConfigEditor.ConfigEditor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20, boolean chains 9, error handling 2, ternaries 1. Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 110, 55, 165, …). 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 · CameraManagementView.CameraManagementView (cognitive 32) · ×1
  • CameraManagementView.CameraManagementView (cognitive 32) web/src/views/settings/CameraManagementView.tsx:91 — CameraManagementView.CameraManagementView has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, if/else 10 (13 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 157, 133, 107, …). 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 · CameraManagementView.CameraStatusSelect (cognitive 32) · ×1
  • CameraManagementView.CameraStatusSelect (cognitive 32) web/src/views/settings/CameraManagementView.tsx:531 — CameraManagementView.CameraStatusSelect has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 13, ternaries 4 (9 pts), if/else 6, error handling 2 (4 pts) (nesting depth added 7). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 559). 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 · event.update_trigger_embedding (cognitive 31) · ×1
  • event.update_trigger_embedding (cognitive 31) frigate/api/event.py:2043 — event.update_trigger_embedding has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), error handling 4 (8 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NorfairTracker.update_position (cognitive 31) · ×1
  • NorfairTracker.update_position (cognitive 31) frigate/track/norfair_tracker.py:368 — NorfairTracker.update_position has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 4, ternaries 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 · ExportCard.ExportCard (cognitive 31) · ×1
  • ExportCard.ExportCard (cognitive 31) web/src/components/card/ExportCard.tsx:117 — ExportCard.ExportCard has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, if/else 11 (12 pts), ternaries 4 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 13 of the 31 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 296, 149, 144, …). 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 · ChatMessage.MessageBubble (cognitive 31) · ×1
  • ChatMessage.MessageBubble (cognitive 31) web/src/components/chat/ChatMessage.tsx:55 — ChatMessage.MessageBubble has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 16, ternaries 6 (8 pts), if/else 7 (nesting depth added 2). Of this number, 17 points are the body's own statements and 14 belong to 7 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 · CameraPathWidget.CameraPathWidget (cognitive 31) · ×1
  • CameraPathWidget.CameraPathWidget (cognitive 31) web/src/components/config-form/theme/widgets/CameraPathWidget.tsx:43 — CameraPathWidget.CameraPathWidget has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 13 (15 pts), boolean chains 12, if/else 4 (nesting depth added 2). Of this number, 20 points are the body's own statements and 11 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 · use-config-schema.extractSectionSchema (cognitive 31) · ×1
  • use-config-schema.extractSectionSchema (cognitive 31) web/src/hooks/use-config-schema.ts:27 — use-config-schema.extractSectionSchema has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 6 (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 · auth.get_remote_addr (cognitive 30) · ×1
  • auth.get_remote_addr (cognitive 30) frigate/api/auth.py:310 — auth.get_remote_addr has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 5, ternaries 2 (5 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chat._execute_search_objects_semantic (cognitive 30) · ×1
  • chat._execute_search_objects_semantic (cognitive 30) frigate/api/chat.py:252 — chat._execute_search_objects_semantic has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 3 (6 pts), boolean chains 2, error handling 2, loops 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, 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 · RecordingExporter._build_chapter_metadata_file (cognitive 30) · ×1
  • RecordingExporter._build_chapter_metadata_file (cognitive 30) frigate/record/export.py:883 — RecordingExporter._build_chapter_metadata_file has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, loops 3 (4 pts), error handling 2, ternaries 1 (2 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 · classification._load_event_classification_crop (cognitive 30) · ×1
  • classification._load_event_classification_crop (cognitive 30) frigate/util/classification.py:895 — classification._load_event_classification_crop has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 5 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · media.sync_event_snapshots (cognitive 30) · ×1
  • media.sync_event_snapshots (cognitive 30) frigate/util/media.py:276 — media.sync_event_snapshots has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (8 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ws.applyCameraActivity (cognitive 30) · ×1
  • ws.applyCameraActivity (cognitive 30) web/src/api/ws.ts:156 — ws.applyCameraActivity has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 12 (24 pts), if/else 3 (4 pts), error handling 1, loops 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 · CameraInputsField.CameraInputsField (cognitive 30) · ×1
  • CameraInputsField.CameraInputsField (cognitive 30) web/src/components/config-form/theme/fields/CameraInputsField.tsx:107 — CameraInputsField.CameraInputsField has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 12, boolean chains 9, if/else 8, loops 1. Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 309, 417, 148, …). 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 · SearchFilterGroup.SearchFilterGroup (cognitive 30) · ×1
  • SearchFilterGroup.SearchFilterGroup (cognitive 30) web/src/components/filter/SearchFilterGroup.tsx:39 — SearchFilterGroup.SearchFilterGroup has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16, boolean chains 12, ternaries 2. Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 66, 143, 52, …). 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 · ImagePicker.ImagePicker (cognitive 30) · ×1
  • ImagePicker.ImagePicker (cognitive 30) web/src/components/overlay/ImagePicker.tsx:29 — ImagePicker.ImagePicker has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (12 pts), ternaries 4 (6 pts) (nesting depth added 6). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 174, a function literal at line 54, a function literal at line 69, …). 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 · MemryXDetector.check_and_prepare_model (cognitive 29) · ×1
  • MemryXDetector.check_and_prepare_model (cognitive 29) REDACTED:246 — MemryXDetector.check_and_prepare_model has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 4 (6 pts), error handling 1 (2 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 · LlamaCppClient.embed (cognitive 29) · ×1
  • LlamaCppClient.embed (cognitive 29) frigate/genai/plugins/llama_cpp.py:709 — LlamaCppClient.embed has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 4 (6 pts), boolean chains 4, ternaries 2 (4 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 · OllamaClient._build_request_params (cognitive 29) · ×1
  • OllamaClient._build_request_params (cognitive 29) frigate/genai/plugins/ollama.py:433 — OllamaClient._build_request_params has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1 (5 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OllamaClient.chat_with_tools_stream (cognitive 29) · ×1
  • OllamaClient.chat_with_tools_stream (cognitive 29) frigate/genai/plugins/ollama.py:571 — OllamaClient.chat_with_tools_stream has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, error handling 2, 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 · StatsEmitter.get_stats_history (cognitive 29) · ×1
  • StatsEmitter.get_stats_history (cognitive 29) frigate/stats/emitter.py:126 — StatsEmitter.get_stats_history has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 5 (10 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 · util.stats_snapshot (cognitive 29) · ×1
  • util.stats_snapshot (cognitive 29) frigate/stats/util.py:248 — util.stats_snapshot has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 7 (8 pts), ternaries 3 (6 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NorfairTracker.match_and_update (cognitive 29) · ×1
  • NorfairTracker.match_and_update (cognitive 29) frigate/track/norfair_tracker.py:541 — NorfairTracker.match_and_update has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 5, boolean chains 3, ternaries 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 · camera_cleanup.cleanup_camera_files (cognitive 29) · ×1
  • camera_cleanup.cleanup_camera_files (cognitive 29) frigate/util/camera_cleanup.py:105 — camera_cleanup.cleanup_camera_files has cognitive complexity 29 (threshold 15). Drivers by points: error handling 6 (15 pts), loops 6 (7 pts), if/else 3 (6 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 · SetPasswordDialog.SetPasswordDialog (cognitive 29) · ×1
  • SetPasswordDialog.SetPasswordDialog (cognitive 29) web/src/components/overlay/SetPasswordDialog.tsx:47 — SetPasswordDialog.SetPasswordDialog has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11, if/else 7 (10 pts), boolean chains 8 (nesting depth added 3). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 149, a function literal at line 291, a function literal at line 388, …). 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 · CreateTriggerDialog.CreateTriggerDialog (cognitive 29) · ×1
  • CreateTriggerDialog.CreateTriggerDialog (cognitive 29) web/src/components/overlay/CreateTriggerDialog.tsx:70 — CreateTriggerDialog.CreateTriggerDialog has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10, ternaries 10, boolean chains 9. Most of this is not in the body itself: 12 of the 29 points are its own statements and the rest belongs to 10 function items inside it that branch (onSubmit, a function literal at line 82, a function literal at line 91, …). 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 · configUtil.extractSectionSchema (cognitive 29) · ×1
  • configUtil.extractSectionSchema (cognitive 29) web/src/utils/configUtil.ts:583 — configUtil.extractSectionSchema has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 6 (nesting depth added 12). 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 · Go2RtcStreamsSettingsView.StreamUrlEntry (cognitive 29) · ×1
  • Go2RtcStreamsSettingsView.StreamUrlEntry (cognitive 29) web/src/views/settings/Go2RtcStreamsSettingsView.tsx:816 — Go2RtcStreamsSettingsView.StreamUrlEntry has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 16, ternaries 6 (8 pts), if/else 5 (nesting depth added 2). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 836, 849, 870, …). 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 · EnrichmentMetrics.EnrichmentMetrics (cognitive 29) · ×1
  • EnrichmentMetrics.EnrichmentMetrics (cognitive 29) web/src/views/system/EnrichmentMetrics.tsx:23 — EnrichmentMetrics.EnrichmentMetrics has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 6, ternaries 3 (4 pts) (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 9 function literals inside it that branch (lines 167, 41, 116, …). 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 · generate_ui_tabs.process_file (cognitive 28) · ×1
  • generate_ui_tabs.process_file (cognitive 28) docs/scripts/generate_ui_tabs.py:55 — generate_ui_tabs.process_file has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 5, 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 · auth.auth (cognitive 28) · ×1
  • auth.auth (cognitive 28) frigate/api/auth.py:716 — auth.auth has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · chat._execute_pending_tools (cognitive 28) · ×1
  • chat._execute_pending_tools (cognitive 28) frigate/api/chat.py:1301 — chat._execute_pending_tools has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, ternaries 2 (4 pts), error handling 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 · Dispatcher.reapply_runtime_state_to_config (cognitive 28) · ×1
  • Dispatcher.reapply_runtime_state_to_config (cognitive 28) frigate/comms/dispatcher.py:616 — Dispatcher.reapply_runtime_state_to_config has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 4, loops 2 (3 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 · FaceRealTimeProcessor.handle_request (cognitive 28) · ×1
  • FaceRealTimeProcessor.handle_request (cognitive 28) frigate/data_processing/real_time/face.py:273 — FaceRealTimeProcessor.handle_request has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (27 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 · ReviewSegmentMaintainer.check_if_new_segment (cognitive 28) · ×1
  • ReviewSegmentMaintainer.check_if_new_segment (cognitive 28) frigate/review/maintainer.py:713 — ReviewSegmentMaintainer.check_if_new_segment has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (5 pts), error handling 1 (3 pts), boolean chains 2 (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 · media.sync_previews (cognitive 28) · ×1
  • media.sync_previews (cognitive 28) frigate/util/media.py:555 — media.sync_previews has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 4 (7 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · object_names.get_categorized_object_names (cognitive 28) · ×1
  • object_names.get_categorized_object_names (cognitive 28) frigate/util/object_names.py:22 — object_names.get_categorized_object_names has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 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 · analyze_recording_keyframes.analyze (cognitive 28) · ×1
  • analyze_recording_keyframes.analyze (cognitive 28) testing-scripts/analyze_recording_keyframes.py:189 — analyze_recording_keyframes.analyze has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 4 (6 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · object_dataset.main (cognitive 28) · ×1
  • object_dataset.main (cognitive 28) testing-scripts/object_dataset.py:856 — object_dataset.main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (24 pts), error handling 1 (2 pts), boolean chains 1, 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 · LiveStreamsField.LiveStreamsField (cognitive 28) · ×1
  • LiveStreamsField.LiveStreamsField (cognitive 28) web/src/components/config-form/theme/fields/LiveStreamsField.tsx:330 — LiveStreamsField.LiveStreamsField has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 10, ternaries 4, error handling 1, loops 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 456, a function literal at line 342, a function literal at line 365, …). 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 · Step1NameCamera.Step1NameCamera (cognitive 28) · ×1
  • Step1NameCamera.Step1NameCamera (cognitive 28) web/src/components/settings/wizard/Step1NameCamera.tsx:50 — Step1NameCamera.Step1NameCamera has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 19, ternaries 6, if/else 3. Of this number, 20 points are the body's own statements and 8 belong to 8 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 · UiSettingsView.UiSettingsView (cognitive 28) · ×1
  • UiSettingsView.UiSettingsView (cognitive 28) web/src/views/settings/UiSettingsView.tsx:142 — UiSettingsView.UiSettingsView has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 11, if/else 9, match/switch 3, ternaries 2 (3 pts), error handling 2 (nesting depth added 1). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 259, 232, 299, …). 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 · generate_ui_tabs.regenerate_file (cognitive 27) · ×1
  • generate_ui_tabs.regenerate_file (cognitive 27) docs/scripts/generate_ui_tabs.py:183 — generate_ui_tabs.regenerate_file has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 5, 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 · event.set_attributes (cognitive 27) · ×1
  • event.set_attributes (cognitive 27) frigate/api/event.py:1447 — event.set_attributes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (7 pts), boolean chains 5, error handling 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 · CameraActivityManager.update_activity (cognitive 27) · ×1
  • CameraActivityManager.update_activity (cognitive 27) frigate/camera/activity_manager.py:98 — CameraActivityManager.update_activity has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, loops 3 (4 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 · review_annotations.build_timeline (cognitive 27) · ×1
  • review_annotations.build_timeline (cognitive 27) frigate/data_processing/post/review_annotations.py:212 — review_annotations.build_timeline has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (6 pts), ternaries 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 · OpenVINOModelRunner.run (cognitive 27) · ×1
  • OpenVINOModelRunner.run (cognitive 27) frigate/detectors/detection_runners.py:556 — OpenVINOModelRunner.run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 pts), error handling 2 (5 pts), boolean chains 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 · config.migrate_frigate_config (cognitive 27) · ×1
  • config.migrate_frigate_config (cognitive 27) frigate/util/config.py:193 — config.migrate_frigate_config has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5, loops 1 (3 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 · config.migrate_017_0 (cognitive 27) · ×1
  • config.migrate_017_0 (cognitive 27) frigate/util/config.py:558 — config.migrate_017_0 has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rknn_converter.wait_for_conversion_completion (cognitive 27) · ×1
  • rknn_converter.wait_for_conversion_completion (cognitive 27) frigate/util/rknn_converter.py:280 — rknn_converter.wait_for_conversion_completion has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ReviewCard.ReviewCard (cognitive 27) · ×1
  • ReviewCard.ReviewCard (cognitive 27) web/src/components/card/ReviewCard.tsx:50 — ReviewCard.ReviewCard has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 9, if/else 7 (nesting depth added 1). Of this number, 18 points are the body's own statements and 9 belong to 6 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 · Step2StateArea.Step2StateArea (cognitive 27) · ×1
  • Step2StateArea.Step2StateArea (cognitive 27) web/src/components/classification/wizard/Step2StateArea.tsx:37 — Step2StateArea.Step2StateArea has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 91, 116, 86, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GenAIRolesWidget.GenAIRolesWidget (cognitive 27) · ×1
  • GenAIRolesWidget.GenAIRolesWidget (cognitive 27) web/src/components/config-form/theme/widgets/GenAIRolesWidget.tsx:55 — GenAIRolesWidget.GenAIRolesWidget has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, loops 2 (3 pts), ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 128, capabilityOf, toggleRole, …). 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 · PreviewPlayer.PreviewVideoPlayer (cognitive 27) · ×1
  • PreviewPlayer.PreviewVideoPlayer (cognitive 27) web/src/components/player/PreviewPlayer.tsx:121 — PreviewPlayer.PreviewVideoPlayer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15, boolean chains 11, ternaries 1. Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 209, 185, 143, …). 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-camera-activity.useCameraActivity (cognitive 27) · ×1
  • use-camera-activity.useCameraActivity (cognitive 27) web/src/hooks/use-camera-activity.ts:47 — use-camera-activity.useCameraActivity has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 7 (9 pts), boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 117, 105, 87, …). 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 · Live.Live (cognitive 27) · ×1
  • Live.Live (cognitive 27) web/src/pages/Live.tsx:16 — Live.Live has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 9, ternaries 2 (3 pts), match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 29, 70, 92, …). 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 · chatUtil.getFindSimilarObjectsFromToolCalls (cognitive 27) · ×1
  • chatUtil.getFindSimilarObjectsFromToolCalls (cognitive 27) web/src/utils/chatUtil.ts:307 — chatUtil.getFindSimilarObjectsFromToolCalls has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AudioEventMaintainer.run (cognitive 26) · ×1
  • AudioEventMaintainer.run (cognitive 26) frigate/events/audio.py:426 — AudioEventMaintainer.run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 1, 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 · PtzAutoTracker.autotrack_object (cognitive 26) · ×1
  • PtzAutoTracker.autotrack_object (cognitive 26) frigate/ptz/autotrack.py:1259 — PtzAutoTracker.autotrack_object has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 3 (nesting depth added 12). 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 · OnvifController._poll_config_updates (cognitive 26) · ×1
  • OnvifController._poll_config_updates (cognitive 26) REDACTED:98 — OnvifController._poll_config_updates has cognitive complexity 26 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (8 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · env.substitute_frigate_vars (cognitive 26) · ×1
  • env.substitute_frigate_vars (cognitive 26) frigate/util/env.py:209 — env.substitute_frigate_vars has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 3, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · object.get_cluster_candidates (cognitive 26) · ×1
  • object.get_cluster_candidates (cognitive 26) frigate/util/object.py:392 — object.get_cluster_candidates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (7 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 · rknn_converter.auto_convert_model (cognitive 26) · ×1
  • rknn_converter.auto_convert_model (cognitive 26) frigate/util/rknn_converter.py:359 — rknn_converter.auto_convert_model has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventSegment.EventSegment (cognitive 26) · ×1
  • EventSegment.EventSegment (cognitive 26) web/src/components/timeline/EventSegment.tsx:37 — EventSegment.EventSegment has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 9, if/else 5 (7 pts) (nesting depth added 5). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 170, 134, 227, …). 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 · auth.resolve_role (cognitive 25) · ×1
  • auth.resolve_role (cognitive 25) frigate/api/auth.py:570 — auth.resolve_role has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · camera.delete_camera (cognitive 25) · ×1
  • camera.delete_camera (cognitive 25) REDACTED:1245 — camera.delete_camera has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, error handling 4, loops 2 (4 pts), ternaries 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 · media.preview_mp4 (cognitive 25) · ×1
  • media.preview_mp4 (cognitive 25) frigate/api/media.py:1671 — media.preview_mp4 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuntimeMotionConfig.__init__ (cognitive 25) · ×1
  • RuntimeMotionConfig.__init__ (cognitive 25) frigate/config/config.py:139 — RuntimeMotionConfig.__init__ has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (8 pts), loops 2 (3 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 · FrigateMotionDetector.detect (cognitive 25) · ×1
  • FrigateMotionDetector.detect (cognitive 25) frigate/motion/frigate_motion.py:47 — FrigateMotionDetector.detect has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (5 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 · RecordingCleanup.expire_existing_camera_recordings (cognitive 25) · ×1
  • RecordingCleanup.expire_existing_camera_recordings (cognitive 25) frigate/record/cleanup.py:144 — RecordingCleanup.expire_existing_camera_recordings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (4 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 · config.migrate_models (cognitive 25) · ×1
  • config.migrate_models (cognitive 25) frigate/util/config.py:950 — config.migrate_models has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, ternaries 2 (4 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 · services.find_restricted_go2rtc_stream_changes (cognitive 25) · ×1
  • services.find_restricted_go2rtc_stream_changes (cognitive 25) frigate/util/services.py:1176 — services.find_restricted_go2rtc_stream_changes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (13 pts), error handling 2 (6 pts), loops 2 (3 pts), ternaries 2, boolean chains 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 · HardwarePicker.HardwarePicker (cognitive 25) · ×1
  • HardwarePicker.HardwarePicker (cognitive 25) web/src/components/config-form/theme/fields/HardwarePicker.tsx:33 — HardwarePicker.HardwarePicker has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 7, boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 86, 195, 114, …). 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 · CameraGroupSelector.CameraGroupEdit (cognitive 25) · ×1
  • CameraGroupSelector.CameraGroupEdit (cognitive 25) web/src/components/filter/CameraGroupSelector.tsx:734 — CameraGroupSelector.CameraGroupEdit has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (6 pts), ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 802, 842, 954, …). 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 · VideoControls.VideoControls (cognitive 25) · ×1
  • VideoControls.VideoControls (cognitive 25) web/src/components/player/VideoControls.tsx:84 — VideoControls.VideoControls has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 8 (10 pts), ternaries 2, match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 153, 140, 219, …). 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 · ExportDialog.ExportDialog (cognitive 25) · ×1
  • ExportDialog.ExportDialog (cognitive 25) web/src/components/overlay/ExportDialog.tsx:102 — ExportDialog.ExportDialog has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11, boolean chains 8, ternaries 5, error handling 1. Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 146, 128, 245, …). 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 · SearchFilterDialog.SearchFilterDialog (cognitive 25) · ×1
  • SearchFilterDialog.SearchFilterDialog (cognitive 25) REDACTED:58 — SearchFilterDialog.SearchFilterDialog has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 12 (15 pts), boolean chains 7, if/else 3 (nesting depth added 3). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 196, 90, 79, …). 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 · CreateUserDialog.CreateUserDialog (cognitive 25) · ×1
  • CreateUserDialog.CreateUserDialog (cognitive 25) web/src/components/overlay/CreateUserDialog.tsx:60 — CreateUserDialog.CreateUserDialog has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 14, boolean chains 10, if/else 1. Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 213, 308, 73, …). 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 · DetailStream.ReviewGroup (cognitive 25) · ×1
  • DetailStream.ReviewGroup (cognitive 25) web/src/components/timeline/DetailStream.tsx:384 — DetailStream.ReviewGroup has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 9, ternaries 8 (9 pts), if/else 3 (6 pts), loops 1 (nesting depth added 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · classification.get_custom_attributes (cognitive 24) · ×1
  • classification.get_custom_attributes (cognitive 24) frigate/api/classification.py:755 — classification.get_custom_attributes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, loops 3 (5 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 · Rknn.parse_model_input (cognitive 24) · ×1
  • Rknn.parse_model_input (cognitive 24) REDACTED:105 — Rknn.parse_model_input has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventCleanup.expire_snapshots (cognitive 24) · ×1
  • EventCleanup.expire_snapshots (cognitive 24) frigate/events/cleanup.py:66 — EventCleanup.expire_snapshots has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 7 (12 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VLMWatchRunner._wait_for_trigger (cognitive 24) · ×1
  • VLMWatchRunner._wait_for_trigger (cognitive 24) frigate/jobs/vlm_watch.py:230 — VLMWatchRunner._wait_for_trigger has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 1, ternaries 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 · RecordingExporter.get_preview_export_command (cognitive 24) · ×1
  • RecordingExporter.get_preview_export_command (cognitive 24) frigate/record/export.py:1322 — RecordingExporter.get_preview_export_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · face_dataset.contamination_analysis (cognitive 24) · ×1
  • face_dataset.contamination_analysis (cognitive 24) testing-scripts/face_dataset.py:583 — face_dataset.contamination_analysis has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (7 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CameraGroupSelector.NewGroupDialog (cognitive 24) · ×1
  • CameraGroupSelector.NewGroupDialog (cognitive 24) web/src/components/filter/CameraGroupSelector.tsx:335 — CameraGroupSelector.NewGroupDialog has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), ternaries 5 (nesting depth added 1). Of this number, 15 points are the body's own statements and 9 belong to 4 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 · SearchDetailDialog.SearchDetailDialog (cognitive 24) · ×1
  • SearchDetailDialog.SearchDetailDialog (cognitive 24) web/src/components/overlay/detail/SearchDetailDialog.tsx:439 — SearchDetailDialog.SearchDetailDialog has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11, boolean chains 7, ternaries 6. Of this number, 12 points are the body's own statements and 12 belong to 7 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 · DetailStream.LifecycleItem (cognitive 24) · ×1
  • DetailStream.LifecycleItem (cognitive 24) web/src/components/timeline/DetailStream.tsx:777 — DetailStream.LifecycleItem has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, ternaries 9 (10 pts), if/else 2 (nesting depth added 1). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 788, 816, 824, …). 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-config-override.collectFieldDeltas (cognitive 24) · ×1
  • use-config-override.collectFieldDeltas (cognitive 24) web/src/hooks/use-config-override.ts:597 — use-config-override.collectFieldDeltas has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 2 (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 · use-keyboard-listener.useKeyboardListener (cognitive 24) · ×1
  • use-keyboard-listener.useKeyboardListener (cognitive 24) web/src/hooks/use-keyboard-listener.tsx:20 — use-keyboard-listener.useKeyboardListener has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, match/switch 1 (2 pts), ternaries 1 (nesting depth added 3). None of this is in the body itself: all 24 points belong to 3 function literals inside it that branch (lines 34, 95, 26). 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 · cameraClone.stripAutoDefaultFilters (cognitive 24) · ×1
  • cameraClone.stripAutoDefaultFilters (cognitive 24) web/src/utils/cameraClone.ts:62 — cameraClone.stripAutoDefaultFilters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ui_generator._format_value (cognitive 23) · ×1
  • ui_generator._format_value (cognitive 23) docs/scripts/lib/ui_generator.py:12 — ui_generator._format_value has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 7 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · event.create_trigger_embedding (cognitive 23) · ×1
  • event.create_trigger_embedding (cognitive 23) frigate/api/event.py:1890 — event.create_trigger_embedding has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 3 (5 pts), boolean chains 2, ternaries 1 (2 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 · FrigateConfig._load_models (cognitive 23) · ×1
  • FrigateConfig._load_models (cognitive 23) frigate/config/config.py:842 — FrigateConfig._load_models has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 pts), ternaries 1 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HailoDetector.detect_raw (cognitive 23) · ×1
  • HailoDetector.detect_raw (cognitive 23) REDACTED:394 — HailoDetector.detect_raw has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 2 (3 pts), error handling 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 · OvDetector.__init__ (cognitive 23) · ×1
  • OvDetector.__init__ (cognitive 23) frigate/detectors/plugins/openvino.py:48 — OvDetector.__init__ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 1 (3 pts), loops 1 (2 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 · OnvifController.get_camera_status (cognitive 23) · ×1
  • OnvifController.get_camera_status (cognitive 23) REDACTED:931 — OnvifController.get_camera_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, error handling 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 · RecordingExporter.save_thumbnail (cognitive 23) · ×1
  • RecordingExporter.save_thumbnail (cognitive 23) frigate/record/export.py:1086 — RecordingExporter.save_thumbnail has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (2 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimelineProcessor.handle_object_detection (cognitive 23) · ×1
  • TimelineProcessor.handle_object_detection (cognitive 23) frigate/timeline.py:81 — TimelineProcessor.handle_object_detection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (4 pts), ternaries 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 · live_streams.raw_transcode_streams (cognitive 23) · ×1
  • live_streams.raw_transcode_streams (cognitive 23) frigate/util/live_streams.py:77 — live_streams.raw_transcode_streams has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (10 pts), 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 · AnimatedEventCard.AnimatedEventCard (cognitive 23) · ×1
  • AnimatedEventCard.AnimatedEventCard (cognitive 23) web/src/components/card/AnimatedEventCard.tsx:33 — AnimatedEventCard.AnimatedEventCard has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, ternaries 4 (5 pts), if/else 4 (nesting depth added 1). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 67, 59, 108, …). 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 · ClassificationCard.ClassificationCard (cognitive 23) · ×1
  • ClassificationCard.ClassificationCard (cognitive 23) web/src/components/card/ClassificationCard.tsx:62 — ClassificationCard.ClassificationCard has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 9 belong to 3 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 · WrapIfAdditionalTemplate.WrapIfAdditionalTemplate (cognitive 23) · ×1
  • WrapIfAdditionalTemplate.WrapIfAdditionalTemplate (cognitive 23) REDACTED:26 — WrapIfAdditionalTemplate.WrapIfAdditionalTemplate has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, ternaries 7, if/else 5. Of this number, 17 points are the body's own statements and 6 belong to 3 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 · section-special-cases.sanitizeOverridesForSection (cognitive 23) · ×1
  • section-special-cases.sanitizeOverridesForSection (cognitive 23) web/src/components/config-form/sections/section-special-cases.ts:396 — section-special-cases.sanitizeOverridesForSection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, ternaries 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 11 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 · ReviewFilterGroup.ReviewFilterGroup (cognitive 23) · ×1
  • ReviewFilterGroup.ReviewFilterGroup (cognitive 23) web/src/components/filter/ReviewFilterGroup.tsx:53 — ReviewFilterGroup.ReviewFilterGroup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, boolean chains 10, ternaries 2. Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 70, 84, 107, …). 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-webrtc-availability.useWebRTCGloballyAvailable (cognitive 23) · ×1
  • use-webrtc-availability.useWebRTCGloballyAvailable (cognitive 23) web/src/hooks/use-webrtc-availability.ts:106 — use-webrtc-availability.useWebRTCGloballyAvailable has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 6, ternaries 3 (5 pts) (nesting depth added 2). None of this is in the body itself: all 23 points belong to 9 function literals inside it that branch (lines 219, 188, 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.
D2 · Cognitive Complexity · health.enrichmentRows (cognitive 23) · ×1
  • health.enrichmentRows (cognitive 23) web/src/utils/health.ts:608 — health.enrichmentRows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10, ternaries 5 (7 pts), boolean chains 6 (nesting depth added 2). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 618). 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 · SingleSectionPage.SingleSectionPage (cognitive 23) · ×1
  • SingleSectionPage.SingleSectionPage (cognitive 23) web/src/views/settings/SingleSectionPage.tsx:64 — SingleSectionPage.SingleSectionPage has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, ternaries 7, if/else 2. Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · chat._execute_get_event_image (cognitive 22) · ×1
  • chat._execute_get_event_image (cognitive 22) frigate/api/chat.py:876 — chat._execute_get_event_image has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 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.
D2 · Cognitive Complexity · export.export_recordings_batch (cognitive 22) · ×1
  • export.export_recordings_batch (cognitive 22) frigate/api/export.py:660 — export.export_recordings_batch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, loops 3, 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 · media.preview_gif (cognitive 22) · ×1
  • media.preview_gif (cognitive 22) frigate/api/media.py:1498 — media.preview_gif has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (2 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 · record.no_recordings (cognitive 22) · ×1
  • record.no_recordings (cognitive 22) frigate/api/record.py:400 — record.no_recordings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 4 (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 · ws._scope_job_entry_to_allowed (cognitive 22) · ×1
  • ws._scope_job_entry_to_allowed (cognitive 22) frigate/comms/ws.py:240 — ws._scope_job_entry_to_allowed has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 10). 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 · HypothesisBuffer.insert (cognitive 22) · ×1
  • HypothesisBuffer.insert (cognitive 22) frigate/data_processing/real_time/whisper_online.py:409 — HypothesisBuffer.insert has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (10 pts) (nesting depth added 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · media.sync_review_thumbnails (cognitive 22) · ×1
  • media.sync_review_thumbnails (cognitive 22) frigate/util/media.py:470 — media.sync_review_thumbnails has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (4 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 · recording_coverage.stream_media_summary (cognitive 22) · ×1
  • recording_coverage.stream_media_summary (cognitive 22) frigate/util/recording_coverage.py:134 — recording_coverage.stream_media_summary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (8 pts), ternaries 1 (2 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 · services.get_nvidia_gpu_stats (cognitive 22) · ×1
  • services.get_nvidia_gpu_stats (cognitive 22) frigate/util/services.py:936 — services.get_nvidia_gpu_stats has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScrubbablePreview.InProgressPreview (cognitive 22) · ×1
  • ScrubbablePreview.InProgressPreview (cognitive 22) web/src/components/preview/ScrubbablePreview.tsx:301 — ScrubbablePreview.InProgressPreview has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 328, 360, 404, …). 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 · Step1NameAndDefine.Step1NameAndDefine (cognitive 22) · ×1
  • Step1NameAndDefine.Step1NameAndDefine (cognitive 22) web/src/components/classification/wizard/Step1NameAndDefine.tsx:55 — Step1NameAndDefine.Step1NameAndDefine has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 6. Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 70, a function literal at line 138, handleRemoveClass, …). 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 · SwitchesWidget.SwitchesWidget (cognitive 22) · ×1
  • SwitchesWidget.SwitchesWidget (cognitive 22) web/src/components/config-form/theme/widgets/SwitchesWidget.tsx:75 — SwitchesWidget.SwitchesWidget has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 6, ternaries 4. Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 98, a function literal at line 145, a function literal at line 156, …). 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 · ModelsField.ModelsField (cognitive 22) · ×1
  • ModelsField.ModelsField (cognitive 22) web/src/components/config-form/theme/fields/ModelsField.tsx:101 — ModelsField.ModelsField has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, ternaries 7, if/else 5, loops 2. Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 337, 157, 262, …). 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 · section-special-cases.modifyObjectsSchema (cognitive 22) · ×1
  • section-special-cases.modifyObjectsSchema (cognitive 22) web/src/components/config-form/sections/section-special-cases.ts:165 — section-special-cases.modifyObjectsSchema has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 5, boolean chains 3, loops 3 (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 · CustomTimeSelector.CustomTimeSelector (cognitive 22) · ×1
  • CustomTimeSelector.CustomTimeSelector (cognitive 22) web/src/components/overlay/CustomTimeSelector.tsx:23 — CustomTimeSelector.CustomTimeSelector has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12, if/else 8, boolean chains 2. Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 52, 62, 152, …). 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 · ImageEntry.ImageEntry (cognitive 22) · ×1
  • ImageEntry.ImageEntry (cognitive 22) web/src/components/input/ImageEntry.tsx:25 — ImageEntry.ImageEntry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, ternaries 2 (3 pts), loops 1 (nesting depth added 7). None of this is in the body itself: all 22 points belong to 6 function literals inside it that branch (lines 86, 129, 36, …). 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 · ZoneEditPane.ZoneObjectSelector (cognitive 22) · ×1
  • ZoneEditPane.ZoneObjectSelector (cognitive 22) web/src/components/settings/ZoneEditPane.tsx:981 — ZoneEditPane.ZoneObjectSelector has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 6). None of this is in the body itself: all 22 points belong to 7 function literals inside it that branch (lines 1073, 1004, 998, …). 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-config-override.deriveSyntheticGlobalValue (cognitive 22) · ×1
  • use-config-override.deriveSyntheticGlobalValue (cognitive 22) web/src/hooks/use-config-override.ts:712 — use-config-override.deriveSyntheticGlobalValue has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (8 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 · FaceLibrary.FaceAttemptGroup (cognitive 22) · ×1
  • FaceLibrary.FaceAttemptGroup (cognitive 22) web/src/pages/FaceLibrary.tsx:842 — FaceLibrary.FaceAttemptGroup has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 22 points belong to 10 function literals inside it that branch (lines 865, 928, 1006, …). 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 · camera._connect_onvif_camera (cognitive 21) · ×1
  • camera._connect_onvif_camera (cognitive 21) REDACTED:647 — camera._connect_onvif_camera has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (3 pts), error handling 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 · classification.train_face (cognitive 21) · ×1
  • classification.train_face (cognitive 21) frigate/api/classification.py:155 — classification.train_face has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 2 (5 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · InterProcessCommunicator.read (cognitive 21) · ×1
  • InterProcessCommunicator.read (cognitive 21) frigate/comms/inter_process.py:40 — InterProcessCommunicator.read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (7 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 · detection_runners.get_optimized_runner (cognitive 21) · ×1
  • detection_runners.get_optimized_runner (cognitive 21) frigate/detectors/detection_runners.py:770 — detection_runners.get_optimized_runner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, error handling 2 (4 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.
D2 · Cognitive Complexity · _AxeleraRuntimeInference.__init__ (cognitive 21) · ×1
  • _AxeleraRuntimeInference.__init__ (cognitive 21) REDACTED:349 — _AxeleraRuntimeInference.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ActiveObjects.__init__ (cognitive 21) · ×1
  • ActiveObjects.__init__ (cognitive 21) frigate/review/maintainer.py:196 — ActiveObjects.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 8, 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 · HardwareStats.update_stats (cognitive 21) · ×1
  • HardwareStats.update_stats (cognitive 21) frigate/stats/hardware.py:288 — HardwareStats.update_stats has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (4 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 · classification._select_balanced_timestamps (cognitive 21) · ×1
  • classification._select_balanced_timestamps (cognitive 21) frigate/util/classification.py:429 — classification._select_balanced_timestamps 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 · classification._select_distinct_images (cognitive 21) · ×1
  • classification._select_distinct_images (cognitive 21) frigate/util/classification.py:633 — classification._select_distinct_images has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (7 pts), error handling 1 (2 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 · model.get_ort_providers (cognitive 21) · ×1
  • model.get_ort_providers (cognitive 21) frigate/util/model.py:318 — model.get_ort_providers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (7 pts), boolean chains 2, 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 · services.process_logs (cognitive 21) · ×1
  • services.process_logs (cognitive 21) frigate/util/services.py:1747 — services.process_logs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 1 (2 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 · ReviewLabelSwitchesWidget.getReviewLabels (cognitive 21) · ×1
  • ReviewLabelSwitchesWidget.getReviewLabels (cognitive 21) web/src/components/config-form/theme/widgets/ReviewLabelSwitchesWidget.tsx:11 — ReviewLabelSwitchesWidget.getReviewLabels has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). Of this number, 16 points are the body's own statements and 5 belong to one function literal 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 · CameraGroupSelector.CameraGroupSelector (cognitive 21) · ×1
  • CameraGroupSelector.CameraGroupSelector (cognitive 21) web/src/components/filter/CameraGroupSelector.tsx:90 — CameraGroupSelector.CameraGroupSelector has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 7 (8 pts), boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 102, a function literal at line 123, groupButtons, …). 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 · QualitySelector.useQualitySubtitles (cognitive 21) · ×1
  • QualitySelector.useQualitySubtitles (cognitive 21) web/src/components/player/QualitySelector.tsx:51 — QualitySelector.useQualitySubtitles has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 6, boolean chains 3 (nesting depth added 4). None of this is in the body itself: all 21 points belong to 2 function literals inside it that branch (lines 103, 60). 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 · InputWithTags.InputWithTags (cognitive 21) · ×1
  • InputWithTags.InputWithTags (cognitive 21) REDACTED:71 — InputWithTags.InputWithTags has cognitive complexity 21 (threshold 15). Drivers by points: if/else 62 (115 pts), boolean chains 49, ternaries 19 (34 pts), match/switch 1 (2 pts) (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (InputWithTags.InputWithTags::formatFilterValues) 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 · ImportUiSettingsDialog.ImportUiSettingsDialog (cognitive 21) · ×1
  • ImportUiSettingsDialog.ImportUiSettingsDialog (cognitive 21) web/src/components/overlay/dialog/ImportUiSettingsDialog.tsx:34 — ImportUiSettingsDialog.ImportUiSettingsDialog has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 4, ternaries 4. Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 100, 71, 80, …). 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 · VirtualizedMotionSegments.VirtualizedMotionSegments (cognitive 21) · ×1
  • VirtualizedMotionSegments.VirtualizedMotionSegments (cognitive 21) web/src/components/timeline/VirtualizedMotionSegments.tsx:47 — VirtualizedMotionSegments.VirtualizedMotionSegments has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (6 pts), ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 108, 145, 157, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · WsMessageFeed.matchesCategories (cognitive 21) · ×1
  • WsMessageFeed.matchesCategories (cognitive 21) web/src/components/ws/WsMessageFeed.tsx:76 — WsMessageFeed.matchesCategories has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 pts), boolean chains 2, ternaries 1 (2 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 · dateUtil.formatUnixTimestampToDateTime (cognitive 21) · ×1
  • dateUtil.formatUnixTimestampToDateTime (cognitive 21) web/src/utils/dateUtil.ts:134 — dateUtil.formatUnixTimestampToDateTime has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 7, error handling 1, ternaries 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 · event.events_summary (cognitive 20) · ×1
  • event.events_summary (cognitive 20) frigate/api/event.py:915 — event.events_summary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · media.grid_snapshot (cognitive 20) · ×1
  • media.grid_snapshot (cognitive 20) frigate/api/media.py:1151 — media.grid_snapshot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (5 pts), boolean chains 2, error handling 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 · deepx._onnx_nodes (cognitive 20) · ×1
  • deepx._onnx_nodes (cognitive 20) frigate/detectors/plugins/deepx.py:575 — deepx._onnx_nodes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 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 · GenAIEmbedding.__call__ (cognitive 20) · ×1
  • GenAIEmbedding.__call__ (cognitive 20) frigate/embeddings/genai_embedding.py:29 — GenAIEmbedding.__call__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIClient._send (cognitive 20) · ×1
  • OpenAIClient._send (cognitive 20) frigate/genai/plugins/openai.py:67 — OpenAIClient._send has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, ternaries 1 (2 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 · Statusbar.Statusbar (cognitive 20) · ×1
  • Statusbar.Statusbar (cognitive 20) web/src/components/Statusbar.tsx:25 — Statusbar.Statusbar has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 6, if/else 4, match/switch 1 (nesting depth added 4). Of this number, 10 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimeAgo.timeAgo (cognitive 20) · ×1
  • TimeAgo.timeAgo (cognitive 20) web/src/components/dynamic/TimeAgo.tsx:24 — TimeAgo.timeAgo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (7 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.
D2 · Cognitive Complexity · CamerasFilterButton.CamerasFilterContent (cognitive 20) · ×1
  • CamerasFilterButton.CamerasFilterContent (cognitive 20) web/src/components/filter/CamerasFilterButton.tsx:160 — CamerasFilterButton.CamerasFilterContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 6). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 221, 184, 210). 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 · ClassificationSelectionDialog.ClassificationSelectionDialog (cognitive 20) · ×1
  • ClassificationSelectionDialog.ClassificationSelectionDialog (cognitive 20) web/src/components/overlay/ClassificationSelectionDialog.tsx:44 — ClassificationSelectionDialog.ClassificationSelectionDialog has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 6. Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 107, 174, 59, …). 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 · FrigatePlusDialog.FrigatePlusDialog (cognitive 20) · ×1
  • FrigatePlusDialog.FrigatePlusDialog (cognitive 20) web/src/components/overlay/dialog/FrigatePlusDialog.tsx:33 — FrigatePlusDialog.FrigatePlusDialog has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, ternaries 5, if/else 3, error handling 1. Of this number, 13 points are the body's own statements and 7 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 · SetupDetector.SetupDetector (cognitive 20) · ×1
  • SetupDetector.SetupDetector (cognitive 20) web/src/components/setup/SetupDetector.tsx:45 — SetupDetector.SetupDetector has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, ternaries 6 (7 pts), if/else 5, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 122, 188, 69, …). 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 · SetupHwAccel.SetupHwAccel (cognitive 20) · ×1
  • SetupHwAccel.SetupHwAccel (cognitive 20) web/src/components/setup/SetupHwAccel.tsx:34 — SetupHwAccel.SetupHwAccel has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 8, boolean chains 1, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 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 88, a function literal at line 128, a function literal at line 52, …). 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 · MotionReviewTimeline.MotionReviewTimeline (cognitive 20) · ×1
  • MotionReviewTimeline.MotionReviewTimeline (cognitive 20) web/src/components/timeline/MotionReviewTimeline.tsx:58 — MotionReviewTimeline.MotionReviewTimeline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, loops 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 138, 149, 117, …). 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.System (cognitive 20) · ×1
  • System.System (cognitive 20) web/src/pages/System.tsx:49 — System.System has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, if/else 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 12 points are the body's own statements and 8 belong to 5 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 · StorageMetrics.StorageMetrics (cognitive 20) · ×1
  • StorageMetrics.StorageMetrics (cognitive 20) web/src/views/system/StorageMetrics.tsx:30 — StorageMetrics.StorageMetrics has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 94, 42, 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.
D2 · Cognitive Complexity · generate_ui_tabs.main (cognitive 19) · ×1
  • generate_ui_tabs.main (cognitive 19) docs/scripts/generate_ui_tabs.py:430 — generate_ui_tabs.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 1 (3 pts), loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · chat._execute_create_export (cognitive 19) · ×1
  • chat._execute_create_export (cognitive 19) frigate/api/chat.py:801 — chat._execute_create_export has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 3 (4 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · export.export_recording_custom (cognitive 19) · ×1
  • export.export_recording_custom (cognitive 19) frigate/api/export.py:1034 — export.export_recording_custom has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (2 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · config.apply_live_transcode_streams (cognitive 19) · ×1
  • config.apply_live_transcode_streams (cognitive 19) frigate/config/config.py:292 — config.apply_live_transcode_streams has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 2, ternaries 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 · LicensePlateProcessingMixin._get_cluster_rep (cognitive 19) · ×1
  • LicensePlateProcessingMixin._get_cluster_rep (cognitive 19) frigate/data_processing/common/license_plate/mixin.py:1098 — LicensePlateProcessingMixin._get_cluster_rep has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts), 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 · AudioTranscriptionRealTimeProcessor.__process_audio_stream (cognitive 19) · ×1
  • AudioTranscriptionRealTimeProcessor.__process_audio_stream (cognitive 19) frigate/data_processing/real_time/audio_transcription.py:128 — AudioTranscriptionRealTimeProcessor.__process_audio_stream has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, loops 1 (2 pts), error handling 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 · RKNNModelRunner.run (cognitive 19) · ×1
  • RKNNModelRunner.run (cognitive 19) frigate/detectors/detection_runners.py:713 — RKNNModelRunner.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, error handling 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 · ollama._normalize_multimodal_content (cognitive 19) · ×1
  • ollama._normalize_multimodal_content (cognitive 19) frigate/genai/plugins/ollama.py:80 — ollama._normalize_multimodal_content has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (4 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 · HardwareStats._scan_enrichments (cognitive 19) · ×1
  • HardwareStats._scan_enrichments (cognitive 19) frigate/stats/hardware.py:409 — HardwareStats._scan_enrichments has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · builtin.update_yaml (cognitive 19) · ×1
  • builtin.update_yaml (cognitive 19) frigate/util/builtin.py:355 — builtin.update_yaml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, 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 · rknn_converter.convert_onnx_to_rknn (cognitive 19) · ×1
  • rknn_converter.convert_onnx_to_rknn (cognitive 19) frigate/util/rknn_converter.py:171 — rknn_converter.convert_onnx_to_rknn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 3 (5 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 · face_dataset.vector_outlier_test (cognitive 19) · ×1
  • face_dataset.vector_outlier_test (cognitive 19) testing-scripts/face_dataset.py:381 — face_dataset.vector_outlier_test has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 2 (4 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BirdseyeCameraReorder.BirdseyeCameraReorder (cognitive 19) · ×1
  • BirdseyeCameraReorder.BirdseyeCameraReorder (cognitive 19) web/src/components/config-form/sectionExtras/BirdseyeCameraReorder.tsx:18 — BirdseyeCameraReorder.BirdseyeCameraReorder has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 71, 49, 25, …). 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 · InputWithTags.InputWithTags · ×1
  • InputWithTags.InputWithTags::formatFilterValues (cognitive 19) REDACTED:423 — InputWithTags.InputWithTags::formatFilterValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, ternaries 3 (6 pts), boolean chains 5 (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. This shape REPEATS in the file: one other method here (InputWithTags.InputWithTags) 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 · PtzControlPanel.PtzControlPanel (cognitive 19) · ×1
  • PtzControlPanel.PtzControlPanel (cognitive 19) web/src/components/overlay/PtzControlPanel.tsx:38 — PtzControlPanel.PtzControlPanel has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (5 pts), ternaries 3 (5 pts), match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 84). 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 · DetailActionsMenu.DetailActionsMenu (cognitive 19) · ×1
  • DetailActionsMenu.DetailActionsMenu (cognitive 19) web/src/components/overlay/detail/DetailActionsMenu.tsx:33 — DetailActionsMenu.DetailActionsMenu has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 14, if/else 4, ternaries 1. Of this number, 13 points are the body's own statements and 6 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 · DetailStream.ObjectTimeline (cognitive 19) · ×1
  • DetailStream.ObjectTimeline (cognitive 19) web/src/components/timeline/DetailStream.tsx:991 — DetailStream.ObjectTimeline has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (calculateLineHeight, a function literal at line 1026, a function literal at line 1019). 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 · ModelTrainingView.LibrarySelector (cognitive 19) · ×1
  • ModelTrainingView.LibrarySelector (cognitive 19) web/src/views/classification/ModelTrainingView.tsx:589 — ModelTrainingView.LibrarySelector has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 5 (nesting depth added 1). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 603, 738, 743, …). 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 · CameraManagementView.CameraDetailsEditor (cognitive 19) · ×1
  • CameraManagementView.CameraDetailsEditor (cognitive 19) web/src/views/settings/CameraManagementView.tsx:722 — CameraManagementView.CameraDetailsEditor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 2 (3 pts), error handling 2 (nesting depth added 1). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 793, 743, 774). 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 · EnrichmentsSettingsView.EnrichmentsSettingsView (cognitive 19) · ×1
  • EnrichmentsSettingsView.EnrichmentsSettingsView (cognitive 19) web/src/views/settings/EnrichmentsSettingsView.tsx:57 — EnrichmentsSettingsView.EnrichmentsSettingsView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5, boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 135, 86, 143, …). 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 · MotionTunerView.MotionTunerView (cognitive 19) · ×1
  • MotionTunerView.MotionTunerView (cognitive 19) web/src/views/settings/MotionTunerView.tsx:38 — MotionTunerView.MotionTunerView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 4. 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 literals inside it that branch (lines 103, 67, 91, …). 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 · camera.reolink_detect (cognitive 18) · ×1
  • camera.reolink_detect (cognitive 18) REDACTED:508 — camera.reolink_detect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 3, ternaries 2 (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 · fastapi_app.create_fastapi_app (cognitive 18) · ×1
  • fastapi_app.create_fastapi_app (cognitive 18) frigate/api/fastapi_app.py:68 — fastapi_app.create_fastapi_app has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 1 (4 pts), boolean chains 2, 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 · media._vod_response (cognitive 18) · ×1
  • media._vod_response (cognitive 18) frigate/api/media.py:661 — media._vod_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (3 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.
D2 · Cognitive Complexity · media.event_snapshot (cognitive 18) · ×1
  • media.event_snapshot (cognitive 18) frigate/api/media.py:952 — media.event_snapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (6 pts), loops 1 (2 pts), ternaries 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 · review.set_multiple_reviewed (cognitive 18) · ×1
  • review.set_multiple_reviewed (cognitive 18) frigate/api/review.py:496 — review.set_multiple_reviewed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), ternaries 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 · RuntimeStatePersistence.clear_for_yaml_keys (cognitive 18) · ×1
  • RuntimeStatePersistence.clear_for_yaml_keys (cognitive 18) frigate/comms/runtime_state.py:118 — RuntimeStatePersistence.clear_for_yaml_keys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, error handling 2, loops 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 · ProfileManager._reset_to_base (cognitive 18) · ×1
  • ProfileManager._reset_to_base (cognitive 18) frigate/config/profile_manager.py:309 — ProfileManager._reset_to_base has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · debug_replay.cleanup_replay_cameras (cognitive 18) · ×1
  • debug_replay.cleanup_replay_cameras (cognitive 18) frigate/debug_replay.py:320 — debug_replay.cleanup_replay_cameras has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (5 pts), error handling 1 (2 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 · OvDetector.detect_raw (cognitive 18) · ×1
  • OvDetector.detect_raw (cognitive 18) frigate/detectors/plugins/openvino.py:152 — OvDetector.detect_raw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), 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 · Embeddings._reindex (cognitive 18) · ×1
  • Embeddings._reindex (cognitive 18) frigate/embeddings/embeddings.py:320 — Embeddings._reindex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), 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 · AudioProcessor.run (cognitive 18) · ×1
  • AudioProcessor.run (cognitive 18) frigate/events/audio.py:143 — AudioProcessor.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 6 (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 · motion_search_decode.probe_vod_keyframe_pts (cognitive 18) · ×1
  • motion_search_decode.probe_vod_keyframe_pts (cognitive 18) frigate/jobs/motion_search_decode.py:271 — motion_search_decode.probe_vod_keyframe_pts has cognitive complexity 18 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 3 (6 pts), boolean chains 3, loops 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 · output.check_disabled_camera_update (cognitive 18) · ×1
  • output.check_disabled_camera_update (cognitive 18) frigate/output/output.py:42 — output.check_disabled_camera_update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 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 · HardwareStats._scan_ffmpeg (cognitive 18) · ×1
  • HardwareStats._scan_ffmpeg (cognitive 18) frigate/stats/hardware.py:352 — HardwareStats._scan_ffmpeg has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 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 · TrackedObjectProcessor.set_sub_label (cognitive 18) · ×1
  • TrackedObjectProcessor.set_sub_label (cognitive 18) frigate/track/object_processing.py:420 — TrackedObjectProcessor.set_sub_label has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (3 pts), loops 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 · media.remove_empty_directories (cognitive 18) · ×1
  • media.remove_empty_directories (cognitive 18) frigate/util/media.py:78 — media.remove_empty_directories has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 2 (6 pts), 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 · model.__post_process_multipart_yolo (cognitive 18) · ×1
  • model.__post_process_multipart_yolo (cognitive 18) frigate/util/model.py:133 — model.__post_process_multipart_yolo has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 2 (6 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · genai_review_tester.select_option (cognitive 18) · ×1
  • genai_review_tester.select_option (cognitive 18) testing-scripts/genai_review_tester.py:98 — genai_review_tester.select_option has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), error handling 1 (2 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 · CameraImage.CameraImage (cognitive 18) · ×1
  • CameraImage.CameraImage (cognitive 18) web/src/components/camera/CameraImage.tsx:18 — CameraImage.CameraImage has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5, boolean chains 4 (nesting depth added 3). Of this number, 9 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PTZPresetsWidget.PTZPresetsWidget (cognitive 18) · ×1
  • PTZPresetsWidget.PTZPresetsWidget (cognitive 18) web/src/components/config-form/theme/widgets/PTZPresetsWidget.tsx:28 — PTZPresetsWidget.PTZPresetsWidget has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 6 (8 pts), if/else 2 (nesting depth added 2). Of this number, 11 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 · ExportActionGroup.ExportActionGroup (cognitive 18) · ×1
  • ExportActionGroup.ExportActionGroup (cognitive 18) web/src/components/filter/ExportActionGroup.tsx:35 — ExportActionGroup.ExportActionGroup has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 3, error handling 2. Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 195, 82, 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 · MotionRegionFilterGrid.MotionRegionFilterGrid (cognitive 18) · ×1
  • MotionRegionFilterGrid.MotionRegionFilterGrid (cognitive 18) web/src/components/filter/MotionRegionFilterGrid.tsx:16 — MotionRegionFilterGrid.MotionRegionFilterGrid has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 6 function literals inside it that branch (lines 41, 30, 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 · CameraInfoDialog.CameraInfoDialog (cognitive 18) · ×1
  • CameraInfoDialog.CameraInfoDialog (cognitive 18) web/src/components/overlay/CameraInfoDialog.tsx:27 — CameraInfoDialog.CameraInfoDialog has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 2, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 118, a function literal at line 43, gcd, …). 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 · transformer.removePropertyBySegments (cognitive 18) · ×1
  • transformer.removePropertyBySegments (cognitive 18) web/src/lib/config-schema/transformer.ts:605 — transformer.removePropertyBySegments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 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.
D2 · Cognitive Complexity · ModelTrainingView.ObjectTrainGrid (cognitive 18) · ×1
  • ModelTrainingView.ObjectTrainGrid (cognitive 18) web/src/views/classification/ModelTrainingView.tsx:1066 — ModelTrainingView.ObjectTrainGrid has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 1143, 1110, 1083, …). 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 · app._redact_go2rtc_credentials (cognitive 17) · ×1
  • app._redact_go2rtc_credentials (cognitive 17) frigate/api/app.py:437 — app._redact_go2rtc_credentials has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 5 (8 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · app.get_sub_labels (cognitive 17) · ×1
  • app.get_sub_labels (cognitive 17) frigate/api/app.py:1553 — app.get_sub_labels has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 pts), error handling 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 · app.get_recognized_license_plates (cognitive 17) · ×1
  • app.get_recognized_license_plates (cognitive 17) frigate/api/app.py:1676 — app.get_recognized_license_plates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 1, error handling 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 · chat._execute_search_objects (cognitive 17) · ×1
  • chat._execute_search_objects (cognitive 17) frigate/api/chat.py:159 — chat._execute_search_objects has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, error handling 3 (5 pts), boolean chains 3, ternaries 2 (3 pts) (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 · record.delete_recordings (cognitive 17) · ×1
  • record.delete_recordings (cognitive 17) frigate/api/record.py:498 — record.delete_recordings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 2 (3 pts), error handling 1 (2 pts) (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 · ReviewDescriptionProcessor.process_data (cognitive 17) · ×1
  • ReviewDescriptionProcessor.process_data (cognitive 17) frigate/data_processing/post/review_descriptions.py:144 — ReviewDescriptionProcessor.process_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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 · CustomStateClassificationProcessor.process_frame (cognitive 17) · ×1
  • CustomStateClassificationProcessor.process_frame (cognitive 17) frigate/data_processing/real_time/custom_classification.py:195 — CustomStateClassificationProcessor.process_frame has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EmbeddingMaintainer.__init__ (cognitive 17) · ×1
  • EmbeddingMaintainer.__init__ (cognitive 17) frigate/embeddings/maintainer.py:101 — EmbeddingMaintainer.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 1 (2 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · EmbeddingMaintainer._process_deferred_results (cognitive 17) · ×1
  • EmbeddingMaintainer._process_deferred_results (cognitive 17) frigate/embeddings/maintainer.py:838 — EmbeddingMaintainer._process_deferred_results has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (14 pts), 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 · gemini._parts_from_content (cognitive 17) · ×1
  • gemini._parts_from_content (cognitive 17) frigate/genai/plugins/gemini.py:58 — gemini._parts_from_content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · llama_cpp._stats_from_llama_cpp_chunk (cognitive 17) · ×1
  • llama_cpp._stats_from_llama_cpp_chunk (cognitive 17) frigate/genai/plugins/llama_cpp.py:24 — llama_cpp._stats_from_llama_cpp_chunk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6 (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 · prompts.build_chat_system_prompt (cognitive 17) · ×1
  • prompts.build_chat_system_prompt (cognitive 17) frigate/genai/prompts.py:825 — prompts.build_chat_system_prompt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 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 · OnvifController.get_camera_info (cognitive 17) · ×1
  • OnvifController.get_camera_info (cognitive 17) REDACTED:840 — OnvifController.get_camera_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · object.is_object_filtered (cognitive 17) · ×1
  • object.is_object_filtered (cognitive 17) frigate/util/object.py:217 — object.is_object_filtered has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ffmpeg.capture_frames (cognitive 17) · ×1
  • ffmpeg.capture_frames (cognitive 17) frigate/video/ffmpeg.py:49 — ffmpeg.capture_frames has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (4 pts), ternaries 1 (2 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 · SearchResultActions.SearchResultActions (cognitive 17) · ×1
  • SearchResultActions.SearchResultActions (cognitive 17) web/src/components/menu/SearchResultActions.tsx:48 — SearchResultActions.SearchResultActions has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 2. Of this number, 10 points are the body's own statements and 7 belong to 4 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 · ClassificationModelWizardDialog.ClassificationModelWizardDialog (cognitive 17) · ×1
  • ClassificationModelWizardDialog.ClassificationModelWizardDialog (cognitive 17) web/src/components/classification/ClassificationModelWizardDialog.tsx:93 — ClassificationModelWizardDialog.ClassificationModelWizardDialog has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 7 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 · ReplaceRulesField.ReplaceRulesField (cognitive 17) · ×1
  • ReplaceRulesField.ReplaceRulesField (cognitive 17) web/src/components/config-form/theme/fields/ReplaceRulesField.tsx:44 — ReplaceRulesField.ReplaceRulesField has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 2. Of this number, 9 points are the body's own statements and 8 belong to 6 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 · calendar-range.DateRangePicker · ×1
  • calendar-range.DateRangePicker::resetValues (cognitive 17) web/src/components/ui/calendar-range.tsx:269 — calendar-range.DateRangePicker::resetValues has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DebugReplayDialog.DebugReplayDialog (cognitive 17) · ×1
  • DebugReplayDialog.DebugReplayDialog (cognitive 17) web/src/components/overlay/DebugReplayDialog.tsx:160 — DebugReplayDialog.DebugReplayDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 4. Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 214, 176, 190, …). 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 · SearchFilterDialog.SnapshotClipFilterContent (cognitive 17) · ×1
  • SearchFilterDialog.SnapshotClipFilterContent (cognitive 17) REDACTED:675 — SearchFilterDialog.SnapshotClipFilterContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, ternaries 4 (6 pts), boolean chains 3 (nesting depth added 2). Of this number, 9 points are the body's own statements and 8 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, 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 · HealthProblemRow.HealthProblemRow (cognitive 17) · ×1
  • HealthProblemRow.HealthProblemRow (cognitive 17) web/src/components/health/HealthProblemRow.tsx:50 — HealthProblemRow.HealthProblemRow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, ternaries 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 · GPUInfoDialog.GPUInfoDialog (cognitive 17) · ×1
  • GPUInfoDialog.GPUInfoDialog (cognitive 17) web/src/components/overlay/GPUInfoDialog.tsx:21 — GPUInfoDialog.GPUInfoDialog has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 2, if/else 2 (nesting depth added 6). Of this number, 16 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 · OnvifProbeResults.OnvifProbeResults (cognitive 17) · ×1
  • OnvifProbeResults.OnvifProbeResults (cognitive 17) web/src/components/settings/wizard/OnvifProbeResults.tsx:33 — OnvifProbeResults.OnvifProbeResults has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, if/else 4. 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-user-persistence.useUserPersistence (cognitive 17) · ×1
  • use-user-persistence.useUserPersistence (cognitive 17) web/src/hooks/use-user-persistence.ts:71 — use-user-persistence.useUserPersistence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 129, 113, 90, …). 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 · transformer.applySchemaDefaults (cognitive 17) · ×1
  • transformer.applySchemaDefaults (cognitive 17) web/src/lib/config-schema/transformer.ts:734 — transformer.applySchemaDefaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 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 · Exports.CaseView (cognitive 17) · ×1
  • Exports.CaseView (cognitive 17) web/src/pages/Exports.tsx:1063 — Exports.CaseView has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 3 (6 pts), if/else 3 (nesting depth added 3). Of this number, 12 points are the body's own statements and 5 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 · media.event_thumbnail (cognitive 16) · ×1
  • media.event_thumbnail (cognitive 16) frigate/api/media.py:1059 — media.event_thumbnail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (4 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 5). 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 · MqttClient._loop_client (cognitive 16) · ×1
  • MqttClient._loop_client (cognitive 16) frigate/comms/mqtt.py:388 — MqttClient._loop_client has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · MqttClient._mqtt_loop_worker (cognitive 16) · ×1
  • MqttClient._mqtt_loop_worker (cognitive 16) frigate/comms/mqtt.py:426 — MqttClient._mqtt_loop_worker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (2 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 · webpush.validate_push_endpoint (cognitive 16) · ×1
  • webpush.validate_push_endpoint (cognitive 16) frigate/comms/webpush.py:54 — webpush.validate_push_endpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, error handling 2 (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 · OpenVINOModelRunner.__init__ (cognitive 16) · ×1
  • OpenVINOModelRunner.__init__ (cognitive 16) frigate/detectors/detection_runners.py:439 — OpenVINOModelRunner.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 3 (5 pts), boolean chains 2 (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 · axelera._resolve_model_json (cognitive 16) · ×1
  • axelera._resolve_model_json (cognitive 16) REDACTED:155 — axelera._resolve_model_json has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EdgeTpuTfl.detect_raw (cognitive 16) · ×1
  • EdgeTpuTfl.detect_raw (cognitive 16) frigate/detectors/plugins/edgetpu_tfl.py:223 — EdgeTpuTfl.detect_raw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmbeddingMaintainer._process_updates (cognitive 16) · ×1
  • EmbeddingMaintainer._process_updates (cognitive 16) frigate/embeddings/maintainer.py:516 — EmbeddingMaintainer._process_updates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, loops 2, ternaries 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 · AudioEventMaintainer.detect_audio (cognitive 16) · ×1
  • AudioEventMaintainer.detect_audio (cognitive 16) frigate/events/audio.py:299 — AudioEventMaintainer.detect_audio has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1 (2 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 · export.reap_stale_exports (cognitive 16) · ×1
  • export.reap_stale_exports (cognitive 16) frigate/jobs/export.py:398 — export.reap_stale_exports has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (6 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreviewRecorder.__init__ (cognitive 16) · ×1
  • PreviewRecorder.__init__ (cognitive 16) frigate/output/preview.py:217 — PreviewRecorder.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, error handling 1 (2 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 · PtzMotionEstimator.motion_estimator (cognitive 16) · ×1
  • PtzMotionEstimator.motion_estimator (cognitive 16) frigate/ptz/autotrack.py:87 — PtzMotionEstimator.motion_estimator has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 2 (4 pts), loops 1 (2 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 · PtzAutoTracker._should_zoom_in (cognitive 16) · ×1
  • PtzAutoTracker._should_zoom_in (cognitive 16) frigate/ptz/autotrack.py:941 — PtzAutoTracker._should_zoom_in has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 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 · export.validate_ffmpeg_args (cognitive 16) · ×1
  • export.validate_ffmpeg_args (cognitive 16) frigate/record/export.py:216 — export.validate_ffmpeg_args has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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 · config._convert_legacy_mask_to_dict (cognitive 16) · ×1
  • config._convert_legacy_mask_to_dict (cognitive 16) frigate/util/config.py:638 — config._convert_legacy_mask_to_dict has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 2 (7 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · recording_coverage.plan_clip (cognitive 16) · ×1
  • recording_coverage.plan_clip (cognitive 16) frigate/util/recording_coverage.py:353 — recording_coverage.plan_clip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · object_dataset.summarize_dataset (cognitive 16) · ×1
  • object_dataset.summarize_dataset (cognitive 16) testing-scripts/object_dataset.py:456 — object_dataset.summarize_dataset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchThumbnail.SearchThumbnail (cognitive 16) · ×1
  • SearchThumbnail.SearchThumbnail (cognitive 16) web/src/components/card/SearchThumbnail.tsx:23 — SearchThumbnail.SearchThumbnail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (5 pts), boolean chains 2 (nesting depth added 2). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 52, 70, 38, …). 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 · ReviewActivityCalendar.ReviewActivityCalendar (cognitive 16) · ×1
  • ReviewActivityCalendar.ReviewActivityCalendar (cognitive 16) web/src/components/overlay/ReviewActivityCalendar.tsx:49 — ReviewActivityCalendar.ReviewActivityCalendar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 69). 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 · ReviewActionGroup.ReviewActionGroup (cognitive 16) · ×1
  • ReviewActionGroup.ReviewActionGroup (cognitive 16) web/src/components/filter/ReviewActionGroup.tsx:34 — ReviewActionGroup.ReviewActionGroup has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 3, ternaries 2. Of this number, 12 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.
D2 · Cognitive Complexity · CombinedStorageGraph.CombinedStorageGraph (cognitive 16) · ×1
  • CombinedStorageGraph.CombinedStorageGraph (cognitive 16) web/src/components/graph/CombinedStorageGraph.tsx:47 — CombinedStorageGraph.CombinedStorageGraph has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 5. Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 194, 294, 57, …). 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 · AccountSettings.AccountSettings (cognitive 16) · ×1
  • AccountSettings.AccountSettings (cognitive 16) web/src/components/menu/AccountSettings.tsx:38 — AccountSettings.AccountSettings has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, boolean chains 6, if/else 2. Of this number, 12 points are the body's own statements and 4 belong to 3 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 · CreateRoleDialog.CreateRoleDialog (cognitive 16) · ×1
  • CreateRoleDialog.CreateRoleDialog (cognitive 16) web/src/components/overlay/CreateRoleDialog.tsx:47 — CreateRoleDialog.CreateRoleDialog has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, error handling 1, if/else 1. Of this number, 12 points are the body's own statements and 4 belong to 3 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 · ObjectPathPlotter.ObjectPathPlotter (cognitive 16) · ×1
  • ObjectPathPlotter.ObjectPathPlotter (cognitive 16) web/src/components/overlay/detail/ObjectPathPlotter.tsx:29 — ObjectPathPlotter.ObjectPathPlotter has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 2. Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 47, a function literal at line 71, a function literal at line 40, …). 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 · SearchSettings.SearchTypeContent (cognitive 16) · ×1
  • SearchSettings.SearchTypeContent (cognitive 16) web/src/components/settings/SearchSettings.tsx:151 — SearchSettings.SearchTypeContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (nesting depth added 6). None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 170, 188). 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 · SetupComplete.SetupComplete (cognitive 16) · ×1
  • SetupComplete.SetupComplete (cognitive 16) web/src/components/setup/SetupComplete.tsx:29 — SetupComplete.SetupComplete has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 6, if/else 3, error handling 1. Of this number, 8 points are the body's own statements and 8 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 · WsMessageRow.getTrackedObjectUpdateSummary (cognitive 16) · ×1
  • WsMessageRow.getTrackedObjectUpdateSummary (cognitive 16) web/src/components/ws/WsMessageRow.tsx:156 — WsMessageRow.getTrackedObjectUpdateSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WsMessageRow.WsMessageRow (cognitive 16) · ×1
  • WsMessageRow.WsMessageRow (cognitive 16) web/src/components/ws/WsMessageRow.tsx:299 — WsMessageRow.WsMessageRow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3, error handling 2, ternaries 2. 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 items inside it that branch (a function literal at line 314, a function literal at line 329, getTypeBadgeColor). 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-api-filter.useApiFilterArgs (cognitive 16) · ×1
  • use-api-filter.useApiFilterArgs (cognitive 16) web/src/hooks/use-api-filter.ts:50 — use-api-filter.useApiFilterArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 6). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 70, 99, 60). 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 · errorMessages.createErrorTransformer (cognitive 16) · ×1
  • errorMessages.createErrorTransformer (cognitive 16) web/src/lib/config-schema/errorMessages.ts:11 — errorMessages.createErrorTransformer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 3). None of this is in the body itself: all 16 points belong to 3 function items inside it that branch (a function literal at line 47, getFieldPathFromProperty, normalizeParams). 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 · Exports.AllExportsView (cognitive 16) · ×1
  • Exports.AllExportsView (cognitive 16) web/src/pages/Exports.tsx:915 — Exports.AllExportsView has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 8 points are the body's own statements and 8 belong to 5 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 · ObjectSettingsView.ObjectSettingsView (cognitive 16) · ×1
  • ObjectSettingsView.ObjectSettingsView (cognitive 16) web/src/views/settings/ObjectSettingsView.tsx:47 — ObjectSettingsView.ObjectSettingsView has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 3. Of this number, 8 points are the body's own statements and 8 belong to 4 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: events_query_parameters.py → REDACTED, Explore.tsx, search.ts, SearchView.tsx frigate/api/defs/query/events_query_parameters.py — `frigate/api/defs/query/events_query_parameters.py` changes together with 4 other files — `REDACTED`, `web/src/pages/Explore.tsx`, `web/src/types/search.ts`, `web/src/views/search/SearchView.tsx` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (104 shared lines) · ×1
  • Near-duplicate member pair (104 shared lines) frigate/api/media.py:1507 — frigate/api/media.py:1507-1664 | frigate/api/media.py:1680-1856 — These two members are variants of one another: 104 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (81 shared lines) · ×1
  • Near-duplicate member pair (81 shared lines) frigate/api/event.py:101 — frigate/api/event.py:101-378 | frigate/api/event.py:538-911 — These two members are variants of one another: 81 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) frigate/embeddings/onnx/face_embedding.py:170 — frigate/embeddings/onnx/face_embedding.py:170-202 | testing-scripts/face_dataset.py:75-104 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) frigate/embeddings/onnx/face_embedding.py:33 — frigate/embeddings/onnx/face_embedding.py:33-61 | frigate/embeddings/onnx/face_embedding.py:127-156 | frigate/embeddings/onnx/jina_v1_embedding.py:36-82 | frigate/embeddings/onnx/jina_v1_embedding.py:160-205 | frigate/embeddings/onnx/jina_v2_embedding.py:37-95 | frigate/embeddings/onnx/lpr_embedding.py:35-74 | frigate/embeddings/onnx/lpr_embedding.py:101-135 | frigate/embeddings/onnx/lpr_embedding.py:162-197 | frigate/embeddings/onnx/lpr_embedding.py:224-259 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) frigate/util/media.py:114 — frigate/util/media.py:114-273 | frigate/util/media.py:277-366 | frigate/util/media.py:370-467 | frigate/util/media.py:471-552 | frigate/util/media.py:556-635 | frigate/util/media.py:639-732 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) frigate/comms/dispatcher.py:693 — frigate/comms/dispatcher.py:693-715 | frigate/comms/dispatcher.py:863-886 | frigate/comms/dispatcher.py:920-943 | frigate/comms/dispatcher.py:1156-1178 | frigate/comms/dispatcher.py:1181-1203 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) frigate/util/model.py:47 — frigate/util/model.py:47-73 | frigate/util/model.py:77-130 | frigate/util/model.py:218-258 | frigate/util/model.py:275-312 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (143–144 lines × 2) · ×1
  • Duplicated block (143–144 lines × 2) frigate/genai/plugins/gemini.py:242 — frigate/genai/plugins/gemini.py:242-385 | frigate/genai/plugins/gemini.py:498-640 — 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 (44–68 lines × 2) · ×1
  • Duplicated block (44–68 lines × 2) frigate/api/media.py:1575 — frigate/api/media.py:1575-1618 | frigate/api/media.py:1764-1831 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/media.py:1575` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (59–60 lines × 2) · ×1
  • Duplicated block (59–60 lines × 2) frigate/api/review.py:272 — frigate/api/review.py:272-330 | frigate/api/review.py:410-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/review.py:272` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–40 lines × 2) · ×1
  • Duplicated block (15–40 lines × 2) frigate/api/media.py:1639 — frigate/api/media.py:1639-1653 | frigate/api/media.py:1801-1840 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/api/media.py:1639` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (37–40 lines × 2) · ×1
  • Duplicated block (37–40 lines × 2) frigate/genai/plugins/openai.py:246 — frigate/genai/plugins/openai.py:246-282 | frigate/genai/plugins/openai.py:367-406 — 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 (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) frigate/util/config.py:726 — frigate/util/config.py:726-760 | frigate/util/config.py:773-807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) frigate/embeddings/__init__.py:137 — frigate/embeddings/__init__.py:137-169 | frigate/embeddings/__init__.py:174-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28–34 lines × 2) · ×1
  • Duplicated block (28–34 lines × 2) frigate/util/config.py:405 — frigate/util/config.py:405-438 | frigate/util/config.py:454-481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (31–33 lines × 5) · ×1
  • Duplicated block (31–33 lines × 5) frigate/util/media.py:315 — frigate/util/media.py:315-347 | frigate/util/media.py:416-448 | frigate/util/media.py:501-533 | frigate/util/media.py:586-616 | frigate/util/media.py:683-713 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25–32 lines × 2) · ×1
  • Duplicated block (25–32 lines × 2) frigate/plus.py:201 — frigate/plus.py:201-232 | frigate/plus.py:241-265 — 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 (27–31 lines × 2) · ×1
  • Duplicated block (27–31 lines × 2) frigate/util/classification.py:432 — frigate/util/classification.py:432-462 | frigate/util/classification.py:795-821 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/util/classification.py:432` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22–29 lines × 2) · ×1
  • Duplicated block (22–29 lines × 2) frigate/embeddings/onnx/face_embedding.py:173 — frigate/embeddings/onnx/face_embedding.py:173-201 | testing-scripts/face_dataset.py:82-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/embeddings/onnx/face_embedding.py:173` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) frigate/api/review.py:101 — frigate/api/review.py:101-126 | frigate/api/review.py:244-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) frigate/api/event.py:2180 — frigate/api/event.py:2180-2204 | frigate/api/event.py:2255-2279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) frigate/comms/webpush.py:628 — frigate/comms/webpush.py:628-649 | frigate/comms/webpush.py:681-704 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) frigate/data_processing/common/face/recognizer.py:237 — frigate/data_processing/common/face/recognizer.py:237-259 | frigate/data_processing/common/face/recognizer.py:355-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–22 lines × 2) · ×1
  • Duplicated block (12–22 lines × 2) docs/scripts/lib/i18n_loader.py:69 — docs/scripts/lib/i18n_loader.py:69-90 | docs/scripts/lib/i18n_loader.py:99-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) REDACTED:471 — REDACTED:471-491 | frigate/detectors/plugins/onnx.py:110-128 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) frigate/api/chat.py:342 — frigate/api/chat.py:342-360 | frigate/api/chat.py:498-517 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 5) · ×1
  • Duplicated block (19 lines × 5) frigate/embeddings/onnx/jina_v1_embedding.py:64 — frigate/embeddings/onnx/jina_v1_embedding.py:64-82 | frigate/embeddings/onnx/lpr_embedding.py:56-74 | frigate/embeddings/onnx/lpr_embedding.py:117-135 | frigate/embeddings/onnx/lpr_embedding.py:179-197 | frigate/embeddings/onnx/lpr_embedding.py:241-259 — before extracting anything, compare `frigate/embeddings/onnx/jina_v1_embedding.py` and `frigate/embeddings/onnx/lpr_embedding.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/embeddings/onnx/jina_v1_embedding.py:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 4) · ×1
  • Duplicated block (18–19 lines × 4) frigate/util/model.py:55 — frigate/util/model.py:55-73 | frigate/util/model.py:112-130 | frigate/util/model.py:241-258 | frigate/util/model.py:294-312 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/util/model.py:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) frigate/data_processing/real_time/custom_classification.py:316 — frigate/data_processing/real_time/custom_classification.py:316-334 | frigate/data_processing/real_time/custom_classification.py:637-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/data_processing/real_time/custom_classification.py:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `frigate/data_processing/real_time/custom_classification.py:338` calls `_should_save_image` and `frigate/data_processing/real_time/custom_classification.py:656` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) frigate/data_processing/real_time/custom_classification.py:379 — frigate/data_processing/real_time/custom_classification.py:379-397 | frigate/data_processing/real_time/custom_classification.py:709-727 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–18 lines × 6) · ×1
  • Duplicated block (16–18 lines × 6) frigate/util/media.py:243 — frigate/util/media.py:243-259 | frigate/util/media.py:337-354 | frigate/util/media.py:438-455 | frigate/util/media.py:523-540 | frigate/util/media.py:608-623 | frigate/util/media.py:705-720 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/util/media.py:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) frigate/detectors/plugins/zmq_ipc.py:146 — frigate/detectors/plugins/zmq_ipc.py:146-158 | frigate/detectors/plugins/zmq_ipc.py:240-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–16 lines × 2) · ×1
  • Duplicated block (12–16 lines × 2) testing-scripts/face_dataset.py:452 — testing-scripts/face_dataset.py:452-463 | testing-scripts/face_dataset.py:565-580 — 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 (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) frigate/api/classification.py:925 — frigate/api/classification.py:925-939 | frigate/api/classification.py:1022-1036 | frigate/api/classification.py:1116-1130 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) frigate/embeddings/onnx/lpr_embedding.py:101 — frigate/embeddings/onnx/lpr_embedding.py:101-114 | frigate/embeddings/onnx/lpr_embedding.py:162-176 | frigate/embeddings/onnx/lpr_embedding.py:224-238 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) frigate/data_processing/common/face/recognizer.py:279 — frigate/data_processing/common/face/recognizer.py:279-293 | frigate/data_processing/common/face/recognizer.py:397-410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/data_processing/common/face/recognizer.py:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) frigate/ptz/autotrack.py:1094 — frigate/ptz/autotrack.py:1094-1106 | frigate/ptz/autotrack.py:1141-1155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/ptz/autotrack.py:1141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `frigate/ptz/autotrack.py:1108` calls `debug` and `frigate/ptz/autotrack.py:1155` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–14 lines × 5) · ×1
  • Duplicated block (13–14 lines × 5) frigate/comms/dispatcher.py:698 — frigate/comms/dispatcher.py:698-710 | frigate/comms/dispatcher.py:868-881 | frigate/comms/dispatcher.py:925-938 | frigate/comms/dispatcher.py:1161-1174 | frigate/comms/dispatcher.py:1186-1199 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/comms/dispatcher.py:698` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×1
  • Duplicated block (10–14 lines × 2) frigate/data_processing/common/license_plate/mixin.py:1415 — frigate/data_processing/common/license_plate/mixin.py:1415-1428 | frigate/data_processing/real_time/face.py:179-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6–14 lines × 3) · ×1
  • Duplicated block (6–14 lines × 3) generate_config_translations.py:86 — generate_config_translations.py:86-99 | generate_config_translations.py:109-122 | generate_config_translations.py:129-134 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `generate_config_translations.py:86` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `generate_config_translations.py:108` calls `items` and `generate_config_translations.py:129` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) REDACTED:91 — REDACTED:91-100 | REDACTED:166-178 — 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) frigate/api/media.py:1511 — frigate/api/media.py:1511-1522 | frigate/api/media.py:1699-1710 | frigate/api/preview.py:64-75 — 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 (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) frigate/api/event.py:1090 — frigate/api/event.py:1090-1101 | frigate/api/event.py:1213-1224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 9) · ×1
  • Duplicated block (11 lines × 9) frigate/embeddings/onnx/face_embedding.py:47 — frigate/embeddings/onnx/face_embedding.py:47-57 | frigate/embeddings/onnx/face_embedding.py:142-152 | frigate/embeddings/onnx/jina_v1_embedding.py:62-72 | frigate/embeddings/onnx/jina_v1_embedding.py:182-192 | frigate/embeddings/onnx/jina_v2_embedding.py:72-82 | frigate/embeddings/onnx/lpr_embedding.py:54-64 | frigate/embeddings/onnx/lpr_embedding.py:115-125 | frigate/embeddings/onnx/lpr_embedding.py:177-187 | frigate/embeddings/onnx/lpr_embedding.py:239-249 — before extracting anything, compare `frigate/embeddings/onnx/jina_v1_embedding.py` and `frigate/embeddings/onnx/jina_v2_embedding.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `frigate/embeddings/onnx/jina_v1_embedding.py:195` calls `_load_model_and_utils` and `frigate/embeddings/onnx/face_embedding.py:58` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) frigate/record/cleanup.py:334 — frigate/record/cleanup.py:334-344 | frigate/record/cleanup.py:398-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) frigate/util/image.py:809 — frigate/util/image.py:809-819 | frigate/util/image.py:822-831 | frigate/util/image.py:834-843 | frigate/util/image.py:846-855 | frigate/util/image.py:856-865 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/util/image.py:809` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `frigate/util/image.py:809` calls `resize` and `frigate/util/image.py:856` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) frigate/record/export.py:809 — frigate/record/export.py:809-817 | frigate/record/export.py:1110-1119 | frigate/record/export.py:1359-1368 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `frigate/record/export.py:809` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `frigate/record/export.py:1369` calls `order_by`, `asc`, `namedtuples` and `frigate/record/export.py:818` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) frigate/util/config.py:1054 — frigate/util/config.py:1054-1062 | frigate/util/config.py:1076-1085 — 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 × 3) · ×1
  • Duplicated block (9 lines × 3) frigate/data_processing/real_time/bird.py:143 — frigate/data_processing/real_time/bird.py:143-151 | frigate/data_processing/real_time/custom_classification.py:320-328 | frigate/data_processing/real_time/custom_classification.py:640-648 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) frigate/api/event.py:716 — frigate/api/event.py:716-722 | frigate/api/event.py:724-732 — 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 (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) frigate/data_processing/real_time/custom_classification.py:742 — frigate/data_processing/real_time/custom_classification.py:742-747 | frigate/data_processing/real_time/face.py:484-491 — 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.
IC1 · Incompleteness & stubs · Markup wires an event to an empty handler · ×1
  • Markup wires an event to an empty handler web/src/components/card/ClassificationCard.tsx:489 — `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
M1 · Documentation (README) · README may be stale · ×1
  • README may be stale — 697 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
P12 · CI test-gate honesty · Pull-request path filter skips the test gate for source changes · ×1
  • Pull-request path filter skips the test gate for source changes REDACTED:6 — `paths-ignore: docs/**` matches compiled source (`docs/babel.config.js`, `REDACTED`, `docs/sidebars.ts`) — a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (129 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (129 clone groups) web/src/components/overlay/CustomTimeSelector.tsx:85 — 129 duplicated blocks under web/src/ have copies in at least two of the sibling directories components, hooks, pages, utils, views — 85 of them are reported below, and 44 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 129 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 129 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 129 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 20 sibling directories (79 clone groups) · ×1
  • Duplication concentrated across 20 sibling directories (79 clone groups) web/src/components/overlay/detail/TrackingDetails.tsx:839 — 79 duplicated blocks under web/src/components/ have copies in at least two of the sibling directories auth, button, camera, card, chat, classification (+14 more sibling(s) not listed) — 44 of them are reported below, and 35 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 79 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 79 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 79 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 (27 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (27 clone groups) web/src/views/motion-search/MotionSearchView.tsx:448 — 27 duplicated blocks under web/src/views/ have copies in at least two of the sibling directories classification, events, live, motion-search, recording, search (+2 more sibling(s) not listed) — 20 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 27 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 27 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 27 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 3 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (9 clone groups) web/src/components/config-form/theme/fields/LiveStreamsField.tsx:71 — 9 of the duplicated blocks reported below have copies in at least two of the sibling directories fields, templates, widgets under web/src/components/config-form/theme/. 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 · Duplicated block with local edits (212 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (212 matched lines × 2 locations) web/src/components/config-form/theme/fields/CameraInputsField.tsx:45 — web/src/components/config-form/theme/fields/CameraInputsField.tsx:45 · web/src/components/config-form/theme/fields/ModelsField.tsx:69 — the two spans are one implementation copied and then locally edited — 1089 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 (191 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (191 matched lines × 2 locations) web/src/components/overlay/detail/TrackingDetails.tsx:839 — web/src/components/overlay/detail/TrackingDetails.tsx:839 · web/src/components/timeline/DetailStream.tsx:723 — the two spans are one implementation copied and then locally edited — 986 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 (167 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (167 matched lines × 2 locations) web/src/components/overlay/CreateUserDialog.tsx:66 — web/src/components/overlay/CreateUserDialog.tsx:66 · web/src/components/overlay/SetPasswordDialog.tsx:65 — the two spans are one implementation copied and then locally edited — 722 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 (161 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (161 matched lines × 2 locations) web/src/components/filter/ReviewFilterGroup.tsx:141 — web/src/components/filter/ReviewFilterGroup.tsx:141 · web/src/components/filter/SearchFilterGroup.tsx:131 — the two spans are one implementation copied and then locally edited — 810 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 (154 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (154 matched lines × 2 locations) web/src/components/ui/context-menu.tsx:7 — web/src/components/ui/context-menu.tsx:7 · web/src/components/ui/dropdown-menu.tsx:7 — the two spans are one implementation copied and then locally edited — 846 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 (148 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (148 matched lines × 2 locations) web/src/components/settings/MotionMaskEditPane.tsx:132 — web/src/components/settings/MotionMaskEditPane.tsx:132 · web/src/components/settings/ObjectMaskEditPane.tsx:114 — the two spans are one implementation copied and then locally edited — 762 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 (146 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (146 matched lines × 2 locations) web/src/components/overlay/CustomTimeSelector.tsx:85 — web/src/components/overlay/CustomTimeSelector.tsx:85 · web/src/views/motion-search/MotionSearchDialog.tsx:580 — the two spans are one implementation copied and then locally edited — 790 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 (140 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (140 matched lines × 2 locations) web/src/components/overlay/CreateRoleDialog.tsx:48 — web/src/components/overlay/CreateRoleDialog.tsx:48 · web/src/components/overlay/EditRoleCamerasDialog.tsx:42 — the two spans are one implementation copied and then locally edited — 736 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 (136 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (136 matched lines × 2 locations) web/src/components/config-form/theme/fields/KnownPlatesField.tsx:244 — web/src/components/config-form/theme/fields/KnownPlatesField.tsx:244 · web/src/components/config-form/theme/fields/ReplaceRulesField.tsx:80 — the two spans are one implementation copied and then locally edited — 663 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 (132 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (132 matched lines × 2 locations) web/src/components/overlay/ExportDialog.tsx:117 — web/src/components/overlay/ExportDialog.tsx:117 · web/src/components/overlay/MobileReviewSettingsDrawer.tsx:153 — the two spans are one implementation copied and then locally edited — 692 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 (129 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (129 matched lines × 2 locations) web/src/components/timeline/EventReviewTimeline.tsx:25 — web/src/components/timeline/EventReviewTimeline.tsx:25 · web/src/components/timeline/MotionReviewTimeline.tsx:28 — the two spans are one implementation copied and then locally edited — 579 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 (127 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (127 matched lines × 2 locations) web/src/components/classification/ClassificationModelWizardDialog.tsx:33 — web/src/components/classification/ClassificationModelWizardDialog.tsx:33 · web/src/components/trigger/TriggerWizardDialog.tsx:45 — the two spans are one implementation copied and then locally edited — 578 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 (122 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (122 matched lines × 2 locations) web/src/components/ws/WsMessageFeed.tsx:296 — web/src/components/ws/WsMessageFeed.tsx:296 · web/src/components/ws/WsMessageFeed.tsx:456 — the two spans are one implementation copied and then locally edited — 571 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 (109 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (109 matched lines × 2 locations) web/src/components/overlay/detail/AnnotationOffsetSlider.tsx:53 — web/src/components/overlay/detail/AnnotationOffsetSlider.tsx:53 · web/src/components/overlay/detail/AnnotationSettingsPane.tsx:56 — the two spans are one implementation copied and then locally edited — 558 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) web/src/components/overlay/CreateTriggerDialog.tsx:140 — web/src/components/overlay/CreateTriggerDialog.tsx:140 · web/src/components/trigger/wizard/Step3ThresholdAndActions.tsx:58 — the two spans are one implementation copied and then locally edited — 493 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 (90 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (90 matched lines × 2 locations) web/src/components/filter/ReviewActionGroup.tsx:35 — web/src/components/filter/ReviewActionGroup.tsx:35 · web/src/components/filter/SearchActionGroup.tsx:30 — the two spans are one implementation copied and then locally edited — 472 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 (83 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (83 matched lines × 2 locations) web/src/components/config-form/theme/fields/LiveStreamsField.tsx:71 — web/src/components/config-form/theme/fields/LiveStreamsField.tsx:71 · web/src/components/config-form/theme/widgets/PTZPresetsWidget.tsx:53 — the two spans are one implementation copied and then locally edited — 404 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 (74 lines × 2 locations) · ×1
  • Duplicated block (74 lines × 2 locations) web/src/components/timeline/VirtualizedEventSegments.tsx:25 — web/src/components/timeline/VirtualizedEventSegments.tsx:25 · web/src/components/timeline/VirtualizedMotionSegments.tsx:29 — 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 (73 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (73 matched lines × 2 locations) web/src/pages/Replay.tsx:590 — web/src/pages/Replay.tsx:590 · web/src/views/settings/ObjectSettingsView.tsx:315 — 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 (70 lines × 2 locations) · ×1
  • Duplicated block (70 lines × 2 locations) web/src/components/config-form/sectionExtras/BirdseyeCameraReorder.tsx:38 — web/src/components/config-form/sectionExtras/BirdseyeCameraReorder.tsx:38 · web/src/views/settings/CameraManagementView.tsx:121 — 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 (68 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (68 matched lines × 2 locations) web/src/views/live/DraggableGridLayout.tsx:787 — web/src/views/live/DraggableGridLayout.tsx:787 · web/src/views/live/LiveDashboardView.tsx:580 — the two spans are one implementation copied and then locally edited — 352 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (60 lines × 2 locations) · ×1
  • Duplicated block (60 lines × 2 locations) web/src/views/settings/MasksAndZonesView.tsx:347 — web/src/views/settings/MasksAndZonesView.tsx:347 · web/src/views/settings/MasksAndZonesView.tsx:412 — 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 (60 lines × 3 locations) · ×1
  • Duplicated block (60 lines × 3 locations) web/src/views/settings/MasksAndZonesView.tsx:804 — web/src/views/settings/MasksAndZonesView.tsx:804 · web/src/views/settings/MasksAndZonesView.tsx:884 · web/src/views/settings/MasksAndZonesView.tsx:966 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (59 lines × 2 locations) · ×1
  • Duplicated block (59 lines × 2 locations) web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1034 — web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1034 · web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1097 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (57 lines × 2 locations) · ×1
  • Duplicated block (57 lines × 2 locations) web/src/components/menu/SearchResultActions.tsx:89 — web/src/components/menu/SearchResultActions.tsx:89 · web/src/components/timeline/EventMenu.tsx:53 — 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 (56 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (56 matched lines × 2 locations) web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx:63 — web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx:63 · web/src/components/settings/wizard/Step3StreamConfig.tsx:256 — the two spans are one implementation copied and then locally edited — 382 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (56 lines × 2 locations) · ×1
  • Duplicated block (56 lines × 2 locations) web/src/views/live/LiveCameraView.tsx:1499 — web/src/views/live/LiveCameraView.tsx:1499 · web/src/views/live/LiveCameraView.tsx:1889 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (53 lines × 2 locations) · ×1
  • Duplicated block (53 lines × 2 locations) web/src/components/settings/ObjectMaskEditPane.tsx:267 — web/src/components/settings/ObjectMaskEditPane.tsx:267 · web/src/components/settings/ZoneEditPane.tsx:502 — 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 FrigateCameraFeatures (cyclomatic 103, cognitive 104) · ×1
  • Complex function FrigateCameraFeatures (cyclomatic 103, cognitive 104) web/src/views/live/LiveCameraView.tsx:1012 — FrigateCameraFeatures has cyclomatic complexity 103 and cognitive complexity 104; 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 FieldTemplate (cyclomatic 101, cognitive 115) · ×1
  • Complex function FieldTemplate (cyclomatic 101, cognitive 115) web/src/components/config-form/theme/templates/FieldTemplate.tsx:60 — FieldTemplate has cyclomatic complexity 101 and cognitive complexity 115; 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 ConfigSection (cyclomatic 88, cognitive 70) · ×1
  • Complex function ConfigSection (cyclomatic 88, cognitive 70) web/src/components/config-form/sections/BaseSection.tsx:198 — ConfigSection has cyclomatic complexity 88 and cognitive complexity 70; 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 MotionSearchView (cyclomatic 76, cognitive 69) · ×1
  • Complex function MotionSearchView (cyclomatic 76, cognitive 69) web/src/views/motion-search/MotionSearchView.tsx:95 — MotionSearchView has cyclomatic complexity 76 and cognitive complexity 69; 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 (anonymous) (cyclomatic 73, cognitive 156) · ×1
  • Complex function (anonymous) (cyclomatic 73, cognitive 156) web/src/views/settings/MasksAndZonesView.tsx:256 — (anonymous) has cyclomatic complexity 73 and cognitive complexity 156; 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 LiveCameraView (cyclomatic 71, cognitive 59) · ×1
  • Complex function LiveCameraView (cyclomatic 71, cognitive 59) web/src/views/live/LiveCameraView.tsx:133 — LiveCameraView has cyclomatic complexity 71 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 GeneralSettings (cyclomatic 67, cognitive 63) · ×1
  • Complex function GeneralSettings (cyclomatic 67, cognitive 63) web/src/components/menu/GeneralSettings.tsx:88 — GeneralSettings has cyclomatic complexity 67 and cognitive complexity 63; 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 LivePlayer (cyclomatic 67, cognitive 59) · ×1
  • Complex function LivePlayer (cyclomatic 67, cognitive 59) web/src/components/player/LivePlayer.tsx:63 — LivePlayer has cyclomatic complexity 67 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 RecordingView (cyclomatic 64, cognitive 54) · ×1
  • Complex function RecordingView (cyclomatic 64, cognitive 54) web/src/views/recording/RecordingView.tsx:106 — RecordingView has cyclomatic complexity 64 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ObjectDetailsTab (cyclomatic 56, cognitive 44) · ×1
  • Complex function ObjectDetailsTab (cyclomatic 56, cognitive 44) web/src/components/overlay/detail/SearchDetailDialog.tsx:690 — ObjectDetailsTab has cyclomatic complexity 56 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 (anonymous) (cyclomatic 55, cognitive 81) · ×1
  • Complex function (anonymous) (cyclomatic 55, cognitive 81) REDACTED:255 — (anonymous) has cyclomatic complexity 55 and cognitive complexity 81; 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 buildClonedCameraPayloads (cyclomatic 54, cognitive 86) · ×1
  • Complex function buildClonedCameraPayloads (cyclomatic 54, cognitive 86) web/src/utils/cameraClone.ts:472 — buildClonedCameraPayloads has cyclomatic complexity 54 and cognitive complexity 86; 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 ReviewTimeline (cyclomatic 50, cognitive 44) · ×1
  • Complex function ReviewTimeline (cyclomatic 50, cognitive 44) web/src/components/timeline/ReviewTimeline.tsx:50 — ReviewTimeline has cyclomatic complexity 50 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 ExportContent (cyclomatic 49, cognitive 40) · ×1
  • Complex function ExportContent (cyclomatic 49, cognitive 40) web/src/components/overlay/ExportDialog.tsx:413 — ExportContent has cyclomatic complexity 49 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 TrackingDetails (cyclomatic 45, cognitive 40) · ×1
  • Complex function TrackingDetails (cyclomatic 45, cognitive 40) web/src/components/overlay/detail/TrackingDetails.tsx:68 — TrackingDetails has cyclomatic complexity 45 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 FfmpegArgsWidget (cyclomatic 43, cognitive 36) · ×1
  • Complex function FfmpegArgsWidget (cyclomatic 43, cognitive 36) web/src/components/config-form/theme/widgets/FfmpegArgsWidget.tsx:104 — FfmpegArgsWidget has cyclomatic complexity 43 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 PolygonItem (cyclomatic 42, cognitive 37) · ×1
  • Complex function PolygonItem (cyclomatic 42, cognitive 37) web/src/components/settings/PolygonItem.tsx:57 — PolygonItem has cyclomatic complexity 42 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function LiveContextMenu (cyclomatic 42, cognitive 33) · ×1
  • Complex function LiveContextMenu (cyclomatic 42, cognitive 33) web/src/components/menu/LiveContextMenu.tsx:75 — LiveContextMenu has cyclomatic complexity 42 and cognitive complexity 33; 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 ObjectFieldTemplate (cyclomatic 41, cognitive 43) · ×1
  • Complex function ObjectFieldTemplate (cyclomatic 41, cognitive 43) web/src/components/config-form/theme/templates/ObjectFieldTemplate.tsx:40 — ObjectFieldTemplate has cyclomatic complexity 41 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · web/src/pages/Settings.tsx · ×1
  • web/src/pages/Settings.tsx: 2019 lines of code web/src/pages/Settings.tsx:1 — web/src/pages/Settings.tsx has 2019 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 · web/src/views/live/LiveCameraView.tsx · ×1
  • web/src/views/live/LiveCameraView.tsx: 1929 lines of code web/src/views/live/LiveCameraView.tsx:1 — web/src/views/live/LiveCameraView.tsx has 1929 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 · web/src/components/overlay/detail/SearchDetailDialog.tsx · ×1
  • web/src/components/overlay/detail/SearchDetailDialog.tsx: 1765 lines of code web/src/components/overlay/detail/SearchDetailDialog.tsx:1 — web/src/components/overlay/detail/SearchDetailDialog.tsx has 1765 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 · web/src/views/events/EventView.tsx · ×1
  • web/src/views/events/EventView.tsx: 1629 lines of code web/src/views/events/EventView.tsx:1 — web/src/views/events/EventView.tsx has 1629 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 · web/src/views/motion-search/MotionSearchView.tsx · ×1
  • web/src/views/motion-search/MotionSearchView.tsx: 1531 lines of code web/src/views/motion-search/MotionSearchView.tsx:1 — web/src/views/motion-search/MotionSearchView.tsx has 1531 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 · web/src/pages/Exports.tsx · ×1
  • web/src/pages/Exports.tsx: 1442 lines of code web/src/pages/Exports.tsx:1 — web/src/pages/Exports.tsx has 1442 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 · web/src/components/overlay/ExportDialog.tsx · ×1
  • web/src/components/overlay/ExportDialog.tsx: 1424 lines of code web/src/components/overlay/ExportDialog.tsx:1 — web/src/components/overlay/ExportDialog.tsx has 1424 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 · web/src/components/config-form/sections/BaseSection.tsx · ×1
  • web/src/components/config-form/sections/BaseSection.tsx: 1337 lines of code web/src/components/config-form/sections/BaseSection.tsx:1 — web/src/components/config-form/sections/BaseSection.tsx has 1337 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 · web/src/views/settings/CameraManagementView.tsx · ×1
  • web/src/views/settings/CameraManagementView.tsx: 1331 lines of code web/src/views/settings/CameraManagementView.tsx:1 — web/src/views/settings/CameraManagementView.tsx has 1331 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 · web/src/views/recording/RecordingView.tsx · ×1
  • web/src/views/recording/RecordingView.tsx: 1302 lines of code web/src/views/recording/RecordingView.tsx:1 — web/src/views/recording/RecordingView.tsx has 1302 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 · web/src/components/overlay/detail/TrackingDetails.tsx · ×1
  • web/src/components/overlay/detail/TrackingDetails.tsx: 1188 lines of code web/src/components/overlay/detail/TrackingDetails.tsx:1 — web/src/components/overlay/detail/TrackingDetails.tsx has 1188 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 · web/src/views/classification/ModelTrainingView.tsx · ×1
  • web/src/views/classification/ModelTrainingView.tsx: 1152 lines of code web/src/views/classification/ModelTrainingView.tsx:1 — web/src/views/classification/ModelTrainingView.tsx has 1152 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1116 lines of code REDACTED:1 — REDACTED has 1116 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 · web/src/views/settings/Go2RtcStreamsSettingsView.tsx · ×1
  • web/src/views/settings/Go2RtcStreamsSettingsView.tsx: 1111 lines of code web/src/views/settings/Go2RtcStreamsSettingsView.tsx:1 — web/src/views/settings/Go2RtcStreamsSettingsView.tsx has 1111 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 · web/src/components/timeline/DetailStream.tsx · ×1
  • web/src/components/timeline/DetailStream.tsx: 1050 lines of code web/src/components/timeline/DetailStream.tsx:1 — web/src/components/timeline/DetailStream.tsx has 1050 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · web/src/pages/FaceLibrary.tsx · ×1
  • web/src/pages/FaceLibrary.tsx: 1042 lines of code web/src/pages/FaceLibrary.tsx:1 — web/src/pages/FaceLibrary.tsx has 1042 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 · web/src/components/settings/ZoneEditPane.tsx · ×1
  • web/src/components/settings/ZoneEditPane.tsx: 1031 lines of code web/src/components/settings/ZoneEditPane.tsx:1 — web/src/components/settings/ZoneEditPane.tsx has 1031 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 · web/src/views/live/DraggableGridLayout.tsx · ×1
  • web/src/views/live/DraggableGridLayout.tsx: 1010 lines of code web/src/views/live/DraggableGridLayout.tsx:1 — web/src/views/live/DraggableGridLayout.tsx has 1010 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 · web/src/components/filter/CameraGroupSelector.tsx · ×1
  • web/src/components/filter/CameraGroupSelector.tsx: 1007 lines of code web/src/components/filter/CameraGroupSelector.tsx:1 — web/src/components/filter/CameraGroupSelector.tsx has 1007 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 · web/src/views/settings/MasksAndZonesView.tsx · ×1
  • web/src/views/settings/MasksAndZonesView.tsx: 998 lines of code web/src/views/settings/MasksAndZonesView.tsx:1 — web/src/views/settings/MasksAndZonesView.tsx has 998 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 · web/src/components/settings/CloneCameraDialog.tsx · ×1
  • web/src/components/settings/CloneCameraDialog.tsx: 991 lines of code web/src/components/settings/CloneCameraDialog.tsx:1 — web/src/components/settings/CloneCameraDialog.tsx has 991 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 · web/src/views/events/MotionPreviewsPane.tsx · ×1
  • web/src/views/events/MotionPreviewsPane.tsx: 973 lines of code web/src/views/events/MotionPreviewsPane.tsx:1 — web/src/views/events/MotionPreviewsPane.tsx has 973 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 961 lines of code REDACTED:1 — REDACTED has 961 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 · web/src/components/settings/wizard/Step3StreamConfig.tsx · ×1
  • web/src/components/settings/wizard/Step3StreamConfig.tsx: 942 lines of code web/src/components/settings/wizard/Step3StreamConfig.tsx:1 — web/src/components/settings/wizard/Step3StreamConfig.tsx has 942 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 · web/src/hooks/use-config-override.ts · ×1
  • web/src/hooks/use-config-override.ts: 935 lines of code web/src/hooks/use-config-override.ts:1 — web/src/hooks/use-config-override.ts has 935 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 · web/src/views/system/GeneralMetrics.tsx · ×1
  • web/src/views/system/GeneralMetrics.tsx: 933 lines of code web/src/views/system/GeneralMetrics.tsx:1 — web/src/views/system/GeneralMetrics.tsx has 933 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 · web/src/utils/configUtil.ts · ×1
  • web/src/utils/configUtil.ts: 864 lines of code web/src/utils/configUtil.ts:1 — web/src/utils/configUtil.ts has 864 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 · web/src/views/settings/TriggerView.tsx · ×1
  • web/src/views/settings/TriggerView.tsx: 852 lines of code web/src/views/settings/TriggerView.tsx:1 — web/src/views/settings/TriggerView.tsx has 852 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 · web/src/components/player/dynamic/DynamicVideoPlayer.tsx · ×1
  • web/src/components/player/dynamic/DynamicVideoPlayer.tsx: 820 lines of code web/src/components/player/dynamic/DynamicVideoPlayer.tsx:1 — web/src/components/player/dynamic/DynamicVideoPlayer.tsx has 820 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 · web/src/utils/cameraClone.ts · ×1
  • web/src/utils/cameraClone.ts: 812 lines of code web/src/utils/cameraClone.ts:1 — web/src/utils/cameraClone.ts has 812 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 · web/src/components/player/MsePlayer.tsx · ×1
  • web/src/components/player/MsePlayer.tsx: 797 lines of code web/src/components/player/MsePlayer.tsx:1 — web/src/components/player/MsePlayer.tsx has 797 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 · web/src/components/menu/GeneralSettings.tsx · ×1
  • web/src/components/menu/GeneralSettings.tsx: 792 lines of code web/src/components/menu/GeneralSettings.tsx:1 — web/src/components/menu/GeneralSettings.tsx has 792 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 · web/src/views/settings/AuthenticationView.tsx · ×1
  • web/src/views/settings/AuthenticationView.tsx: 789 lines of code web/src/views/settings/AuthenticationView.tsx:1 — web/src/views/settings/AuthenticationView.tsx has 789 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 · web/src/api/ws.ts · ×1
  • web/src/api/ws.ts: 788 lines of code web/src/api/ws.ts:1 — web/src/api/ws.ts has 788 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 · web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx · ×1
  • web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx: 780 lines of code web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx:1 — web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx has 780 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 · web/src/components/overlay/MobileReviewSettingsDrawer.tsx · ×1
  • web/src/components/overlay/MobileReviewSettingsDrawer.tsx: 771 lines of code web/src/components/overlay/MobileReviewSettingsDrawer.tsx:1 — web/src/components/overlay/MobileReviewSettingsDrawer.tsx has 771 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 · web/src/views/settings/ProfilesView.tsx · ×1
  • web/src/views/settings/ProfilesView.tsx: 733 lines of code web/src/views/settings/ProfilesView.tsx:1 — web/src/views/settings/ProfilesView.tsx has 733 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 · web/src/components/ui/sidebar.tsx · ×1
  • web/src/components/ui/sidebar.tsx: 725 lines of code web/src/components/ui/sidebar.tsx:1 — web/src/components/ui/sidebar.tsx has 725 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 · web/src/lib/config-schema/transformer.ts · ×1
  • web/src/lib/config-schema/transformer.ts: 713 lines of code web/src/lib/config-schema/transformer.ts:1 — web/src/lib/config-schema/transformer.ts has 713 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 · web/src/pages/Replay.tsx · ×1
  • web/src/pages/Replay.tsx: 711 lines of code web/src/pages/Replay.tsx:1 — web/src/pages/Replay.tsx has 711 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 (~614 LoC) · ×1
  • Dead file (~614 LoC) web/src/views/settings/EnrichmentsSettingsView.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~173 LoC) · ×1
  • Dead file (~173 LoC) web/src/components/camera/DebugCameraImage.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~123 LoC) · ×1
  • Dead file (~123 LoC) web/src/components/camera/ResizingCameraImage.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~112 LoC) · ×1
  • Dead file (~112 LoC) web/src/pages/MotionSearch.tsx — no import path from any entry point (38 application, 9 tooling, 70 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~94 LoC) · ×1
  • Dead file (~94 LoC) web/src/components/overlay/dialog/MultiSelectDialog.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~88 LoC) · ×1
  • Dead file (~88 LoC) web/src/components/chat/ToolCallBubble.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~70 LoC) · ×1
  • Dead file (~70 LoC) web/src/components/ui/text.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~63 LoC) · ×1
  • Dead file (~63 LoC) web/src/components/button/DownloadVideoButton.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~54 LoC) · ×1
  • Dead file (~54 LoC) web/src/hooks/use-press.ts — no import path from any entry point (38 application, 9 tooling, 70 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 (~44 LoC) · ×1
  • Dead file (~44 LoC) web/src/components/config-form/theme/widgets/NumberWidget.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~25 LoC) · ×1
  • Dead file (~25 LoC) web/src/lib/formatTimeAgo.ts — no import path from any entry point (38 application, 9 tooling, 70 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~19 LoC) · ×1
  • Dead file (~19 LoC) web/src/pages/NoMatch.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~17 LoC) · ×1
  • Dead file (~17 LoC) web/src/components/config-form/theme/widgets/CheckboxWidget.tsx — no import path from any entry point (38 application, 9 tooling, 70 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 (~11 LoC) · ×1
  • Dead file (~11 LoC) web/src/hooks/use-is-custom-role.ts — no import path from any entry point (38 application, 9 tooling, 70 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 (~6 LoC) · ×1
  • Dead file (~6 LoC) web/src/components/config-form/theme/fields/index.ts — no import path from any entry point (38 application, 9 tooling, 70 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 (~5 LoC) · ×1
  • Dead file (~5 LoC) web/src/components/ui/aspect-ratio.tsx — no import path from any entry point (38 application, 9 tooling, 70 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
X1 · Async correctness · `async` callback passed to `forEach` · ×1
  • `async` callback passed to `forEach` web/src/views/settings/UiSettingsView.tsx:155 — `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape.
X1 · Async correctness · Task from `asyncio.create_task` is not kept · ×1
  • Task from `asyncio.create_task` is not kept frigate/api/fastapi_app.py:88 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) web/src/utils/webrtcProbe.ts:120 — `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.
Minor — 185 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging generate_config_translations.py:224 — `info` at line 224 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:228 — `info` at line 228 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:234 — `info` at line 234 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:242 — `info` at line 242 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:347 — `warning` at line 347 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:440 — `warning` at line 440 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:447 — `info` at line 447 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:469 — `info` at line 469 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:496 — `info` at line 496 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:500 — `error` at line 500 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:515 — `info` at line 515 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:520 — `info` at line 520 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:524 — `info` at line 524 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:564 — `info` at line 564 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging generate_config_translations.py:566 — `error` at line 566 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:156 — `info` at line 156 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:160 — `debug` at line 160 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:249 — `info` at line 249 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:257 — `info` at line 257 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:264 — `info` at line 264 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:274 — `info` at line 274 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:465 — `info` at line 465 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:613 — `info` at line 613 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/app.py:632 — `info` at line 632 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging frigate/ffmpeg_presets.py:51 — `debug` at line 51 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • + 15 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Disabled test · ×34
  • Disabled test web/e2e/specs/_meta/error-collector.spec.ts:27 — 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 web/e2e/specs/_meta/error-collector.spec.ts:57 — 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 web/e2e/specs/_meta/error-collector.spec.ts:79 — 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 web/e2e/specs/auth.spec.ts:88 — 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 web/e2e/specs/chat.spec.ts:393 — 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 web/e2e/specs/classification.spec.ts:125 — 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 web/e2e/specs/classification.spec.ts:215 — 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 web/e2e/specs/command-menu.spec.ts:57 — 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 web/e2e/specs/command-menu.spec.ts:108 — 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 web/e2e/specs/command-menu.spec.ts:191 — 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 web/e2e/specs/command-menu.spec.ts:225 — 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 web/e2e/specs/command-menu.spec.ts:271 — 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 web/e2e/specs/config-editor.spec.ts:59 — 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 web/e2e/specs/config-editor.spec.ts:106 — 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 web/e2e/specs/config-editor.spec.ts:160 — 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 web/e2e/specs/config-editor.spec.ts:184 — 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 web/e2e/specs/config-editor.spec.ts:210 — 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 web/e2e/specs/config-editor.spec.ts:272 — 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 web/e2e/specs/error-boundary.spec.ts:109 — 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 web/e2e/specs/error-boundary.spec.ts:133 — 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 web/e2e/specs/error-boundary.spec.ts:153 — 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 web/e2e/specs/explore.spec.ts:81 — 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 web/e2e/specs/explore.spec.ts:232 — 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 web/e2e/specs/explore.spec.ts:265 — 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 web/e2e/specs/explore.spec.ts:285 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • + 9 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate web/src/components/settings/MotionMaskEditPane.tsx:416 — `!!editingProfile && polygon.name.length > 0` appears character-identically in 2 files — web/src/components/settings/MotionMaskEditPane.tsx, web/src/components/settings/ObjectMaskEditPane.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 web/src/components/classification/ClassificationModelEditDialog.tsx:98 — `!cameraConfig.enabled || !cameraConfig.enabled_in_config` appears character-identically in 2 files — web/src/components/classification/ClassificationModelEditDialog.tsx, web/src/components/classification/wizard/Step1NameAndDefine.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 web/src/components/overlay/CreateTriggerDialog.tsx:93 — `!config || !selectedCamera || !config.cameras[selectedCamera]?.semantic_search?.triggers` appears character-identically in 3 files — web/src/components/overlay/CreateTriggerDialog.tsx, web/src/components/trigger/wizard/Step1NameAndType.tsx, web/src/views/settings/TriggerView.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 web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx:63 — `!config || typeof config !== "object" || Array.isArray(config)` appears character-identically in 2 files — web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx, web/src/components/config-form/theme/widgets/GenAIRolesWidget.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 web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx:90 — `!currentLabel && "text-muted-foreground"` appears character-identically in 3 files — web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx, web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx, web/src/components/config-form/theme/widgets/PTZPresetsWidget.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 web/src/components/settings/MotionMaskEditPane.tsx:262 — `!editingProfile && maskName && !renamingMask` appears character-identically in 2 files — web/src/components/settings/MotionMaskEditPane.tsx, web/src/components/settings/ObjectMaskEditPane.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 web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx:71 — `!entry || typeof entry !== "object" || Array.isArray(entry)` appears character-identically in 3 files — web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx, web/src/components/config-form/theme/widgets/GenAIRolesWidget.tsx, web/src/utils/cameraClone.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 web/src/components/overlay/CreateTriggerDialog.tsx:134 — `!existingTriggerFriendlyNames.includes(value) || value === trigger?.friendly_name` appears character-identically in 2 files — web/src/components/overlay/CreateTriggerDialog.tsx, web/src/components/trigger/wizard/Step1NameAndType.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 web/src/components/overlay/CreateTriggerDialog.tsx:126 — `!existingTriggerNames.includes(value) || value === trigger?.name` appears character-identically in 2 files — web/src/components/overlay/CreateTriggerDialog.tsx, web/src/components/trigger/wizard/Step1NameAndType.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 web/src/components/config-form/theme/fields/KnownPlatesField.tsx:229 — `!formData || typeof formData !== "object" || Array.isArray(formData)` appears character-identically in 2 files — web/src/components/config-form/theme/fields/KnownPlatesField.tsx, web/src/components/config-form/theme/fields/LiveStreamsField.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 web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx:57 — `!genai || typeof genai !== "object" || Array.isArray(genai)` appears character-identically in 2 files — web/src/components/config-form/theme/widgets/GenAIBackedModelWidget.tsx, web/src/components/config-form/theme/widgets/GenAIModelWidget.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 web/src/components/config-form/theme/fields/CameraInputsField.tsx:59 — `!items || typeof items !== "object" || Array.isArray(items)` appears character-identically in 3 files — web/src/components/config-form/theme/fields/CameraInputsField.tsx, web/src/components/config-form/theme/fields/ModelsField.tsx, web/src/components/config-form/theme/fields/ReplaceRulesField.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 web/src/components/menu/AccountSettings.tsx:54 — `!profile?.username || profile.username === "anonymous"` appears character-identically in 2 files — web/src/components/menu/AccountSettings.tsx, web/src/components/menu/GeneralSettings.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 web/src/components/config-form/section-configs/objects.ts:88 — `!providers || Object.keys(providers).length === 0` appears character-identically in 2 files — web/src/components/config-form/section-configs/objects.ts, web/src/components/config-form/section-configs/review.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 web/src/components/settings/MotionMaskEditPane.tsx:186 — `!scaledWidth || !scaledHeight || !polygon || !cameraConfig` appears character-identically in 2 files — web/src/components/settings/MotionMaskEditPane.tsx, web/src/components/settings/ObjectMaskEditPane.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 web/src/components/config-form/theme/fields/CameraInputsField.tsx:69 — `!schema || typeof schema.properties !== "object" || !schema.properties` appears character-identically in 2 files — web/src/components/config-form/theme/fields/CameraInputsField.tsx, web/src/components/config-form/theme/fields/ModelsField.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 web/src/components/player/MsePlayer.tsx:749 — `!videoRef.current || volume == undefined` appears character-identically in 2 files — web/src/components/player/MsePlayer.tsx, web/src/components/player/WebRTCPlayer.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 web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx:44 — `!widgetId.startsWith(prefix) || !widgetId.endsWith(suffix)` appears character-identically in 2 files — web/src/components/config-form/theme/widgets/GenAIModelWidget.tsx, web/src/components/config-form/theme/widgets/GenAIRolesWidget.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 web/src/hooks/use-config-schema.ts:59 — `"$ref" in sectionProp && typeof sectionProp.$ref === "string"` appears character-identically in 2 files — web/src/hooks/use-config-schema.ts, web/src/utils/configUtil.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 web/src/components/player/BirdseyeLivePlayer.tsx:34 — `"MediaSource" in window || "ManagedMediaSource" in window` appears character-identically in 4 files — web/src/components/player/BirdseyeLivePlayer.tsx, web/src/components/player/LivePlayer.tsx, web/src/hooks/use-camera-live-mode.ts, web/src/views/live/LiveCameraView.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 web/src/components/timeline/SummaryTimeline.tsx:288 — `"TouchEvent" in window && e instanceof TouchEvent` appears character-identically in 2 files — web/src/components/timeline/SummaryTimeline.tsx, web/src/hooks/use-draggable-element.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 web/src/components/timeline/SummaryTimeline.tsx:199 — `"TouchEvent" in window && e.nativeEvent instanceof TouchEvent` appears character-identically in 3 files — web/src/components/timeline/SummaryTimeline.tsx, web/src/hooks/use-draggable-element.ts, web/src/views/live/LiveBirdseyeView.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 web/src/components/config-form/theme/fields/CameraInputsField.tsx:293 — `Number.isNaN(current) || current === index` appears character-identically in 2 files — web/src/components/config-form/theme/fields/CameraInputsField.tsx, web/src/components/config-form/theme/fields/ModelsField.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 web/src/views/live/DraggableGridLayout.tsx:754 — `Object.values(availableStreams)[0] || ""` appears character-identically in 2 files — web/src/views/live/DraggableGridLayout.tsx, web/src/views/live/LiveDashboardView.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 web/src/components/overlay/ClassificationSelectionDialog.tsx:98 — `React.isValidElement(children) && children.type === Button` appears character-identically in 2 files — web/src/components/overlay/ClassificationSelectionDialog.tsx, web/src/components/overlay/FaceSelectionDialog.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.
R7 · Dead Code · Unused export 'default' · ×17
  • Unused export 'default' web/src/components/config-form/ConfigForm.tsx:370 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/sections/ConfigSectionTemplate.tsx:33 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/CameraInputsField.tsx:554 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/HardwarePicker.tsx:277 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/KnownPlatesField.tsx:514 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/LiveStreamsField.tsx:639 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/LiveTranscodeField.tsx:280 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/ModelSourcePicker.tsx:199 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/ModelsField.tsx:483 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/ReplaceRulesField.tsx:267 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/fields/StreamSourceSelector.tsx:217 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/templates/ArrayFieldItemTemplate.tsx:58 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' REDACTED:204 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/widgets/DefaultRoleWidget.tsx:59 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/config-form/theme/widgets/TimezoneSelectWidget.tsx:64 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/player/dynamic/DynamicVideoController.ts:198 — Nothing imports this binding — it is safe to review for removal.
  • Unused export 'default' web/src/components/settings/PolygonCanvas.tsx:379 — Nothing imports this binding — it is safe to review for removal.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×16
  • Diagnostic log message is built whether or not it is wanted frigate/track/tracked_object.py:254 — `debug` at line 254 is called with an argument built by `tuple(np.round(self.obj_data["…"]).flatten().astype(int))` (line 256), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/stats/hardware.py:286 — `debug` at line 286 is called with an argument built by `list(monitored)` (line 286), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/record/export.py:699 — `debug` at line 699 is called with an argument built by `sorted(codecs)` (line 702), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/ptz/autotrack.py:834 — `debug` at line 834 is called with an argument built by `tuple(np.round(velocities).flatten().astype(int))` (line 835), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/ptz/autotrack.py:883 — `debug` at line 883 is called with an argument built by `tuple(np.round(velocities, 2).flatten().astype(int))` (line 884), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/ptz/autotrack.py:1109 — `debug` at line 1109 is called with an argument built by `tuple(predicted_box)` (line 1109), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/ptz/autotrack.py:1110 — `debug` at line 1110 is called with an argument built by `tuple(np.round(average_velocity).flatten().astype(int))` (line 1111), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/ptz/autotrack.py:1155 — `debug` at line 1155 is called with an argument built by `tuple(zoom_predicted_box)` (line 1156), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/jobs/vlm_watch.py:264 — `debug` at line 264 is called with an argument built by `[{ "…" : o.get("…"), "…" : o.get("…") } for o in (tracked_objects or[])]` (line 271), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/genai/plugins/ollama.py:500 — `debug` at line 500 is called with an argument built by `list(message.keys())` (line 503), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/detectors/hardware.py:403 — `debug` at line 403 is called with an argument built by `[h.key for h in found]` (line 403), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/data_processing/common/license_plate/mixin.py:1487 — `debug` at line 1487 is called with an argument built by `list(plate_box)` (line 1487), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/comms/webpush.py:485 — `debug` at line 485 is called with an argument built by `"…".join(allowed)` (line 488), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/api/auth.py:319 — `debug` at line 319 is called with an argument built by `[r for r in route]` (line 319), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/api/chat.py:1344 — `debug` at line 1344 is called with an argument built by `json.dumps(tool_args, indent = 2)` (line 1345), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
  • Diagnostic log message is built whether or not it is wanted frigate/api/media.py:752 — `debug` at line 752 is called with an argument built by `sorted(video_codecs)` (line 759), whose cost grows with the collection it walks. Python 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 `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
D31 · IaC & Container Security · Low IaC · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned file · ×7
  • Orphaned file frigate/service_manager/service.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file web/src/components/overlay/ShareTimestampDialog.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file frigate/service_manager/multiprocessing_waiter.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file frigate/service_manager/multiprocessing.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file frigate/detectors/plugins/synaptics.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file web/src/context/language-provider.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file docker/rockchip/conv2rknn.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch REDACTED:50 — `normalize` 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 frigate/detectors/detection_runners.py:553 — `get_input_width` swallows every exception into `return -1` — 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 web/src/components/config-form/theme/fields/DictAsYamlField.tsx:20 — `formatYaml` 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.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×3
  • Silent fallback default on parse failure frigate/output/birdseye.py:224 — `read` returns `False` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure frigate/output/camera.py:76 — `read` returns `False` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default on parse failure frigate/stats/util.py:43 — `get_latest_version` returns `'unknown'` when `(RequestException, JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 111 significant file(s) lose their only recent owner: web/src/views/motion-search/MotionSearchView.tsx, web/src/components/config-form/sections/BaseSection.tsx, web/src/components/settings/CloneCameraDialog.tsx, testing-scripts/object_dataset.py, web/src/components/settings/wizard/Step3StreamConfig.tsx, web/src/views/settings/Go2RtcStreamsSettingsView.tsx, web/src/views/events/MotionPreviewsPane.tsx, web/src/hooks/use-config-override.ts (+103 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 13 significant file(s) lose their only recent owner: frigate/data_processing/post/review_annotations.py, frigate/data_processing/common/face/detector.py, frigate/util/object_names.py, frigate/genai/manager.py, frigate/detectors/plugins/onnx.py, web/src/components/chat/ChatComposer.tsx, frigate/stats/intel_gpu_info.py, web/src/components/config-form/section-validations/models.ts (+5 more). Pair on, review, or document these before any departure.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (125 single-owned of 548 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 548 of the 914 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: frigate/detectors/plugins/deepx.py.
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 — 2 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `web` (127043 LoC, 628 module-visible types across 66 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 7 of 549 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 549 of the 914 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: frigate/service_manager/service.py, web/src/components/overlay/ShareTimestampDialog.tsx, frigate/service_manager/multiprocessing_waiter.py, frigate/service_manager/multiprocessing.py, frigate/detectors/plugins/synaptics.py, docker/rockchip/conv2rknn.py, web/src/context/language-provider.tsx. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `docker/main`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 40879 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
P6 · Release Hygiene · Changelog looks stale/thin · ×1
  • Changelog looks stale/thin — The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
R7 · Dead Code · Unused export 'useAudioActivity' · ×1
  • Unused export 'useAudioActivity' web/src/api/ws.ts:713 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isSimpleNullableField' · ×1
  • Unused export 'isSimpleNullableField' web/src/components/config-form/theme/fields/nullableUtils.ts:37 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SwitchesWidgetOptions' · ×1
  • Unused export 'SwitchesWidgetOptions' web/src/components/config-form/theme/widgets/SwitchesWidget.tsx:33 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'VideoTab' · ×1
  • Unused export 'VideoTab' web/src/components/overlay/detail/SearchDetailDialog.tsx:1890 — Nothing imports this binding — it is safe to review for removal.
S1 · Web-Security Posture · Security headers incomplete · ×1
  • Security headers incomplete REDACTED:81 — Set: Referrer-Policy, X-Content-Type-Options. Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−1.5 on this card.)
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 1/8 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 1/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
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 — 45 assertion(s) across the 140178 source line(s) of the 601 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: web/src/views/settings/MasksAndZonesView.tsx (10), web/src/views/classification/ModelTrainingView.tsx (6), web/src/components/settings/CameraWizardDialog.tsx (4). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Minor — 14 finding(s)
D12 · Dependency Hygiene · Outdated · ×14
  • Outdated: nvidia-cublas-cu12 — `nvidia-cublas-cu12` is pinned to 12.8.4.1, but 12.9.2.10 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 12.8.4.1 until the declaration is edited.
  • Outdated: nvidia-cuda-cupti-cu12 — `nvidia-cuda-cupti-cu12` is pinned to 12.8.90, but 12.9.79 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 12.8.90 until the declaration is edited.
  • Outdated: nvidia-cuda-nvcc-cu12 — `nvidia-cuda-nvcc-cu12` is pinned to 12.8.93, but 12.9.86 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 12.8.93 until the declaration is edited.
  • Outdated: nvidia-cuda-nvrtc-cu12 — `nvidia-cuda-nvrtc-cu12` is pinned to 12.8.93, but 12.9.86 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 12.8.93 until the declaration is edited.
  • Outdated: nvidia-cuda-runtime-cu12 — `nvidia-cuda-runtime-cu12` is pinned to 12.8.90, but 12.9.79 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 12.8.90 until the declaration is edited.
  • Outdated: nvidia-cudnn-cu12 — `nvidia-cudnn-cu12` is pinned to 9.8.0.87, but 9.27.0.42 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 9.8.0.87 until the declaration is edited.
  • Outdated: nvidia-cufft-cu12 — `nvidia-cufft-cu12` is pinned to 11.3.3.83, but 11.4.1.4 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 11.3.3.83 until the declaration is edited.
  • Outdated: nvidia-curand-cu12 — `nvidia-curand-cu12` is pinned to 10.3.9.90, but 10.3.10.19 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 10.3.9.90 until the declaration is edited.
  • Outdated: nvidia-cusolver-cu12 — `nvidia-cusolver-cu12` is pinned to 11.7.3.90, but 11.7.5.82 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 11.7.3.90 until the declaration is edited.
  • Outdated: nvidia-cusparse-cu12 — `nvidia-cusparse-cu12` is pinned to 12.5.8.93, but 12.5.10.65 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 12.5.8.93 until the declaration is edited.
  • Outdated: nvidia-nccl-cu12 — `nvidia-nccl-cu12` is pinned to 2.26.2.post1, but 2.32.3 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 2.26.2.post1 until the declaration is edited.
  • Outdated: nvidia-nvjitlink-cu12 — `nvidia-nvjitlink-cu12` is pinned to 12.8.93, but 12.9.86 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 12.8.93 until the declaration is edited.
  • Outdated: rknn-toolkit-lite2 — `rknn-toolkit-lite2` is pinned to 2.3.2, but 2.5.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 2.3.2 until the declaration is edited.
  • Outdated: rknn-toolkit2 — `rknn-toolkit2` is pinned to 2.3.2, but 2.5.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 2.3.2 until the declaration is edited.

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-b2b65eb4aa194e89bb858dcc973fc21c/history.json --exit-code 0 --source .5artifacts/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-b2b65eb4aa194e89bb858dcc973fc21c/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .81artifacts/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-update6artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .64artifacts/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 2 file(s) — `REDACTED`, `web/src/components/classification/ClassificationModelEditDialog.tsx` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a1796b-33d8-7b7b-835d-9edaca06ec90 · 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