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

iFurySt/open-codex-computer-use

Measured 15 November 2026, 01:29 UTC, at code version e25be21

CAI score 57out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change since the last survey

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

A medium codebase: 35,497 lines of product code in 14 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Code Health, 49

Findings by how serious they are

1 critical 492 serious 24 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 01:29 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

51of 51 dimensions measured by tools.
505of 517 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
51dimensions across 6 lenses, read from 35,497 lines of product code in 14 projects.
Chapters

Executive summary

iFurySt/open-codex-computer-use falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 57 out of 100 and is rated Adequate, and its one critical finding is a security problem in the build pipeline.

Code Health, at 49, is the weakest lens and counts most in the score. The best first steps are adding type checking and adding automated security scanning, each worth about 5 points. Raising Code Health to 70 would lift the score to about 63.

One secret can leak from the build pipeline. Limiting the secret to its own step would close this risk.

The product code is 35,497 lines, about €51,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.
Code Health 49 · counts for 46%Production Readiness 50 · counts for 25%Performance 70 · counts for 14%Security and Compliance 79 · counts for 8%Maturity 89 · counts for 4%Architecture 94 · counts for 2%

If Code Health rose from 49 to 70, the lowest score rated Strong, the score would rise from 57 to about 63.

Code composition: what the lines of code are
Product code 72%Tests 28%
New since the last survey: 116 findings

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

  • Cyclomatic Complexity · TreeRenderer.renderSelected (cyclomatic 40) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Cyclomatic Complexity · TreeRenderer.plan (cyclomatic 24) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Cyclomatic Complexity · ComputerUseService.typeTextUsingAccessibility (cyclomatic 23) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift
  • Cyclomatic Complexity · PhysicalInputMonitor.start (cyclomatic 18) experiments/LockedUse/Sources/Guardian/PhysicalInputMonitor.swift
  • Cyclomatic Complexity · ElementIdentity.read (cyclomatic 18) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ElementIdentity.swift
  • Cyclomatic Complexity · service.refreshSnapshot (cyclomatic 17) apps/OpenComputerUseWindows/main.go
  • Cyclomatic Complexity · SetValueReadBack.swift.normalizedSetValueNumber (cyclomatic 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SetValueReadBack.swift
  • Cognitive Complexity · TreeRenderer.renderSelected (cognitive 44) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Cognitive Complexity · ComputerUseService.typeTextUsingAccessibility (cognitive 30) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift
  • Cognitive Complexity · PhysicalInputMonitor.start (cognitive 28) experiments/LockedUse/Sources/Guardian/PhysicalInputMonitor.swift
  • Cognitive Complexity · TreeRenderer.plan (cognitive 26) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Cognitive Complexity · ElementIdentity.read (cognitive 21) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ElementIdentity.swift
  • Cognitive Complexity · service.refreshSnapshot (cognitive 20) apps/OpenComputerUseWindows/main.go
  • Cognitive Complexity · SetValueReadBack.swift.normalizedSetValueNumber (cognitive 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SetValueReadBack.swift
  • Cognitive Complexity · runtime.set_element_value (cognitive 17) apps/OpenComputerUseLinux/runtime.py
  • Cognitive Complexity · TreeRenderer.rawChildren (cognitive 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • God Classes · MethodTooLong: TreeRenderer.renderSelected packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Code Duplication · Near-duplicate member family (3 members, 70 shared lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Near-duplicate member pair (89 shared lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (64 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift
  • Code Duplication · Edited copy of a member (76 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copies of one member (3 members, 49+ corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift
  • Code Duplication · Edited copy of a member (50 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (50 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (40 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (45 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copies of one member (3 members, 37+ corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift
  • Code Duplication · Edited copy of a member (42 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (20 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseClickAllowance.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift
  • Code Duplication · Edited copy of a member (28 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (44 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (25 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Code Duplication · Edited copy of a member (34 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (16 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift
  • Code Duplication · Edited copy of a member (27 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseDisplayPreflight.swift
  • Code Duplication · Edited copy of a member (31 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (9 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPC.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift
  • Code Duplication · Edited copy of a member (33 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (13 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilityTextSelection.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (9 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (8 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilityTextSelection.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Edited copy of a member (15 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerConfiguration.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) apps/OpenComputerUseSmokeSuite/Sources/OpenComputerUseSmokeSuite/main.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseGuardianPolicy.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift
  • Code Duplication · Duplicated block (21 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (13 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (8 lines × 2) experiments/LockedUse/Sources/Guardian/ShieldPreview.swift
  • Code Duplication · Duplicated block (14 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (7 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 96 findings

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

  • Cyclomatic Complexity · open-computer-use-repl.createCuaApi::appBinding (cyclomatic 41) scripts/node-repl/open-computer-use-repl.mjs
  • Cyclomatic Complexity · TreeRenderer.render (cyclomatic 37) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Cyclomatic Complexity · run-locked-use-native-validation.main (cyclomatic 34) scripts/run-locked-use-native-validation.py
  • Cyclomatic Complexity · open-computer-use-cli.main (cyclomatic 30) scripts/node-repl/open-computer-use-cli.mjs
  • Cyclomatic Complexity · CodexDump._summarize_local_session (cyclomatic 25) scripts/codex_dump.py
  • Cyclomatic Complexity · ocu-config.validateSetting (cyclomatic 24) scripts/node-repl/ocu-config.mjs
  • Cyclomatic Complexity · locked_use_report.curate (cyclomatic 22) scripts/locked_use_report.py
  • Cyclomatic Complexity · run-locked-use-rehearsal.main (cyclomatic 22) scripts/run-locked-use-rehearsal.py
  • Cyclomatic Complexity · run-locked-use-unshielded-diagnostic.main (cyclomatic 22) scripts/run-locked-use-unshielded-diagnostic.py
  • Cyclomatic Complexity · install-config-helper.probeStdioMcp (cyclomatic 22) scripts/install-config-helper.mjs
  • Cyclomatic Complexity · ocu-config.configCommand (cyclomatic 21) scripts/node-repl/ocu-config.mjs
  • Cyclomatic Complexity · install-config-helper.installOpencodeMcp (cyclomatic 20) scripts/install-config-helper.mjs
  • Cyclomatic Complexity · DisplayGuardian.reportToBroker (cyclomatic 19) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift
  • Cyclomatic Complexity · install-config-helper.main (cyclomatic 19) scripts/install-config-helper.mjs
  • Cyclomatic Complexity · open-computer-use-cli.runInteractiveRepl (cyclomatic 19) scripts/node-repl/open-computer-use-cli.mjs
  • Cyclomatic Complexity · open-computer-use-repl.runServer (cyclomatic 18) scripts/node-repl/open-computer-use-repl.mjs
  • Cyclomatic Complexity · locked_use_report.authentication_windows (cyclomatic 17) scripts/locked_use_report.py
  • Cyclomatic Complexity · main.runCall (cyclomatic 17) scripts/computer-use-cli/main.go
  • Cyclomatic Complexity · CodexDump._sync_local_sessions (cyclomatic 16) scripts/codex_dump.py
  • Cyclomatic Complexity · LiveAuthenticationTrace._read (cyclomatic 16) scripts/locked_use_report.py
  • Cyclomatic Complexity · open-computer-use-cli.parseJavaScriptArgs (cyclomatic 16) scripts/node-repl/open-computer-use-cli.mjs
  • Cognitive Complexity · locked_use_report.curate (cognitive 51) scripts/locked_use_report.py
  • Cognitive Complexity · run-locked-use-native-validation.main (cognitive 51) scripts/run-locked-use-native-validation.py
  • Cognitive Complexity · CodexDump._summarize_local_session (cognitive 49) scripts/codex_dump.py
  • Cognitive Complexity · open-computer-use-repl.createCuaApi::appBinding (cognitive 44) scripts/node-repl/open-computer-use-repl.mjs
  • Cognitive Complexity · TreeRenderer.render (cognitive 41) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Cognitive Complexity · open-computer-use-cli.runInteractiveRepl (cognitive 40) scripts/node-repl/open-computer-use-cli.mjs
  • Cognitive Complexity · LiveAuthenticationTrace._read (cognitive 37) scripts/locked_use_report.py
  • Cognitive Complexity · run-locked-use-unshielded-diagnostic.main (cognitive 37) scripts/run-locked-use-unshielded-diagnostic.py
  • Cognitive Complexity · open-computer-use-cli.main (cognitive 34) scripts/node-repl/open-computer-use-cli.mjs
  • Cognitive Complexity · locked_use_report.authentication_windows (cognitive 32) scripts/locked_use_report.py
  • Cognitive Complexity · install-config-helper.installOpencodeMcp (cognitive 30) scripts/install-config-helper.mjs
  • Cognitive Complexity · run-locked-use-rehearsal.main (cognitive 27) scripts/run-locked-use-rehearsal.py
  • Cognitive Complexity · official_cursor_motion.extract_motion_type_fields (cognitive 26) scripts/cursor-motion-re/official_cursor_motion.py
  • Cognitive Complexity · ocu-config.configCommand (cognitive 26) scripts/node-repl/ocu-config.mjs
  • Cognitive Complexity · install-config-helper.probeStdioMcp (cognitive 25) scripts/install-config-helper.mjs
  • Cognitive Complexity · ocu-config.validateSetting (cognitive 25) scripts/node-repl/ocu-config.mjs
  • Cognitive Complexity · appServerSession.request (cognitive 24) scripts/computer-use-cli/app_server.go
  • Cognitive Complexity · rpcSession.request (cognitive 24) scripts/computer-use-cli/main.go
  • Cognitive Complexity · CodexDump._sync_local_sessions (cognitive 22) scripts/codex_dump.py
  • Cognitive Complexity · CodexDump._session_matches_capture (cognitive 21) scripts/codex_dump.py
  • Cognitive Complexity · official_cursor_motion.scan_bundle_for_slider_labels (cognitive 21) scripts/cursor-motion-re/official_cursor_motion.py
  • Cognitive Complexity · open-computer-use-cli.parseJavaScriptArgs (cognitive 21) scripts/node-repl/open-computer-use-cli.mjs
  • Cognitive Complexity · main.runCall (cognitive 20) scripts/computer-use-cli/main.go
  • Cognitive Complexity · publish-packages.publishWithRetry (cognitive 20) scripts/npm/publish-packages.mjs
  • Cognitive Complexity · RPC.call (cognitive 19) scripts/run-locked-use-native-validation.py
  • Cognitive Complexity · main.discoverPluginRoot (cognitive 19) scripts/computer-use-cli/main.go
  • Cognitive Complexity · install-config-helper.main (cognitive 19) scripts/install-config-helper.mjs
  • Cognitive Complexity · CursorMotionPath.measure (cognitive 18) scripts/cursor-motion-re/official_cursor_motion.py
  • Cognitive Complexity · open-computer-use-repl.normalizeImage (cognitive 17) scripts/node-repl/open-computer-use-repl.mjs
  • Cognitive Complexity · open-computer-use-repl.runServer::handle (cognitive 17) scripts/node-repl/open-computer-use-repl.mjs
  • Cognitive Complexity · official_cursor_motion.build_timed_cursor_timeline (cognitive 16) scripts/cursor-motion-re/official_cursor_motion.py
  • Cognitive Complexity · JsonLinePeer.#onData (cognitive 16) scripts/node-repl/open-computer-use-repl.mjs
  • God Classes · FileTooLong: cursor-motion-re/official_cursor_motion.py scripts/cursor-motion-re/official_cursor_motion.py
  • God Classes · MethodTooLong: TreeRenderer.render packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • God Classes · FileTooLong: computer-use-cli/main.go scripts/computer-use-cli/main.go
  • God Classes · FileTooLong: scripts/install-config-helper.mjs scripts/install-config-helper.mjs
  • God Classes · FunctionTooLong: open-computer-use-repl.createCuaApi scripts/node-repl/open-computer-use-repl.mjs
  • God Classes · FileTooLong: node-repl/open-computer-use-repl.mjs scripts/node-repl/open-computer-use-repl.mjs
  • God Classes · FileTooLong: scripts/codex_dump.py scripts/codex_dump.py
  • Code Duplication · Near-duplicate member family (3 members, 68 shared lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Near-duplicate member family (3 members, 5 shared lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Near-duplicate member pair (85 shared lines) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Duplicated block (29 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
  • Code Duplication · Duplicated block (25 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (21 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (15–16 lines × 3) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift
  • Code Duplication · Duplicated block (15 lines × 2) experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift
  • Code Duplication · Duplicated block (14 lines × 2) apps/OpenComputerUseSmokeSuite/Sources/OpenComputerUseSmokeSuite/main.swift
  • Code Duplication · Duplicated block (12 lines × 2) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift
  • Code Duplication · Duplicated block (11 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (10 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (8 lines × 2) apps/OpenComputerUseSmokeSuite/Sources/OpenComputerUseSmokeSuite/main.swift
  • Code Duplication · Duplicated block (7 lines × 2) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift
  • Code Duplication · Duplicated block (7 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (6 lines × 2) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift
  • Code Duplication · Duplicated block (5 lines × 2) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift
  • Code Duplication · Duplicated block (5 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (5 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (7 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift
  • Code Duplication · Duplicated block (8 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift
  • Code Duplication · Duplicated block (5 lines × 2) experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift
  • Code Duplication · Duplicated block (10 lines × 2) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Duplicated block (9 lines × 2) apps/OpenComputerUseLinux/main.go
  • Code Duplication · Duplicated block (14 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/FixtureBridge.swift
  • Churn × Complexity Hotspots · Hotspot: packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift
  • Dependency Vulnerabilities · Medium CVE: GO-2025-3503 REDACTED
  • Dependency Vulnerabilities · Medium CVE: GO-2026-4599 REDACTED
  • Test Coverage · No test reaches this file scripts/npm/publish-packages.mjs
  • Exception handling · Swallowed exception (empty catch) scripts/run-locked-use-native-validation.py
  • Exception handling · Swallowed exception (empty catch) scripts/run-locked-use-native-validation.py
  • Exception handling · Swallowed exception (empty catch) scripts/node-repl/open-computer-use-repl.mjs
  • Exception handling · Swallowed exception (caught, then discarded) scripts/computer-use-cli/main.go
  • Exception handling · Swallowed exception (caught, then discarded) scripts/computer-use-cli/main.go
  • Exception handling · Swallowed exception (empty catch) apps/OpenComputerUseLinux/runtime.py
Rebuild cost: about €51,000 · Estimate
Cost to rebuild€17,000 to €84,000, for 280 to 888 hours of work, about 0.3 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 57. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 35,497 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 5 points · Medium effort · Type Safety
2
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 5 points · Medium effort · Security & performance tooling
3
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Raises the score by about 2 points · Medium effort · Async & latency hygiene

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €51,000 to build again, about 0.3 person-years of work. Its weakest lens is Code Health, at 49 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.6 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 9% to 19% on every change. The history of the code shows how much it changes: about 45,837 lines over the last 90 days, which is about 185,894 lines a year. At that pace, the extra work comes to an estimated 39.7 to 238.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch CursorMotion CursorMotion LockedUseNative LockedUseNative OCUGuardian OCUGuardian OpenComputerUseKit OpenComputerUseKit OCUGuardian->OpenComputerUseKit OCULockInstaller OCULockInstaller OCULockInstaller->LockedUseNative OCULockInstaller->OpenComputerUseKit OCULockService OCULockService OCULockService->LockedUseNative OCULockService->OpenComputerUseKit OpenComputerUse OpenComputerUse OpenComputerUse->OpenComputerUseKit OpenComputerUseKit->LockedUseNative OpenComputerUseVirtualDisplayShim OpenComputerUseVirtualDisplayShim OpenComputerUseKit->OpenComputerUseVirtualDisplayShim OpenComputerUseSmokeSuite OpenComputerUseSmokeSuite OpenComputerUseSmokeSuite->OpenComputerUseKit StandaloneCursor StandaloneCursor StandaloneCursorSupport StandaloneCursorSupport StandaloneCursor->StandaloneCursorSupport github.com/iFurySt/open-computer-use/apps/opencomputeruselinux opencomputeruselinux github.com/iFurySt/open-computer-use/apps/opencomputerusewindows opencomputerusewindows github.com/openai/codex/computer-use-cli computer-use-cli

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.

24 modules, with 13 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

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 apps.OpenComputerUseLinux2 experiments~LockedUse3 experiments~LockedUse~Installer4 github.com/iFurySt/open-computer-use/apps/opencomputeruselinux5 github.com/iFurySt/open-computer-use/apps/opencomputerusewindows6 github.com/openai/codex/computer-use-cli7 scripts8 scripts.codex_dump9 scripts.cursor-motion-re.official_cursor_motion10 scripts.locked_use_report11 scripts.node-repl12 scripts.node-repl.open-computer-use-repl13 scripts.npm14 scripts.run-locked-use-native-validation15 packages~OpenComputerUseKit~OpenComputerUseKit16 scripts.cursor-motion-re17 experiments~CursorMotion~CursorMotion18 experiments~LockedUse~Broker19 experiments~LockedUse~Guardian20 apps~OpenComputerUseSmokeSuite~OpenComputerUseSmokeSuite21 apps~OpenComputerUse~OpenComputerUse22 experiments~StandaloneCursor~StandaloneCursorSupport23 repository24 experiments~StandaloneCursor~StandaloneCursor
1 apps.OpenComputerUseLinux
2 experiments~LockedUse
3 experiments~LockedUse~Installer
4 github.com/iFurySt/open-computer-use/apps/opencomputeruselinux
5 github.com/iFurySt/open-computer-use/apps/opencomputerusewindows
6 github.com/openai/codex/computer-use-cli
7 scripts
8 scripts.codex_dump
9 scripts.cursor-motion-re.official_cursor_motion
10 scripts.locked_use_report
11 scripts.node-repl
12 scripts.node-repl.open-computer-use-repl
13 scripts.npm
14 scripts.run-locked-use-native-validation
15 packages~OpenComputerUseKit~OpenComputerUseKit103
16 scripts.cursor-motion-re8
17 experiments~CursorMotion~CursorMotion2
18 experiments~LockedUse~Broker13
19 experiments~LockedUse~Guardian21
20 apps~OpenComputerUseSmokeSuite~OpenComputerUseSmokeSuite23
21 apps~OpenComputerUse~OpenComputerUse2015
22 experiments~StandaloneCursor~StandaloneCursorSupport22
23 repository10
24 experiments~StandaloneCursor~StandaloneCursor127
Uses a module listed above itPart of a loopThe module itself
1 apps.OpenComputerUseLinux2 experiments~LockedUse3 experiments~LockedUse~Installer4 github.com/iFurySt/open-computer-use/apps/opencomputeruselinux5 github.com/iFurySt/open-computer-use/apps/opencomputerusewindows6 github.com/openai/codex/computer-use-cli7 scripts8 scripts.codex_dump9 scripts.cursor-motion-re.official_cursor_motion10 scripts.locked_use_report11 scripts.node-repl12 scripts.node-repl.open-computer-use-repl13 scripts.npm14 scripts.run-locked-use-native-validation15 packages~OpenComputerUseKit~OpenComputerUseKit16 scripts.cursor-motion-re17 experiments~CursorMotion~CursorMotion18 experiments~LockedUse~Broker19 experiments~LockedUse~Guardian20 apps~OpenComputerUseSmokeSuite~OpenComputerUseSmokeSuite21 apps~OpenComputerUse~OpenComputerUse22 experiments~StandaloneCursor~StandaloneCursorSupport23 repository24 experiments~StandaloneCursor~StandaloneCursorapps.OpenComputerUseLinux1experiments~LockedUse2experiments~LockedUse~Installer3github.com/iFurySt/open-computer-use/apps/opencomputeruselinux4github.com/iFurySt/open-computer-use/apps/opencomputerusewindows5github.com/openai/codex/computer-use-cli6scripts7scripts.codex_dump8scripts.cursor-motion-re.official_cursor_motion9scripts.locked_use_report10scripts.node-repl11scripts.node-repl.open-computer-use-repl12scripts.npm13scripts.run-locked-use-native-validation14packages~OpenComputerUseKit~OpenComputerUseKit15scripts.cursor-motion-re16experiments~CursorMotion~CursorMotion17experiments~LockedUse~Broker18experiments~LockedUse~Guardian19apps~OpenComputerUseSmokeSuite~OpenComputerUseSmokeSuite20apps~OpenComputerUse~OpenComputerUse21experiments~StandaloneCursor~StandaloneCursorSupport22repository23experiments~StandaloneCursor~StandaloneCursor241038213212320152210127

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

At a glance — Architecture · 94% · Exemplary ·

At a glance — Maturity · 89% · Strong ·

At a glance — Readiness · 50% · Weak · gated by P3 ·

At a glance — Security · 79% · Checked 5 of 11 ·

At a glance — Performance · 70% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures6Medium
A05:2025 — Injection2High / Critical
A02:2025 — Security Misconfiguration1Medium

Roadmap

Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.

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

Do thisHelpsEffortDimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+5.3 ptsMediumType Safety
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+4.7 ptsMediumSecurity & performance tooling
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.+2.4 ptsMediumAsync & latency hygiene
Resolve the 9 No assertions finding(s) in Test Quality — start with CursorWindowFollowTests.swift (4), LockedUseRecoveryDeadlineTests.swift (3), PermissionAccessoryPanelTests.swift (2).+0.9 ptsLowTest Quality
Swallowed exception (caught, then discarded)+1.6 ptsMediumException handling
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+1.5 ptsMediumObservability
Resolve the 15 Skipped test finding(s) in Test Quality — start with CursorWindowFollowTests.swift (2), LockedUseDisplayPreflightTests.swift, PermissionListAnchorTests.swift.+1.4 ptsMediumTest Quality
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+1.4 ptsMediumDeployment & Rollback

File quality

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

FileScoreBandWorst signal
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift5.9MixedCode Duplication: Edited copy of a member (11 corresponding lines)
experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift7.0MixedCyclomatic Complexity: DisplayGuardian.poll (cyclomatic 40)
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift7.0MixedCyclomatic Complexity: TreeRenderer.renderSelected (cyclomatic 40)
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift7.0MixedCyclomatic Complexity: ComputerUseService.click (cyclomatic 26)
apps/OpenComputerUseLinux/main.go7.0MixedCyclomatic Complexity: service.callTool (cyclomatic 25)
apps/OpenComputerUseWindows/main.go7.0MixedCyclomatic Complexity: service.callTool (cyclomatic 25)
experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift7.0MixedCognitive Complexity: CursorMotionPath.measure (cognitive 17)
experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift7.0MixedCode Duplication: Near-duplicate member family (3 members, 25 shared lines)
experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift7.0MixedCyclomatic Complexity: LockScreenInteractor.probe (cyclomatic 99)
experiments/LockedUse/Sources/Installer/InstallerMain.swift7.0MixedCyclomatic Complexity: InstallerMain.reconcileStoppedGuards (cyclomatic 25)
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift7.1MixedCyclomatic Complexity: LockedUseBrokerCoordinator.handle (cyclomatic 178)
experiments/LockedUse/Sources/Broker/BrokerMain.swift7.1MixedCyclomatic Complexity: BrokerServer.read (cyclomatic 55)
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift7.1MixedCyclomatic Complexity: OpenComputerUseCLI.swift.parseCall (cyclomatic 25)
apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift7.1MixedCyclomatic Complexity: PermissionSettingsWindowReader.context (cyclomatic 20)
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift7.1MixedCognitive Complexity: CursorMotionPath.measure (cognitive 17)
experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift7.1MixedGod Classes: FileTooLong: CursorMotion/CursorLabRootView.swift
experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift7.1MixedGod Classes: FileTooLong: StandaloneCursor/StandaloneCursorRootView.swift
packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift7.1MixedCode Duplication: Edited copy of a member (17 corresponding lines)
scripts/computer-use-cli/main.go7.1MixedCode Duplication: Edited copy of a member (53 corresponding lines)

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

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

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

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

Could not be resolved — 22

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

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 51 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 51 dimensions across the health lenses
D1D2D3D4D5D6D7D10D12D13D14D15D16D17D19D26D27D28D29D30D34D35D36D37D43D44AX10AX3AX4AX8AX9M1M2M3M4P1P10P2P3P4P6PF3R1R10R2R3R6R7R9X28X3

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1dcd2-e594-7db1-9ccd-51ed91c71c60.

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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 482 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 38 test source file(s) (.py, .go, .mjs) that it cannot: it reads the test types the .swift frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py, .go, .swift, .mjs) and this repository declares a SwiftPM test suite (OpenComputerUse), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its SwiftPM package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D20 ADR Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseNativeValidation.swift`, `apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift`, `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift`, `experiments/LockedUse/Sources/Guardian/ScreenLock.swift`, `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift`, … (+3 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit 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 audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention 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 retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights 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 data-subject rights controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Go, Python, Swift, c, objectivec is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Go, Python, Swift, c, objectivec is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C, Objectivec, Python, Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • 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 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, 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.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity4.0 / 10Weak✓ Tool-verified

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

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

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

62 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was LockedUseBrokerCoordinator.handle at 178.

service.callTool (cyclomatic 25) · ×2apps/OpenComputerUseLinux/main.go:201
main.runCallCommand (cyclomatic 23) · ×2apps/OpenComputerUseLinux/main.go:1635
main.runCLI (cyclomatic 22) · ×2apps/OpenComputerUseLinux/main.go:1454
LockedUseBrokerCoordinator.handle (cyclomatic 178)packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:98
LockScreenInteractor.probe (cyclomatic 99)experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:57

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

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with LockedUseBrokerCoordinator.handle (cyclomatic 178), LockScreenInteractor.probe (cyclomatic 99). — 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 2 together lifts Cyclomatic Complexity from 4.0 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

94 method(s) exceeded the cognitive complexity threshold of 15; the worst was LockedUseBrokerCoordinator.handle at 216.

main.runCallCommand (cognitive 36) · ×2apps/OpenComputerUseLinux/main.go:1635
main.parseSnapshotArgs (cognitive 28) · ×2apps/OpenComputerUseLinux/main.go:1562
main.runCLI (cognitive 27) · ×2apps/OpenComputerUseLinux/main.go:1454
service.callTool (cognitive 26) · ×2apps/OpenComputerUseLinux/main.go:201
CursorMotionPath.measure (cognitive 17) · ×2experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:203

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with LockedUseBrokerCoordinator.handle (cognitive 216). — Refactoring it lifts Cognitive Complexity from 2.0 to about 3.0/10.

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

D3 · God Classes7.6 / 10Strong✓ Tool-verified

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

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

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

29 god class(es) detected.

FileTooLong: OpenComputerUseKit/AccessibilitySnapshot.swift · ×12packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift
MethodTooLong: LockScreenInteractor.probe · ×10experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:57
ClassTooLong: ComputerUseService · ×5packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:648
TooManyMethods: ComputerUseServicepackages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:648
FunctionTooLong: OpenComputerUseCLI.swift.openComputerUseHelpTextpackages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift:134

What to do

  1. Resolve the 12 FileTooLong finding(s) in God Classes — start with CursorMotionModel.swift (2), main.go (2), AccessibilitySnapshot.swift. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 10 MethodTooLong finding(s) in God Classes — start with CursorMotionModel.swift (3), LockScreenInteractor.swift, LockedUseBrokerCoordinator.swift. — One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 5 ClassTooLong finding(s) in God Classes — start with CursorMotionModel.swift (2), ComputerUseService.swift, SoftwareCursorOverlay.swift. — One of this dimension's main actionable groups (5 warning-level).

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

D4 · Code Duplication2.7 / 10Weak✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

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

Duplicated block (11 lines × 2) · ×9experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:47
Duplicated block (7 lines × 2) · ×9experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:237
Duplicated block (12 lines × 2) · ×8experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:402
Duplicated block (13 lines × 2) · ×7experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:20
Duplicated block (8 lines × 2) · ×7experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:605

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

What to do

  1. Resolve the 9 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with main.go (5), CursorMotionApp.swift, CursorMotionModel.swift. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 9 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with main.go (5), StandaloneCursorRootView.swift, AccessibilitySnapshot.swift. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 8 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with main.go (4), CursorLabRootView.swift, CursorMotionModel.swift. — One of this dimension's main actionable groups (8 warning-level).

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

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

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

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

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

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

14 production modules (Go+SwiftPM), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 12 of the 14 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: StandaloneCursorSupport · ×2

What to do

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

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

D6 · Cohesion (LCOM4)9.6 / 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.6 / 10 · rule-coverage 100% · ceiling Verified

2 of 55 classes have LCOM4 above 3.

Low cohesion: SkyLightSPI (LCOM4 6) · ×2packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:105

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with SkyLightSPI.swift, MCPAppRuntime.swift. — One of this dimension's main actionable groups (2 warning-level).

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

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Detailed fixes: d7_recommendation.md.

D10 · Test Quality9.1 / 10Stronggated by 24 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

15 skipped, 9 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 482 tests. Measured on the .swift suite only — at least 38 test source file(s) (.py, .go, .mjs) went unread, so its test quality is unmeasured and is not in these counts.

Skipped test: testNativeHoldCreatesAndReleasesPowerAssertion · ×15apps/OpenComputerUse/Tests/PermissionOnboardingTests/LockedUseDisplayPreflightTests.swift:219
No assertions: testCompletedLaunchUsesExactTargetSize · ×9apps/OpenComputerUse/Tests/PermissionOnboardingTests/PermissionAccessoryPanelTests.swift:26

What to do

  1. Resolve the 15 Skipped test finding(s) in Test Quality — start with CursorWindowFollowTests.swift (2), LockedUseDisplayPreflightTests.swift, PermissionListAnchorTests.swift. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 9 No assertions finding(s) in Test Quality — start with CursorWindowFollowTests.swift (4), LockedUseRecoveryDeadlineTests.swift (3), PermissionAccessoryPanelTests.swift (2). — One of this dimension's main actionable groups (9 warning-level).

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

D12 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

0 outdated direct SwiftPM dependencies, 0 pinning defect(s). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md.

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 1 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 1 of them read from the licence file the repository carries at the revision Package.resolved pins, and 0 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. ★ COVERAGE OF THIS VERDICT: it grades this repository's SwiftPM package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.4 / 10Stronggated by 10 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: packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift (16×40=640); apps/OpenComputerUseWindows/main.go (22×25=550); packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift (21×26=546)

Hotspot: packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift · ×10packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:951

What to do

  1. Resolve the 10 Hotspot finding(s) in Churn × Complexity Hotspots — start with main.go (2), AccessibilitySnapshot.swift, ComputerUseService.swift. — One of this dimension's main actionable groups (10 warning-level).

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

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

21 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is scripts/cursor-motion-re/official_cursor_motion.py. Counted over 90 of the 135 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

1 of 4 build units (Go, 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.

D27 · Navigability9.9 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

23 % of calls cross a namespace and 1 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)8.0 / 10Adequategated by 1 critical finding✓ 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 8.0 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 1 high, 1 medium, 0 low. 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

What to do

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

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

D30 · Dependency Vulnerabilities9.6 / 10Stronggated by 3 serious 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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

REDACTED

What to do

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

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

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ 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 7.5 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

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

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

D37 · Vulnerability-disclosure Policy4.0 / 10Weak✓ Tool-verified

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

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

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

A vulnerability-disclosure policy (REDACTED) is present but lists no reporting contact.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Vulnerability-disclosure Policy — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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 3 platform declaration(s) and 0 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.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation10.0 / 10Exemplary✓ 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.

M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

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

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

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

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

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

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

P2 · Observability4.8 / 10Weak✓ 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/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `apps/OpenComputerUseLinux`, `apps/OpenComputerUseWindows`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling0.0 / 10Critical✓ 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 Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 4 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. — .github/workflows/ci.yml:4

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ 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.

  • The release 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 the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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 1 versioned entry, 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.
PF3 · Async & latency hygiene7.0 / 10Strong✓ Tool-verified

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

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

  • `readFileSync` in `runJavaScript` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/node-repl/open-computer-use-cli.mjs:330
  • `existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/node-repl/open-computer-use-cli.mjs:523

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety0.0 / 10Critical✓ Tool-verified

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

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

  • 0 typed · 31 plain JS — the untyped files are scripts/install-config-helper.mjs, scripts/node-repl/ocu-config.mjs, scripts/node-repl/ocu-config.test.mjs, scripts/node-repl/open-computer-use-cli.mjs, scripts/node-repl/open-computer-use-cli.test.mjs, scripts/node-repl/open-computer-use-kernel.mjs (+25 more).

What to do

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

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

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

  • scripts/install-config-helper.mjs:233 · scripts/install-config-helper.mjs:270 — 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. — scripts/install-config-helper.mjs:233
  • scripts/install-config-helper.mjs:792 · scripts/install-config-helper.mjs:813 — 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. — scripts/install-config-helper.mjs:792
  • scripts/npm/build-packages.mjs:140 · scripts/npm/publish-packages.mjs:74 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/npm/build-packages.mjs:140
  • scripts/install-config-helper.mjs:642 · scripts/node-repl/open-computer-use-repl.mjs:157 — the two spans are one implementation copied and then locally edited — 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/install-config-helper.mjs:642

What to do

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

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

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

  • main has cyclomatic complexity 31 and cognitive complexity 35; 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. — scripts/node-repl/open-computer-use-cli.mjs:448
  • validateSetting has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/node-repl/ocu-config.mjs:26
  • query has cyclomatic complexity 23 and cognitive complexity 25; 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. — scripts/node-repl/open-computer-use-repl.mjs:330
  • configCommand has cyclomatic complexity 22 and cognitive complexity 27; 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. — scripts/node-repl/ocu-config.mjs:91
  • installOpencodeMcp has cyclomatic complexity 20 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/install-config-helper.mjs:297
  • runInteractiveRepl has cyclomatic complexity 19 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/node-repl/open-computer-use-cli.mjs:347
  • main has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/install-config-helper.mjs:763
  • parseJavaScriptArgs has cyclomatic complexity 16 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/node-repl/open-computer-use-cli.mjs:206
  • selectText has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — scripts/node-repl/open-computer-use-repl.mjs:382
  • publishWithRetry has cyclomatic complexity 14 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — scripts/npm/publish-packages.mjs:161
  • handle has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — scripts/node-repl/open-computer-use-repl.mjs:683
  • normalizeImage has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — scripts/node-repl/open-computer-use-repl.mjs:93
  • validateNotes has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/validate-github-release-notes.mjs:52
  • optionsToSnapshotArgs has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — scripts/node-repl/open-computer-use-repl.mjs:271
  • inspectConfig has cyclomatic complexity 11 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — scripts/node-repl/ocu-config.mjs:57
  • readConfig has cyclomatic complexity 11 and cognitive complexity 11; 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. — scripts/node-repl/ocu-config.mjs:45
R3 · Large Files10.0 / 10Exemplary✓ 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.

R6 · Tooling6.7 / 10Adequate✓ 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.

  • test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add eslint as package.json scripts and run them in CI.
R7 · Dead Code9.9 / 10Exemplary✓ Tool-verified

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

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

  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. — scripts/tests/macos-set-value-smoke.mjs:40
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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

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

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.

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

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

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

  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×9) — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:400, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift:158, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/TargetedQuery.swift:96, …
  • `if err != nil` 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. (×6) — apps/OpenComputerUseWindows/main.go:194, apps/OpenComputerUseLinux/main.go:814, apps/OpenComputerUseLinux/main.go:846, …
  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — apps/OpenComputerUseLinux/runtime.py:49, apps/OpenComputerUseLinux/runtime.py:105, apps/OpenComputerUseLinux/runtime.py:424, …

What to do

  • Swallowed exception (caught, then discarded)

Reference — by lens

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

LensScoreRatingImpact
Code Health49%Weak — gated by D2, D4, R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture94%ExemplaryStrongest area.
Maturity89%StrongSolid.
Readiness50%Weak — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security79%Checked 5 of 11Solid.
Performance70%StrongSolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 5 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 — Not assessed: these audit 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 audit 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.
  • C4 Data Retention — Not assessed: these retention 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 retention 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.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 71 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • 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.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .swift suite was found but not re-run
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — 1 ADR(s) are written in a language our ADR lexicon does not cover, or are too short to tell (undetermined); their sections and statuses were not judged.
  • D21 Naming Consistency — N/A — too few peers to establish a naming convention (7447 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Swift surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .go, .py, .swift source were not judged.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 8 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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.
  • D8 Code Coverage — Coverage not measured — Swift suite
  • DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 13 value object(s)
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Go, Python, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, 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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — no production JavaScript/TypeScript files to cover (25 test file(s) present) — nothing to measure
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 18% of this repository's production lines — swift (27,113 lines), go (4,467 lines), objectivec (352 lines), c (232 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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 — 1 finding(s)
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 492 finding(s)
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×19
  • Swallowed exception (caught, then discarded) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:400 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift:158 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/TargetedQuery.swift:96 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/TargetedQuery.swift:105 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/WindowOcclusionKeepAlive.swift:90 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) experiments/LockedUse/Sources/Guardian/GuardianMain.swift:118 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) experiments/LockedUse/Sources/Guardian/GuardianMain.swift:127 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) experiments/LockedUse/AuthorizationPlugin/TaskVerifier.swift:33 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) experiments/LockedUse/AuthorizationPlugin/TaskVerifierDiagnostics.swift:27 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseWindows/main.go:194 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/runtime.py:49 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/runtime.py:105 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/runtime.py:424 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/runtime.py:452 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/main.go:814 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/main.go:846 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/main.go:856 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/main.go:984 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) apps/OpenComputerUseLinux/main.go:1057 — `if err != nil` 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.
D10 · Test Quality · Skipped test · ×15
  • Skipped test: testNativeHoldCreatesAndReleasesPowerAssertion apps/OpenComputerUse/Tests/PermissionOnboardingTests/LockedUseDisplayPreflightTests.swift:219 — Skipped — throws XCTSkip
  • Skipped test: testLiveSettingsListGeometry apps/OpenComputerUse/Tests/PermissionOnboardingTests/PermissionListAnchorTests.swift:86 — Skipped — throws XCTSkip
  • Skipped test: testHiddenChromeIsParkedOnTheAgentDisplayAndRestored packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/AgentDisplayLiveTests.swift:16 — Skipped — throws XCTSkip
  • Skipped test: testSurveyRunningApps packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/AppMatrixLiveTests.swift:19 — Skipped — throws XCTSkip
  • Skipped test: testCoveredChromeClickAndKeyLatency packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/BackgroundInputBenchmarkLiveTests.swift:13 — Skipped — throws XCTSkip
  • Skipped test: testWindowOnAnotherSpaceIsReadableClickableAndTypable packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/CrossSpaceLiveTests.swift:20 — Skipped — throws XCTSkip
  • Skipped test: testServiceClickRegistersLiveWindowAndFeedbackMatchesMovedButton packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/CursorWindowFollowTests.swift:149 — Skipped — throws XCTSkip
  • Skipped test: testRealAccessibilityWindowFollowsTravelPulseAndIdleAcrossDisplays packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/CursorWindowFollowTests.swift:193 — Skipped — throws XCTSkip
  • Skipped test: testRevokedLeaseStopsInputAndQueryBeforeResolvingTarget packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/LockedUseDispatchTests.swift:30 — Skipped — throws XCTSkip
  • Skipped test: testKernelRecheckAcceptsSameLivePeerAndRejectsForgedHashOrToken packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/LockedUsePeerRevalidationTests.swift:6 — Skipped — throws XCTSkip
  • Skipped test: testCoveredChromeKeepsWebContentAfterVisibleSnapshot packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/OcclusionKeepAliveLiveTests.swift:12 — Skipped — throws XCTSkip
  • Skipped test: testSkyLightRuntimeSPIProbeCanStampEventWithoutPosting packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/OpenComputerUseKitTests.swift:2130 — Skipped — throws XCTSkip
  • Skipped test: testCoveredChromeReceivesExactlyOneSkyClickWithoutForegroundSideEffects packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/SkyClickLiveTests.swift:16 — Skipped — throws XCTSkip
  • Skipped test: testCoveredChromeReceivesSkyKeyTypingWithoutForegroundSideEffects packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/SkyKeyboardLiveTests.swift:16 — Skipped — throws XCTSkip
  • Skipped test: testRealAXTextViewSupportsUTF16SelectionAndBothCaretModes packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/TextSelectionOperationTests.swift:79 — Skipped — throws XCTSkip
D3 · God Classes · FileTooLong · ×12
  • FileTooLong: OpenComputerUseKit/AccessibilitySnapshot.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift — FileTooLong — 1804 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1304 over it, 3.61× 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: OpenComputerUseKit/ComputerUseService.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift — FileTooLong — 1659 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: ComputerUseService (648-2540). The bar is 500 significant lines; this is 1159 over it, 3.32× 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: CursorMotion/CursorMotionModel.swift experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift — FileTooLong — 1488 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 988 over it, 2.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: OpenComputerUseLinux/main.go apps/OpenComputerUseLinux/main.go — FileTooLong — 1295 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 795 over it, 2.59× 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: OpenComputerUseKit/CursorMotionModel.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift — FileTooLong — 1163 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 663 over it, 2.33× 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: OpenComputerUseWindows/main.go apps/OpenComputerUseWindows/main.go — FileTooLong — 1077 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 577 over it, 2.15× 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: OpenComputerUse/PermissionOnboardingApp.swift apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift — FileTooLong — 988 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 488 over it, 1.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: OpenComputerUseLinux/runtime.py apps/OpenComputerUseLinux/runtime.py — FileTooLong — 844 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 344 over it, 1.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: StandaloneCursorSupport/StandaloneCursorModel.swift experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift — FileTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 208 over it, 1.42× 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: OpenComputerUseKit/SoftwareCursorOverlay.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift — FileTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: SoftwareCursorOverlay (186-912). The bar is 500 significant lines; this is 143 over it, 1.29× 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: CursorMotion/CursorLabRootView.swift experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift — FileTooLong — 587 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 87 over it, 1.17× 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: StandaloneCursor/StandaloneCursorRootView.swift experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift — FileTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 85 over it, 1.17× 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×10
  • Hotspot: packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:951 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in TreeRenderer.renderSelected at line 951. 7 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift`: 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: apps/OpenComputerUseWindows/main.go apps/OpenComputerUseWindows/main.go:267 — apps/OpenComputerUseWindows/main.go changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in service.callTool at line 267. 7 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- apps/OpenComputerUseWindows/main.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:743 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ComputerUseService.click at line 743. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/node-repl/open-computer-use-repl.mjs scripts/node-repl/open-computer-use-repl.mjs:308 — scripts/node-repl/open-computer-use-repl.mjs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in open-computer-use-repl.createCuaApi at line 308. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- scripts/node-repl/open-computer-use-repl.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/OpenComputerUseLinux/main.go apps/OpenComputerUseLinux/main.go:201 — apps/OpenComputerUseLinux/main.go changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in service.callTool at line 201. 3 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- apps/OpenComputerUseLinux/main.go`: 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: apps/OpenComputerUseLinux/runtime.py apps/OpenComputerUseLinux/runtime.py:924 — apps/OpenComputerUseLinux/runtime.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in runtime.perform_operation at line 924. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- apps/OpenComputerUseLinux/runtime.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: apps/OpenComputerUse/Sources/OpenComputerUse/OpenComputerUseMain.swift apps/OpenComputerUse/Sources/OpenComputerUse/OpenComputerUseMain.swift:25 — apps/OpenComputerUse/Sources/OpenComputerUse/OpenComputerUseMain.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in OpenComputerUseMain.run at line 25. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- apps/OpenComputerUse/Sources/OpenComputerUse/OpenComputerUseMain.swift`: 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: experiments/LockedUse/Sources/Installer/InstallerMain.swift experiments/LockedUse/Sources/Installer/InstallerMain.swift:195 — experiments/LockedUse/Sources/Installer/InstallerMain.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in InstallerMain.install at line 195. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- experiments/LockedUse/Sources/Installer/InstallerMain.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: scripts/install-config-helper.mjs scripts/install-config-helper.mjs:763 — scripts/install-config-helper.mjs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in install-config-helper.main at line 763. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- scripts/install-config-helper.mjs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift:94 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in LockedUseDiagnostics.current at line 94. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 23:13:46 +08:00' --until='2026-11-13 23:13:46 +08:00' --full-history --no-merges -- packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · MethodTooLong · ×10
  • MethodTooLong: LockScreenInteractor.probe experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:57 — MethodTooLong — probe runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HeadingDrivenCursorMotionModel.descriptors experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1010 — MethodTooLong — descriptors runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.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.
  • MethodTooLong: HeadingDrivenCursorMotionModel.descriptors packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:815 — MethodTooLong — descriptors runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.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.
  • MethodTooLong: LockedUseBrokerCoordinator.handle packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:98 — MethodTooLong — handle runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TreeRenderer.renderSelected packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:951 — MethodTooLong — renderSelected runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GuardianMain.main experiments/LockedUse/Sources/Guardian/GuardianMain.swift:21 — MethodTooLong — main runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ComputerUseService.click packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:743 — MethodTooLong — click runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HeadingDrivenCursorMotionModel.makePath experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:743 — MethodTooLong — makePath runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppAgentConnection.handle apps/OpenComputerUse/Sources/OpenComputerUse/MacOSAppAgentProxy.swift:365 — MethodTooLong — handle runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StandaloneCursorBinaryGuidedModel.makeCandidates experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:420 — MethodTooLong — makeCandidates runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D10 · Test Quality · No assertions · ×9
  • No assertions: testCompletedLaunchUsesExactTargetSize apps/OpenComputerUse/Tests/PermissionOnboardingTests/PermissionAccessoryPanelTests.swift:26 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testNewGuidanceAfterInterruptedLaunchUsesFullPanel apps/OpenComputerUse/Tests/PermissionOnboardingTests/PermissionAccessoryPanelTests.swift:40 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testIdleFollowsRepeatedMovesAndReturnToOriginalFrame packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/CursorWindowFollowTests.swift:64 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testClickPulseTracksMovesDuringBothClicks packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/CursorWindowFollowTests.swift:78 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testTravelAbortActuallyPlacesVisibleTipAtMovedWindow packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/CursorWindowFollowTests.swift:94 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testUnanchoredTargetDoesNotKeepPreviousWindowTracking packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/CursorWindowFollowTests.swift:110 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testWedgedRPCQueueAndRepeatedRetriesCannotExtendRecoveryDeadline packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/LockedUseRecoveryDeadlineTests.swift:5 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testCompletedCleanupCancelsExpiration packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/LockedUseRecoveryDeadlineTests.swift:17 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testEarlierFailureShortensAcquisitionDeadline packages/OpenComputerUseKit/Tests/OpenComputerUseKitTests/LockedUseRecoveryDeadlineTests.swift:26 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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 (11 lines × 2) · ×9
  • Duplicated block (11 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:47 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:47-57 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorApp.swift:46-56 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorApp.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:47` 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 (11 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:471 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:471-481 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:383-393 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:471` 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) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:52 — experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:52-62 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:65-75 — 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 `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:52` 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) apps/OpenComputerUseLinux/main.go:1246 — apps/OpenComputerUseLinux/main.go:1246-1256 | apps/OpenComputerUseWindows/main.go:900-910 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) apps/OpenComputerUseLinux/main.go:1259 — apps/OpenComputerUseLinux/main.go:1259-1269 | apps/OpenComputerUseWindows/main.go:913-923 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) apps/OpenComputerUseLinux/main.go:1272 — apps/OpenComputerUseLinux/main.go:1272-1282 | apps/OpenComputerUseWindows/main.go:926-936 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) apps/OpenComputerUseLinux/main.go:1082 — apps/OpenComputerUseLinux/main.go:1082-1092 | apps/OpenComputerUseWindows/main.go:736-746 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (11 lines × 2) apps/OpenComputerUseLinux/main.go:1395 — apps/OpenComputerUseLinux/main.go:1395-1405 | apps/OpenComputerUseWindows/main.go:1060-1070 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (11 lines × 2) scripts/computer-use-cli/app_server.go:312 — scripts/computer-use-cli/app_server.go:312-322 | scripts/computer-use-cli/main.go:419-429 — 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 `scripts/computer-use-cli/app_server.go:312` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×9
  • Duplicated block (7 lines × 2) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:237 — experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:237-243 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:252-258 — 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 `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:237` 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) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1729 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1729-1735 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2208-2217 — 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 (7 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1032 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1032-1038 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1080-1086 — 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, `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1040` calls `actionResult` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1088` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:40 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:40-46 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:57-63 — 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) apps/OpenComputerUseLinux/main.go:123 — apps/OpenComputerUseLinux/main.go:123-129 | apps/OpenComputerUseWindows/main.go:134-140 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:123` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `apps/OpenComputerUseWindows/main.go:143` calls `sanitizeScreenshot` and `apps/OpenComputerUseLinux/main.go:132` 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 (7 lines × 2) apps/OpenComputerUseLinux/main.go:1200 — apps/OpenComputerUseLinux/main.go:1200-1206 | apps/OpenComputerUseWindows/main.go:854-860 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) apps/OpenComputerUseLinux/main.go:1208 — apps/OpenComputerUseLinux/main.go:1208-1214 | apps/OpenComputerUseWindows/main.go:862-868 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) apps/OpenComputerUseLinux/main.go:1627 — apps/OpenComputerUseLinux/main.go:1627-1633 | apps/OpenComputerUseWindows/main.go:1292-1298 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) apps/OpenComputerUseLinux/main.go:1850 — apps/OpenComputerUseLinux/main.go:1850-1856 | apps/OpenComputerUseWindows/main.go:1515-1521 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×8
  • Duplicated block (12 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:402 — experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:402-413 | experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:416-427 — 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 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1403 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1403-1414 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1154-1165 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1403` 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 (12 lines × 2) apps/OpenComputerUseLinux/main.go:581 — apps/OpenComputerUseLinux/main.go:581-592 | apps/OpenComputerUseWindows/main.go:662-673 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) apps/OpenComputerUseLinux/main.go:608 — apps/OpenComputerUseLinux/main.go:608-619 | apps/OpenComputerUseWindows/main.go:689-700 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:608` 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (12 lines × 2) apps/OpenComputerUseLinux/main.go:1159 — apps/OpenComputerUseLinux/main.go:1159-1170 | apps/OpenComputerUseWindows/main.go:813-824 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) apps/OpenComputerUseLinux/main.go:59 — apps/OpenComputerUseLinux/main.go:59-70 | apps/OpenComputerUseWindows/main.go:66-77 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (12 lines × 2) apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift:24 — apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift:24-35 | apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift:63-74 — 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 lines × 2) scripts/computer-use-cli/app_server.go:350 — scripts/computer-use-cli/app_server.go:350-361 | scripts/computer-use-cli/main.go:475-486 — 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 `scripts/computer-use-cli/app_server.go:350` 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 lines × 2) · ×7
  • Duplicated block (13 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:20 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:20-32 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorApp.swift:20-32 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorApp.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:20` 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (13 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:567 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:567-579 | experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:729-741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:823 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:823-835 | experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:857-869 — 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 `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:823` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:804 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:804-816 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:866-878 — 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 `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:804` 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 (13 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:479 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:479-491 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:643-655 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1534 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1534-1546 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1289-1301 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1534` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) apps/OpenComputerUseLinux/main.go:1774 — apps/OpenComputerUseLinux/main.go:1774-1786 | apps/OpenComputerUseWindows/main.go:1439-1451 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:605 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:605-612 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:521-528 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) experiments/LockedUse/Sources/Guardian/ShieldPreview.swift:74 — experiments/LockedUse/Sources/Guardian/ShieldPreview.swift:74-81 | experiments/LockedUse/Sources/Guardian/WatchdogShield.swift:55-62 — 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 `experiments/LockedUse/Sources/Guardian/ShieldPreview.swift:74` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:591 — experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:591-598 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:601-608 — 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 `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:591` 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, `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:610` calls `ArcAnchorNode` and `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:600` 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) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:376 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:376-383 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:292-299 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:6 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:6-13 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorApp.swift:6-13 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorApp.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) apps/OpenComputerUseLinux/main.go:571 — apps/OpenComputerUseLinux/main.go:571-578 | apps/OpenComputerUseWindows/main.go:652-659 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) apps/OpenComputerUseLinux/main.go:1284 — apps/OpenComputerUseLinux/main.go:1284-1291 | apps/OpenComputerUseWindows/main.go:950-957 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×7
  • Duplicated block (6 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:254 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:254-262 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift:28-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:294 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:294-299 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:348-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. Note first that the copies are not typed on the same thing: the declarations holding them bind `source` to `CGEventSource?` in one and `CGEventSource` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:196 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:196-201 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:120-125 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) experiments/LockedUse/Sources/Installer/InstallerMain.swift:30 — experiments/LockedUse/Sources/Installer/InstallerMain.swift:30-35 | experiments/LockedUse/Sources/Installer/InstallerMain.swift:350-355 — 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (6 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:121 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:121-126 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:132-137 — 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 (6 lines × 2) apps/OpenComputerUseLinux/main.go:1123 — apps/OpenComputerUseLinux/main.go:1123-1128 | apps/OpenComputerUseWindows/main.go:777-782 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 2) apps/OpenComputerUseLinux/main.go:1447 — apps/OpenComputerUseLinux/main.go:1447-1452 | apps/OpenComputerUseWindows/main.go:1112-1117 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×6
  • Duplicated block (21 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:86 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:86-106 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:21-41 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:328 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:328-348 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:244-264 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1219 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1219-1239 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1024-1044 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) apps/OpenComputerUseLinux/main.go:202 — apps/OpenComputerUseLinux/main.go:202-222 | apps/OpenComputerUseWindows/main.go:268-288 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:202` 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 (21 lines × 2) apps/OpenComputerUseLinux/main.go:402 — apps/OpenComputerUseLinux/main.go:402-422 | apps/OpenComputerUseWindows/main.go:465-485 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (21 lines × 2) apps/OpenComputerUseLinux/main.go:1717 — apps/OpenComputerUseLinux/main.go:1717-1737 | apps/OpenComputerUseWindows/main.go:1382-1402 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:254 — experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:254-268 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:459-473 — 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 `experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:254` 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 (15 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:480 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:480-494 | experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:501-515 — 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 `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:480` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1241 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1241-1255 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1046-1060 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:392 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:392-406 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:413-427 — 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 `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:392` 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 (15 lines × 2) apps/OpenComputerUseLinux/main.go:1134 — apps/OpenComputerUseLinux/main.go:1134-1148 | apps/OpenComputerUseWindows/main.go:788-802 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (15 lines × 2) scripts/computer-use-cli/main.go:152 — scripts/computer-use-cli/main.go:152-166 | scripts/computer-use-cli/main.go:230-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/computer-use-cli/main.go:152` 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1618 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1618-1631 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1382-1395 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:241 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:241-254 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:276-289 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:241` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2168 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2168-2181 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2193-2206 — 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 `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2168` 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 (14 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1378 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1378-1391 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1129-1142 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) apps/OpenComputerUseLinux/main.go:280 — apps/OpenComputerUseLinux/main.go:280-293 | apps/OpenComputerUseWindows/main.go:346-359 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:280` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) apps/OpenComputerUseLinux/main.go:485 — apps/OpenComputerUseLinux/main.go:485-498 | apps/OpenComputerUseWindows/main.go:555-568 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 lines × 2) · ×6
  • Duplicated block (10 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1633 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1633-1642 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1397-1406 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) apps/OpenComputerUseLinux/main.go:297 — apps/OpenComputerUseLinux/main.go:297-306 | apps/OpenComputerUseWindows/main.go:363-372 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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) apps/OpenComputerUseLinux/main.go:335 — apps/OpenComputerUseLinux/main.go:335-344 | apps/OpenComputerUseWindows/main.go:401-410 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:335` 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) apps/OpenComputerUseLinux/main.go:347 — apps/OpenComputerUseLinux/main.go:347-356 | apps/OpenComputerUseWindows/main.go:410-419 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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) scripts/cursor-motion-re/official_cursor_motion.py:1658 — scripts/cursor-motion-re/official_cursor_motion.py:1658-1667 | scripts/cursor-motion-re/official_cursor_motion.py:1678-1687 — 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) scripts/computer-use-cli/main.go:172 — scripts/computer-use-cli/main.go:172-181 | scripts/computer-use-cli/main.go:250-259 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D3 · God Classes · ClassTooLong · ×5
  • ClassTooLong: ComputerUseService packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:648 — ClassTooLong — 1264 significant lines (blank, comment-only and punctuation-only lines excluded), 94 methods. The bar is 400 significant lines; this is 864 over it, 3.16× 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: HeadingDrivenCursorMotionModel experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:674 — ClassTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded), 17 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: SoftwareCursorOverlay packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift:185 — ClassTooLong — 487 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 87 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: HeadingDrivenCursorMotionModel packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:590 — ClassTooLong — 462 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 62 over it, 1.16× 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: DisplayGuardian experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:21 — ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 53 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×5
  • Edited copy of a member (13 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:58 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:58-70 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:72-84 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1382 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1382-1395 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2183-2195 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) apps/OpenComputerUseLinux/main.go:295 — apps/OpenComputerUseLinux/main.go:295-307 | apps/OpenComputerUseWindows/main.go:361-373 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) apps/OpenComputerUseLinux/main.go:131 — apps/OpenComputerUseLinux/main.go:131-143 | apps/OpenComputerUseWindows/main.go:142-155 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift:10 — apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift:10-22 | apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift:24-37 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×5
  • Edited copy of a member (25 corresponding lines) apps/OpenComputerUseLinux/main.go:426 — apps/OpenComputerUseLinux/main.go:426-450 | apps/OpenComputerUseWindows/main.go:489-513 — 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.
  • Edited copy of a member (25 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2283 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2283-2307 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2309-2336 — 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.
  • Edited copy of a member (25 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:21 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:21-45 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/FixtureBridge.swift:99-125 — 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.
  • Edited copy of a member (25 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:385 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:385-413 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:301-325 — 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.
  • Edited copy of a member (25 corresponding lines) apps/OpenComputerUseLinux/main.go:76 — apps/OpenComputerUseLinux/main.go:76-100 | apps/OpenComputerUseWindows/main.go:83-109 — 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 · Edited copy of a member (9 corresponding lines) · ×5
  • Edited copy of a member (9 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:140 — apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:140-148 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2639-2654 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPC.swift:21 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPC.swift:21-30 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPC.swift:53-61 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) apps/OpenComputerUseLinux/main.go:570 — apps/OpenComputerUseLinux/main.go:570-578 | apps/OpenComputerUseWindows/main.go:651-659 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2173 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2173-2181 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:416-424 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1364 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1364-1373 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2153-2161 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:166 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:166-182 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:184-203 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1463 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1463-1479 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1214-1230 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:61 — experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:61-77 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:282-300 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) scripts/codex_dump.py:332 — scripts/codex_dump.py:332-349 | scripts/codex_dump.py:352-368 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×4
  • Edited copy of a member (10 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:120 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:120-129 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:131-140 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:293 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:293-303 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:347-356 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilityTextSelection.swift:15 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilityTextSelection.swift:15-24 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:306-315 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:543 — experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:543-552 | experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:139-148 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×4
  • Edited copy of a member (15 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1403 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1403-1417 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1154-1168 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:364 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:364-378 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:380-395 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:191 — experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:191-207 | experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:209-223 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift:22 — apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift:22-43 | apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift:61-75 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×4
  • Edited copy of a member (7 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:253 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:253-262 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift:27-33 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:630 — experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:630-636 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:642-648 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:290 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:290-296 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:298-304 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift:198 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift:198-204 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift:499-505 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×4
  • Edited copy of a member (3 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1315 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1315-1317 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1067-1069 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift:120 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift:120-122 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/VirtualDisplayConfig.swift:51-53 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1326 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1326-1328 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1077-1079 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1330 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1330-1332 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1081-1083 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×4
  • Duplicated block (9 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:229 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:229-237 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:240-248 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) apps/OpenComputerUseLinux/main.go:1617 — apps/OpenComputerUseLinux/main.go:1617-1625 | apps/OpenComputerUseWindows/main.go:1282-1290 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) apps/OpenComputerUseLinux/main.go:456 — apps/OpenComputerUseLinux/main.go:456-464 | apps/OpenComputerUseLinux/main.go:472-480 — 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) scripts/computer-use-cli/main.go:120 — scripts/computer-use-cli/main.go:120-128 | scripts/computer-use-cli/main.go:140-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/computer-use-cli/main.go:120` 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 (19 lines × 2) · ×4
  • Duplicated block (19 lines × 2) apps/OpenComputerUseLinux/main.go:314 — apps/OpenComputerUseLinux/main.go:314-332 | apps/OpenComputerUseWindows/main.go:380-398 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:314` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) apps/OpenComputerUseLinux/main.go:427 — apps/OpenComputerUseLinux/main.go:427-445 | apps/OpenComputerUseWindows/main.go:490-508 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (19 lines × 2) apps/OpenComputerUseLinux/main.go:547 — apps/OpenComputerUseLinux/main.go:547-565 | apps/OpenComputerUseWindows/main.go:627-645 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (19 lines × 2) apps/OpenComputerUseLinux/main.go:1103 — apps/OpenComputerUseLinux/main.go:1103-1121 | apps/OpenComputerUseWindows/main.go:757-775 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×4
  • Duplicated block (18 lines × 2) apps/OpenComputerUseLinux/main.go:103 — apps/OpenComputerUseLinux/main.go:103-120 | apps/OpenComputerUseWindows/main.go:112-129 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:103` 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 (18 lines × 2) apps/OpenComputerUseLinux/main.go:361 — apps/OpenComputerUseLinux/main.go:361-378 | apps/OpenComputerUseWindows/main.go:424-441 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:361` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) apps/OpenComputerUseLinux/main.go:1181 — apps/OpenComputerUseLinux/main.go:1181-1198 | apps/OpenComputerUseWindows/main.go:835-852 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) scripts/cursor-motion-re/official_cursor_motion.py:1037 — scripts/cursor-motion-re/official_cursor_motion.py:1037-1054 | scripts/cursor-motion-re/official_cursor_motion.py:1055-1072 — 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×3
  • Edited copy of a member (20 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseClickAllowance.swift:21 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseClickAllowance.swift:21-40 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseReturnAllowance.swift:19-39 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2166 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2166-2189 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2191-2210 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:160 — experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:160-185 | experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:233-252 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:421 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:421-424 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUsePermitRegistry.swift:84-87 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1257 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1257-1260 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1062-1065 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseGuardianPolicy.swift:107 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseGuardianPolicy.swift:107-110 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUsePermitRegistry.swift:80-83 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×3
  • Edited copy of a member (5 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:134 — apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:134-138 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyKeyboardSimulation.swift:257-263 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1684 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1684-1688 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift:400-404 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:80 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:80-84 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/WindowOcclusionKeepAlive.swift:97-103 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×3
  • Duplicated block (52 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:203 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:203-254 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:127-178 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (52 lines × 2) apps/OpenComputerUseLinux/main.go:1478 — apps/OpenComputerUseLinux/main.go:1478-1529 | apps/OpenComputerUseWindows/main.go:1143-1194 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:1478` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (52 lines × 2) apps/OpenComputerUseLinux/main.go:1563 — apps/OpenComputerUseLinux/main.go:1563-1614 | apps/OpenComputerUseWindows/main.go:1228-1279 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D1 · Cyclomatic Complexity · service.callTool (cyclomatic 25) · ×2
  • service.callTool (cyclomatic 25) apps/OpenComputerUseLinux/main.go:201 — service.callTool 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.
  • service.callTool (cyclomatic 25) apps/OpenComputerUseWindows/main.go:267 — service.callTool 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 · main.runCallCommand (cyclomatic 23) · ×2
  • main.runCallCommand (cyclomatic 23) apps/OpenComputerUseLinux/main.go:1635 — main.runCallCommand 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.
  • main.runCallCommand (cyclomatic 23) apps/OpenComputerUseWindows/main.go:1300 — main.runCallCommand 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 · main.runCLI (cyclomatic 22) · ×2
  • main.runCLI (cyclomatic 22) apps/OpenComputerUseLinux/main.go:1454 — main.runCLI 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.
  • main.runCLI (cyclomatic 22) apps/OpenComputerUseWindows/main.go:1119 — main.runCLI 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.
D2 · Cognitive Complexity · main.runCallCommand (cognitive 36) · ×2
  • main.runCallCommand (cognitive 36) apps/OpenComputerUseLinux/main.go:1635 — main.runCallCommand has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (3 pts), boolean chains 2, match/switch 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.
  • main.runCallCommand (cognitive 36) apps/OpenComputerUseWindows/main.go:1300 — main.runCallCommand has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (3 pts), boolean chains 2, match/switch 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 · main.parseSnapshotArgs (cognitive 28) · ×2
  • main.parseSnapshotArgs (cognitive 28) apps/OpenComputerUseLinux/main.go:1562 — main.parseSnapshotArgs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (25 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main.parseSnapshotArgs (cognitive 28) apps/OpenComputerUseWindows/main.go:1227 — main.parseSnapshotArgs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (25 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.runCLI (cognitive 27) · ×2
  • main.runCLI (cognitive 27) apps/OpenComputerUseLinux/main.go:1454 — main.runCLI has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 1, match/switch 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.
  • main.runCLI (cognitive 27) apps/OpenComputerUseWindows/main.go:1119 — main.runCLI has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 1, match/switch 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 · service.callTool (cognitive 26) · ×2
  • service.callTool (cognitive 26) apps/OpenComputerUseLinux/main.go:201 — service.callTool has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • service.callTool (cognitive 26) apps/OpenComputerUseWindows/main.go:267 — service.callTool has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CursorMotionPath.measure (cognitive 17) · ×2
  • CursorMotionPath.measure (cognitive 17) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:203 — CursorMotionPath.measure has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 10). 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.
  • CursorMotionPath.measure (cognitive 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:127 — CursorMotionPath.measure has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (7 pts), boolean chains 1 (nesting depth added 10). 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 · service.click (cognitive 16) · ×2
  • service.click (cognitive 16) apps/OpenComputerUseLinux/main.go:334 — service.click has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (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.
  • service.click (cognitive 16) apps/OpenComputerUseWindows/main.go:400 — service.click has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×2
  • Edited copy of a member (50 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:951 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:951-1008 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:764-813 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (50 corresponding lines) apps/OpenComputerUseLinux/main.go:594 — apps/OpenComputerUseLinux/main.go:594-645 | apps/OpenComputerUseWindows/main.go:675-724 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1860 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1860-1870 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:855-871 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:39 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:39-49 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:56-72 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:20 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionApp.swift:20-41 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorApp.swift:20-40 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:238 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:238-258 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:273-293 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:71 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:71-89 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:105-128 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:331 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:331-349 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:368-387 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) apps/OpenComputerUseLinux/main.go:309 — apps/OpenComputerUseLinux/main.go:309-332 | apps/OpenComputerUseWindows/main.go:375-398 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift:248 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift:248-271 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift:273-297 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift:43 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift:43-59 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/VirtualDisplayConfig.swift:9-24 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseDisplayPreflight.swift:107 — apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseDisplayPreflight.swift:107-122 | apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseDisplayPreflight.swift:154-169 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×2
  • Duplicated block (34 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:951 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:951-984 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:764-797 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:951` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:985` calls `max` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:798` 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 (34 lines × 2) apps/OpenComputerUseLinux/main.go:1811 — apps/OpenComputerUseLinux/main.go:1811-1844 | apps/OpenComputerUseWindows/main.go:1476-1509 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:581 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:581-603 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:497-519 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (23 lines × 2) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:134 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:134-156 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:162-184 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:392 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:392-413 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:304-325 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:392` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (22 lines × 2) apps/OpenComputerUseLinux/main.go:1455 — apps/OpenComputerUseLinux/main.go:1455-1476 | apps/OpenComputerUseWindows/main.go:1120-1141 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `apps/OpenComputerUseLinux/main.go:1455` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×2
  • Duplicated block (15 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:517 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:517-531 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:506-520 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:429-443 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:517` 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 (15 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:550 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:550-564 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:538-552 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:462-476 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:550` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `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 (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1861 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1861-1870 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:862-871 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1427-1436 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1872` calls `distanceBetween`, `hypot` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1438` 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 × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:633 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:633-642 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:792-801 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:549-558 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:288 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:288-292 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:297-302 — 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 `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:288` 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.
  • Duplicated block (5 lines × 2) experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:217 — experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:217-221 | experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:236-240 — 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) apps/OpenComputerUseLinux/main.go:1789 — apps/OpenComputerUseLinux/main.go:1789-1808 | apps/OpenComputerUseWindows/main.go:1454-1473 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) apps/OpenComputerUseLinux/main.go:34 — apps/OpenComputerUseLinux/main.go:34-53 | apps/OpenComputerUseWindows/main.go:41-60 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: StandaloneCursorSupport — StandaloneCursorSupport: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: OpenComputerUseKit — OpenComputerUseKit: abstractness 0.01, instability 0.29, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: SkyLightSPI (LCOM4 6) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyLightSPI.swift:105 — SkyLightSPI's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MCPAppRuntime (LCOM4 4) apps/OpenComputerUse/Sources/OpenComputerUse/MCPAppRuntime.swift:5 — MCPAppRuntime'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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking scripts/node-repl/open-computer-use-cli.mjs:330 — `readFileSync` in `runJavaScript` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/node-repl/open-computer-use-cli.mjs:523 — `existsSync` in `main` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D1 · Cyclomatic Complexity · LockedUseBrokerCoordinator.handle (cyclomatic 178) · ×1
  • LockedUseBrokerCoordinator.handle (cyclomatic 178) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:98 — LockedUseBrokerCoordinator.handle has cyclomatic complexity 178 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LockScreenInteractor.probe (cyclomatic 99) · ×1
  • LockScreenInteractor.probe (cyclomatic 99) experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:57 — LockScreenInteractor.probe has cyclomatic complexity 99 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LockScreenInteractor.probe::visit) 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 · BrokerServer.read (cyclomatic 55) · ×1
  • BrokerServer.read (cyclomatic 55) experiments/LockedUse/Sources/Broker/BrokerMain.swift:253 — BrokerServer.read 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 · AppAgentConnection.handle (cyclomatic 49) · ×1
  • AppAgentConnection.handle (cyclomatic 49) apps/OpenComputerUse/Sources/OpenComputerUse/MacOSAppAgentProxy.swift:365 — AppAgentConnection.handle 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 · GuardianMain.swift.runWatchdog (cyclomatic 49) · ×1
  • GuardianMain.swift.runWatchdog (cyclomatic 49) experiments/LockedUse/Sources/Guardian/GuardianMain.swift:237 — GuardianMain.swift.runWatchdog has cyclomatic complexity 49 (threshold 15). Of this number, 48 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GuardianMain.main (cyclomatic 42) · ×1
  • GuardianMain.main (cyclomatic 42) experiments/LockedUse/Sources/Guardian/GuardianMain.swift:21 — GuardianMain.main has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DisplayGuardian.poll (cyclomatic 40) · ×1
  • DisplayGuardian.poll (cyclomatic 40) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:332 — DisplayGuardian.poll has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TreeRenderer.renderSelected (cyclomatic 40) · ×1
  • TreeRenderer.renderSelected (cyclomatic 40) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:951 — TreeRenderer.renderSelected has cyclomatic complexity 40 (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 · ImageCaptureConfig.resolve (cyclomatic 39) · ×1
  • ImageCaptureConfig.resolve (cyclomatic 39) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift:61 — ImageCaptureConfig.resolve has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 10 of the 39 points are its own statements and the rest belongs to 4 function items inside it that branch (number::valid, disabled, number, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · LockedUseUnshieldedDiagnostic.handle (cyclomatic 34) · ×1
  • LockedUseUnshieldedDiagnostic.handle (cyclomatic 34) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseUnshieldedDiagnostic.swift:34 — LockedUseUnshieldedDiagnostic.handle has cyclomatic complexity 34 (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 · LockedUseRecoveryRecord.validated (cyclomatic 33) · ×1
  • LockedUseRecoveryRecord.validated (cyclomatic 33) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseRecoveryRecord.swift:30 — LockedUseRecoveryRecord.validated has cyclomatic complexity 33 (threshold 15). Of this number, 28 points are the body's own statements and 5 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 · runtime.perform_operation (cyclomatic 32) · ×1
  • runtime.perform_operation (cyclomatic 32) apps/OpenComputerUseLinux/runtime.py:924 — runtime.perform_operation has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LockedUseSecureStore.read (cyclomatic 29) · ×1
  • LockedUseSecureStore.read (cyclomatic 29) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseSecureStore.swift:8 — LockedUseSecureStore.read 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 · UnshieldedUnlockDiagnostic.swift.runUnshieldedUnlockDiagnostic (cyclomatic 27) · ×1
  • UnshieldedUnlockDiagnostic.swift.runUnshieldedUnlockDiagnostic (cyclomatic 27) experiments/LockedUse/Sources/Guardian/UnshieldedUnlockDiagnostic.swift:7 — UnshieldedUnlockDiagnostic.swift.runUnshieldedUnlockDiagnostic has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs 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 · ComputerUseService.click (cyclomatic 26) · ×1
  • ComputerUseService.click (cyclomatic 26) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:743 — ComputerUseService.click 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 · LockedUseConnection.acquire (cyclomatic 25) · ×1
  • LockedUseConnection.acquire (cyclomatic 25) apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseConnection.swift:79 — LockedUseConnection.acquire 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 · BrokerServer.start (cyclomatic 25) · ×1
  • BrokerServer.start (cyclomatic 25) experiments/LockedUse/Sources/Broker/BrokerMain.swift:89 — BrokerServer.start 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 · InstallerMain.reconcileStoppedGuards (cyclomatic 25) · ×1
  • InstallerMain.reconcileStoppedGuards (cyclomatic 25) experiments/LockedUse/Sources/Installer/InstallerMain.swift:287 — InstallerMain.reconcileStoppedGuards has cyclomatic complexity 25 (threshold 15). Of this number, 23 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 · OpenComputerUseCLI.swift.parseCall (cyclomatic 25) · ×1
  • OpenComputerUseCLI.swift.parseCall (cyclomatic 25) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift:422 — OpenComputerUseCLI.swift.parseCall 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 · LockScreenPresentation.presentation (cyclomatic 24) · ×1
  • LockScreenPresentation.presentation (cyclomatic 24) experiments/LockedUse/Sources/Guardian/LockScreenPresentation.swift:30 — LockScreenPresentation.presentation 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 · TreeRenderer.plan (cyclomatic 24) · ×1
  • TreeRenderer.plan (cyclomatic 24) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:900 — TreeRenderer.plan has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 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 · LockedUseStateMachine.observe (cyclomatic 24) · ×1
  • LockedUseStateMachine.observe (cyclomatic 24) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseStateMachine.swift:175 — LockedUseStateMachine.observe 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 · OpenComputerUseMain.run (cyclomatic 23) · ×1
  • OpenComputerUseMain.run (cyclomatic 23) apps/OpenComputerUse/Sources/OpenComputerUse/OpenComputerUseMain.swift:25 — OpenComputerUseMain.run 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 · ComputerUseService.performAXClickSequence (cyclomatic 23) · ×1
  • ComputerUseService.performAXClickSequence (cyclomatic 23) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1554 — ComputerUseService.performAXClickSequence 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 · ComputerUseService.typeTextUsingAccessibility (cyclomatic 23) · ×1
  • ComputerUseService.typeTextUsingAccessibility (cyclomatic 23) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1971 — ComputerUseService.typeTextUsingAccessibility 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 · OpenComputerUseCLI.swift.parseSnapshot (cyclomatic 23) · ×1
  • OpenComputerUseCLI.swift.parseSnapshot (cyclomatic 23) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift:326 — OpenComputerUseCLI.swift.parseSnapshot 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 · LockedUseClickAllowance.accept (cyclomatic 22) · ×1
  • LockedUseClickAllowance.accept (cyclomatic 22) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseClickAllowance.swift:21 — LockedUseClickAllowance.accept has cyclomatic complexity 22 (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 · InstallerMain.main (cyclomatic 21) · ×1
  • InstallerMain.main (cyclomatic 21) experiments/LockedUse/Sources/Installer/InstallerMain.swift:19 — InstallerMain.main 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 · LockedUsePrivateRecord.write (cyclomatic 21) · ×1
  • LockedUsePrivateRecord.write (cyclomatic 21) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUsePrivateRecord.swift:15 — LockedUsePrivateRecord.write 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 · PermissionSettingsWindowReader.context (cyclomatic 20) · ×1
  • PermissionSettingsWindowReader.context (cyclomatic 20) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:161 — PermissionSettingsWindowReader.context 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 · DisplayShieldSurface.coverageFailure (cyclomatic 20) · ×1
  • DisplayShieldSurface.coverageFailure (cyclomatic 20) experiments/LockedUse/Sources/Guardian/DisplayShieldSurface.swift:96 — DisplayShieldSurface.coverageFailure 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 · SnapshotBuilder.targetedSearch (cyclomatic 20) · ×1
  • SnapshotBuilder.targetedSearch (cyclomatic 20) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2543 — SnapshotBuilder.targetedSearch 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 · LockedUseBrokerCoordinator.reply (cyclomatic 20) · ×1
  • LockedUseBrokerCoordinator.reply (cyclomatic 20) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:395 — LockedUseBrokerCoordinator.reply 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 · LockedUseIPCClient.request (cyclomatic 20) · ×1
  • LockedUseIPCClient.request (cyclomatic 20) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPCSocket.swift:53 — LockedUseIPCClient.request 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 · AccessibilitySnapshot.swift.preferredDisplayTitle (cyclomatic 20) · ×1
  • AccessibilitySnapshot.swift.preferredDisplayTitle (cyclomatic 20) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1498 — AccessibilitySnapshot.swift.preferredDisplayTitle has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ComputerUseService.swift.isLikelySyntheticSideActionCandidate (cyclomatic 20) · ×1
  • ComputerUseService.swift.isLikelySyntheticSideActionCandidate (cyclomatic 20) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:399 — ComputerUseService.swift.isLikelySyntheticSideActionCandidate has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · InstallerMain.install (cyclomatic 19) · ×1
  • InstallerMain.install (cyclomatic 19) experiments/LockedUse/Sources/Installer/InstallerMain.swift:195 — InstallerMain.install 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 · LockedUseGuardianPolicy.poll (cyclomatic 19) · ×1
  • LockedUseGuardianPolicy.poll (cyclomatic 19) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseGuardianPolicy.swift:76 — LockedUseGuardianPolicy.poll 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 · LockedUsePeerIdentity.verified (cyclomatic 19) · ×1
  • LockedUsePeerIdentity.verified (cyclomatic 19) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUsePeerIdentity.swift:57 — LockedUsePeerIdentity.verified has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LockScreenInteractor.wake (cyclomatic 18) · ×1
  • LockScreenInteractor.wake (cyclomatic 18) experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:15 — LockScreenInteractor.wake 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 · LockScreenInteractor.probe · ×1
  • LockScreenInteractor.probe::visit (cyclomatic 18) experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:84 — LockScreenInteractor.probe::visit 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. This shape REPEATS in the file: one other method here (LockScreenInteractor.probe) 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 · PhysicalInputMonitor.start (cyclomatic 18) · ×1
  • PhysicalInputMonitor.start (cyclomatic 18) experiments/LockedUse/Sources/Guardian/PhysicalInputMonitor.swift:46 — PhysicalInputMonitor.start 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 · ElementIdentity.read (cyclomatic 18) · ×1
  • ElementIdentity.read (cyclomatic 18) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ElementIdentity.swift:42 — ElementIdentity.read 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 · LockedUseDiagnostics.current (cyclomatic 18) · ×1
  • LockedUseDiagnostics.current (cyclomatic 18) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift:94 — LockedUseDiagnostics.current has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LockedUseReturnAllowance.accept (cyclomatic 18) · ×1
  • LockedUseReturnAllowance.accept (cyclomatic 18) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseReturnAllowance.swift:19 — LockedUseReturnAllowance.accept 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 · DisplayGuardian.verifyCaptureFixture (cyclomatic 17) · ×1
  • DisplayGuardian.verifyCaptureFixture (cyclomatic 17) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:190 — DisplayGuardian.verifyCaptureFixture 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 · ComputerUseService.selectText (cyclomatic 17) · ×1
  • ComputerUseService.selectText (cyclomatic 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1173 — ComputerUseService.selectText 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 · AccessibilitySnapshot.swift.encodeScreenshot (cyclomatic 17) · ×1
  • AccessibilitySnapshot.swift.encodeScreenshot (cyclomatic 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:739 — AccessibilitySnapshot.swift.encodeScreenshot has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AccessibilitySnapshot.swift.shouldElideNode (cyclomatic 17) · ×1
  • AccessibilitySnapshot.swift.shouldElideNode (cyclomatic 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1755 — AccessibilitySnapshot.swift.shouldElideNode 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 · service.click (cyclomatic 17) · ×1
  • service.click (cyclomatic 17) apps/OpenComputerUseWindows/main.go:400 — service.click 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 · service.refreshSnapshot (cyclomatic 17) · ×1
  • service.refreshSnapshot (cyclomatic 17) apps/OpenComputerUseWindows/main.go:598 — service.refreshSnapshot 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 · PermissionListAnchorSearch.first (cyclomatic 16) · ×1
  • PermissionListAnchorSearch.first (cyclomatic 16) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:13 — PermissionListAnchorSearch.first 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 · DisplayGuardian.start (cyclomatic 16) · ×1
  • DisplayGuardian.start (cyclomatic 16) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:85 — DisplayGuardian.start 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 · DisplayGuardian.installTap (cyclomatic 16) · ×1
  • DisplayGuardian.installTap (cyclomatic 16) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:249 — DisplayGuardian.installTap 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 · SetValueReadBack.swift.normalizedSetValueNumber (cyclomatic 16) · ×1
  • SetValueReadBack.swift.normalizedSetValueNumber (cyclomatic 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SetValueReadBack.swift:35 — SetValueReadBack.swift.normalizedSetValueNumber 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 · service.click (cyclomatic 16) · ×1
  • service.click (cyclomatic 16) apps/OpenComputerUseLinux/main.go:334 — service.click 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.
D2 · Cognitive Complexity · LockedUseBrokerCoordinator.handle (cognitive 216) · ×1
  • LockedUseBrokerCoordinator.handle (cognitive 216) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:98 — LockedUseBrokerCoordinator.handle has cognitive complexity 216 (threshold 15). Drivers by points: if/else 53 (108 pts), boolean chains 104, ternaries 1 (3 pts), match/switch 1 (nesting depth added 57). 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 · LockScreenInteractor.probe (cognitive 116) · ×1
  • LockScreenInteractor.probe (cognitive 116) experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:57 — LockScreenInteractor.probe has cognitive complexity 116 (threshold 15). Drivers by points: boolean chains 75, if/else 37 (54 pts), loops 3 (7 pts), ternaries 6, error handling 1 (2 pts) (nesting depth added 22). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LockScreenInteractor.probe::visit) 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 · BrokerServer.read (cognitive 112) · ×1
  • BrokerServer.read (cognitive 112) experiments/LockedUse/Sources/Broker/BrokerMain.swift:253 — BrokerServer.read has cognitive complexity 112 (threshold 15). Drivers by points: if/else 28 (78 pts), boolean chains 21, error handling 4 (11 pts), loops 1 (2 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 · AppAgentConnection.handle (cognitive 102) · ×1
  • AppAgentConnection.handle (cognitive 102) apps/OpenComputerUse/Sources/OpenComputerUse/MacOSAppAgentProxy.swift:365 — AppAgentConnection.handle has cognitive complexity 102 (threshold 15). Drivers by points: if/else 22 (79 pts), boolean chains 13, match/switch 3 (9 pts), error handling 1 (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuardianMain.main (cognitive 63) · ×1
  • GuardianMain.main (cognitive 63) experiments/LockedUse/Sources/Guardian/GuardianMain.swift:21 — GuardianMain.main has cognitive complexity 63 (threshold 15). Drivers by points: if/else 17 (49 pts), error handling 4 (10 pts), boolean chains 2, match/switch 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 · GuardianMain.swift.runWatchdog (cognitive 63) · ×1
  • GuardianMain.swift.runWatchdog (cognitive 63) experiments/LockedUse/Sources/Guardian/GuardianMain.swift:237 — GuardianMain.swift.runWatchdog has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 25, ternaries 2, loops 1 (nesting depth added 14). Of this number, 62 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 · DisplayGuardian.poll (cognitive 59) · ×1
  • DisplayGuardian.poll (cognitive 59) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:332 — DisplayGuardian.poll has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (38 pts), boolean chains 18, ternaries 1 (2 pts), error handling 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 · ImageCaptureConfig.resolve (cognitive 57) · ×1
  • ImageCaptureConfig.resolve (cognitive 57) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ImageCaptureConfig.swift:61 — ImageCaptureConfig.resolve has cognitive complexity 57 (threshold 15). Drivers by points: if/else 27 (35 pts), boolean chains 16, ternaries 2 (6 pts) (nesting depth added 12). Of this number, 17 points are the body's own statements and 40 belong to 4 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 · ComputerUseService.click (cognitive 50) · ×1
  • ComputerUseService.click (cognitive 50) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:743 — ComputerUseService.click has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (33 pts), match/switch 2 (6 pts), error handling 2 (4 pts), loops 1 (4 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 · ComputerUseService.performAXClickSequence (cognitive 47) · ×1
  • ComputerUseService.performAXClickSequence (cognitive 47) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1554 — ComputerUseService.performAXClickSequence has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 3 (10 pts), boolean chains 8 (nesting depth added 25). 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 · TreeRenderer.renderSelected (cognitive 44) · ×1
  • TreeRenderer.renderSelected (cognitive 44) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:951 — TreeRenderer.renderSelected has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14, ternaries 12 (13 pts), boolean chains 10, loops 4 (7 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · runtime.perform_operation (cognitive 41) · ×1
  • runtime.perform_operation (cognitive 41) apps/OpenComputerUseLinux/runtime.py:924 — runtime.perform_operation has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 5, loops 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 · LockedUseUnshieldedDiagnostic.handle (cognitive 39) · ×1
  • LockedUseUnshieldedDiagnostic.handle (cognitive 39) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseUnshieldedDiagnostic.swift:34 — LockedUseUnshieldedDiagnostic.handle has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (18 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · BrokerServer.start (cognitive 38) · ×1
  • BrokerServer.start (cognitive 38) experiments/LockedUse/Sources/Broker/BrokerMain.swift:89 — BrokerServer.start has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 10, error handling 3 (6 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LockedUseIPCClient.request (cognitive 38) · ×1
  • LockedUseIPCClient.request (cognitive 38) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPCSocket.swift:53 — LockedUseIPCClient.request has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 8, ternaries 1 (4 pts), loops 1 (2 pts), error handling 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 · LockedUseSecureStore.read (cognitive 35) · ×1
  • LockedUseSecureStore.read (cognitive 35) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseSecureStore.swift:8 — LockedUseSecureStore.read has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 16, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenComputerUseCLI.swift.parseSnapshot (cognitive 35) · ×1
  • OpenComputerUseCLI.swift.parseSnapshot (cognitive 35) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift:326 — OpenComputerUseCLI.swift.parseSnapshot has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LockedUseRecoveryRecord.validated (cognitive 32) · ×1
  • LockedUseRecoveryRecord.validated (cognitive 32) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseRecoveryRecord.swift:30 — LockedUseRecoveryRecord.validated has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 31, if/else 1. Of this number, 27 points are the body's own statements and 5 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.
D2 · Cognitive Complexity · LockedUseConnection.acquire (cognitive 31) · ×1
  • LockedUseConnection.acquire (cognitive 31) apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseConnection.swift:79 — LockedUseConnection.acquire has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 12, loops 1 (2 pts), error handling 1, 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 · UnshieldedUnlockDiagnostic.swift.runUnshieldedUnlockDiagnostic (cognitive 30) · ×1
  • UnshieldedUnlockDiagnostic.swift.runUnshieldedUnlockDiagnostic (cognitive 30) experiments/LockedUse/Sources/Guardian/UnshieldedUnlockDiagnostic.swift:7 — UnshieldedUnlockDiagnostic.swift.runUnshieldedUnlockDiagnostic has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (14 pts), loops 2 (nesting depth added 4). Of this number, 29 points are the body's own statements and 1 belongs 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.
D2 · Cognitive Complexity · InstallerMain.reconcileStoppedGuards (cognitive 30) · ×1
  • InstallerMain.reconcileStoppedGuards (cognitive 30) experiments/LockedUse/Sources/Installer/InstallerMain.swift:287 — InstallerMain.reconcileStoppedGuards has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (14 pts), error handling 1 (nesting depth added 6). Of this number, 28 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.
D2 · Cognitive Complexity · ComputerUseService.typeTextUsingAccessibility (cognitive 30) · ×1
  • ComputerUseService.typeTextUsingAccessibility (cognitive 30) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1971 — ComputerUseService.typeTextUsingAccessibility has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 11, 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 · LockedUseStateMachine.observe (cognitive 29) · ×1
  • LockedUseStateMachine.observe (cognitive 29) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseStateMachine.swift:175 — LockedUseStateMachine.observe has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 11, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TargetedQuery.swift.boundedTargetedWalk (cognitive 29) · ×1
  • TargetedQuery.swift.boundedTargetedWalk (cognitive 29) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/TargetedQuery.swift:79 — TargetedQuery.swift.boundedTargetedWalk has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 2 (5 pts), loops 2 (4 pts), boolean chains 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 · DisplayGuardian.start (cognitive 28) · ×1
  • DisplayGuardian.start (cognitive 28) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:85 — DisplayGuardian.start has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, ternaries 2 (5 pts), 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 · PhysicalInputMonitor.start (cognitive 28) · ×1
  • PhysicalInputMonitor.start (cognitive 28) experiments/LockedUse/Sources/Guardian/PhysicalInputMonitor.swift:46 — PhysicalInputMonitor.start has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (4 pts), boolean chains 3, 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 · InstallerMain.main (cognitive 28) · ×1
  • InstallerMain.main (cognitive 28) experiments/LockedUse/Sources/Installer/InstallerMain.swift:19 — InstallerMain.main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 9, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayShieldSurface.coverageFailure (cognitive 27) · ×1
  • DisplayShieldSurface.coverageFailure (cognitive 27) experiments/LockedUse/Sources/Guardian/DisplayShieldSurface.swift:96 — DisplayShieldSurface.coverageFailure has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, 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 · OpenComputerUseCLI.swift.parseCall (cognitive 27) · ×1
  • OpenComputerUseCLI.swift.parseCall (cognitive 27) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift:422 — OpenComputerUseCLI.swift.parseCall has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayGuardian.execute (cognitive 26) · ×1
  • DisplayGuardian.execute (cognitive 26) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:426 — DisplayGuardian.execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (2 pts), 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 · LockScreenInteractor.wake (cognitive 26) · ×1
  • LockScreenInteractor.wake (cognitive 26) experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:15 — LockScreenInteractor.wake has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LockScreenPresentation.presentation (cognitive 26) · ×1
  • LockScreenPresentation.presentation (cognitive 26) experiments/LockedUse/Sources/Guardian/LockScreenPresentation.swift:30 — LockScreenPresentation.presentation has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (11 pts), loops 1 (nesting depth added 3). 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 · TreeRenderer.plan (cognitive 26) · ×1
  • TreeRenderer.plan (cognitive 26) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:900 — TreeRenderer.plan has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, ternaries 5 (6 pts), if/else 3 (4 pts), loops 2 (3 pts) (nesting depth added 3). Of this number, 14 points are the body's own statements and 12 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.
D2 · Cognitive Complexity · PermissionListAnchorSearch.first (cognitive 24) · ×1
  • PermissionListAnchorSearch.first (cognitive 24) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:13 — PermissionListAnchorSearch.first has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayGuardian.reportToBroker (cognitive 24) · ×1
  • DisplayGuardian.reportToBroker (cognitive 24) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:495 — DisplayGuardian.reportToBroker has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 2 (4 pts), boolean chains 3, ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InstallerMain.install (cognitive 24) · ×1
  • InstallerMain.install (cognitive 24) experiments/LockedUse/Sources/Installer/InstallerMain.swift:195 — InstallerMain.install has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, ternaries 2 (4 pts), 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 · LockedUseGuardianPolicy.poll (cognitive 24) · ×1
  • LockedUseGuardianPolicy.poll (cognitive 24) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseGuardianPolicy.swift:76 — LockedUseGuardianPolicy.poll has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7 (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 · SkyClickDispatcher.click (cognitive 24) · ×1
  • SkyClickDispatcher.click (cognitive 24) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SkyClickSimulation.swift:109 — SkyClickDispatcher.click has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (6 pts), loops 1 (2 pts), 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 · LockScreenInteractor.probe · ×1
  • LockScreenInteractor.probe::visit (cognitive 23) experiments/LockedUse/Sources/Guardian/LockScreenInteractor.swift:84 — LockScreenInteractor.probe::visit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 5, loops 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, 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 (LockScreenInteractor.probe) 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 · SnapshotBuilder.targetedSearch (cognitive 23) · ×1
  • SnapshotBuilder.targetedSearch (cognitive 23) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:2543 — SnapshotBuilder.targetedSearch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PermissionSettingsWindowReader.context (cognitive 22) · ×1
  • PermissionSettingsWindowReader.context (cognitive 22) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionSettingsAnchor.swift:161 — PermissionSettingsWindowReader.context has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10 (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 · LockedUseClickAllowance.accept (cognitive 22) · ×1
  • LockedUseClickAllowance.accept (cognitive 22) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseClickAllowance.swift:21 — LockedUseClickAllowance.accept has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LockedUsePrivateRecord.write (cognitive 22) · ×1
  • LockedUsePrivateRecord.write (cognitive 22) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUsePrivateRecord.swift:15 — LockedUsePrivateRecord.write has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (10 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · OpenComputerUseMain.run (cognitive 21) · ×1
  • OpenComputerUseMain.run (cognitive 21) apps/OpenComputerUse/Sources/OpenComputerUse/OpenComputerUseMain.swift:25 — OpenComputerUseMain.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (4 pts), boolean chains 1, match/switch 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 · DisplayGuardian.verifyCaptureFixture (cognitive 21) · ×1
  • DisplayGuardian.verifyCaptureFixture (cognitive 21) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:190 — DisplayGuardian.verifyCaptureFixture has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 8, error handling 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 · ElementIdentity.read (cognitive 21) · ×1
  • ElementIdentity.read (cognitive 21) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ElementIdentity.swift:42 — ElementIdentity.read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LockedUseBrokerCoordinator.reply (cognitive 21) · ×1
  • LockedUseBrokerCoordinator.reply (cognitive 21) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerCoordinator.swift:395 — LockedUseBrokerCoordinator.reply has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), ternaries 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ComputerUseService.swift.isLikelySyntheticSideActionCandidate (cognitive 21) · ×1
  • ComputerUseService.swift.isLikelySyntheticSideActionCandidate (cognitive 21) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:399 — ComputerUseService.swift.isLikelySyntheticSideActionCandidate has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppAgentConnection.runCLI (cognitive 20) · ×1
  • AppAgentConnection.runCLI (cognitive 20) apps/OpenComputerUse/Sources/OpenComputerUse/MacOSAppAgentProxy.swift:506 — AppAgentConnection.runCLI has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (7 pts), match/switch 1 (2 pts), boolean chains 1, 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 · TaskVerifier.swift.verifyBrokerTask (cognitive 20) · ×1
  • TaskVerifier.swift.verifyBrokerTask (cognitive 20) experiments/LockedUse/AuthorizationPlugin/TaskVerifier.swift:8 — TaskVerifier.swift.verifyBrokerTask has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WatchdogShield.init (cognitive 20) · ×1
  • WatchdogShield.init (cognitive 20) experiments/LockedUse/Sources/Guardian/WatchdogShield.swift:22 — WatchdogShield.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 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 · SnapshotBuilder.buildAccessibilitySnapshot (cognitive 20) · ×1
  • SnapshotBuilder.buildAccessibilitySnapshot (cognitive 20) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:268 — SnapshotBuilder.buildAccessibilitySnapshot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (3 pts), boolean chains 2, 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 · ComputerUseService.selectText (cognitive 20) · ×1
  • ComputerUseService.selectText (cognitive 20) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1173 — ComputerUseService.selectText has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 1 (2 pts) (nesting depth added 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 · service.refreshSnapshot (cognitive 20) · ×1
  • service.refreshSnapshot (cognitive 20) apps/OpenComputerUseWindows/main.go:598 — service.refreshSnapshot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrokerServer.flush (cognitive 19) · ×1
  • BrokerServer.flush (cognitive 19) experiments/LockedUse/Sources/Broker/BrokerMain.swift:452 — BrokerServer.flush has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, 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 · WatchdogBrokerLink.report (cognitive 19) · ×1
  • WatchdogBrokerLink.report (cognitive 19) experiments/LockedUse/Sources/Guardian/WatchdogBrokerLink.swift:37 — WatchdogBrokerLink.report has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 1 (2 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 · SpotlightAppIndex.recentApps (cognitive 19) · ×1
  • SpotlightAppIndex.recentApps (cognitive 19) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AppDiscovery.swift:455 — SpotlightAppIndex.recentApps 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 · LockedUseIPCFrame.append (cognitive 19) · ×1
  • LockedUseIPCFrame.append (cognitive 19) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPC.swift:86 — LockedUseIPCFrame.append has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (2 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 · AccessibilitySnapshot.swift.preferredDisplayTitle (cognitive 19) · ×1
  • AccessibilitySnapshot.swift.preferredDisplayTitle (cognitive 19) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1498 — AccessibilitySnapshot.swift.preferredDisplayTitle has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 7. 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 · AccessibilitySnapshot.swift.isPlainGenericTextContainer (cognitive 19) · ×1
  • AccessibilitySnapshot.swift.isPlainGenericTextContainer (cognitive 19) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1975 — AccessibilitySnapshot.swift.isPlainGenericTextContainer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, 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 · runtime.find_element (cognitive 19) · ×1
  • runtime.find_element (cognitive 19) apps/OpenComputerUseLinux/runtime.py:602 — runtime.find_element has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, 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 · InstallerMain.trustedTree (cognitive 18) · ×1
  • InstallerMain.trustedTree (cognitive 18) experiments/LockedUse/Sources/Installer/InstallerMain.swift:74 — InstallerMain.trustedTree has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, 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 · InstallerMain.removeOwnArtifacts (cognitive 18) · ×1
  • InstallerMain.removeOwnArtifacts (cognitive 18) experiments/LockedUse/Sources/Installer/InstallerMain.swift:393 — InstallerMain.removeOwnArtifacts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4 (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 · LockedUsePeerIdentity.verified (cognitive 18) · ×1
  • LockedUsePeerIdentity.verified (cognitive 18) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUsePeerIdentity.swift:57 — LockedUsePeerIdentity.verified has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LockedUseReturnAllowance.accept (cognitive 18) · ×1
  • LockedUseReturnAllowance.accept (cognitive 18) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseReturnAllowance.swift:19 — LockedUseReturnAllowance.accept has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8 (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 · PermissionSupport.preferredInstalledAppBundleURL (cognitive 18) · ×1
  • PermissionSupport.preferredInstalledAppBundleURL (cognitive 18) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/Permissions.swift:242 — PermissionSupport.preferredInstalledAppBundleURL has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (7 pts) (nesting depth added 7). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. 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 · LockedUseDiagnostics.current (cognitive 17) · ×1
  • LockedUseDiagnostics.current (cognitive 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift:94 — LockedUseDiagnostics.current has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, ternaries 3, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LockedUseIPCSocket.connect (cognitive 17) · ×1
  • LockedUseIPCSocket.connect (cognitive 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseIPCSocket.swift:118 — LockedUseIPCSocket.connect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AccessibilitySnapshot.swift.summaryImageDescendants (cognitive 17) · ×1
  • AccessibilitySnapshot.swift.summaryImageDescendants (cognitive 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1916 — AccessibilitySnapshot.swift.summaryImageDescendants has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenComputerUseCLI.swift.parseTurnEnded (cognitive 17) · ×1
  • OpenComputerUseCLI.swift.parseTurnEnded (cognitive 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift:289 — OpenComputerUseCLI.swift.parseTurnEnded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SetValueReadBack.swift.normalizedSetValueNumber (cognitive 17) · ×1
  • SetValueReadBack.swift.normalizedSetValueNumber (cognitive 17) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SetValueReadBack.swift:35 — SetValueReadBack.swift.normalizedSetValueNumber has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · runtime.set_element_value (cognitive 17) · ×1
  • runtime.set_element_value (cognitive 17) apps/OpenComputerUseLinux/runtime.py:864 — runtime.set_element_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.sessionBusAddress (cognitive 17) · ×1
  • main.sessionBusAddress (cognitive 17) apps/OpenComputerUseLinux/main.go:727 — main.sessionBusAddress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrokerServer.accept (cognitive 16) · ×1
  • BrokerServer.accept (cognitive 16) experiments/LockedUse/Sources/Broker/BrokerMain.swift:171 — BrokerServer.accept has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DisplayGuardian.installTap (cognitive 16) · ×1
  • DisplayGuardian.installTap (cognitive 16) experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:249 — DisplayGuardian.installTap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GuardReleaseAcknowledgement.send (cognitive 16) · ×1
  • GuardReleaseAcknowledgement.send (cognitive 16) experiments/LockedUse/Sources/Guardian/GuardReleaseAcknowledgement.swift:9 — GuardReleaseAcknowledgement.send has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 2 (6 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 · WindowCapture.resolve (cognitive 16) · ×1
  • WindowCapture.resolve (cognitive 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:554 — WindowCapture.resolve has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 2 (4 pts), if/else 2 (3 pts), loops 1 (nesting depth added 3). 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 · TreeRenderer.rawChildren (cognitive 16) · ×1
  • TreeRenderer.rawChildren (cognitive 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1205 — TreeRenderer.rawChildren has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDiscovery.bestResolutionIndex (cognitive 16) · ×1
  • AppDiscovery.bestResolutionIndex (cognitive 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AppDiscovery.swift:211 — AppDiscovery.bestResolutionIndex has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LockedUseSession.from (cognitive 16) · ×1
  • LockedUseSession.from (cognitive 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift:29 — LockedUseSession.from has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · LockedUseDiagnostics.installedGuardianPermissions (cognitive 16) · ×1
  • LockedUseDiagnostics.installedGuardianPermissions (cognitive 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseDiagnostics.swift:136 — LockedUseDiagnostics.installedGuardianPermissions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, loops 1 (2 pts), error handling 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 · AccessibilitySnapshot.swift.shouldElideNode (cognitive 16) · ×1
  • AccessibilitySnapshot.swift.shouldElideNode (cognitive 16) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1755 — AccessibilitySnapshot.swift.shouldElideNode has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: ComputerUseService packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:648 — TooManyMethods — 94 methods. The bar is 30 methods; this is 64 over it, 3.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · FunctionTooLong · ×1
  • FunctionTooLong: OpenComputerUseCLI.swift.openComputerUseHelpText packages/OpenComputerUseKit/Sources/OpenComputerUseKit/OpenComputerUseCLI.swift:134 — FunctionTooLong — openComputerUseHelpText runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (3 members, 70 shared lines) · ×1
  • Near-duplicate member family (3 members, 70 shared lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:437 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:437-564 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:420-552 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:349-476 — These 3 members are variants of one another: a block of 70 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 25 shared lines) · ×1
  • Near-duplicate member family (3 members, 25 shared lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:196 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:196-227 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:239-270 | scripts/render-synthesized-software-cursor.swift:266-321 — These 3 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication · Near-duplicate member pair (89 shared lines) · ×1
  • Near-duplicate member pair (89 shared lines) apps/OpenComputerUseLinux/main.go:201 — apps/OpenComputerUseLinux/main.go:201-293 | apps/OpenComputerUseWindows/main.go:267-359 — These two members are variants of one another: 89 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 (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:108 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:108-137 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:43-72 — These two members are one piece of code written twice and then edited apart: 26 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 (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) apps/OpenComputerUseLinux/main.go:380 — apps/OpenComputerUseLinux/main.go:380-399 | apps/OpenComputerUseLinux/main.go:401-424 | apps/OpenComputerUseLinux/main.go:484-500 | apps/OpenComputerUseWindows/main.go:443-462 | apps/OpenComputerUseWindows/main.go:464-487 | apps/OpenComputerUseWindows/main.go:554-570 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:566 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:566-579 | experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:728-741 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:478-491 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:642-655 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (64 corresponding lines) · ×1
  • Edited copy of a member (64 corresponding lines) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift:1177 — apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift:1177-1242 | scripts/render-open-computer-use-icon.swift:78-141 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (76 corresponding lines) · ×1
  • Edited copy of a member (76 corresponding lines) apps/OpenComputerUseLinux/main.go:1454 — apps/OpenComputerUseLinux/main.go:1454-1529 | apps/OpenComputerUseWindows/main.go:1119-1194 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 49+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 49+ corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:108 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:108-156 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:130-184 | scripts/render-synthesized-software-cursor.swift:173-226 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 49 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1531 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1531-1570 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1285-1329 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1572 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1572-1616 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1331-1380 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 37+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 37+ corresponding lines) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:158 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:158-194 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:186-237 | scripts/render-synthesized-software-cursor.swift:228-264 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) apps/OpenComputerUseLinux/main.go:334 — apps/OpenComputerUseLinux/main.go:334-378 | apps/OpenComputerUseWindows/main.go:400-441 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) apps/OpenComputerUseLinux/main.go:102 — apps/OpenComputerUseLinux/main.go:102-129 | apps/OpenComputerUseWindows/main.go:111-140 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:677 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:677-726 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:597-640 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1496 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1496-1529 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1247-1283 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2395 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2395-2416 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:2444-2479 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:254 — experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift:254-280 | experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift:459-485 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) apps/OpenComputerUseLinux/main.go:23 — apps/OpenComputerUseLinux/main.go:23-53 | apps/OpenComputerUseWindows/main.go:23-60 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) apps/OpenComputerUseLinux/main.go:145 — apps/OpenComputerUseLinux/main.go:145-177 | apps/OpenComputerUseWindows/main.go:207-240 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:13 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AgentDisplay.swift:13-26 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:28-41 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:68-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:507 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:507-520 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:523-534 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 15+ corresponding lines) apps/OpenComputerUseLinux/main.go:452 — apps/OpenComputerUseLinux/main.go:452-466 | apps/OpenComputerUseLinux/main.go:468-482 | apps/OpenComputerUseWindows/main.go:519-533 | apps/OpenComputerUseWindows/main.go:535-552 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×1
  • Edited copy of a member (8 corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilityTextSelection.swift:6 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilityTextSelection.swift:6-13 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1961-1969 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerConfiguration.swift:21 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseBrokerConfiguration.swift:21-26 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseRecoveryRecord.swift:55-60 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseValidationReport.swift:23-26 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift:186 — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift:186-192 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseToolDispatcher.swift:336-345 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/MCPServer.swift:162-169 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) apps/OpenComputerUseSmokeSuite/Sources/OpenComputerUseSmokeSuite/main.swift:507 — apps/OpenComputerUseSmokeSuite/Sources/OpenComputerUseSmokeSuite/main.swift:507-509 | experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1872-1874 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift:909-911 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (208 lines × 2) · ×1
  • Duplicated block (208 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1010 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1010-1217 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:815-1022 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (36–37 lines × 3) · ×1
  • Duplicated block (36–37 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:158 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:158-194 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:111-146 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:82-118 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. 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 (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1581 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1581-1616 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1345-1380 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1581` 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 (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:920 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:920-949 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:733-762 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–29 lines × 3) · ×1
  • Duplicated block (25–29 lines × 3) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:203 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:203-227 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:246-270 | scripts/render-synthesized-software-cursor.swift:293-321 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (40 lines × 3) · ×1
  • Duplicated block (40 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:438 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:438-477 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:421-460 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:350-389 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:516 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:516-541 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:428-454 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:516` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:350 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:350-374 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:266-290 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1548 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1548-1570 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1305-1329 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1548` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:463 — experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:463-486 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:487-510 — 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 (56 lines × 2) · ×1
  • Duplicated block (56 lines × 2) apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift:1183 — apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift:1183-1238 | scripts/render-open-computer-use-icon.swift:85-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (16–21 lines × 3) · ×1
  • Duplicated block (16–21 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1843 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1843-1858 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:833-853 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1409-1424 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:116 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:116-136 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:144-164 | scripts/render-synthesized-software-cursor.swift:180-200 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:116` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:644 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:644-663 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:803-822 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:560-579 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:614 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:614-631 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:773-790 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:530-547 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:108 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:108-132 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:43-68 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:139 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:139-154 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:167-182 | scripts/render-synthesized-software-cursor.swift:203-218 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:139` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:682 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:682-696 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:601-616 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:682` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1502 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1502-1516 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:1254-1267 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:1502` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:121 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:121-134 | experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:142-155 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:149-162 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:170-183 | scripts/render-synthesized-software-cursor.swift:185-198 | scripts/render-synthesized-software-cursor.swift:206-219 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:204 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:204-214 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:177-187 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:128-138 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:204` 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 (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:566 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:566-574 | experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:728-736 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:478-486 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:642-650 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift` as WHOLE FILES: this scan already matched 39 separate duplicated blocks between them, totalling at least 934 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:566` 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 (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:174 — experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift:174-182 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift:217-225 | scripts/render-synthesized-software-cursor.swift:244-252 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/SynthesizedCursorGlyphView.swift` and `packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorGlyphRenderer.swift` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:334 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:334-341 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:684-691 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:250-257 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:334` 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 (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) experiments/LockedUse/Sources/AuthorizationProbe.swift:16 — experiments/LockedUse/Sources/AuthorizationProbe.swift:16-22 | experiments/LockedUse/Sources/RemoteVerificationProbe.swift:25-30 — 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 `experiments/LockedUse/Sources/AuthorizationProbe.swift:16` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:665 — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:665-671 | experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:824-830 | packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift:581-587 — before extracting anything, compare `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift` and `experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 212 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (74 lines × 2) · ×1
  • Duplicated block (74 lines × 2) apps/OpenComputerUseLinux/main.go:1636 — apps/OpenComputerUseLinux/main.go:1636-1709 | apps/OpenComputerUseWindows/main.go:1301-1374 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (54 lines × 2) · ×1
  • Duplicated block (54 lines × 2) apps/OpenComputerUseLinux/main.go:225 — apps/OpenComputerUseLinux/main.go:225-278 | apps/OpenComputerUseWindows/main.go:291-344 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) apps/OpenComputerUseLinux/main.go:1740 — apps/OpenComputerUseLinux/main.go:1740-1772 | apps/OpenComputerUseWindows/main.go:1405-1437 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) apps/OpenComputerUseLinux/main.go:1532 — apps/OpenComputerUseLinux/main.go:1532-1560 | apps/OpenComputerUseWindows/main.go:1197-1225 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) apps/OpenComputerUseLinux/main.go:146 — apps/OpenComputerUseLinux/main.go:146-170 | apps/OpenComputerUseWindows/main.go:211-234 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) apps/OpenComputerUseLinux/main.go:381 — apps/OpenComputerUseLinux/main.go:381-397 | apps/OpenComputerUseWindows/main.go:444-460 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) apps/OpenComputerUseLinux/main.go:390 — apps/OpenComputerUseLinux/main.go:390-397 | apps/OpenComputerUseLinux/main.go:415-422 | apps/OpenComputerUseLinux/main.go:491-498 | apps/OpenComputerUseWindows/main.go:453-460 | apps/OpenComputerUseWindows/main.go:478-485 | apps/OpenComputerUseWindows/main.go:561-568 — `apps/OpenComputerUseLinux/main.go` and `apps/OpenComputerUseWindows/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 49 separate duplicated blocks between them, totalling at least 894 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 · Edited copy of a member (53 corresponding lines) · ×1
  • Edited copy of a member (53 corresponding lines) scripts/computer-use-cli/main.go:139 — scripts/computer-use-cli/main.go:139-191 | scripts/computer-use-cli/main.go:271-329 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) scripts/computer-use-cli/main.go:777 — scripts/computer-use-cli/main.go:777-806 | scripts/computer-use-cli/main.go:808-840 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) scripts/computer-use-cli/app_server.go:210 — scripts/computer-use-cli/app_server.go:210-223 | scripts/computer-use-cli/main.go:384-399 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) scripts/codex_dump.py:332 — scripts/codex_dump.py:332-349 | scripts/codex_dump.py:355-368 — 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) scripts/computer-use-cli/main.go:226 — scripts/computer-use-cli/main.go:226-241 | scripts/computer-use-cli/main.go:292-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/computer-use-cli/main.go:226` 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 31 plain JS — the untyped files are scripts/install-config-helper.mjs, scripts/node-repl/ocu-config.mjs, scripts/node-repl/ocu-config.test.mjs, scripts/node-repl/open-computer-use-cli.mjs, scripts/node-repl/open-computer-use-cli.test.mjs, scripts/node-repl/open-computer-use-kernel.mjs (+25 more).
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) scripts/install-config-helper.mjs:233 — scripts/install-config-helper.mjs:233 · scripts/install-config-helper.mjs:270 — 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 (14 lines × 2 locations) · ×1
  • Duplicated block (14 lines × 2 locations) scripts/install-config-helper.mjs:792 — scripts/install-config-helper.mjs:792 · scripts/install-config-helper.mjs:813 — 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 (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) scripts/npm/build-packages.mjs:140 — scripts/npm/build-packages.mjs:140 · scripts/npm/publish-packages.mjs:74 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (5 matched lines × 2 locations) scripts/install-config-helper.mjs:642 — scripts/install-config-helper.mjs:642 · scripts/node-repl/open-computer-use-repl.mjs:157 — the two spans are one implementation copied and then locally edited — 56 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function main (cyclomatic 31, cognitive 35) · ×1
  • Complex function main (cyclomatic 31, cognitive 35) scripts/node-repl/open-computer-use-cli.mjs:448 — main has cyclomatic complexity 31 and cognitive complexity 35; 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 validateSetting (cyclomatic 24, cognitive 24) · ×1
  • Complex function validateSetting (cyclomatic 24, cognitive 24) scripts/node-repl/ocu-config.mjs:26 — validateSetting has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function query (cyclomatic 23, cognitive 25) · ×1
  • Complex function query (cyclomatic 23, cognitive 25) scripts/node-repl/open-computer-use-repl.mjs:330 — query has cyclomatic complexity 23 and cognitive complexity 25; 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 configCommand (cyclomatic 22, cognitive 27) · ×1
  • Complex function configCommand (cyclomatic 22, cognitive 27) scripts/node-repl/ocu-config.mjs:91 — configCommand has cyclomatic complexity 22 and cognitive complexity 27; 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 installOpencodeMcp (cyclomatic 20, cognitive 30) · ×1
  • Complex function installOpencodeMcp (cyclomatic 20, cognitive 30) scripts/install-config-helper.mjs:297 — installOpencodeMcp has cyclomatic complexity 20 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runInteractiveRepl (cyclomatic 19, cognitive 40) · ×1
  • Complex function runInteractiveRepl (cyclomatic 19, cognitive 40) scripts/node-repl/open-computer-use-cli.mjs:347 — runInteractiveRepl has cyclomatic complexity 19 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function main (cyclomatic 19, cognitive 19) · ×1
  • Complex function main (cyclomatic 19, cognitive 19) scripts/install-config-helper.mjs:763 — main has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseJavaScriptArgs (cyclomatic 16, cognitive 21) · ×1
  • Complex function parseJavaScriptArgs (cyclomatic 16, cognitive 21) scripts/node-repl/open-computer-use-cli.mjs:206 — parseJavaScriptArgs has cyclomatic complexity 16 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function selectText (cyclomatic 15, cognitive 16) · ×1
  • Complex function selectText (cyclomatic 15, cognitive 16) scripts/node-repl/open-computer-use-repl.mjs:382 — selectText has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 publishWithRetry (cyclomatic 14, cognitive 23) · ×1
  • Complex function publishWithRetry (cyclomatic 14, cognitive 23) scripts/npm/publish-packages.mjs:161 — publishWithRetry has cyclomatic complexity 14 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 handle (cyclomatic 14, cognitive 18) · ×1
  • Complex function handle (cyclomatic 14, cognitive 18) scripts/node-repl/open-computer-use-repl.mjs:683 — handle has cyclomatic complexity 14 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 normalizeImage (cyclomatic 13, cognitive 18) · ×1
  • Complex function normalizeImage (cyclomatic 13, cognitive 18) scripts/node-repl/open-computer-use-repl.mjs:93 — normalizeImage has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 validateNotes (cyclomatic 13, cognitive 12) · ×1
  • Complex function validateNotes (cyclomatic 13, cognitive 12) scripts/validate-github-release-notes.mjs:52 — validateNotes has cyclomatic complexity 13 and cognitive complexity 12; 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 optionsToSnapshotArgs (cyclomatic 12, cognitive 15) · ×1
  • Complex function optionsToSnapshotArgs (cyclomatic 12, cognitive 15) scripts/node-repl/open-computer-use-repl.mjs:271 — optionsToSnapshotArgs has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function inspectConfig (cyclomatic 11, cognitive 18) · ×1
  • Complex function inspectConfig (cyclomatic 11, cognitive 18) scripts/node-repl/ocu-config.mjs:57 — inspectConfig has cyclomatic complexity 11 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 readConfig (cyclomatic 11, cognitive 11) · ×1
  • Complex function readConfig (cyclomatic 11, cognitive 11) scripts/node-repl/ocu-config.mjs:45 — readConfig has cyclomatic complexity 11 and cognitive complexity 11; 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.
R6 · Tooling · No lint script · ×1
  • No lint script — test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Minor — 24 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×9
  • Duplicated predicate apps/OpenComputerUse/Sources/OpenComputerUse/MacOSAppAgentProxy.swift:522 — `!json && !permissions.missingPermissions.isEmpty` appears character-identically in 2 files — apps/OpenComputerUse/Sources/OpenComputerUse/MacOSAppAgentProxy.swift, apps/OpenComputerUse/Sources/OpenComputerUse/OpenComputerUseMain.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift:1383 — `attribute == kAXValueAttribute as String || attribute == kAXSelectedTextAttribute as String` appears character-identically in 2 files — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AXSnapshotReadCache.swift:63 — `error == .attributeUnsupported || error == .noValue` appears character-identically in 3 files — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AXSnapshotReadCache.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/AccessibilitySnapshot.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ElementIdentity.swift. 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 experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:667 — `length < minimumLength || length < normalizationEpsilon` appears character-identically in 3 files — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift, experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift. 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 experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift:577 — `lhs.measurement.staysInBounds && !rhs.measurement.staysInBounds` appears character-identically in 2 files — experiments/StandaloneCursor/Sources/StandaloneCursorSupport/StandaloneCursorModel.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/SoftwareCursorOverlay.swift. 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 experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift:381 — `progress >= configuration.closeEnoughProgressThreshold && abs(target - progress) <= configuration.closeEnoughDistanceThreshold` appears character-identically in 2 files — experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift:1687 — `result == .success && settable.boolValue` appears character-identically in 2 files — packages/OpenComputerUseKit/Sources/OpenComputerUseKit/ComputerUseService.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/InputSimulation.swift. 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 experiments/LockedUse/Sources/Installer/InstallerMain.swift:383 — `status.phase == .idle || status.phase == .awaitingManualUnlock` appears character-identically in 2 files — experiments/LockedUse/Sources/Installer/InstallerMain.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/LockedUseActionScope.swift. 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 experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift:261 — `type == .tapDisabledByTimeout || type == .tapDisabledByUserInput` appears character-identically in 2 files — experiments/LockedUse/Sources/Guardian/DisplayGuardian.swift, experiments/LockedUse/Sources/Guardian/ShieldPreview.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch apps/OpenComputerUseLinux/runtime.py:105 — `node_pid` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch apps/OpenComputerUseLinux/runtime.py:452 — `pixbuf_looks_black` swallows every exception into `return False` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch experiments/LockedUse/AuthorizationPlugin/TaskVerifierDiagnostics.swift:27 — `diagnoseBrokerTask` turns every thrown error into `-3` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). 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 at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
X7 · Silent fallback defaults · Silent fallback default on error · ×2
  • Silent fallback default on error apps/OpenComputerUseLinux/main.go:814 — `firstWaylandSocket` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
  • Silent fallback default on error apps/OpenComputerUseWindows/main.go:194 — `validateScreenshotPNGBase64` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 21 significant file(s) lose their only recent owner: scripts/cursor-motion-re/official_cursor_motion.py, experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift, apps/OpenComputerUse/Sources/OpenComputerUse/PermissionOnboardingApp.swift, packages/OpenComputerUseKit/Sources/OpenComputerUseKit/CursorMotionModel.swift, experiments/LockedUse/Sources/Broker/BrokerMain.swift, experiments/CursorMotion/Sources/CursorMotion/CursorLabRootView.swift, experiments/LockedUse/Sources/Installer/InstallerMain.swift, scripts/codex_dump.py (+13 more). Pair on, review, or document these before any departure.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is `(repository root)` (33394 LoC, 387 module-visible types across 16 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D37 · Vulnerability-disclosure Policy · REDACTED · ×1
  • REDACTED
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `apps/OpenComputerUseLinux`, `apps/OpenComputerUseWindows`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST .github/workflows/ci.yml:4 — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 4 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 — The release 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 the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
P6 · Release Hygiene · Changelog looks stale/thin · ×1
  • Changelog looks stale/thin — The changelog this check read carries 1 versioned entry, 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 module-local declaration 'reset' · ×1
  • Unused module-local declaration 'reset' scripts/tests/macos-set-value-smoke.mjs:40 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-19f9143a69b749a8944553b0eb7cd59f/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-19f9143a69b749a8944553b0eb7cd59f/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .2artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .3artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
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 8 file(s) — `apps/OpenComputerUse/Sources/OpenComputerUse/LockedUseNativeValidation.swift`, `apps/OpenComputerUseFixture/Sources/OpenComputerUseFixture/main.swift`, `experiments/CursorMotion/Sources/CursorMotion/CursorMotionModel.swift`, `experiments/LockedUse/Sources/Guardian/ScreenLock.swift`, `experiments/StandaloneCursor/Sources/StandaloneCursor/StandaloneCursorRootView.swift`, … (+3 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1dcd2-e594-7db1-9ccd-51ed91c71c60 · 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