Public report of jacklandrin/OnlySwitch, published 28 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). 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, 28 October 2026, 18:53 UTC · Survey ID cd_9b69b476211f4e159e13169b534ed6ae

jacklandrin/OnlySwitch

Measured 28 October 2026, 18:48 UTC, at code version bf928c5

No regression since the last survey

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

CAI score 52out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey

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

A medium codebase: 59,710 lines of product code in 24 projects, tests not counted · Estimated rebuild effort: about 0.6 person-years · Weakest lens: Production Readiness, 30

Findings by how serious they are

3 critical 491 serious 77 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
28 October 2026, 18:48 UTC

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

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

46of 46 dimensions measured by tools.
523of 571 findings point to an exact file and line, so you can open each one in the code. The other 48 concern the repository as a whole, such as missing documentation.
46dimensions across 8 lenses, read from 59,710 lines of product code in 24 projects.
Chapters

Executive summary

jacklandrin/OnlySwitch falls short of our standard for production because we found no working pipeline that builds or tests changes to the code and no automated security scanning of the code, its secrets or its dependencies. It scores 52 out of 100 and is rated Adequate, and none of its three critical findings concern security.

Production Readiness, at 30, is the weakest lens and counts most in the score. The best first step for the work it takes is making the tests check their results, worth about 5 points. Adding an automated build and test pipeline would lift Production Readiness itself, worth about 7 points. Raising Production Readiness to 70 would lift the score to about 69.

One set of files in separate parts keeps changing together, which points to a hidden dependency. Making the hidden dependencies explicit would close this risk. Saving the change and the message together would take care of the place where data is saved and a message sent separately.

The product code is 59,710 lines, about €82,000 to rebuild.

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

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

If Production Readiness rose from 30 to 70, the lowest score rated Strong, the score would rise from 52 to about 69.

Code composition: what the lines of code are
Product code 70%Tests 30%
New since the last survey: 144 findings

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

  • Cyclomatic Complexity · AphroditeReducer.body (cyclomatic 102) Modules/Sources/Aphrodite/AphroditeReducer.swift
  • Cyclomatic Complexity · XcodeCleanerFeature.body (cyclomatic 71) Modules/Sources/XcodeCleaner/XcodeCleanerFeature.swift
  • Cyclomatic Complexity · TailscaleFeature.body (cyclomatic 56) Modules/Sources/Tailscale/TailscaleFeature.swift
  • Cyclomatic Complexity · AppUninstallerFeature.body (cyclomatic 50) Modules/Sources/AppUninstaller/AppUninstallerFeature.swift
  • Cyclomatic Complexity · DockPreviewFeature.body (cyclomatic 48) OnlySwitch/Features/DockPreview/DockPreviewFeature.swift
  • Cyclomatic Complexity · TailscaleCoordinator.perform (cyclomatic 38) Modules/Sources/Tailscale/TailscaleCoordinator.swift
  • Cyclomatic Complexity · RemotePaywallFeature.body (cyclomatic 35) OnlySwitchRemote/Features/Subscription/RemotePaywallFeature.swift
  • Cyclomatic Complexity · AphroditeRemoteSVGValidationDelegate.validAttribute (cyclomatic 26) Modules/Sources/RemoteCore/AphroditeRemoteModels.swift
  • Cyclomatic Complexity · OnlySwitchListView.body (cyclomatic 25) OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift
  • Cyclomatic Complexity · OnlyRemoteCampaignFeature.body (cyclomatic 25) OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.swift
  • Cyclomatic Complexity · XcodeCleanerSimulator.inventory (cyclomatic 24) Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift
  • Cyclomatic Complexity · RemoteConnectionRuntime.handle (cyclomatic 24) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift
  • Cyclomatic Complexity · ClaudeUsageView.content (cyclomatic 23) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift
  • Cyclomatic Complexity · CodexUsageView.content (cyclomatic 23) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift
  • Cyclomatic Complexity · RemoteAppView.body (cyclomatic 23) OnlySwitchRemote/App/RemoteAppView.swift
  • Cyclomatic Complexity · RemoteCatalogProvider.init (cyclomatic 23) OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift
  • Cyclomatic Complexity · AppUninstallerFileSystem.scan (cyclomatic 22) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift
  • Cyclomatic Complexity · AppUninstallerFileSystem.validate (cyclomatic 22) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift
  • Cyclomatic Complexity · MacSystemMonitorCollector.sampleForStream (cyclomatic 22) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift
  • Cyclomatic Complexity · RemoteClaudeUsageFeature.body (cyclomatic 21) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Cyclomatic Complexity · ClaudeCodeCLI.signIn (cyclomatic 20) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeCodeCLI.swift
  • Cyclomatic Complexity · XcodeCleanerFileSystem.clean (cyclomatic 20) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift
  • Cyclomatic Complexity · SwitchManager.visibleTypesIncludingNewDiscoveries (cyclomatic 19) OnlySwitch/EverySwitch/SwitchManager.swift
  • Cyclomatic Complexity · ClaudeUsageReducer.body (cyclomatic 18) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageReducer.swift
  • Cyclomatic Complexity · CleanerCoordinator.clean (cyclomatic 18) Modules/Sources/XcodeCleaner/XcodeCleanerClient.swift
  • Cyclomatic Complexity · SystemMonitorReducer.body (cyclomatic 17) Modules/Sources/SystemMonitor/SystemMonitorReducer.swift
  • Cyclomatic Complexity · XcodeCleanerFileSystem.removeEntry (cyclomatic 17) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift
  • Cyclomatic Complexity · CodexRuntimePool.chatStream (cyclomatic 16) Modules/Sources/OnlyAgent/Settings/CodexSettings/CodexService.swift
  • Cyclomatic Complexity · DashboardReducer.body (cyclomatic 16) Modules/Sources/OnlyControl/DashboardReducer.swift
  • Cyclomatic Complexity · TailscaleConnection.validatedIPAddress (cyclomatic 16) Modules/Sources/Tailscale/TailscaleModels.swift
  • Cognitive Complexity · AphroditeReducer.body (cognitive 106) Modules/Sources/Aphrodite/AphroditeReducer.swift
  • Cognitive Complexity · XcodeCleanerFeature.body (cognitive 73) Modules/Sources/XcodeCleaner/XcodeCleanerFeature.swift
  • Cognitive Complexity · DockPreviewFeature.body (cognitive 67) OnlySwitch/Features/DockPreview/DockPreviewFeature.swift
  • Cognitive Complexity · TailscaleFeature.body (cognitive 57) Modules/Sources/Tailscale/TailscaleFeature.swift
  • Cognitive Complexity · AppUninstallerFeature.body (cognitive 55) Modules/Sources/AppUninstaller/AppUninstallerFeature.swift
  • Cognitive Complexity · XcodeCleanerSimulator.inventory (cognitive 52) Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift
  • Cognitive Complexity · RemotePaywallFeature.body (cognitive 45) OnlySwitchRemote/Features/Subscription/RemotePaywallFeature.swift
  • Cognitive Complexity · TailscaleCoordinator.perform (cognitive 43) Modules/Sources/Tailscale/TailscaleCoordinator.swift
  • Cognitive Complexity · XcodeCleanerFileSystem.clean (cognitive 43) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift
  • Cognitive Complexity · CodexUsageView.content (cognitive 39) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift
  • Cognitive Complexity · ModelProviderService.liveValue (cognitive 34) Modules/Sources/OnlyAgent/ModelProviderService.swift
  • Cognitive Complexity · AppUninstallerFileSystem.scan (cognitive 33) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift
  • Cognitive Complexity · OnlyRemoteCampaignFeature.body (cognitive 32) OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.swift
  • Cognitive Complexity · ClaudeUsageView.content (cognitive 30) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift
  • Cognitive Complexity · ClaudeCodeCLI.signIn (cognitive 28) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeCodeCLI.swift
  • Cognitive Complexity · XcodeCleanerFileSystem.removeEntry (cognitive 27) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift
  • Cognitive Complexity · TailscaleCommandRunner.drain (cognitive 26) Modules/Sources/Tailscale/TailscaleCommandRunner.swift
  • Cognitive Complexity · RemoteConnectionRuntime.handle (cognitive 26) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift
  • Cognitive Complexity · Benchmark.main (cognitive 26) doc/research/xcode-cleaner-scan-benchmark.swift
  • Cognitive Complexity · CleanerCoordinator.clean (cognitive 25) Modules/Sources/XcodeCleaner/XcodeCleanerClient.swift
  • Cognitive Complexity · RemoteClaudeUsageFeature.body (cognitive 24) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Cognitive Complexity · ClaudeUsageService.fetchOnce (cognitive 23) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageService.swift
  • Cognitive Complexity · OnlySwitchListView.body (cognitive 23) OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift
  • Cognitive Complexity · AppUninstallerFileSystem.validate (cognitive 22) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift
  • Cognitive Complexity · XcodeCleanerSimulator.clean (cognitive 22) Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift
  • Cognitive Complexity · MacSystemMonitorCollector.sampleForStream (cognitive 22) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift
  • Cognitive Complexity · AphroditeFileStore.load (cognitive 21) Modules/Sources/Aphrodite/AphroditePersistenceClient.swift
  • Cognitive Complexity · TailscaleSettingsView.accountDetails (cognitive 19) Modules/Sources/Tailscale/TailscaleSettingsView.swift
  • Cognitive Complexity · SwitchManager.visibleTypesIncludingNewDiscoveries (cognitive 18) OnlySwitch/EverySwitch/SwitchManager.swift
  • Cognitive Complexity · AppUninstallerFileSystem.remove (cognitive 17) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift
  • Cognitive Complexity · ClaudeCodeCLI.authorizationURL (cognitive 17) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeCodeCLI.swift
  • Cognitive Complexity · DashboardReducer.body (cognitive 17) Modules/Sources/OnlyControl/DashboardReducer.swift
  • Cognitive Complexity · SwitchBarVM.doSwitch (cognitive 17) OnlySwitch/Features/SwitchItem/SwitchBar/SwitchBarVM.swift
  • Cognitive Complexity · ClaudeUsageResponse.decode (cognitive 16) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageResponse.swift
  • Cognitive Complexity · TailscaleCoordinator.authorize (cognitive 16) Modules/Sources/Tailscale/TailscaleCoordinator.swift
  • Cognitive Complexity · TailscaleConnection.validatedIPAddress (cognitive 16) Modules/Sources/Tailscale/TailscaleModels.swift
  • God Classes · MethodTooLong: AphroditeReducer.body Modules/Sources/Aphrodite/AphroditeReducer.swift
  • God Classes · MethodTooLong: DockPreviewFeature.body OnlySwitch/Features/DockPreview/DockPreviewFeature.swift
  • God Classes · MethodTooLong: CodexUsageView.content Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift
  • God Classes · MethodTooLong: RemoteAppView.body OnlySwitchRemote/App/RemoteAppView.swift
  • God Classes · MethodTooLong: RemoteMessage.encode Modules/Sources/RemoteCore/RemoteMessage.swift
  • God Classes · ClassTooLong: SystemMonitorPanelView OnlySwitch/Features/SystemMonitor/SystemMonitorPanelView.swift
  • God Classes · TooManyMethods: InMemoryRemotePersistenceStore OnlySwitchRemote/Dependencies/RemotePersistenceClient.swift
  • God Classes · MethodTooLong: ModelProviderService.liveValue Modules/Sources/OnlyAgent/ModelProviderService.swift
  • God Classes · MethodTooLong: SwitchType.getNewSwitchInstance OnlySwitch/EverySwitch/SwitchType++.swift
  • God Classes · MethodTooLong: RemotePaywallFeature.body OnlySwitchRemote/Features/Subscription/RemotePaywallFeature.swift
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Code Duplication · Duplicated block (19 lines × 2) OnlySwitch/Features/Settings/KeepAwake/KeepAwakeSettingView.swift
  • Code Duplication · Duplicated block (14 lines × 2) Modules/Sources/OnlyAgent/Settings/OllamaSettings/OllamaRequestService.swift
  • Code Duplication · Duplicated block (7–13 lines × 2) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift
  • Code Duplication · Duplicated block (11 lines × 2) OnlySwitch/Features/DockPreview/DockPreviewClient.swift
  • Code Duplication · Duplicated block (11 lines × 2) OnlySwitchRemote/App/RemoteAppFeature.swift
  • Code Duplication · Duplicated block (10 lines × 4) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Code Duplication · Duplicated block (10 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Code Duplication · Duplicated block (9 lines × 2) Modules/Sources/AppUninstaller/AppUninstallerView.swift
  • Code Duplication · Duplicated block (9 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Code Duplication · Duplicated block (8 lines × 2) Modules/Sources/RemoteCore/ClaudeUsageModels.swift
  • Code Duplication · Duplicated block (8 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Code Duplication · Duplicated block (7 lines × 2) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift
  • Code Duplication · Duplicated block (5 lines × 2) Modules/Sources/Aphrodite/AphroditeReducer.swift
  • Code Duplication · Duplicated block (5 lines × 2) Modules/Sources/RemoteCore/ClaudeUsageModels.swift
  • Code Duplication · Duplicated block (5 lines × 2) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift
  • Code Duplication · Duplicated block (6 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Code Duplication · Duplicated block (9 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift
  • Code Duplication · Duplicated block (5 lines × 2) Modules/Sources/Aphrodite/AphroditeLocalNotificationClient.swift
  • Code Duplication · Duplicated block (7 lines × 2) OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift
  • Code Duplication · Duplicated block (6 lines × 2) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift
  • Code Duplication · Duplicated block (6 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageView.swift
  • Cohesion (LCOM4) · Low cohesion: ClaudeUsageSwitch (LCOM4 4) OnlySwitch/EverySwitch/ClaudeUsageSwitch.swift
  • Cohesion (LCOM4) · Low cohesion: DockPreviewSwitch (LCOM4 4) OnlySwitch/EverySwitch/DockPreviewSwitch.swift

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

Fixed since the last survey: 31 findings

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

  • Cyclomatic Complexity · CodexUsageView.body (cyclomatic 23) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift
  • Cyclomatic Complexity · MacSystemMonitorCollector.sample (cyclomatic 22) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift
  • Cognitive Complexity · CodexUsageView.body (cognitive 39) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift
  • Cognitive Complexity · MacSystemMonitorCollector.sample (cognitive 22) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift
  • God Classes · MethodTooLong: CodexUsageView.body Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift
  • Code Duplication · Duplicated block (22 lines × 2) OnlySwitch/Features/Settings/KeepAwake/KeepAwakeSettingView.swift
  • Code Duplication · Duplicated block (11 lines × 2) OnlySwitchRemote/App/RemoteAppFeature.swift
  • Code Duplication · Duplicated block (10 lines × 2) OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift
  • Code Duplication · Duplicated block (5 lines × 2) OnlySwitch/EverySwitch/CodexUsageSwitch.swift
  • Churn × Complexity Hotspots · Hotspot: OnlySwitch/Features/RemoteAccess/Settings/RemoteAccessSettingsFeature.swift OnlySwitch/Features/RemoteAccess/Settings/RemoteAccessSettingsFeature.swift
  • Churn × Complexity Hotspots · Hotspot: OnlySwitchRemote/Features/Pairing/PairingView.swift OnlySwitchRemote/Features/Pairing/PairingView.swift
  • Churn × Complexity Hotspots · Repeated repair: OnlySwitch/Features/RemoteAccess/Host/RemoteCatalogMonitor.swift OnlySwitch/Features/RemoteAccess/Host/RemoteCatalogMonitor.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/Extensions/String++.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/Extensions/String++.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/Extensions/LocalizedString++.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/Extensions/LocalizedString++.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageService.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/OnlyAgent/Dialogue/PromptDialogueView.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/OnlyAgent/Settings/CodexSettings/CodexService.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift
  • Exception handling · Swallowed exception (caught, then discarded) Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAIService.swift
  • Exception handling · Swallowed exception (empty catch) OnlySwitch/CoreData/RadioStations+Fetch.swift
  • Exception handling · Swallowed exception (empty catch) OnlySwitch/CoreData/RadioStations+Fetch.swift
  • Exception handling · Swallowed exception (empty catch) OnlySwitch/CoreData/RadioStations+Fetch.swift
  • Exception handling · Swallowed exception (caught, then discarded) OnlySwitch/EverySwitch/XcodeCacheSwitch.swift
  • Exception handling · Swallowed exception (caught, then discarded) OnlySwitch/EverySwitch/XcodeCacheSwitch.swift
  • Exception handling · Swallowed exception (caught, then discarded) OnlySwitch/EverySwitch/TopNotchSwitch.swift
  • Exception handling · Swallowed exception (caught, then discarded) OnlySwitch/EverySwitch/TopNotchSwitch.swift
  • Exception handling · Swallowed exception (caught, then discarded) OnlySwitch/EverySwitch/TopNotchSwitch.swift
  • Exception handling · Swallowed exception (caught, then discarded) OnlySwitch/EverySwitch/TopNotchSwitch.swift
Rebuild cost: about €82,000 · Estimate
Cost to rebuild€27,000 to €140,000, for 456 to 1,446 hours of work, about 0.6 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 52. 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: 59,710 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with OnlySwitchTests.swift.
Raises the score by about 5 points · Low effort · Test Quality
2
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 7 points · Medium effort · CI/CD gates
3
Keep implementation types off the public surface (Swift: leave it `internal` (the default) instead of `public`) so internals can change without breaking consumers.
Raises the score by about 5 points · Medium effort · Library API & versioning

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

Architecture — 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 Aphrodite Aphrodite Defines Defines Aphrodite->Defines Extensions Extensions Aphrodite->Extensions OnlyAgent OnlyAgent Aphrodite->OnlyAgent RemoteCore RemoteCore Aphrodite->RemoteCore AppUninstaller AppUninstaller AppUninstaller->Extensions Authenticator Authenticator Authenticator->Defines Authenticator->Extensions Utilities Utilities Authenticator->Utilities Design Design Extensions->Defines OnlyAgent->Defines OnlyAgent->Design OnlyAgent->Extensions OnlyControl OnlyControl OnlyControl->Authenticator OnlyControl->Defines OnlyControl->Extensions Switches Switches OnlyControl->Switches OnlyControl->Utilities OnlySwitch OnlySwitch OnlySwitch->Aphrodite OnlySwitch->AppUninstaller OnlySwitch->Authenticator OnlySwitch->Design OnlySwitch->Extensions OnlySwitch->OnlyAgent OnlySwitch->OnlyControl PureColorView PureColorView OnlySwitch->PureColorView OnlySwitch->RemoteCore RemoteTransport RemoteTransport OnlySwitch->RemoteTransport StickerView StickerView OnlySwitch->StickerView OnlySwitch->Switches SystemMonitor SystemMonitor OnlySwitch->SystemMonitor Tailscale Tailscale OnlySwitch->Tailscale OnlySwitch->Utilities XcodeCleaner XcodeCleaner OnlySwitch->XcodeCleaner OnlySwitchRemote OnlySwitchRemote OnlySwitchRemote->RemoteCore OnlySwitchRemote->RemoteTransport OnlyWidgetExtension OnlyWidgetExtension OnlyWidgetExtension->Defines OnlyWidgetExtension->Switches OnlyWidgetExtension->Utilities PureColorView->Extensions RemoteTransport->RemoteCore StickerView->Defines StickerView->Extensions Switches->Extensions SystemMonitor->RemoteCore Tailscale->Extensions Utilities->Defines Utilities->Extensions XcodeCleaner->Extensions __more__ +4 more projects

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.

22 modules, with 78 dependencies between them. One loop runs through 16 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 Scripts2 Modules~Defines3 Modules~RemoteCore4 Modules~XcodeCleaner5 Modules~RemoteTransport6 Modules~StickerView7 Modules~SystemMonitor8 Modules~Authenticator9 Modules~Networking10 Modules~OnlyAgent11 Modules~Switches12 Modules~Tailscale13 repository14 Modules~DesktopPet15 Modules~Extensions16 Modules~AppUninstaller17 Modules~OnlyControl18 Modules~PureColorView19 Modules~Reorderable20 Modules~Aphrodite21 Modules~Utilities22 Modules~Design
1 Scripts
2 Modules~Defines14
3 Modules~RemoteCore93662
4 Modules~XcodeCleaner643
5 Modules~RemoteTransport612141
6 Modules~StickerView288
7 Modules~SystemMonitor424
8 Modules~Authenticator7732
9 Modules~Networking1121
10 Modules~OnlyAgent828125
11 Modules~Switches128
12 Modules~Tailscale1731
13 repository614734325141317542273194
14 Modules~DesktopPet919
15 Modules~Extensions2211
16 Modules~AppUninstaller318
17 Modules~OnlyControl11149
18 Modules~PureColorView75
19 Modules~Reorderable13
20 Modules~Aphrodite12114431
21 Modules~Utilities151
22 Modules~Design2211
Uses a module listed above itPart of a loopThe module itself
1 Scripts2 Modules~Defines3 Modules~RemoteCore4 Modules~XcodeCleaner5 Modules~RemoteTransport6 Modules~StickerView7 Modules~SystemMonitor8 Modules~Authenticator9 Modules~Networking10 Modules~OnlyAgent11 Modules~Switches12 Modules~Tailscale13 repository14 Modules~DesktopPet15 Modules~Extensions16 Modules~AppUninstaller17 Modules~OnlyControl18 Modules~PureColorView19 Modules~Reorderable20 Modules~Aphrodite21 Modules~Utilities22 Modules~DesignScripts1Modules~Defines2Modules~RemoteCore3Modules~XcodeCleaner4Modules~RemoteTransport5Modules~StickerView6Modules~SystemMonitor7Modules~Authenticator8Modules~Networking9Modules~OnlyAgent10Modules~Switches11Modules~Tailscale12repository13Modules~DesktopPet14Modules~Extensions15Modules~AppUninstaller16Modules~OnlyControl17Modules~PureColorView18Modules~Reorderable19Modules~Aphrodite20Modules~Utilities21Modules~Design2214936626436121412884247732112182812512817316147343251413175422731949192211318111497513121144311512211

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

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

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

At a glance — Readiness · 30% · Weak · gated by P1, P3, P10 ·

At a glance — Security · 100% · Exemplary ·

At a glance — Event-Driven · 79% · Strong ·

At a glance — Accessibility · 80% · Strong ·

At a glance — Performance · 71% · Strong ·

Roadmap

Establish a CI workflow to build and test on every push to ensure immediate feedback. Refine the public API by restricting implementation types to internal visibility to protect consumers from breaking changes. Improve test quality by uncommenting assertions in OnlySwitchTests.swift and addressing the lack of assertions in EverySwitchTests.swift, RemoteAppFeatureTests.swift, and SettingsFeatureTests.swift. Finally, document architectural decisions by creating the missing Architecture Decision Records.

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

Do thisHelpsEffortDimension
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with OnlySwitchTests.swift.+4.5 ptsLowTest Quality
Add a CI workflow that builds and runs the test suite on every push/PR.+6.9 ptsMediumCI/CD gates
Keep implementation types off the public surface (Swift: leave it `internal` (the default) instead of `public`) so internals can change without breaking consumers.+4.9 ptsMediumLibrary API & versioning
Resolve the 1 No ADRs found finding(s) in ADR Quality.+2.1 ptsLowADR Quality
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+2.0 ptsMediumArchitecture documentation
Resolve the 103 No assertions finding(s) in Test Quality — start with EverySwitchTests.swift (17), RemoteAppFeatureTests.swift (15), SettingsFeatureTests.swift (11).+2.9 ptsHighTest Quality
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.+1.2 ptsMediumDocumentation (README)
Swallowed exception (caught, then discarded)+1.0 ptsMediumException handling

File quality

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

FileScoreBandWorst signal
OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift5.5MixedCyclomatic Complexity: RemoteConnectionRuntime.connectWithRetry (cyclomatic 32)
OnlySwitch/EverySwitch/AppleMusicSwitch.swift5.9MixedCode Duplication: Duplicated block (5 lines × 2)
OnlySwitch/Player/CommonPlayer/JLASAudioPlayer.swift6.3MixedCognitive Complexity: JLASAudioPlayer.play (cognitive 17)
OnlySwitch/EverySwitch/AutohideDockSwitch.swift6.3MixedCode Duplication: Duplicated block (10 lines × 2)
OnlySwitch/EverySwitch/DockRecentSwitch.swift6.3MixedCode Duplication: Duplicated block (9 lines × 4)
OnlySwitchTests/OnlySwitchTests.swift6.5MixedTest Quality: Assertions commented out: testExample
OnlySwitch/Features/DockPreview/DockPreviewClient.swift7.0MixedCode Duplication: Duplicated block (11 lines × 2)
OnlySwitch/EverySwitch/KeepAwakeSwitch.swift7.0MixedCode Duplication: Duplicated block (6 lines × 2)
OnlySwitchRemoteTests/RemoteAppFeatureTests.swift7.0MixedTest Quality: No assertions: pageSelectionSynchronizesMonitorVisibilityWithSwipeablePages
OnlySwitchRemoteTests/SettingsFeatureTests.swift7.0MixedTest Quality: No assertions: switchingMacLoadsOnlyItsOwnLayoutAndCatalog
OnlySwitchTests/EverySwitchTests.swift7.0MixedTest Quality: No assertions: testDarkModeSwitch
OnlySwitchRemote/App/RemoteAppFeature.swift7.0MixedCyclomatic Complexity: RemoteAppFeature.body (cyclomatic 130)
OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift7.0MixedCyclomatic Complexity: RemotePeerSession.handleAuthenticated (cyclomatic 30)
OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift7.0MixedCyclomatic Complexity: RemoteClaudeUsageFeature.body (cyclomatic 21)
OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift7.0MixedCyclomatic Complexity: DashboardFeature.body (cyclomatic 53)
OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift7.1MixedCyclomatic Complexity: OnlySwitchListView.body (cyclomatic 25)
Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift7.1MixedCyclomatic Complexity: XcodeCleanerFileSystem.clean (cyclomatic 20)
Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift7.1MixedCyclomatic Complexity: ClaudeLive.chatStream (cyclomatic 16)
OnlySwitchRemoteTests/PairingFeatureTests.swift7.1MixedTest Quality: No assertions: discoveryUsesStableMacIdentityForUpdatesAndRemoval
OnlySwitchTests/DockPreview/DockPreviewFeatureTests.swift7.1MixedTest Quality: No assertions: permissionRevocationClearsTheCurrentHover

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

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

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

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

Could not be resolved — 40

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

Methodology & how to trust this report

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

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

What we checked — 46 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D17D20D26D28D29D30D34D35D43AC2AC3AC5AC6AC7AX10AX3AX4AX8AX9ED4M1M2M3M4P1P10P2P3PF2PF3X14X26X28X3

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a183d7-d424-7a56-9962-804c4de89919.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in Modules 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. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.swift) and this repository declares a SwiftPM test suite (Modules), 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.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (32 contributor(s) across 1300 commit(s) sampled, automation and bot accounts excluded). One of them holds 89% of the history; the other 31 hold 0.4% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22'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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Modules/Sources/Aphrodite/AphroditeApp.swift`, `Modules/Sources/Aphrodite/AphroditeIconValidation.swift`, `Modules/Sources/Aphrodite/AphroditeReducer.swift`, `Modules/Sources/DesktopPet/DesktopPetController.swift`, `Modules/Sources/DesktopPet/DesktopPetLayout.swift`, … (+41 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.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is swift-dependencies, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'CoreData' is imported (OnlySwitch/Player/RadioPlayerItem/RadioPlayerItemViewModel.swift:9), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'CoreData' is imported (OnlySwitch/Player/RadioPlayerItem/RadioPlayerItemViewModel.swift:9), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), 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.
  • P8 Schema migrations — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads EF Core usage in C# and the schema tooling its file scan recognises only, and no .NET project was loaded, and this repository's language is not one the scan models, 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.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust 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.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, 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.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, 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.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust and Dart source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust or Dart 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.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, 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.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python or Rust 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.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's C, Objective-C, 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.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python 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.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby 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.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Objective-C 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.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 21 further occurrence(s) are not listed individually; the score already reflects all 61.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala, JavaScript/TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart and Ruby source only, and no C# was loaded and no Scala, JavaScript, TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart or Ruby 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust 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.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and 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, 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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.

Dimensions

D1 · Cyclomatic Complexity5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Prevented

60 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was RemoteAppFeature.body at 130. A further 9 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being SwitchType.legacyIdentifier at 50 — they are counted neither in the figure above nor in this dimension's score. 6 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: Modules/Sources/Switches/SwitchType.swift (SwitchType.legacyIdentifier at 50), OnlySwitch/EverySwitch/SwitchType++.swift (SwitchType.getNewSwitchInstance at 50), Modules/Sources/RemoteCore/RemoteMessage.swift (RemoteMessage.init at 40), OnlySwitch/Features/RemoteAccess/Catalog/RemoteIconAdapter.swift (RemoteIconAdapter.symbolName at 39), OnlySwitch/Features/Settings/SettingsView/SettingsView.swift (SettingsView.page at 26), and 1 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

RemoteAppFeature.body (cyclomatic 130)OnlySwitchRemote/App/RemoteAppFeature.swift:156
AphroditeReducer.body (cyclomatic 102)Modules/Sources/Aphrodite/AphroditeReducer.swift:96
PromptDialogueReducer.body (cyclomatic 85)Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:100
PairingFeature.body (cyclomatic 73)OnlySwitchRemote/Features/Pairing/PairingFeature.swift:137
XcodeCleanerFeature.body (cyclomatic 71)Modules/Sources/XcodeCleaner/XcodeCleanerFeature.swift:58

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

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with RemoteAppFeature.body (cyclomatic 130), AphroditeReducer.body (cyclomatic 102), PromptDialogueReducer.body (cyclomatic 85). — 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 5 together lifts Cyclomatic Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity5.7 / 10Adequate✓ Tool-verified

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

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

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

87 method(s) exceeded the cognitive complexity threshold of 15; the worst was RemoteAppFeature.body at 138.

RemoteAppFeature.body (cognitive 138)OnlySwitchRemote/App/RemoteAppFeature.swift:156
AphroditeReducer.body (cognitive 106)Modules/Sources/Aphrodite/AphroditeReducer.swift:96
PairingFeature.body (cognitive 98)OnlySwitchRemote/Features/Pairing/PairingFeature.swift:137
PromptDialogueReducer.body (cognitive 96)Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:100
XcodeCleanerFeature.body (cognitive 73)Modules/Sources/XcodeCleaner/XcodeCleanerFeature.swift:58

+ 82 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 RemoteAppFeature.body (cognitive 138). — Refactoring it lifts Cognitive Complexity from 5.7 to about 5.8/10.
  2. Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes7.7 / 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.7 / 10 · rule-coverage 100% · ceiling Prevented

39 god class(es) detected.

MethodTooLong: RemoteAppFeature.body · ×21OnlySwitchRemote/App/RemoteAppFeature.swift:156
TooManyMethods: RemoteConnectionRuntime · ×7OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:150
FileTooLong: Dependencies/RemoteConnectionClient+Live.swift · ×6OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift
ClassTooLong: RemoteAppFeature · ×5OnlySwitchRemote/App/RemoteAppFeature.swift:12

What to do

  1. Resolve the 21 MethodTooLong finding(s) in God Classes — start with RemoteAppFeature.swift, PromptDialogueReducer.swift, SwitchType.swift. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 7 TooManyMethods finding(s) in God Classes — start with RemotePersistenceClient.swift (2), RemoteConnectionClient+Live.swift, RemoteCredentialStore.swift. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 FileTooLong finding(s) in God Classes — start with RemoteConnectionClient+Live.swift, MacSystemMonitorCollector.swift, RemotePeerSession.swift. — One of this dimension's main actionable groups (6 warning-level).
  4. Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.3 / 10Stronggated by 85 serious findings✓ Tool-verified

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

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

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

83 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (5 lines × 2) · ×12Modules/Sources/Aphrodite/AphroditeReducer.swift:204
Duplicated block (11 lines × 2) · ×10Modules/Sources/Networking/GitHub/GitHubRemoteDataSource.swift:15
Duplicated block (9 lines × 2) · ×7Modules/Sources/AppUninstaller/AppUninstallerView.swift:16
Duplicated block (8 lines × 2) · ×5Modules/Sources/RemoteCore/ClaudeUsageModels.swift:88
Duplicated block (6 lines × 2) · ×5OnlySwitch/EverySwitch/KeepAwakeSwitch.swift:127

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

What to do

  1. Resolve the 12 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with AppleMusicSwitch.swift (2), AphroditeReducer.swift, ClaudeUsageModels.swift. — One of this dimension's main actionable groups (12 warning-level).
  2. Resolve the 10 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with SoundMixerService.swift (2), GitHubRemoteDataSource.swift, TaskPlanner.swift. — One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 7 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with RemoteClaudeUsageFeature.swift (2), AppUninstallerView.swift, PromptDialogueReducer.swift. — One of this dimension's main actionable groups (7 warning-level).
  4. Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling8.3 / 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.3 / 10 · rule-coverage 100% · ceiling Prevented

24 production modules (SwiftPM+Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 5 module(s) off the main sequence, with abstractness counted on 21 of the 24 (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: Design · ×5

What to do

  1. Resolve the 5 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (5 warning-level).
  2. Stand up a CI pipeline, then gate Coupling in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)7.1 / 10Strong✓ Tool-verified

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

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

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

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

40 of 163 classes have LCOM4 above 3.

Low cohesion: String (LCOM4 10) · ×40Modules/Sources/Extensions/LocalizedString++.swift:59

What to do

  1. Resolve the 40 Low cohesion finding(s) in Cohesion (LCOM4) — start with LocalizedString++.swift, KeepAwakeSwitch.swift, BluetoothDevicesManager.swift. — One of this dimension's main actionable groups (40 warning-level).
  2. Stand up a CI pipeline, then gate Cohesion (LCOM4) in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

1201 test methods: 1201 unit, 0 integration, 0 BDD, 0 e2e.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality8.7 / 10Adequategated by 1 critical finding✓ 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 8.7 / 10 · rule-coverage 100% · ceiling Prevented

3 skipped (3 with a documented reason), 104 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1201 tests.

Assertions commented out: testExampleOnlySwitchTests/OnlySwitchTests.swift:32
No assertions: newerPushedStatusIsAuthoritative · ×103OnlySwitchRemoteTests/DashboardFeatureTests.swift:436
Skipped (documented): mapsStatusToRecoveryPresentation · ×3OnlySwitchTests/PrivilegedOperations/PrivilegedAccessViewModelTests.swift:11

What to do

  1. Resolve the 1 Assertions commented out finding(s) in Test Quality — start with OnlySwitchTests.swift. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 103 No assertions finding(s) in Test Quality — start with EverySwitchTests.swift (17), RemoteAppFeatureTests.swift (15), SettingsFeatureTests.swift (11). — One of this dimension's main actionable groups (103 warning-level).
  3. Stand up a CI pipeline, then gate Test Quality in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D12 · Dependency Hygiene8.1 7.5 / 10Strong✓ Tool-verified

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

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

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

38 outdated direct SwiftPM dependencies, 0 pinning defect(s). 48 of 52 direct dependencies had their releases listed (0 naming no readable repository, 4 pinned to a branch or a revision rather than a version). 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.

Outdated: abseil-cpp-binary · ×35

What to do

  1. Stand up a CI pipeline, then gate Dependency Hygiene in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D13 · 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 42 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 40 of them read from the licence file the repository carries at the revision Package.resolved pins, and 2 — 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. 2 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

Top hotspots: OnlySwitchRemote/App/RemoteAppFeature.swift (12×130=1560); Modules/Sources/Switches/SwitchType.swift (12×50=600); OnlySwitch/EverySwitch/SwitchType++.swift (9×50=450) Repeated repair below the complexity floor: OnlySwitch/Features/SoundMixer/SoundMixerVM.swift (5 of 7 changes were fixes); OnlySwitch/Features/SoundMixer/SoundMixerPanelView.swift (3 of 5 changes were fixes)

Hotspot: OnlySwitchRemote/App/RemoteAppFeature.swift · ×27OnlySwitchRemote/App/RemoteAppFeature.swift:156
Repeated repair: OnlySwitch/Features/SoundMixer/SoundMixerVM.swift · ×2OnlySwitch/Features/SoundMixer/SoundMixerVM.swift:172

What to do

  1. Resolve the 27 Hotspot finding(s) in Churn × Complexity Hotspots — start with RemoteAppFeature.swift, SwitchType.swift, SwitchType++.swift. — One of this dimension's main actionable groups (27 warning-level).
  2. Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with SoundMixerVM.swift, SoundMixerPanelView.swift. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d15_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 59710 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.

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

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

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

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

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

2 of 2 build units (SwiftPM, Xcode) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)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)10.0 / 10Exemplary○ Nothing flagged

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

semgrep found no security issues. semgrep hit a parse error in 7 file(s) — `OnlySwitch/EverySwitch/ReverseScrollDirectionSwitch.swift` (line 422), `OnlySwitch/Features/SoundMixer/SoundMixerVM.swift` (line 68), `OnlySwitch/Player/MusicAppPlayer/AppleMusic/iTunesBridge/ObjC/iTunes.h` (line 9, line 147, line 149, …), `OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift` (line 859), `OnlySwitchTests/OnlySwitchTests.swift` (line 187, line 188, line 190, …), … (+2 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

✓ On the Gold path — maintain.

Detailed fixes: d29_recommendation.md.

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

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

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

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

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

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

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

13 of 260 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Modules/Sources/Authenticator/OtpAuthImport.swift. Counted over 260 of the 567 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×13Modules/Sources/Authenticator/OtpAuthImport.swift:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling10.0 / 10Adequategated by 1 critical finding✓ 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

Strongest change-coupling: NotificationNames.swift↔Preferences.swift 67%

Boundary-crossing change coupling: NotificationNames.swift ↔ Preferences.swiftModules/Sources/Defines/NotificationNames.swift:1

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with NotificationNames.swift. — One of this dimension's main actionable groups (1 issue-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

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

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

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

  • No accessibility enforcement found — no accessibility linting at author time and no automated accessibility check in tests or CI. Add your UI toolkit's own accessibility assertion to the test suite (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in the pipeline. What was searched, so you can tell an absence from a miss: the 1 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain your project already uses: assert accessibility in your UI test suite with your toolkit's own matcher (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in CI so a regression blocks the merge.
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.

What to do

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

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

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

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

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

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

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.

ED4 · Outbox / dual-write7.9 / 10Strong✓ Tool-verified

Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.

Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.

  • `RemoteKeychainClient.client` performs two independent DURABLE writes — `store` (a persistence store) via `save` and `provisional` (a persistence store) via `save` — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — OnlySwitchRemote/Dependencies/RemoteKeychainClient.swift:140

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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

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

What to do

  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 1 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

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

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

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

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

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

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

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P10 · Library API & versioning2.0 / 10Critical✓ Tool-verified

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

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

  • 371/520 types (71%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
  • No explicit version was found for the SwiftPM library declared by `Package.swift`. This check read nothing in Package.swift, which has no version field, and a CHANGELOG/CHANGES/HISTORY/NEWS/RELEASES file with a semver heading, or release tooling (changesets, release-please, semantic-release, goreleaser, cargo-release, bump2version, standard-version, git-cliff) in the library's directory or at the repository root, or a semver release tag (or a Drupal `8.x-1.2` release tag) in the repository. A version computed where none of those can see is invisible here. A published library needs explicit semantic versioning so consumers can reason about breaking changes. — Modules/Package.swift

What to do

  • Keep implementation types off the public surface (Swift: leave it `internal` (the default) instead of `public`) so internals can change without breaking consumers.
  • Declare the version where the ecosystem expects it, or keep a CHANGELOG with semver release headings, and follow semver for breaking changes.
P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add 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.
PF2 · Allocation hygiene6.1 / 10Adequate✓ Tool-verified

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

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

What to do

  • Raise allocation-aware density on the hot paths — currently 16 use(s) across 66,643 production line(s) (~0.2/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Swift: on hot paths, reserveCapacity before appending, use ContiguousArray for class-element arrays, work in place with withUnsafeBufferPointer/withUnsafeTemporaryAllocation, and make large values ~Copyable with borrowing/consuming parameters.
PF3 · Async & latency hygiene8.5 / 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 the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `sleep` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — Modules/Sources/Extensions/Task++.swift:11

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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.2 / 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. (×37) — OnlyWidget/Widgets/Evolution/Intents/EvolutionEntity.swift:30, OnlySwitchRemote/Features/Dashboard/DashboardView.swift:300, OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:623, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×3) — OnlySwitchRemote/Features/Pairing/PairingFeature.swift:154, OnlySwitch/Features/Settings/Shortcuts/ShortcutsSettingVM.swift:106, OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:1016

What to do

  • Swallowed exception (caught, then discarded)

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health70%AdequateAcceptable, with room to improve.
Architecture88%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity66%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness30%Weak — gated by P1, P3, P10Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security100%ExemplaryStrongest area.
Event-Driven79%StrongSolid.
Accessibility80%StrongSolid.
Performance71%StrongSolid.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 3 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 — 6 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: this repository stores data through 'CoreData' (OnlySwitch/Player/RadioPlayerItem/RadioPlayerItemViewModel.swift:9) but declares no persisted model this check reads (SwiftData @Model, Core Data, Realm, GRDB and Fluent types, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'CoreData' (OnlySwitch/Player/RadioPlayerItem/RadioPlayerItemViewModel.swift:9) but declares no persisted model this check reads (SwiftData @Model, Core Data NSManagedObject, Realm Object, GRDB record and Fluent Model properties, GRDB and SQLite.swift columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
  • P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 65 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 image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads.
  • 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 — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — D19 withholds "Documentation: empty section": 2 candidate(s) were measured and not published.
  • D21 Naming Consistency — Naming consistency is measured on C# only; Python, Swift not measured.
  • 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+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.swift), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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) — 46 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — Swift suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • 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 — no CI workflow found
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — 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
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `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.
  • 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.
  • X1 Async 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
  • X12 Unreachable branch — 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
  • X13 Undrained process stream — 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
  • X15 Unvalidated length from an untrusted reader — 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
  • 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 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
  • 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 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
  • 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: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. In C a `case` label must be a constant expression, and a switch has no guards, so no label can change state. In Objective-C a `case` label must be a constant expression, and a switch has no guards, so no label can change state. Swift has no `++` or `--`, and an assignment yields `()`, which cannot be an operand of `&&`, `||` or `?:` nor the Bool a `case … where` clause needs. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — 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
  • X23 Unguarded diagnostic materialisation — 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
  • X24 Document value interpolated into markup unescaped — 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
  • X25 Inert configuration knob — 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
  • X27 Collection changed while being enumerated — 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
  • 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 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
  • 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
  • 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 — 3 finding(s)
D10 · Test Quality · Assertions commented out · ×1
  • Assertions commented out: testExample OnlySwitchTests/OnlySwitchTests.swift:32 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: NotificationNames.swift ↔ Preferences.swift Modules/Sources/Defines/NotificationNames.swift:1 — `Modules/Sources/Defines/NotificationNames.swift` (context Sources) and `OnlySwitch/Model/Preferences.swift` (context OnlySwitch) sit in DIFFERENT parts of the tree yet change together 67% of the time (12 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `613b47b8` feat: add system monitor settings; `3c891501` feat: add desktop pet setting; `fe8b2a88` feat(DimScreen): sync external monitor brightness via DDC/CI — run `git show` on any of them.
ED4 · Outbox / dual-write · Dual write (no outbox) · ×1
  • Dual write (no outbox): RemoteKeychainClient.client OnlySwitchRemote/Dependencies/RemoteKeychainClient.swift:140 — `RemoteKeychainClient.client` performs two independent DURABLE writes — `store` (a persistence store) via `save` and `provisional` (a persistence store) via `save` — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Serious — 491 finding(s)
D10 · Test Quality · No assertions · ×103
  • No assertions: newerPushedStatusIsAuthoritative OnlySwitchRemoteTests/DashboardFeatureTests.swift:436 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: authoritativePushedStatusClearsOnlyThatTilesActionFailure OnlySwitchRemoteTests/DashboardFeatureTests.swift:507 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fixedTabsCannotBeHidden OnlySwitchRemoteTests/GlobalSettingsFeatureTests.swift:44 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rePairDelegatesWithoutForgetting OnlySwitchRemoteTests/MacManagementFeatureTests.swift:51 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: discoveryUsesStableMacIdentityForUpdatesAndRemoval OnlySwitchRemoteTests/PairingFeatureTests.swift:12 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: completedDiscoveryOffersAWorkingRetry OnlySwitchRemoteTests/PairingFeatureTests.swift:45 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: waitingAndFailureEventsMapToActionableDiscoveryPhases OnlySwitchRemoteTests/PairingFeatureTests.swift:260 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: unicodePasteNeverExpandsAndSkipsCombiningMarksAndSeparators OnlySwitchRemoteTests/PairingFeatureTests.swift:329 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: removingPairingTargetCancelsAndShowsUnavailableIssue OnlySwitchRemoteTests/PairingFeatureTests.swift:498 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: pairingResponseWithMismatchedPairedIdentityStopsWithoutDelegating OnlySwitchRemoteTests/PairingFeatureTests.swift:548 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: pageSelectionSynchronizesMonitorVisibilityWithSwipeablePages OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:133 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: rootForwardsSelectedMacStatusIntoDashboard OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:219 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: dashboardLoadsSelectedMacCachedLayoutCatalogAndStatus OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:252 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: firstDashboardTaskAdoptsTheRootSelection OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:304 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: selectingAnotherMacClearsPriorDashboardStatusImmediately OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:350 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: alreadyAuthenticatedSnapshotSeedsConnectedStateBeforeSettingsOpens OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:505 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: globalSettingsButtonIsAvailableWithoutASelectedMac OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:777 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: globalSettingsButtonUsesTheSameRouteFromSystemMonitor OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:785 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: systemMonitorConfigurationStillUsesItsContextualRoute OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:795 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: controlsConfigurationIsTheContextualTrailingRoute OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:858 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: currentSelectedMacAcceptsItsLoadedMonitorLayout OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:944 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: staleLaunchResponseIsIgnored OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:1196 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: globalSettingsToggleUpdatesTheAppWideWakePreference OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:1262 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: pairingPersistenceFailureRetainsIntentAndRetrySuccessClearsIt OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:1405 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: hidingSelectedTabReturnsToControlsAndStopsVisibility OnlySwitchRemoteTests/RemoteAppFeatureTests.swift:1843 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 78 more in this group — see findings.md.
D6 · Cohesion (LCOM4) · Low cohesion · ×40
  • Low cohesion: String (LCOM4 10) Modules/Sources/Extensions/LocalizedString++.swift:59 — String's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: KeepAwakeSwitch (LCOM4 6) OnlySwitch/EverySwitch/KeepAwakeSwitch.swift:15 — KeepAwakeSwitch'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: BluetoothDevicesManager (LCOM4 5) OnlySwitch/Utilities/BluetoothDevicesManager.swift:19 — BluetoothDevicesManager's methods fall into 5 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 5 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: JLASAudioPlayer (LCOM4 5) OnlySwitch/Player/CommonPlayer/JLASAudioPlayer.swift:17 — JLASAudioPlayer's methods fall into 5 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 5 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: NSImage (LCOM4 4) Modules/Sources/Extensions/NSImage++.swift:11 — NSImage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PureColorVM (LCOM4 4) Modules/Sources/PureColorView/PureColorVM.swift:11 — PureColorVM's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AICommanderSwitch (LCOM4 4) OnlySwitch/EverySwitch/AICommanderSwitch.swift:16 — AICommanderSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AppleMusicSwitch (LCOM4 4) OnlySwitch/EverySwitch/AppleMusicSwitch.swift:12 — AppleMusicSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AutohideDockSwitch (LCOM4 4) OnlySwitch/EverySwitch/AutohideDockSwitch.swift:12 — AutohideDockSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AutohideMenuBarSwitch (LCOM4 4) OnlySwitch/EverySwitch/AutohideMenuBarSwitch.swift:12 — AutohideMenuBarSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ClaudeUsageSwitch (LCOM4 4) OnlySwitch/EverySwitch/ClaudeUsageSwitch.swift:12 — ClaudeUsageSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CodexUsageSwitch (LCOM4 4) OnlySwitch/EverySwitch/CodexUsageSwitch.swift:12 — CodexUsageSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DarkModeSwitch (LCOM4 4) OnlySwitch/EverySwitch/DarkModeSwitch.swift:12 — DarkModeSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DesktopPetSwitch (LCOM4 4) OnlySwitch/EverySwitch/DesktopPetSwitch.swift:4 — DesktopPetSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DockPreviewSwitch (LCOM4 4) OnlySwitch/EverySwitch/DockPreviewSwitch.swift:4 — DockPreviewSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DockRecentSwitch (LCOM4 4) OnlySwitch/EverySwitch/DockRecentSwitch.swift:12 — DockRecentSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EjectDiscsSWitch (LCOM4 4) OnlySwitch/EverySwitch/EjectDiscsSwitch.swift:11 — EjectDiscsSWitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EmptyPasteboardSwitch (LCOM4 4) OnlySwitch/EverySwitch/EmptyPasteboardSwitch.swift:12 — EmptyPasteboardSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EmptyTrashSwitch (LCOM4 4) OnlySwitch/EverySwitch/EmptyTrashSwitch.swift:12 — EmptyTrashSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FKeySwitch (LCOM4 4) OnlySwitch/EverySwitch/FKeySwitch.swift:11 — FKeySwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HiddenDesktopSwitch (LCOM4 4) OnlySwitch/EverySwitch/HiddenDesktopSwitch.swift:12 — HiddenDesktopSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HiddenFilesSwitch (LCOM4 4) OnlySwitch/EverySwitch/HiddenFilesSwitch.swift:12 — HiddenFilesSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HideMenubarIconsSwitch (LCOM4 4) OnlySwitch/EverySwitch/HideMenubarIconsSwitch.swift:13 — HideMenubarIconsSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HideWindowsSwitch (LCOM4 4) OnlySwitch/EverySwitch/HideWindowsSwitch.swift:13 — HideWindowsSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: KeyLightSwitch (LCOM4 4) OnlySwitch/EverySwitch/KeyLightSwitch.swift:11 — KeyLightSwitch'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.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×37
  • Swallowed exception (caught, then discarded) OnlyWidget/Widgets/Evolution/Intents/EvolutionEntity.swift:30 — `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) OnlySwitchRemote/Features/Dashboard/DashboardView.swift:300 — `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) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:623 — `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) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1153 — `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) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1162 — `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) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1399 — `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) OnlySwitch/AppDelegate.swift:379 — `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) OnlySwitch/Utilities/BluetoothDevicesManager.swift:65 — `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) OnlySwitch/Utilities/WallpaperManager.swift:65 — `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) OnlySwitch/Utilities/DDC/BrightnessSyncManager.swift:144 — `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) OnlySwitch/StatusBar/StatusBarController.swift:242 — `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) OnlySwitch/Player/BackNoisesPlayerItem/BackNoisiesTrackManager.swift:103 — `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) OnlySwitch/Player/BackNoisesPlayerItem/BackNoisiesTrackManager.swift:146 — `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) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift:171 — `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) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift:875 — `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) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift:887 — `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) OnlySwitch/Features/SwitchItem/SwitchBar/SwitchBarVM.swift:211 — `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) OnlySwitch/Features/SwitchItem/ShortcutsItem/ShortcutsBarVM.swift:66 — `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) OnlySwitch/Features/Settings/Shortcuts/ShortcutsSettingVM.swift:189 — `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) OnlySwitch/Features/Settings/Evolution/EvolutionGallery/EvolutionGalleryService/EvolutionGalleryService+Live.swift:34 — `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) OnlySwitch/Features/RemoteAccess/Host/RemoteStatusScheduler.swift:195 — `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) OnlySwitch/Features/OnlyControl/OnlyControlView.swift:438 — `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) OnlySwitch/Features/DockPreview/DockPreviewClient.swift:99 — `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) OnlySwitch/EverySwitch/AutohideDockSwitch.swift:22 — `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) OnlySwitch/EverySwitch/AutohideMenuBarSwitch.swift:21 — `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.
  • + 12 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×27
  • Hotspot: OnlySwitchRemote/App/RemoteAppFeature.swift OnlySwitchRemote/App/RemoteAppFeature.swift:156 — OnlySwitchRemote/App/RemoteAppFeature.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in RemoteAppFeature.body at line 156. 1 of those changes was a fix/bug commit, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitchRemote/App/RemoteAppFeature.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: Modules/Sources/Switches/SwitchType.swift Modules/Sources/Switches/SwitchType.swift:83 — Modules/Sources/Switches/SwitchType.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in SwitchType.legacyIdentifier at line 83. 2 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- Modules/Sources/Switches/SwitchType.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: OnlySwitch/EverySwitch/SwitchType++.swift OnlySwitch/EverySwitch/SwitchType++.swift:14 — OnlySwitch/EverySwitch/SwitchType++.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in SwitchType.getNewSwitchInstance at line 14. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/EverySwitch/SwitchType++.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: OnlySwitch/Features/RemoteAccess/Catalog/RemoteIconAdapter.swift OnlySwitch/Features/RemoteAccess/Catalog/RemoteIconAdapter.swift:56 — OnlySwitch/Features/RemoteAccess/Catalog/RemoteIconAdapter.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in RemoteIconAdapter.symbolName at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/RemoteAccess/Catalog/RemoteIconAdapter.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: OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:64 — OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in OnlySwitchListView.body at line 64. 2 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.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: OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:146 — OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in DashboardFeature.body at line 146. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitchRemote/Features/Dashboard/DashboardFeature.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: OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift:910 — OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in MacSystemMonitorCollector.sampleForStream at line 910. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.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: OnlySwitch/Features/Settings/SettingsView/SettingsView.swift OnlySwitch/Features/Settings/SettingsView/SettingsView.swift:80 — OnlySwitch/Features/Settings/SettingsView/SettingsView.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in SettingsView.page at line 80. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/Settings/SettingsView/SettingsView.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: OnlySwitchRemote/Features/Settings/SettingsFeature.swift OnlySwitchRemote/Features/Settings/SettingsFeature.swift:96 — OnlySwitchRemote/Features/Settings/SettingsFeature.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in SettingsFeature.body at line 96. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitchRemote/Features/Settings/SettingsFeature.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: OnlySwitchRemote/App/RemoteAppView.swift OnlySwitchRemote/App/RemoteAppView.swift:8 — OnlySwitchRemote/App/RemoteAppView.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in RemoteAppView.body at line 8. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitchRemote/App/RemoteAppView.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: OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:842 — OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in RemoteConnectionRuntime.connectWithRetry at line 842. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.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: Modules/Sources/Aphrodite/AphroditeReducer.swift Modules/Sources/Aphrodite/AphroditeReducer.swift:96 — Modules/Sources/Aphrodite/AphroditeReducer.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 102 in AphroditeReducer.body at line 96. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- Modules/Sources/Aphrodite/AphroditeReducer.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: Modules/Sources/RemoteCore/RemoteMessage.swift Modules/Sources/RemoteCore/RemoteMessage.swift:213 — Modules/Sources/RemoteCore/RemoteMessage.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in RemoteMessage.init at line 213. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- Modules/Sources/RemoteCore/RemoteMessage.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: OnlySwitch/Features/OnlyControl/OnlyControlReducer.swift OnlySwitch/Features/OnlyControl/OnlyControlReducer.swift:91 — OnlySwitch/Features/OnlyControl/OnlyControlReducer.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in OnlyControlReducer.body at line 91. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/OnlyControl/OnlyControlReducer.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: OnlySwitch/EverySwitch/SwitchManager.swift OnlySwitch/EverySwitch/SwitchManager.swift:111 — OnlySwitch/EverySwitch/SwitchManager.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in SwitchManager.visibleTypesIncludingNewDiscoveries at line 111. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/EverySwitch/SwitchManager.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: OnlySwitch/AppDelegate.swift OnlySwitch/AppDelegate.swift:29 — OnlySwitch/AppDelegate.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in OnlySwitchApp.body at line 29. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/AppDelegate.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: OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift:215 — OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in SystemAudioMixer.makeAppTap at line 215. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/SoundMixer/SystemAudioMixer.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: OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:763 — OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in RemotePeerSession.handleAuthenticated at line 763. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.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: OnlySwitchRemote/Features/Pairing/PairingFeature.swift OnlySwitchRemote/Features/Pairing/PairingFeature.swift:137 — OnlySwitchRemote/Features/Pairing/PairingFeature.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in PairingFeature.body at line 137. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitchRemote/Features/Pairing/PairingFeature.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: OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift:7 — OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in RemoteCatalogProvider.init at line 7. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.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: OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift:65 — OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in GlobalSettingsFeature.body at line 65. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.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: OnlySwitch/CoreData/EvolutionCommandEntityLive.swift OnlySwitch/CoreData/EvolutionCommandEntityLive.swift:56 — OnlySwitch/CoreData/EvolutionCommandEntityLive.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in EvolutionCommandEntity.addItem at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/CoreData/EvolutionCommandEntityLive.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: OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.swift OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.swift:27 — OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in OnlyRemoteCampaignFeature.body at line 27. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.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: Modules/Sources/SystemMonitor/SystemMonitorReducer.swift Modules/Sources/SystemMonitor/SystemMonitorReducer.swift:59 — Modules/Sources/SystemMonitor/SystemMonitorReducer.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in SystemMonitorReducer.body at line 59. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- Modules/Sources/SystemMonitor/SystemMonitorReducer.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: OnlySwitch/Features/Settings/Evolution/EvolutionAdapter.swift OnlySwitch/Features/Settings/Evolution/EvolutionAdapter.swift:20 — OnlySwitch/Features/Settings/Evolution/EvolutionAdapter.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in EvolutionAdapter.toEvolutionItem at line 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/Settings/Evolution/EvolutionAdapter.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.
  • + 2 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×21
  • MethodTooLong: RemoteAppFeature.body OnlySwitchRemote/App/RemoteAppFeature.swift:156 — MethodTooLong — body runs 395 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 295 over it, 3.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: PromptDialogueReducer.body Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:100 — MethodTooLong — body runs 372 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 272 over it, 3.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SwitchType.barInfo Modules/Sources/Switches/SwitchType.swift:144 — MethodTooLong — barInfo runs 279 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 179 over it, 2.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AphroditeReducer.body Modules/Sources/Aphrodite/AphroditeReducer.swift:96 — MethodTooLong — body runs 238 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 138 over it, 2.38× 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: PairingFeature.body OnlySwitchRemote/Features/Pairing/PairingFeature.swift:137 — MethodTooLong — body runs 214 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RemoteAccessSettingsFeature.body OnlySwitch/Features/RemoteAccess/Settings/RemoteAccessSettingsFeature.swift:173 — MethodTooLong — body runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DockPreviewFeature.body OnlySwitch/Features/DockPreview/DockPreviewFeature.swift:61 — MethodTooLong — body 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: CodexUsageView.content Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift:22 — MethodTooLong — content runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: OnlyControlReducer.body OnlySwitch/Features/OnlyControl/OnlyControlReducer.swift:91 — MethodTooLong — body runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GlobalSettingsView.body OnlySwitchRemote/Features/Settings/GlobalSettingsView.swift:7 — MethodTooLong — body runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GeneralView.body OnlySwitch/Features/Settings/General/GeneralView.swift:20 — MethodTooLong — body runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RemoteConnectionRuntime.preparePairing OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:331 — MethodTooLong — preparePairing runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RemoteAppView.body OnlySwitchRemote/App/RemoteAppView.swift:8 — MethodTooLong — body runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: DashboardFeature.body OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:146 — MethodTooLong — body runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: RemoteMessage.encode Modules/Sources/RemoteCore/RemoteMessage.swift:300 — MethodTooLong — encode runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PairingView.body OnlySwitchRemote/Features/Pairing/PairingView.swift:7 — MethodTooLong — body runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingsFeature.body OnlySwitchRemote/Features/Settings/SettingsFeature.swift:96 — MethodTooLong — body runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RadioSettingView.body OnlySwitch/Features/Settings/Radio/RadioSettingView.swift:17 — MethodTooLong — body runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ModelProviderService.liveValue Modules/Sources/OnlyAgent/ModelProviderService.swift:61 — MethodTooLong — liveValue runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SwitchType.getNewSwitchInstance OnlySwitch/EverySwitch/SwitchType++.swift:14 — MethodTooLong — getNewSwitchInstance runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RemotePaywallFeature.body OnlySwitchRemote/Features/Subscription/RemotePaywallFeature.swift:61 — MethodTooLong — body 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×12
  • Duplicated block (5 lines × 2) Modules/Sources/Aphrodite/AphroditeReducer.swift:204 — Modules/Sources/Aphrodite/AphroditeReducer.swift:204-208 | Modules/Sources/Aphrodite/AphroditeReducer.swift:253-257 — 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 `Modules/Sources/Aphrodite/AphroditeReducer.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Modules/Sources/RemoteCore/ClaudeUsageModels.swift:80 — Modules/Sources/RemoteCore/ClaudeUsageModels.swift:80-84 | Modules/Sources/RemoteCore/CodexUsageModels.swift:82-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:63 — Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:63-67 | Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift:152-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:63` 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 (5 lines × 2) OnlySwitch/EverySwitch/TopNotchSwitch.swift:75 — OnlySwitch/EverySwitch/TopNotchSwitch.swift:75-79 | OnlySwitch/Utilities/WallpaperManager.swift:20-24 — 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 `OnlySwitch/EverySwitch/TopNotchSwitch.swift:75` 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.
  • Duplicated block (5 lines × 2) OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:458 — OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:458-466 | OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:530-534 — 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 `OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:458` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) OnlySwitchRemote/App/RemoteAppFeature.swift:580 — OnlySwitchRemote/App/RemoteAppFeature.swift:580-584 | OnlySwitchRemote/App/RemoteAppFeature.swift:608-612 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) OnlySwitch/EverySwitch/AppleMusicSwitch.swift:69 — OnlySwitch/EverySwitch/AppleMusicSwitch.swift:69-73 | OnlySwitch/EverySwitch/SpotifySwitch.swift:70-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) OnlySwitch/EverySwitch/AppleMusicSwitch.swift:75 — OnlySwitch/EverySwitch/AppleMusicSwitch.swift:75-79 | OnlySwitch/EverySwitch/SpotifySwitch.swift:76-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) Modules/Sources/Aphrodite/AphroditeLocalNotificationClient.swift:10 — Modules/Sources/Aphrodite/AphroditeLocalNotificationClient.swift:10-14 | Modules/Sources/Utilities/AdaptivePanelHeightPolicy.swift:15-19 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) OnlySwitch/Player/MusicAppPlayer/AppleMusic/AppleMusicPlayer/AppleMusicPlayer.swift:17 — OnlySwitch/Player/MusicAppPlayer/AppleMusic/AppleMusicPlayer/AppleMusicPlayer.swift:17-21 | OnlySwitch/Player/MusicAppPlayer/Spotify/SpotifyPlayer/SpotifyPlayer.swift:20-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Modules/Sources/Authenticator/AuthenticatorPanelView.swift:123 — Modules/Sources/Authenticator/AuthenticatorPanelView.swift:123-127 | Modules/Sources/Authenticator/AuthenticatorSettingsView.swift:78-82 — 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 `Modules/Sources/Authenticator/AuthenticatorPanelView.swift:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) OnlySwitchRemote/Dependencies/RemotePersistenceClient.swift:182 — OnlySwitchRemote/Dependencies/RemotePersistenceClient.swift:182-186 | OnlySwitchRemote/Dependencies/RemoteReviewDemoClient.swift:497-501 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×10
  • Duplicated block (11 lines × 2) Modules/Sources/Networking/GitHub/GitHubRemoteDataSource.swift:15 — Modules/Sources/Networking/GitHub/GitHubRemoteDataSource.swift:15-25 | Modules/Sources/Networking/GitHub/GitHubRemoteDataSource.swift:45-55 — 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 `Modules/Sources/Networking/GitHub/GitHubRemoteDataSource.swift:15` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) Modules/Sources/OnlyAgent/Planning/TaskPlanner.swift:119 — Modules/Sources/OnlyAgent/Planning/TaskPlanner.swift:119-129 | Modules/Sources/OnlyAgent/Planning/TaskPlanner.swift:143-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) OnlySwitch/Features/DockPreview/DockPreviewClient.swift:348 — OnlySwitch/Features/DockPreview/DockPreviewClient.swift:348-358 | OnlySwitch/StatusBar/MenuBarAccessibilityItemResolver.swift:360-370 — 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 `OnlySwitch/Features/DockPreview/DockPreviewClient.swift:348` 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 (11 lines × 2) OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift:47 — OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift:47-57 | OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift:95-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift:106` calls `Sendable` and `OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift:58` 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 (11 lines × 2) OnlySwitch/Features/Settings/DimScreen/DimScreenSettingVM.swift:58 — OnlySwitch/Features/Settings/DimScreen/DimScreenSettingVM.swift:58-68 | OnlySwitch/Features/Settings/KeepAwake/KeepAwakeSettingVM.swift:79-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) OnlySwitch/Features/SoundMixer/SoundMixerService.swift:73 — OnlySwitch/Features/SoundMixer/SoundMixerService.swift:73-83 | OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift:478-488 — 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 (11 lines × 2) OnlySwitch/Features/SoundMixer/SoundMixerService.swift:88 — OnlySwitch/Features/SoundMixer/SoundMixerService.swift:88-98 | OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift:453-463 — 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 `OnlySwitch/Features/SoundMixer/SoundMixerService.swift:88` 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 (11 lines × 2) OnlySwitchRemote/App/RemoteAppFeature.swift:587 — OnlySwitchRemote/App/RemoteAppFeature.swift:587-597 | OnlySwitchRemote/App/RemoteAppFeature.swift:615-625 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) OnlySwitchRemote/Features/Pairing/PairingView.swift:25 — OnlySwitchRemote/Features/Pairing/PairingView.swift:25-35 | OnlySwitchRemote/Features/Pairing/PairingView.swift:56-66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) OnlySwitch/EverySwitch/AppleMusicSwitch.swift:56 — OnlySwitch/EverySwitch/AppleMusicSwitch.swift:56-66 | OnlySwitch/EverySwitch/SpotifySwitch.swift:57-67 — 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.
D3 · God Classes · TooManyMethods · ×7
  • TooManyMethods: RemoteConnectionRuntime OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:150 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RemoteCredentialStore OnlySwitch/Features/RemoteAccess/Host/RemoteCredentialStore.swift:21 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RemoteReviewDemoRuntime OnlySwitchRemote/Dependencies/RemoteReviewDemoClient.swift:5 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RemoteFilePersistenceStore OnlySwitchRemote/Dependencies/RemotePersistenceClient.swift:540 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RemoteHost OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift:7 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RemotePeerSession OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:71 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: InMemoryRemotePersistenceStore OnlySwitchRemote/Dependencies/RemotePersistenceClient.swift:293 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) Modules/Sources/AppUninstaller/AppUninstallerView.swift:16 — Modules/Sources/AppUninstaller/AppUninstallerView.swift:16-24 | Modules/Sources/XcodeCleaner/XcodeCleanerView.swift:14-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/AppUninstaller/AppUninstallerView.swift:16` 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 first that the copies are not typed on the same thing: the declarations holding them bind `store` to `StoreOf<AppUninstallerFeature>` in one and `StoreOf<XcodeCleanerFeature>` 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 (9 lines × 2) Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:300 — Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:300-308 | Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:316-324 — 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 `Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:300` 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 (9 lines × 2) OnlySwitch/Features/SoundMixer/SoundMixerVM.swift:313 — OnlySwitch/Features/SoundMixer/SoundMixerVM.swift:313-321 | OnlySwitch/Features/SoundMixer/SoundMixerVM.swift:327-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) OnlySwitch/Features/SwitchItem/EvolutionItems/EvolutionBarView.swift:52 — OnlySwitch/Features/SwitchItem/EvolutionItems/EvolutionBarView.swift:52-60 | OnlySwitch/Features/SwitchItem/ShortcutsItem/ShortcutsBarView.swift:45-53 — 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 `OnlySwitch/Features/SwitchItem/EvolutionItems/EvolutionBarView.swift:52` 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 (9 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:73 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:73-81 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:81-89 — before extracting anything, compare `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift` and `OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 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 `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:73` 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 (9 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:107 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:107-115 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:114-122 — before extracting anything, compare `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift` and `OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 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 (9 lines × 2) OnlySwitchRemote/Features/Dashboard/ControlTileStatusBadge.swift:89 — OnlySwitchRemote/Features/Dashboard/ControlTileStatusBadge.swift:89-97 | OnlySwitchRemote/Features/Dashboard/ControlTileView.swift:102-110 — 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.
D3 · God Classes · FileTooLong · ×6
  • FileTooLong: Dependencies/RemoteConnectionClient+Live.swift OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift — FileTooLong — 1592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1092 over it, 3.18× 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: SystemMonitor/MacSystemMonitorCollector.swift OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift — FileTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 418 over it, 1.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Host/RemotePeerSession.swift OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift — FileTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 321 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: App/RemoteAppFeature.swift OnlySwitchRemote/App/RemoteAppFeature.swift — FileTooLong — 737 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: RemoteAppFeature (13-923). The bar is 500 significant lines; this is 237 over it, 1.47× 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: Dependencies/RemotePersistenceClient.swift OnlySwitchRemote/Dependencies/RemotePersistenceClient.swift — FileTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 209 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: SystemMonitor/SystemMonitorPanelView.swift OnlySwitch/Features/SystemMonitor/SystemMonitorPanelView.swift — FileTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: SystemMonitorPanelView (227-800). The bar is 500 significant lines; this is 113 over it, 1.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D3 · God Classes · ClassTooLong · ×5
  • ClassTooLong: RemoteAppFeature OnlySwitchRemote/App/RemoteAppFeature.swift:12 — ClassTooLong — 726 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 326 over it, 1.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DashboardFeature OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:5 — ClassTooLong — 458 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 58 over it, 1.15× 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: OnlySwitchListView OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:26 — ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 54 over it, 1.14× 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: PromptDialogueReducer Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:12 — ClassTooLong — 443 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 43 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SystemMonitorPanelView OnlySwitch/Features/SystemMonitor/SystemMonitorPanelView.swift:227 — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 30 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) Modules/Sources/RemoteCore/ClaudeUsageModels.swift:88 — Modules/Sources/RemoteCore/ClaudeUsageModels.swift:88-95 | Modules/Sources/RemoteCore/CodexUsageModels.swift:90-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) Modules/Sources/SystemMonitor/SystemMonitorFormatters.swift:9 — Modules/Sources/SystemMonitor/SystemMonitorFormatters.swift:9-16 | OnlySwitch/Features/SystemMonitor/SystemMonitorStatusItemController.swift:228-235 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) OnlySwitch/Features/OnlyControl/OnlyControlView.swift:303 — OnlySwitch/Features/OnlyControl/OnlyControlView.swift:303-310 | OnlySwitch/Features/SystemMonitor/SystemMonitorPanelView.swift:173-180 — 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 `OnlySwitch/Features/OnlyControl/OnlyControlView.swift:303` 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 (8 lines × 2) OnlySwitch/Features/Update/UpdateView.swift:42 — OnlySwitch/Features/Update/UpdateView.swift:42-49 | OnlySwitch/Features/Update/UpdateView.swift:58-65 — 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 `OnlySwitch/Features/Update/UpdateView.swift:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:32 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:32-39 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:33-40 — before extracting anything, compare `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift` and `OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 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 `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:32` 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 lines × 2) · ×5
  • Duplicated block (6 lines × 2) OnlySwitch/EverySwitch/KeepAwakeSwitch.swift:127 — OnlySwitch/EverySwitch/KeepAwakeSwitch.swift:127-132 | OnlySwitch/EverySwitch/NightShiftSwitch.swift:90-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:97 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:97-102 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:104-109 — before extracting anything, compare `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift` and `OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 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) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:15 — Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:15-20 | Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift:15-23 — before extracting anything, compare `Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift` and `Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:12` calls `URL` and `Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift:14` 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 (6 lines × 2) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1972 — OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1972-1977 | OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:2006-2011 — 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 `OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1972` 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.
  • Duplicated block (6 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageView.swift:63 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageView.swift:63-68 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageView.swift:150-155 — 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. 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.
D5 · Coupling · Off the main sequence · ×5
  • Off the main sequence: Design — Design: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: DesktopPet — DesktopPet: 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: RemoteCore — RemoteCore: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: Reorderable — Reorderable: 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: Extensions — Extensions: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) Modules/Sources/Authenticator/AuthenticatorPanelView.swift:80 — Modules/Sources/Authenticator/AuthenticatorPanelView.swift:80-93 | OnlySwitch/Features/SoundMixer/SoundMixerPanelView.swift:65-78 — 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 `Modules/Sources/Authenticator/AuthenticatorPanelView.swift:80` 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 (14 lines × 2) Modules/Sources/OnlyAgent/Settings/OllamaSettings/OllamaRequestService.swift:91 — Modules/Sources/OnlyAgent/Settings/OllamaSettings/OllamaRequestService.swift:91-104 | Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAIService.swift:99-112 — 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 `Modules/Sources/OnlyAgent/Settings/OllamaSettings/OllamaRequestService.swift:91` 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) OnlySwitch/Features/OnlyControl/OnlyControlView.swift:327 — OnlySwitch/Features/OnlyControl/OnlyControlView.swift:327-340 | OnlySwitch/Features/SystemMonitor/SystemMonitorPanelView.swift:195-208 — 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 `OnlySwitch/Features/OnlyControl/OnlyControlView.swift:327` 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 (14 lines × 2) OnlySwitchRemote/App/RemoteAppFeature.swift:170 — OnlySwitchRemote/App/RemoteAppFeature.swift:170-183 | OnlySwitchRemote/App/RemoteAppFeature.swift:275-288 — 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 `OnlySwitchRemote/App/RemoteAppFeature.swift:170` 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 (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) OnlySwitch/Features/OnlyControl/OnlyControlView.swift:282 — OnlySwitch/Features/OnlyControl/OnlyControlView.swift:282-300 | OnlySwitch/Features/SystemMonitor/SystemMonitorPanelView.swift:143-161 — 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 `OnlySwitch/Features/OnlyControl/OnlyControlView.swift:282` 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 (19 lines × 2) OnlySwitch/Features/Settings/KeepAwake/KeepAwakeSettingView.swift:41 — OnlySwitch/Features/Settings/KeepAwake/KeepAwakeSettingView.swift:41-59 | OnlySwitch/Features/Settings/NightShift/NightShiftSettingsView.swift:33-51 — 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 `OnlySwitch/Features/Settings/KeepAwake/KeepAwakeSettingView.swift:41` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OnlySwitch/Features/Settings/NightShift/NightShiftSettingsView.swift:31` calls `Toggle`, `localized` and `OnlySwitch/Features/Settings/KeepAwake/KeepAwakeSettingView.swift:39` 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 (19 lines × 2) OnlySwitchRemote/Features/Dashboard/ControlTileStatusBadge.swift:33 — OnlySwitchRemote/Features/Dashboard/ControlTileStatusBadge.swift:33-51 | OnlySwitchRemote/Features/Dashboard/ControlTileStatusBadge.swift:54-72 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) OnlySwitch/Features/Settings/DimScreen/DimScreenSettingView.swift:13 — OnlySwitch/Features/Settings/DimScreen/DimScreenSettingView.swift:13-24 | OnlySwitch/Features/Settings/NightShift/NightShiftSettingsView.swift:13-24 — 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 `OnlySwitch/Features/Settings/DimScreen/DimScreenSettingView.swift:13` 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) OnlySwitchRemote/Features/Pairing/PairingFeature.swift:15 — OnlySwitchRemote/Features/Pairing/PairingFeature.swift:15-26 | OnlySwitchRemote/Features/Pairing/PairingFeature.swift:28-39 — 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) Modules/Sources/Extensions/KeychainManager.swift:90 — Modules/Sources/Extensions/KeychainManager.swift:90-101 | Modules/Sources/Utilities/KeychainManager.swift:90-101 — `Modules/Sources/Extensions/KeychainManager.swift` and `Modules/Sources/Utilities/KeychainManager.swift` 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 4 separate duplicated blocks between them, totalling at least 74 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 (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:98 — Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:98-104 | Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift:166-172 — 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 `Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:98` 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 (7 lines × 2) OnlySwitch/Features/Settings/Radio/RadioSettingView.swift:77 — OnlySwitch/Features/Settings/Radio/RadioSettingView.swift:77-84 | OnlySwitch/Features/Settings/Radio/RadioSettingView.swift:98-104 — 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 `OnlySwitch/Features/Settings/Radio/RadioSettingView.swift:77` 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) OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift:388 — OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift:388-394 | OnlySwitch/Features/SystemMonitor/SystemMonitorProcessActivation.swift:88-94 — 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 `OnlySwitch/Features/SystemMonitor/SystemMonitorProcessActivation.swift:88` 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×3
  • Swallowed exception (empty catch) OnlySwitchRemote/Features/Pairing/PairingFeature.swift:154 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) OnlySwitch/Features/Settings/Shortcuts/ShortcutsSettingVM.swift:106 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:1016 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D15 · Churn × Complexity Hotspots · Repeated repair · ×2
  • Repeated repair: OnlySwitch/Features/SoundMixer/SoundMixerVM.swift OnlySwitch/Features/SoundMixer/SoundMixerVM.swift:172 — OnlySwitch/Features/SoundMixer/SoundMixerVM.swift changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is SoundMixerVM.refresh at line 172), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop writing into the rows array through a ForEach binding”; “fix: make refresh() non-re-entrant”; “fix: build the process tap once per app, not per slider movement”; “fix: stop the process tap writing into freed memory”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/SoundMixer/SoundMixerVM.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.
  • Repeated repair: OnlySwitch/Features/SoundMixer/SoundMixerPanelView.swift OnlySwitch/Features/SoundMixer/SoundMixerPanelView.swift:137 — OnlySwitch/Features/SoundMixer/SoundMixerPanelView.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is SoundMixerPanelView.appRow at line 137), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: ramp every channel over the same span, bound retired states, add a11y”; “fix: stop writing into the rows array through a ForEach binding”; “fix: keep the mixer inert while it is switched off”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 12:27:36 +01:00' --until='2026-10-28 12:27:36 +01:00' --full-history --no-merges -- OnlySwitch/Features/SoundMixer/SoundMixerPanelView.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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:22 — Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:22-37 | Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift:25-42 | Modules/Sources/OnlyAgent/Settings/OllamaSettings/OllamaRequestService.swift:48-64 | Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAIService.swift:30-47 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:117 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:117-126 | OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:127-136 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:124-133 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:134-143 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:48 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:48-57 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:56-65 — before extracting anything, compare `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift` and `OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 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 `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) OnlySwitch/EverySwitch/AutohideDockSwitch.swift:16 — OnlySwitch/EverySwitch/AutohideDockSwitch.swift:16-25 | OnlySwitch/EverySwitch/AutohideMenuBarSwitch.swift:16-25 — 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.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no accessibility linting at author time and no automated accessibility check in tests or CI. Add your UI toolkit's own accessibility assertion to the test suite (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in the pipeline. What was searched, so you can tell an absence from a miss: the 1 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · RemoteAppFeature.body (cyclomatic 130) · ×1
  • RemoteAppFeature.body (cyclomatic 130) OnlySwitchRemote/App/RemoteAppFeature.swift:156 — RemoteAppFeature.body has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AphroditeReducer.body (cyclomatic 102) · ×1
  • AphroditeReducer.body (cyclomatic 102) Modules/Sources/Aphrodite/AphroditeReducer.swift:96 — AphroditeReducer.body has cyclomatic complexity 102 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PromptDialogueReducer.body (cyclomatic 85) · ×1
  • PromptDialogueReducer.body (cyclomatic 85) Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:100 — PromptDialogueReducer.body has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PairingFeature.body (cyclomatic 73) · ×1
  • PairingFeature.body (cyclomatic 73) OnlySwitchRemote/Features/Pairing/PairingFeature.swift:137 — PairingFeature.body has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · XcodeCleanerFeature.body (cyclomatic 71) · ×1
  • XcodeCleanerFeature.body (cyclomatic 71) Modules/Sources/XcodeCleaner/XcodeCleanerFeature.swift:58 — XcodeCleanerFeature.body has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TailscaleFeature.body (cyclomatic 56) · ×1
  • TailscaleFeature.body (cyclomatic 56) Modules/Sources/Tailscale/TailscaleFeature.swift:38 — TailscaleFeature.body has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DashboardFeature.body (cyclomatic 53) · ×1
  • DashboardFeature.body (cyclomatic 53) OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:146 — DashboardFeature.body has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteAccessSettingsFeature.body (cyclomatic 51) · ×1
  • RemoteAccessSettingsFeature.body (cyclomatic 51) OnlySwitch/Features/RemoteAccess/Settings/RemoteAccessSettingsFeature.swift:173 — RemoteAccessSettingsFeature.body has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppUninstallerFeature.body (cyclomatic 50) · ×1
  • AppUninstallerFeature.body (cyclomatic 50) Modules/Sources/AppUninstaller/AppUninstallerFeature.swift:33 — AppUninstallerFeature.body has cyclomatic complexity 50 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DockPreviewFeature.body (cyclomatic 48) · ×1
  • DockPreviewFeature.body (cyclomatic 48) OnlySwitch/Features/DockPreview/DockPreviewFeature.swift:61 — DockPreviewFeature.body has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OnlyControlReducer.body (cyclomatic 44) · ×1
  • OnlyControlReducer.body (cyclomatic 44) OnlySwitch/Features/OnlyControl/OnlyControlReducer.swift:91 — OnlyControlReducer.body has cyclomatic complexity 44 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SettingsFeature.body (cyclomatic 43) · ×1
  • SettingsFeature.body (cyclomatic 43) OnlySwitchRemote/Features/Settings/SettingsFeature.swift:96 — SettingsFeature.body has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelProviderService.liveValue (cyclomatic 42) · ×1
  • ModelProviderService.liveValue (cyclomatic 42) Modules/Sources/OnlyAgent/ModelProviderService.swift:61 — ModelProviderService.liveValue has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TailscaleCoordinator.perform (cyclomatic 38) · ×1
  • TailscaleCoordinator.perform (cyclomatic 38) Modules/Sources/Tailscale/TailscaleCoordinator.swift:43 — TailscaleCoordinator.perform has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemotePaywallFeature.body (cyclomatic 35) · ×1
  • RemotePaywallFeature.body (cyclomatic 35) OnlySwitchRemote/Features/Subscription/RemotePaywallFeature.swift:61 — RemotePaywallFeature.body has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteSystemMonitorFeature.body (cyclomatic 34) · ×1
  • RemoteSystemMonitorFeature.body (cyclomatic 34) OnlySwitchRemote/Features/SystemMonitor/RemoteSystemMonitorFeature.swift:36 — RemoteSystemMonitorFeature.body has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteConnectionRuntime.connectWithRetry (cyclomatic 32) · ×1
  • RemoteConnectionRuntime.connectWithRetry (cyclomatic 32) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:842 — RemoteConnectionRuntime.connectWithRetry 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 · DashboardFeature.handleConnectionEvent (cyclomatic 31) · ×1
  • DashboardFeature.handleConnectionEvent (cyclomatic 31) OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:421 — DashboardFeature.handleConnectionEvent has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemotePeerSession.handleAuthenticated (cyclomatic 30) · ×1
  • RemotePeerSession.handleAuthenticated (cyclomatic 30) OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:763 — RemotePeerSession.handleAuthenticated has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteConnectionRuntime.preparePairing (cyclomatic 28) · ×1
  • RemoteConnectionRuntime.preparePairing (cyclomatic 28) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:331 — RemoteConnectionRuntime.preparePairing has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GlobalSettingsFeature.body (cyclomatic 27) · ×1
  • GlobalSettingsFeature.body (cyclomatic 27) OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift:65 — GlobalSettingsFeature.body has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AphroditeRemoteSVGValidationDelegate.validAttribute (cyclomatic 26) · ×1
  • AphroditeRemoteSVGValidationDelegate.validAttribute (cyclomatic 26) Modules/Sources/RemoteCore/AphroditeRemoteModels.swift:64 — AphroditeRemoteSVGValidationDelegate.validAttribute has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SystemAudioMixer.makeAppTap (cyclomatic 26) · ×1
  • SystemAudioMixer.makeAppTap (cyclomatic 26) OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift:215 — SystemAudioMixer.makeAppTap 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 · OnlySwitchListView.body (cyclomatic 25) · ×1
  • OnlySwitchListView.body (cyclomatic 25) OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:64 — OnlySwitchListView.body has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RemoteCodexUsageFeature.body (cyclomatic 25) · ×1
  • RemoteCodexUsageFeature.body (cyclomatic 25) OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:33 — RemoteCodexUsageFeature.body 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 · OnlyRemoteCampaignFeature.body (cyclomatic 25) · ×1
  • OnlyRemoteCampaignFeature.body (cyclomatic 25) OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.swift:27 — OnlyRemoteCampaignFeature.body 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 · EvolutionEditorReducer.body (cyclomatic 25) · ×1
  • EvolutionEditorReducer.body (cyclomatic 25) OnlySwitch/Features/Settings/Evolution/EvolutionEditor/EvolutionEditorReducer.swift:86 — EvolutionEditorReducer.body has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · XcodeCleanerSimulator.inventory (cyclomatic 24) · ×1
  • XcodeCleanerSimulator.inventory (cyclomatic 24) Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift:102 — XcodeCleanerSimulator.inventory 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 · RemoteConnectionRuntime.handle (cyclomatic 24) · ×1
  • RemoteConnectionRuntime.handle (cyclomatic 24) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1093 — RemoteConnectionRuntime.handle 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 · ClaudeUsageView.content (cyclomatic 23) · ×1
  • ClaudeUsageView.content (cyclomatic 23) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift:17 — ClaudeUsageView.content 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 · CodexUsageView.content (cyclomatic 23) · ×1
  • CodexUsageView.content (cyclomatic 23) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift:22 — CodexUsageView.content 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 · RemoteAppView.body (cyclomatic 23) · ×1
  • RemoteAppView.body (cyclomatic 23) OnlySwitchRemote/App/RemoteAppView.swift:8 — RemoteAppView.body 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 · RemoteCatalogProvider.init (cyclomatic 23) · ×1
  • RemoteCatalogProvider.init (cyclomatic 23) OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift:7 — RemoteCatalogProvider.init has cyclomatic complexity 23 (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 · AppUninstallerFileSystem.scan (cyclomatic 22) · ×1
  • AppUninstallerFileSystem.scan (cyclomatic 22) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift:28 — AppUninstallerFileSystem.scan has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AppUninstallerFileSystem.validate (cyclomatic 22) · ×1
  • AppUninstallerFileSystem.validate (cyclomatic 22) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift:113 — AppUninstallerFileSystem.validate 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 · MacSystemMonitorCollector.sampleForStream (cyclomatic 22) · ×1
  • MacSystemMonitorCollector.sampleForStream (cyclomatic 22) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift:910 — MacSystemMonitorCollector.sampleForStream has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NSSound.setSystemVolume (cyclomatic 21) · ×1
  • NSSound.setSystemVolume (cyclomatic 21) Modules/Sources/Extensions/NSSound_SystemVolumeExtension.swift:158 — NSSound.setSystemVolume 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 · RemoteClaudeUsageFeature.body (cyclomatic 21) · ×1
  • RemoteClaudeUsageFeature.body (cyclomatic 21) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:32 — RemoteClaudeUsageFeature.body has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ClaudeCodeCLI.signIn (cyclomatic 20) · ×1
  • ClaudeCodeCLI.signIn (cyclomatic 20) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeCodeCLI.swift:66 — ClaudeCodeCLI.signIn has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · XcodeCleanerFileSystem.clean (cyclomatic 20) · ×1
  • XcodeCleanerFileSystem.clean (cyclomatic 20) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:54 — XcodeCleanerFileSystem.clean 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 · SwitchManager.visibleTypesIncludingNewDiscoveries (cyclomatic 19) · ×1
  • SwitchManager.visibleTypesIncludingNewDiscoveries (cyclomatic 19) OnlySwitch/EverySwitch/SwitchManager.swift:111 — SwitchManager.visibleTypesIncludingNewDiscoveries has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RemoteConnectionRuntime.updateDiscovery (cyclomatic 19) · ×1
  • RemoteConnectionRuntime.updateDiscovery (cyclomatic 19) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1292 — RemoteConnectionRuntime.updateDiscovery 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 · EvolutionAdapter.toEvolutionItem (cyclomatic 19) · ×1
  • EvolutionAdapter.toEvolutionItem (cyclomatic 19) OnlySwitch/Features/Settings/Evolution/EvolutionAdapter.swift:20 — EvolutionAdapter.toEvolutionItem 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 · EvolutionCommandEntity.addItem (cyclomatic 19) · ×1
  • EvolutionCommandEntity.addItem (cyclomatic 19) OnlySwitch/CoreData/EvolutionCommandEntityLive.swift:56 — EvolutionCommandEntity.addItem 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 · ClaudeUsageReducer.body (cyclomatic 18) · ×1
  • ClaudeUsageReducer.body (cyclomatic 18) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageReducer.swift:37 — ClaudeUsageReducer.body has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CleanerCoordinator.clean (cyclomatic 18) · ×1
  • CleanerCoordinator.clean (cyclomatic 18) Modules/Sources/XcodeCleaner/XcodeCleanerClient.swift:75 — CleanerCoordinator.clean has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SystemAXMenuBarSource.systemItemKind (cyclomatic 18) · ×1
  • SystemAXMenuBarSource.systemItemKind (cyclomatic 18) OnlySwitch/StatusBar/MenuBarAccessibilityItemResolver.swift:332 — SystemAXMenuBarSource.systemItemKind 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 · RemoteConnectionRuntime.recoverPreparedPairingIfNeeded (cyclomatic 18) · ×1
  • RemoteConnectionRuntime.recoverPreparedPairingIfNeeded (cyclomatic 18) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:955 — RemoteConnectionRuntime.recoverPreparedPairingIfNeeded 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 · SystemMonitorReducer.body (cyclomatic 17) · ×1
  • SystemMonitorReducer.body (cyclomatic 17) Modules/Sources/SystemMonitor/SystemMonitorReducer.swift:59 — SystemMonitorReducer.body 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 · XcodeCleanerFileSystem.removeEntry (cyclomatic 17) · ×1
  • XcodeCleanerFileSystem.removeEntry (cyclomatic 17) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:114 — XcodeCleanerFileSystem.removeEntry 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 · OnlySwitchApp.body (cyclomatic 17) · ×1
  • OnlySwitchApp.body (cyclomatic 17) OnlySwitch/AppDelegate.swift:29 — OnlySwitchApp.body 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 · RemoteConnectionRuntime.abortPairing (cyclomatic 17) · ×1
  • RemoteConnectionRuntime.abortPairing (cyclomatic 17) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:580 — RemoteConnectionRuntime.abortPairing 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 · SettingsFeature.handleConnectionEvent (cyclomatic 17) · ×1
  • SettingsFeature.handleConnectionEvent (cyclomatic 17) OnlySwitchRemote/Features/Settings/SettingsFeature.swift:258 — SettingsFeature.handleConnectionEvent has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RemotePeerSession.completePairing (cyclomatic 17) · ×1
  • RemotePeerSession.completePairing (cyclomatic 17) OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:364 — RemotePeerSession.completePairing 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 · ClaudeLive.chatStream (cyclomatic 16) · ×1
  • ClaudeLive.chatStream (cyclomatic 16) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:39 — ClaudeLive.chatStream has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · CodexRuntimePool.chatStream (cyclomatic 16) · ×1
  • CodexRuntimePool.chatStream (cyclomatic 16) Modules/Sources/OnlyAgent/Settings/CodexSettings/CodexService.swift:135 — CodexRuntimePool.chatStream 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 · DashboardReducer.body (cyclomatic 16) · ×1
  • DashboardReducer.body (cyclomatic 16) Modules/Sources/OnlyControl/DashboardReducer.swift:38 — DashboardReducer.body 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 · TailscaleConnection.validatedIPAddress (cyclomatic 16) · ×1
  • TailscaleConnection.validatedIPAddress (cyclomatic 16) Modules/Sources/Tailscale/TailscaleModels.swift:58 — TailscaleConnection.validatedIPAddress has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · OnlySwitchListView.singleSwitchList (cyclomatic 16) · ×1
  • OnlySwitchListView.singleSwitchList (cyclomatic 16) OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:195 — OnlySwitchListView.singleSwitchList 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 · RemotePeerSession.handshake (cyclomatic 16) · ×1
  • RemotePeerSession.handshake (cyclomatic 16) OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:275 — RemotePeerSession.handshake 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 · RemoteAppFeature.body (cognitive 138) · ×1
  • RemoteAppFeature.body (cognitive 138) OnlySwitchRemote/App/RemoteAppFeature.swift:156 — RemoteAppFeature.body has cognitive complexity 138 (threshold 15). Drivers by points: if/else 45 (97 pts), boolean chains 21, match/switch 5 (9 pts), error handling 2 (5 pts), loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 62). 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 · AphroditeReducer.body (cognitive 106) · ×1
  • AphroditeReducer.body (cognitive 106) Modules/Sources/Aphrodite/AphroditeReducer.swift:96 — AphroditeReducer.body has cognitive complexity 106 (threshold 15). Drivers by points: if/else 27 (56 pts), error handling 12 (24 pts), boolean chains 20, ternaries 2 (5 pts), match/switch 1 (nesting depth added 44). 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 · PairingFeature.body (cognitive 98) · ×1
  • PairingFeature.body (cognitive 98) OnlySwitchRemote/Features/Pairing/PairingFeature.swift:137 — PairingFeature.body has cognitive complexity 98 (threshold 15). Drivers by points: if/else 24 (57 pts), boolean chains 18, error handling 5 (10 pts), match/switch 4 (7 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 45). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PromptDialogueReducer.body (cognitive 96) · ×1
  • PromptDialogueReducer.body (cognitive 96) Modules/Sources/OnlyAgent/Dialogue/PromptDialogueReducer.swift:100 — PromptDialogueReducer.body has cognitive complexity 96 (threshold 15). Drivers by points: if/else 34 (67 pts), boolean chains 17, match/switch 3 (5 pts), loops 1 (4 pts), error handling 1 (3 pts) (nesting depth added 40). 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 · XcodeCleanerFeature.body (cognitive 73) · ×1
  • XcodeCleanerFeature.body (cognitive 73) Modules/Sources/XcodeCleaner/XcodeCleanerFeature.swift:58 — XcodeCleanerFeature.body has cognitive complexity 73 (threshold 15). Drivers by points: if/else 21 (42 pts), boolean chains 21, match/switch 4 (7 pts), ternaries 1 (3 pts) (nesting depth added 26). 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 · RemoteConnectionRuntime.connectWithRetry (cognitive 68) · ×1
  • RemoteConnectionRuntime.connectWithRetry (cognitive 68) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:842 — RemoteConnectionRuntime.connectWithRetry has cognitive complexity 68 (threshold 15). Drivers by points: if/else 11 (36 pts), error handling 5 (15 pts), boolean chains 13, loops 2 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockPreviewFeature.body (cognitive 67) · ×1
  • DockPreviewFeature.body (cognitive 67) OnlySwitch/Features/DockPreview/DockPreviewFeature.swift:61 — DockPreviewFeature.body has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (33 pts), error handling 5 (14 pts), boolean chains 9, ternaries 2 (5 pts), loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 33). 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 · TailscaleFeature.body (cognitive 57) · ×1
  • TailscaleFeature.body (cognitive 57) Modules/Sources/Tailscale/TailscaleFeature.swift:38 — TailscaleFeature.body has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 14, match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 22). 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 · AppUninstallerFeature.body (cognitive 55) · ×1
  • AppUninstallerFeature.body (cognitive 55) Modules/Sources/AppUninstaller/AppUninstallerFeature.swift:33 — AppUninstallerFeature.body has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 12, error handling 3 (6 pts), match/switch 3 (5 pts) (nesting depth added 21). 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 · XcodeCleanerSimulator.inventory (cognitive 52) · ×1
  • XcodeCleanerSimulator.inventory (cognitive 52) Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift:102 — XcodeCleanerSimulator.inventory has cognitive complexity 52 (threshold 15). Drivers by points: if/else 7 (24 pts), ternaries 3 (11 pts), loops 3 (7 pts), boolean chains 6, error handling 4 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashboardFeature.body (cognitive 49) · ×1
  • DashboardFeature.body (cognitive 49) OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:146 — DashboardFeature.body has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 12, error handling 2 (4 pts), match/switch 1 (nesting depth added 18). 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 · SettingsFeature.body (cognitive 48) · ×1
  • SettingsFeature.body (cognitive 48) OnlySwitchRemote/Features/Settings/SettingsFeature.swift:96 — SettingsFeature.body has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 8, match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 20). 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 · RemoteSystemMonitorFeature.body (cognitive 46) · ×1
  • RemoteSystemMonitorFeature.body (cognitive 46) OnlySwitchRemote/Features/SystemMonitor/RemoteSystemMonitorFeature.swift:36 — RemoteSystemMonitorFeature.body has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 23). 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 · RemoteAccessSettingsFeature.body (cognitive 46) · ×1
  • RemoteAccessSettingsFeature.body (cognitive 46) OnlySwitch/Features/RemoteAccess/Settings/RemoteAccessSettingsFeature.swift:173 — RemoteAccessSettingsFeature.body has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (33 pts), error handling 3 (6 pts), match/switch 2 (3 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 23). 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 · RemotePaywallFeature.body (cognitive 45) · ×1
  • RemotePaywallFeature.body (cognitive 45) OnlySwitchRemote/Features/Subscription/RemotePaywallFeature.swift:61 — RemotePaywallFeature.body has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (22 pts), error handling 7 (14 pts), ternaries 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 22). 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 · TailscaleCoordinator.perform (cognitive 43) · ×1
  • TailscaleCoordinator.perform (cognitive 43) Modules/Sources/Tailscale/TailscaleCoordinator.swift:43 — TailscaleCoordinator.perform has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 3, ternaries 1 (3 pts), match/switch 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XcodeCleanerFileSystem.clean (cognitive 43) · ×1
  • XcodeCleanerFileSystem.clean (cognitive 43) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:54 — XcodeCleanerFileSystem.clean has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (22 pts), error handling 4 (12 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnlyControlReducer.body (cognitive 42) · ×1
  • OnlyControlReducer.body (cognitive 42) OnlySwitch/Features/OnlyControl/OnlyControlReducer.swift:91 — OnlyControlReducer.body has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 9, loops 3 (6 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 15). 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 · RemoteAppView.body (cognitive 41) · ×1
  • RemoteAppView.body (cognitive 41) OnlySwitchRemote/App/RemoteAppView.swift:8 — RemoteAppView.body has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (28 pts), ternaries 2 (6 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodexUsageView.content (cognitive 39) · ×1
  • CodexUsageView.content (cognitive 39) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift:22 — CodexUsageView.content has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (33 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SystemAudioMixer.makeAppTap (cognitive 35) · ×1
  • SystemAudioMixer.makeAppTap (cognitive 35) OnlySwitch/Features/SoundMixer/SystemAudioMixer.swift:215 — SystemAudioMixer.makeAppTap has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 8, loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelProviderService.liveValue (cognitive 34) · ×1
  • ModelProviderService.liveValue (cognitive 34) Modules/Sources/OnlyAgent/ModelProviderService.swift:61 — ModelProviderService.liveValue has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 7 (15 pts), if/else 5 (10 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppUninstallerFileSystem.scan (cognitive 33) · ×1
  • AppUninstallerFileSystem.scan (cognitive 33) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift:28 — AppUninstallerFileSystem.scan has cognitive complexity 33 (threshold 15). Drivers by points: error handling 10 (18 pts), if/else 4 (7 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteConnectionRuntime.preparePairing (cognitive 33) · ×1
  • RemoteConnectionRuntime.preparePairing (cognitive 33) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:331 — RemoteConnectionRuntime.preparePairing has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 10, error handling 5 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnlyRemoteCampaignFeature.body (cognitive 32) · ×1
  • OnlyRemoteCampaignFeature.body (cognitive 32) OnlySwitch/Features/RemoteAccess/Campaign/OnlyRemoteCampaignFeature.swift:27 — OnlyRemoteCampaignFeature.body has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 8, error handling 1 (2 pts), match/switch 1 (nesting depth added 13). 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 · RemotePeerSession.handleAuthenticated (cognitive 31) · ×1
  • RemotePeerSession.handleAuthenticated (cognitive 31) OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:763 — RemotePeerSession.handleAuthenticated has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 3, 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 · ClaudeUsageView.content (cognitive 30) · ×1
  • ClaudeUsageView.content (cognitive 30) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift:17 — ClaudeUsageView.content has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashboardFeature.handleConnectionEvent (cognitive 30) · ×1
  • DashboardFeature.handleConnectionEvent (cognitive 30) OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:421 — DashboardFeature.handleConnectionEvent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 3, loops 1 (2 pts), match/switch 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NSSound.setSystemVolume (cognitive 29) · ×1
  • NSSound.setSystemVolume (cognitive 29) Modules/Sources/Extensions/NSSound_SystemVolumeExtension.swift:158 — NSSound.setSystemVolume has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 6, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteCodexUsageFeature.body (cognitive 29) · ×1
  • RemoteCodexUsageFeature.body (cognitive 29) OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:33 — RemoteCodexUsageFeature.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 6, match/switch 3 (6 pts), ternaries 2 (4 pts) (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 · ClaudeCodeCLI.signIn (cognitive 28) · ×1
  • ClaudeCodeCLI.signIn (cognitive 28) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeCodeCLI.swift:66 — ClaudeCodeCLI.signIn has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 9). Of this number, 23 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteConnectionRuntime.recoverPreparedPairingIfNeeded (cognitive 28) · ×1
  • RemoteConnectionRuntime.recoverPreparedPairingIfNeeded (cognitive 28) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:955 — RemoteConnectionRuntime.recoverPreparedPairingIfNeeded has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XcodeCleanerFileSystem.removeEntry (cognitive 27) · ×1
  • XcodeCleanerFileSystem.removeEntry (cognitive 27) Modules/Sources/XcodeCleaner/XcodeCleanerFileSystem.swift:114 — XcodeCleanerFileSystem.removeEntry has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TailscaleCommandRunner.drain (cognitive 26) · ×1
  • TailscaleCommandRunner.drain (cognitive 26) Modules/Sources/Tailscale/TailscaleCommandRunner.swift:100 — TailscaleCommandRunner.drain has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 2, loops 1 (2 pts), error handling 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 · RemoteConnectionRuntime.handle (cognitive 26) · ×1
  • RemoteConnectionRuntime.handle (cognitive 26) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1093 — RemoteConnectionRuntime.handle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Benchmark.main (cognitive 26) · ×1
  • Benchmark.main (cognitive 26) doc/research/xcode-cleaner-scan-benchmark.swift:25 — Benchmark.main has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 3 (8 pts), loops 4 (6 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 · CodexRuntimePool.chatStream (cognitive 25) · ×1
  • CodexRuntimePool.chatStream (cognitive 25) Modules/Sources/OnlyAgent/Settings/CodexSettings/CodexService.swift:135 — CodexRuntimePool.chatStream has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, match/switch 1 (3 pts), ternaries 2 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CleanerCoordinator.clean (cognitive 25) · ×1
  • CleanerCoordinator.clean (cognitive 25) Modules/Sources/XcodeCleaner/XcodeCleanerClient.swift:75 — CleanerCoordinator.clean has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (5 pts), loops 2 (4 pts), ternaries 1 (4 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteCatalogProvider.init (cognitive 25) · ×1
  • RemoteCatalogProvider.init (cognitive 25) OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift:7 — RemoteCatalogProvider.init has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (9 pts), match/switch 1 (nesting depth added 4). 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 · GeminiLive.chatStream (cognitive 24) · ×1
  • GeminiLive.chatStream (cognitive 24) Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift:44 — GeminiLive.chatStream has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (9 pts), boolean chains 1, error handling 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 · RemoteClaudeUsageFeature.body (cognitive 24) · ×1
  • RemoteClaudeUsageFeature.body (cognitive 24) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:32 — RemoteClaudeUsageFeature.body has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (6 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 10). 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 · ClaudeUsageService.fetchOnce (cognitive 23) · ×1
  • ClaudeUsageService.fetchOnce (cognitive 23) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageService.swift:28 — ClaudeUsageService.fetchOnce has cognitive complexity 23 (threshold 15). Drivers by points: error handling 7 (13 pts), if/else 3 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PersistenceController.init (cognitive 23) · ×1
  • PersistenceController.init (cognitive 23) OnlySwitch/CoreData/Persistence.swift:16 — PersistenceController.init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 2 (5 pts), boolean chains 4, ternaries 2 (4 pts), loops 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 · StatusBarController.togglePopover (cognitive 23) · ×1
  • StatusBarController.togglePopover (cognitive 23) OnlySwitch/StatusBar/StatusBarController.swift:113 — StatusBarController.togglePopover has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnlySwitchListView.body (cognitive 23) · ×1
  • OnlySwitchListView.body (cognitive 23) OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:64 — OnlySwitchListView.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4, match/switch 1, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EvolutionCommandEntity.addItem (cognitive 23) · ×1
  • EvolutionCommandEntity.addItem (cognitive 23) OnlySwitch/CoreData/EvolutionCommandEntityLive.swift:56 — EvolutionCommandEntity.addItem has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (11 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 · AppUninstallerFileSystem.validate (cognitive 22) · ×1
  • AppUninstallerFileSystem.validate (cognitive 22) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift:113 — AppUninstallerFileSystem.validate has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, if/else 4 (5 pts), loops 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 · XcodeCleanerSimulator.clean (cognitive 22) · ×1
  • XcodeCleanerSimulator.clean (cognitive 22) Modules/Sources/XcodeCleaner/XcodeCleanerSimulator.swift:145 — XcodeCleanerSimulator.clean has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, error handling 2 (4 pts), ternaries 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 · RemoteConnectionRuntime.updateDiscovery (cognitive 22) · ×1
  • RemoteConnectionRuntime.updateDiscovery (cognitive 22) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1292 — RemoteConnectionRuntime.updateDiscovery has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (9 pts), loops 3 (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 · MacSystemMonitorCollector.sampleForStream (cognitive 22) · ×1
  • MacSystemMonitorCollector.sampleForStream (cognitive 22) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift:910 — MacSystemMonitorCollector.sampleForStream has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 11, boolean chains 6, if/else 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RadioPlayerItemViewModel.storeEditedData (cognitive 22) · ×1
  • RadioPlayerItemViewModel.storeEditedData (cognitive 22) OnlySwitch/Player/RadioPlayerItem/RadioPlayerItemViewModel.swift:121 — RadioPlayerItemViewModel.storeEditedData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GlobalSettingsFeature.body (cognitive 22) · ×1
  • GlobalSettingsFeature.body (cognitive 22) OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift:65 — GlobalSettingsFeature.body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, ternaries 1 (2 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 · AphroditeFileStore.load (cognitive 21) · ×1
  • AphroditeFileStore.load (cognitive 21) Modules/Sources/Aphrodite/AphroditePersistenceClient.swift:86 — AphroditeFileStore.load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 5 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeLive.chatStream (cognitive 21) · ×1
  • ClaudeLive.chatStream (cognitive 21) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:39 — ClaudeLive.chatStream has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (9 pts), loops 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnlySwitchApp.body (cognitive 21) · ×1
  • OnlySwitchApp.body (cognitive 21) OnlySwitch/AppDelegate.swift:29 — OnlySwitchApp.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CodexLocalUsageScanner.scan (cognitive 20) · ×1
  • CodexLocalUsageScanner.scan (cognitive 20) Modules/Sources/OnlyAgent/CodexUsage/CodexLocalUsageScanner.swift:17 — CodexLocalUsageScanner.scan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TopNotchSwitch.hideHeicDesktopNotch (cognitive 20) · ×1
  • TopNotchSwitch.hideHeicDesktopNotch (cognitive 20) OnlySwitch/EverySwitch/TopNotchSwitch.swift:173 — TopNotchSwitch.hideHeicDesktopNotch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PrivateAppleSiliconMetricsReader.discoverTemperatureSensors (cognitive 20) · ×1
  • PrivateAppleSiliconMetricsReader.discoverTemperatureSensors (cognitive 20) OnlySwitch/Features/SystemMonitor/MacSystemMonitorCollector.swift:567 — PrivateAppleSiliconMetricsReader.discoverTemperatureSensors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteFrameCodec.append (cognitive 19) · ×1
  • RemoteFrameCodec.append (cognitive 19) Modules/Sources/RemoteTransport/RemoteFrameCodec.swift:96 — RemoteFrameCodec.append has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (3 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TailscaleSettingsView.accountDetails (cognitive 19) · ×1
  • TailscaleSettingsView.accountDetails (cognitive 19) Modules/Sources/Tailscale/TailscaleSettingsView.swift:95 — TailscaleSettingsView.accountDetails has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteConnectionRuntime.validateCatalog (cognitive 19) · ×1
  • RemoteConnectionRuntime.validateCatalog (cognitive 19) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1420 — RemoteConnectionRuntime.validateCatalog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OnlyControlReducer.refreshDashboard (cognitive 19) · ×1
  • OnlyControlReducer.refreshDashboard (cognitive 19) OnlySwitch/Features/OnlyControl/OnlyControlReducer.swift:273 — OnlyControlReducer.refreshDashboard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (6 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteStatusScheduler.deliver (cognitive 19) · ×1
  • RemoteStatusScheduler.deliver (cognitive 19) OnlySwitch/Features/RemoteAccess/Host/RemoteStatusScheduler.swift:223 — RemoteStatusScheduler.deliver has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 3 (6 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SwitchManager.visibleTypesIncludingNewDiscoveries (cognitive 18) · ×1
  • SwitchManager.visibleTypesIncludingNewDiscoveries (cognitive 18) OnlySwitch/EverySwitch/SwitchManager.swift:111 — SwitchManager.visibleTypesIncludingNewDiscoveries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AXMenuBarVisibleItemResolver.itemsToKeepVisible (cognitive 18) · ×1
  • AXMenuBarVisibleItemResolver.itemsToKeepVisible (cognitive 18) OnlySwitch/StatusBar/MenuBarAccessibilityItemResolver.swift:126 — AXMenuBarVisibleItemResolver.itemsToKeepVisible has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteConnectionRuntime.abortPairing (cognitive 18) · ×1
  • RemoteConnectionRuntime.abortPairing (cognitive 18) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:580 — RemoteConnectionRuntime.abortPairing has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · EvolutionAdapter.toEvolutionItem (cognitive 18) · ×1
  • EvolutionAdapter.toEvolutionItem (cognitive 18) OnlySwitch/Features/Settings/Evolution/EvolutionAdapter.swift:20 — EvolutionAdapter.toEvolutionItem has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, 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 · AppUninstallerFileSystem.remove (cognitive 17) · ×1
  • AppUninstallerFileSystem.remove (cognitive 17) Modules/Sources/AppUninstaller/AppUninstallerFileSystem.swift:77 — AppUninstallerFileSystem.remove has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeCodeCLI.authorizationURL (cognitive 17) · ×1
  • ClaudeCodeCLI.authorizationURL (cognitive 17) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeCodeCLI.swift:138 — ClaudeCodeCLI.authorizationURL has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), loops 2 (3 pts) (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 · OpenAILive.chatStream (cognitive 17) · ×1
  • OpenAILive.chatStream (cognitive 17) Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAIService.swift:49 — OpenAILive.chatStream has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashboardReducer.body (cognitive 17) · ×1
  • DashboardReducer.body (cognitive 17) Modules/Sources/OnlyControl/DashboardReducer.swift:38 — DashboardReducer.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), boolean chains 4, match/switch 1 (nesting depth added 7). 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 · SystemAXMenuBarSource.systemItemKind (cognitive 17) · ×1
  • SystemAXMenuBarSource.systemItemKind (cognitive 17) OnlySwitch/StatusBar/MenuBarAccessibilityItemResolver.swift:332 — SystemAXMenuBarSource.systemItemKind has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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 · JLASAudioPlayer.play (cognitive 17) · ×1
  • JLASAudioPlayer.play (cognitive 17) OnlySwitch/Player/CommonPlayer/JLASAudioPlayer.swift:74 — JLASAudioPlayer.play has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ControlTilePresentation.init (cognitive 17) · ×1
  • ControlTilePresentation.init (cognitive 17) OnlySwitchRemote/Features/Dashboard/ControlTilePresentation.swift:21 — ControlTilePresentation.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, match/switch 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RemoteHost.startListener (cognitive 17) · ×1
  • RemoteHost.startListener (cognitive 17) OnlySwitch/Features/RemoteAccess/Host/RemoteHost.swift:293 — RemoteHost.startListener has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteStatusScheduler.update (cognitive 17) · ×1
  • RemoteStatusScheduler.update (cognitive 17) OnlySwitch/Features/RemoteAccess/Host/RemoteStatusScheduler.swift:75 — RemoteStatusScheduler.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SwitchBarVM.doSwitch (cognitive 17) · ×1
  • SwitchBarVM.doSwitch (cognitive 17) OnlySwitch/Features/SwitchItem/SwitchBar/SwitchBarVM.swift:155 — SwitchBarVM.doSwitch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, match/switch 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 · ClaudeUsageResponse.decode (cognitive 16) · ×1
  • ClaudeUsageResponse.decode (cognitive 16) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageResponse.swift:5 — ClaudeUsageResponse.decode has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TailscaleCoordinator.authorize (cognitive 16) · ×1
  • TailscaleCoordinator.authorize (cognitive 16) Modules/Sources/Tailscale/TailscaleCoordinator.swift:145 — TailscaleCoordinator.authorize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TailscaleConnection.validatedIPAddress (cognitive 16) · ×1
  • TailscaleConnection.validatedIPAddress (cognitive 16) Modules/Sources/Tailscale/TailscaleModels.swift:58 — TailscaleConnection.validatedIPAddress has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 3 (4 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 · RemoteConnectionRuntime.boundedCandidates (cognitive 16) · ×1
  • RemoteConnectionRuntime.boundedCandidates (cognitive 16) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:1460 — RemoteConnectionRuntime.boundedCandidates has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 3 (6 pts), boolean chains 2 (nesting depth added 6). 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 · OnlySwitchListView.singleSwitchList (cognitive 16) · ×1
  • OnlySwitchListView.singleSwitchList (cognitive 16) OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:195 — OnlySwitchListView.singleSwitchList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 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 · SettingsWindow.show (cognitive 16) · ×1
  • SettingsWindow.show (cognitive 16) OnlySwitch/Features/OnlySwitchList/SettingsWindow.swift:83 — SettingsWindow.show has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (16 pts) (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SoundMixerBottomSurface.body (cognitive 16) · ×1
  • SoundMixerBottomSurface.body (cognitive 16) OnlySwitchRemote/Features/Dashboard/DashboardView.swift:184 — SoundMixerBottomSurface.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (7 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 · PairingView.body (cognitive 16) · ×1
  • PairingView.body (cognitive 16) OnlySwitchRemote/Features/Pairing/PairingView.swift:7 — PairingView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RemotePeerSession.completePairing (cognitive 16) · ×1
  • RemotePeerSession.completePairing (cognitive 16) OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:364 — RemotePeerSession.completePairing has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, error handling 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 · EvolutionItem.doSwitch (cognitive 16) · ×1
  • EvolutionItem.doSwitch (cognitive 16) OnlySwitch/Features/Settings/Evolution/EvolutionModel.swift:66 — EvolutionItem.doSwitch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (34 lines × 3) · ×1
  • Duplicated block (34 lines × 3) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeSettingView.swift:20 — Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeSettingView.swift:20-53 | Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiSettingView.swift:20-53 | Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAISettingView.swift:20-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeSettingView.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `store` to `StoreOf<ClaudeSettingReducer>` in one and `StoreOf<GeminiSettingReducer>` 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.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) Modules/Sources/Extensions/KeychainManager.swift:48 — Modules/Sources/Extensions/KeychainManager.swift:48-74 | Modules/Sources/Utilities/KeychainManager.swift:48-74 — `Modules/Sources/Extensions/KeychainManager.swift` and `Modules/Sources/Utilities/KeychainManager.swift` 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 4 separate duplicated blocks between them, totalling at least 74 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 (23–24 lines × 3) · ×1
  • Duplicated block (23–24 lines × 3) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeSettingView.swift:51 — Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeSettingView.swift:51-74 | Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiSettingView.swift:51-74 | Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAISettingView.swift:64-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeSettingView.swift:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) Modules/Sources/Extensions/KeychainManager.swift:25 — Modules/Sources/Extensions/KeychainManager.swift:25-46 | Modules/Sources/Utilities/KeychainManager.swift:25-46 — `Modules/Sources/Extensions/KeychainManager.swift` and `Modules/Sources/Utilities/KeychainManager.swift` 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 4 separate duplicated blocks between them, totalling at least 74 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) · ×1
  • Duplicated block (21 lines × 2) OnlySwitchRemote/Features/Settings/GlobalSettingsView.swift:134 — OnlySwitchRemote/Features/Settings/GlobalSettingsView.swift:134-154 | OnlySwitchRemote/Features/Settings/GlobalSettingsView.swift:156-176 — 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 `destination` to `URL(string: "https://apps.apple.com/us/app/id1590006394")!` in one and `URL(string: "https://apps.apple.com/us/app/onlybaby/id6758526534")!` 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) Modules/Sources/Authenticator/AuthenticatorPanelView.swift:58 — Modules/Sources/Authenticator/AuthenticatorPanelView.swift:58-77 | OnlySwitch/Features/SoundMixer/SoundMixerPanelView.swift:43-62 — 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 `Modules/Sources/Authenticator/AuthenticatorPanelView.swift:58` 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 (15–17 lines × 4) · ×1
  • Duplicated block (15–17 lines × 4) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:23 — Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:23-37 | Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift:26-42 | Modules/Sources/OnlyAgent/Settings/OllamaSettings/OllamaRequestService.swift:48-64 | Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAIService.swift:31-47 — before extracting anything, compare `Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift` and `Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) OnlySwitch/Player/CommonPlayer/JLASAudioPlayer.swift:81 — OnlySwitch/Player/CommonPlayer/JLASAudioPlayer.swift:81-97 | OnlySwitch/Player/CommonPlayer/JLAVAudioPlayer.swift:56-71 — 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 `OnlySwitch/Player/CommonPlayer/JLASAudioPlayer.swift:81` 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, `OnlySwitch/Player/CommonPlayer/JLAVAudioPlayer.swift:73` calls `stop`, `AVAsset`, `AVPlayerItem` and `OnlySwitch/Player/CommonPlayer/JLASAudioPlayer.swift:99` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:797 — OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:797-813 | OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:817-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) Modules/Sources/Defines/ColorDefine.swift:44 — Modules/Sources/Defines/ColorDefine.swift:44-59 | Modules/Sources/Defines/ColorDefine.swift:78-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–15 lines × 4) · ×1
  • Duplicated block (11–15 lines × 4) OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:313 — OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:313-323 | OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:334-346 | OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:359-372 | OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:385-399 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `OnlySwitch/Features/OnlySwitchList/OnlySwitchListView.swift:313` 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 (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) OnlySwitch/CoreData/RadioStations+Fetch.swift:60 — OnlySwitch/CoreData/RadioStations+Fetch.swift:60-74 | OnlySwitch/CoreData/RadioStations+Fetch.swift:84-98 — 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 `OnlySwitch/CoreData/RadioStations+Fetch.swift:60` 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–13 lines × 3) · ×1
  • Duplicated block (9–13 lines × 3) OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:359 — OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:359-367 | OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:882-894 | OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:993-1001 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:359` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:356` calls `uppercased` and `OnlySwitchRemote/Dependencies/RemoteConnectionClient+Live.swift:992` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) Modules/Sources/Extensions/KeychainManager.swift:76 — Modules/Sources/Extensions/KeychainManager.swift:76-88 | Modules/Sources/Utilities/KeychainManager.swift:76-88 — `Modules/Sources/Extensions/KeychainManager.swift` and `Modules/Sources/Utilities/KeychainManager.swift` 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 4 separate duplicated blocks between them, totalling at least 74 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 (7–13 lines × 2) · ×1
  • Duplicated block (7–13 lines × 2) Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift:29 — Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift:29-35 | Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift:35-47 — 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 `Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift:29` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) OnlySwitch/Features/Settings/Evolution/EvolutionEditor/EvolutionEditorView.swift:128 — OnlySwitch/Features/Settings/Evolution/EvolutionEditor/EvolutionEditorView.swift:128-140 | OnlySwitch/Features/Settings/Evolution/EvolutionView.swift:107-118 — 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 `OnlySwitch/Features/Settings/Evolution/EvolutionEditor/EvolutionEditorView.swift:128` 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, `OnlySwitch/Features/Settings/Evolution/EvolutionView.swift:120` calls `send`, `finish` and `OnlySwitch/Features/Settings/Evolution/EvolutionEditor/EvolutionEditorView.swift:141` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift:112 — OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift:112-121 | OnlySwitchRemote/Features/Settings/SettingsFeature.swift:201-212 — 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 `OnlySwitchRemote/Features/Settings/GlobalSettingsFeature.swift:112` 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 (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:117 — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:117-126 | OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:127-136 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:124-133 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift:134-143 — before extracting anything, compare `OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift` and `OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 52 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 (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) OnlySwitch/StatusBar/StatusBarController.swift:272 — OnlySwitch/StatusBar/StatusBarController.swift:272-281 | OnlySwitch/StatusBar/StatusBarController.swift:290-298 — 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 `OnlySwitch/StatusBar/StatusBarController.swift:272` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:421 — OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:421-430 | OnlySwitchRemote/Features/Settings/SettingsFeature.swift:258-264 — 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 `OnlySwitchRemote/Features/Dashboard/DashboardFeature.swift:421` 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 (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) OnlySwitchRemote/Dependencies/RemoteReviewDemoClient.swift:49 — OnlySwitchRemote/Dependencies/RemoteReviewDemoClient.swift:49-57 | OnlySwitchRemote/Dependencies/RemoteReviewDemoClient.swift:349-356 — 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 `OnlySwitchRemote/Dependencies/RemoteReviewDemoClient.swift:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) OnlyWidget/Widgets/Evolution/Intents/EvolutionEntity.swift:23 — OnlyWidget/Widgets/Evolution/Intents/EvolutionEntity.swift:23-29 | OnlyWidget/Widgets/Evolution/Intents/EvolutionEntity.swift:48-55 — 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 `OnlyWidget/Widgets/Evolution/Intents/EvolutionEntity.swift:23` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5–7 lines × 2) · ×1
  • Duplicated block (5–7 lines × 2) Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift:150 — Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift:150-156 | OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageView.swift:130-134 — 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 `Modules/Sources/OnlyAgent/CodexUsage/CodexUsageView.swift:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) OnlySwitch/Player/CommonPlayer/AudioSpectrum/SpectrumView.swift:35 — OnlySwitch/Player/CommonPlayer/AudioSpectrum/SpectrumView.swift:35-41 | OnlySwitch/Player/CommonPlayer/AudioSpectrum/SpectrumView.swift:54-59 — 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 `OnlySwitch/Player/CommonPlayer/AudioSpectrum/SpectrumView.swift:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) OnlySwitch/Features/RemoteAccess/Host/RemoteCredentialStore.swift:654 — OnlySwitch/Features/RemoteAccess/Host/RemoteCredentialStore.swift:654-658 | OnlySwitch/Features/RemoteAccess/Host/RemotePeerSession.swift:1043-1047 | OnlySwitchRemote/Dependencies/RemoteKeychainClient.swift:184-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. 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 (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:102 — Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift:102-110 | Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift:104-112 | Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAIService.swift:114-122 — before extracting anything, compare `Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeService.swift` and `Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiService.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) OnlySwitch/EverySwitch/AutohideDockSwitch.swift:36 — OnlySwitch/EverySwitch/AutohideDockSwitch.swift:36-47 | OnlySwitch/EverySwitch/AutohideMenuBarSwitch.swift:36-48 | OnlySwitch/EverySwitch/DarkModeSwitch.swift:26-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) OnlySwitch/EverySwitch/DockRecentSwitch.swift:16 — OnlySwitch/EverySwitch/DockRecentSwitch.swift:16-25 | OnlySwitch/EverySwitch/HiddenFilesSwitch.swift:21-30 | OnlySwitch/EverySwitch/ShowExtensionNameSwitch.swift:16-25 | OnlySwitch/EverySwitch/ShowFinderPathbarSwitch.swift:16-24 — 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 all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) OnlySwitch/EverySwitch/DockRecentSwitch.swift:32 — OnlySwitch/EverySwitch/DockRecentSwitch.swift:32-44 | OnlySwitch/EverySwitch/HiddenDesktopSwitch.swift:32-43 | OnlySwitch/EverySwitch/HiddenFilesSwitch.swift:36-48 | OnlySwitch/EverySwitch/ShowExtensionNameSwitch.swift:32-43 | OnlySwitch/EverySwitch/ShowFinderPathbarSwitch.swift:31-42 | OnlySwitch/EverySwitch/SmallLaunchpadIconSwitch.swift:36-47 — 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 all 6 call sites, so a change lands once.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking Modules/Sources/Extensions/Task++.swift:11 — `sleep` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
Minor — 39 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×13
  • Orphaned file Modules/Sources/Authenticator/OtpAuthImport.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Planning/TaskPlanner.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file OnlySwitch/Features/SoundMixer/SoundMixerService.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/Extensions/KeychainStorageKey.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAISettingReducer.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAISettingView.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/Utilities/KeychainManager.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/Extensions/KeychainManager.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiSettingReducer.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Planning/TaskContext.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Settings/ClaudeSettings/ClaudeSettingReducer.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Observation/StateObserver.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Modules/Sources/OnlyAgent/Settings/GeminiSettings/GeminiSettingView.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X10 · Duplicated predicate · Duplicated predicate · ×11
  • Duplicated predicate OnlySwitch/EverySwitch/KeepAwakeSwitch.swift:134 — `endTimeToday >= nowTimeInterval - 1 && endTimeToday <= nowTimeInterval + 1` appears character-identically in 2 files — OnlySwitch/EverySwitch/KeepAwakeSwitch.swift, OnlySwitch/EverySwitch/NightShiftSwitch.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 OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsagePresentation.swift:7 — `horizontalSizeClass == .regular && availableWidth >= 700` appears character-identically in 2 files — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsagePresentation.swift, OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsagePresentation.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 Modules/Sources/XcodeCleaner/CleanerBatchConfirmationView.swift:18 — `item.category == .simulatorDevice || item.category == .simulatorRuntime` appears character-identically in 2 files — Modules/Sources/XcodeCleaner/CleanerBatchConfirmationView.swift, Modules/Sources/XcodeCleaner/XcodeCleanerView.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 OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:116 — `self == .unavailable || self == .invalidResponse || self == .serverFailure` appears character-identically in 2 files — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift, OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.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 Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift:72 — `snapshot.session == nil && snapshot.weekly == nil && snapshot.models.isEmpty` appears character-identically in 2 files — Modules/Sources/OnlyAgent/ClaudeUsage/ClaudeUsageView.swift, OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageView.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 OnlySwitch/EverySwitch/KeepAwakeSwitch.swift:139 — `startTimeToday >= nowTimeInterval - 1 && startTimeToday <= nowTimeInterval + 1` appears character-identically in 2 files — OnlySwitch/EverySwitch/KeepAwakeSwitch.swift, OnlySwitch/EverySwitch/NightShiftSwitch.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 OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:98 — `state.activeRequestID != nil || state.isLoading` appears character-identically in 2 files — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift, OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.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 OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift:39 — `state.selectedMacID != macID || state.authenticatedSessionID != sessionID` appears character-identically in 2 files — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageFeature.swift, OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageFeature.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 Modules/Sources/Extensions/KeychainManager.swift:85 — `status == errSecSuccess || status == errSecItemNotFound` appears character-identically in 4 files — Modules/Sources/Extensions/KeychainManager.swift, Modules/Sources/Utilities/KeychainManager.swift, OnlySwitch/Features/RemoteAccess/Host/RemoteCredentialStore.swift, OnlySwitchRemote/Dependencies/RemoteKeychainClient.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 OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageView.swift:18 — `store.isLoading || store.selectedMacID == nil || store.authenticatedSessionID == nil` appears character-identically in 2 files — OnlySwitchRemote/Features/ClaudeUsage/RemoteClaudeUsageView.swift, OnlySwitchRemote/Features/CodexUsage/RemoteCodexUsageView.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 OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift:31 — `type != .xcodeCleaner && type != .appUninstaller && type != .tailscale` appears character-identically in 3 files — OnlySwitch/Features/RemoteAccess/Catalog/RemoteCatalogProvider+Live.swift, OnlySwitch/Features/RemoteAccess/Commands/RemoteCommandRouter+Live.swift, OnlySwitch/Features/RemoteAccess/Commands/RemoteCommandRouter.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 · ×5
  • Silent fallback default in catch Modules/Sources/Extensions/String++.swift:92 — `groups` turns every thrown error into `[]` — 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.
  • Silent fallback default in catch Modules/Sources/Extensions/LocalizedString++.swift:79 — `regulayExpression` turns every thrown error into `[]` — 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.
  • Silent fallback default in catch OnlySwitch/EverySwitch/XcodeCacheSwitch.swift:52 — `currentInfo` turns every thrown error into `""` — 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.
  • Silent fallback default in catch OnlySwitch/Utilities/BluetoothDevicesManager.swift:65 — `getAirPodsBattery` turns every thrown error into `""` — 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.
  • Silent fallback default in catch OnlyWidget/Widgets/Evolution/Intents/EvolutionEntity.swift:30 — `allEvolutions` turns every thrown error into `[]` — 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.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×3
  • Hand-rolled JSON/XML parsing via regex Modules/Sources/RemoteCore/AphroditeRemoteModels.swift:11 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Swift code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex Modules/Sources/Aphrodite/AphroditeIconValidation.swift:7 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Swift code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex Modules/Sources/Aphrodite/AphroditeReducer.swift:401 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Swift code already uses a real parser in the same package; use it here too.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (39211 LoC, 730 module-visible types across 83 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.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 13 of 260 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 260 of the 567 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: Modules/Sources/Authenticator/OtpAuthImport.swift, Modules/Sources/OnlyAgent/Planning/TaskPlanner.swift, OnlySwitch/Features/SoundMixer/SoundMixerService.swift, Modules/Sources/Extensions/KeychainStorageKey.swift, Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAISettingReducer.swift, Modules/Sources/OnlyAgent/Settings/OpenAISettings/OpenAISettingView.swift, Modules/Sources/Extensions/KeychainManager.swift, Modules/Sources/Utilities/KeychainManager.swift (and 5 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 371/520 types (71%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
P10 · Library API & versioning · No explicit versioning · ×1
  • No explicit versioning Modules/Package.swift — No explicit version was found for the SwiftPM library declared by `Package.swift`. This check read nothing in Package.swift, which has no version field, and a CHANGELOG/CHANGES/HISTORY/NEWS/RELEASES file with a semver heading, or release tooling (changesets, release-please, semantic-release, goreleaser, cargo-release, bump2version, standard-version, git-cliff) in the library's directory or at the repository root, or a semver release tag (or a Drupal `8.x-1.2` release tag) in the repository. A version computed where none of those can see is invisible here. A published library needs explicit semantic versioning so consumers can reason about breaking changes.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — 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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
Minor — 38 finding(s)
D12 · Dependency Hygiene · Outdated · ×35
  • Outdated: abseil-cpp-binary — `abseil-cpp-binary` is resolved at 1.2024072200.0, but 1.2025051202.0 is the newest release tagged on https://github.com/google/abseil-cpp-binary.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update abseil-cpp-binary` reaches this one with no change to Package.swift.
  • Outdated: aiproxyswift — `aiproxyswift` is resolved at 0.146.0, but 0.157.0 is the newest release tagged on https://github.com/lzell/AIProxySwift within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update aiproxyswift` reaches this one with no change to Package.swift.
  • Outdated: alamofire — `alamofire` is resolved at 5.5.0, but 5.12.2 is the newest release tagged on https://github.com/Alamofire/Alamofire within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update alamofire` reaches this one with no change to Package.swift.
  • Outdated: alamofire — `alamofire` is resolved at 5.5.0, but 5.12.2 is the newest release tagged on https://github.com/Alamofire/Alamofire.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update alamofire` reaches this one with no change to Package.swift.
  • Outdated: app-check — `app-check` is resolved at 11.2.0, but 11.3.2 is the newest release tagged on https://github.com/google/app-check.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update app-check` reaches this one with no change to Package.swift.
  • Outdated: combine-schedulers — `combine-schedulers` is resolved at 1.0.2, but 1.2.2 is the newest release tagged on https://github.com/pointfreeco/combine-schedulers within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update combine-schedulers` reaches this one with no change to Package.swift.
  • Outdated: firebase-ios-sdk — `firebase-ios-sdk` is resolved at 12.6.0, but 12.19.3 is the newest release tagged on https://github.com/firebase/firebase-ios-sdk.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update firebase-ios-sdk` reaches this one with no change to Package.swift.
  • Outdated: firebase-ios-sdk — `firebase-ios-sdk` is resolved at 12.6.0, but 12.19.3 is the newest release tagged on https://github.com/firebase/firebase-ios-sdk within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update firebase-ios-sdk` reaches this one with no change to Package.swift.
  • Outdated: google-ads-on-device-conversion-ios-sdk — `google-ads-on-device-conversion-ios-sdk` is resolved at 3.2.0, but 3.7.0 is the newest release tagged on https://github.com/googleads/google-ads-on-device-conversion-ios-sdk within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update google-ads-on-device-conversion-ios-sdk` reaches this one with no change to Package.swift.
  • Outdated: googleappmeasurement — `googleappmeasurement` is resolved at 12.5.0, but 12.19.2 is the newest release tagged on https://github.com/google/GoogleAppMeasurement.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update googleappmeasurement` reaches this one with no change to Package.swift.
  • Outdated: googledatatransport — `googledatatransport` is resolved at 10.1.0, but 10.1.1 is the newest release tagged on https://github.com/google/GoogleDataTransport.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update googledatatransport` reaches this one with no change to Package.swift.
  • Outdated: googleutilities — `googleutilities` is resolved at 8.1.0, but 8.1.5 is the newest release tagged on https://github.com/google/GoogleUtilities.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update googleutilities` reaches this one with no change to Package.swift.
  • Outdated: grdb.swift — `grdb.swift` is resolved at 7.10.0, but 7.11.1 is the newest release tagged on https://github.com/groue/GRDB.swift.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grdb.swift` reaches this one with no change to Package.swift.
  • Outdated: grpc-binary — `grpc-binary` is resolved at 1.69.1, but 1.83.1 is the newest release tagged on https://github.com/google/grpc-binary.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grpc-binary` reaches this one with no change to Package.swift.
  • Outdated: gtm-session-fetcher — `gtm-session-fetcher` is resolved at 5.0.0, but 5.3.1 is the newest release tagged on https://github.com/google/gtm-session-fetcher.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update gtm-session-fetcher` reaches this one with no change to Package.swift.
  • Outdated: nanopb — `nanopb` is resolved at 2.30910.0, but 2.30910.1 is the newest release tagged on https://github.com/firebase/nanopb.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update nanopb` reaches this one with no change to Package.swift.
  • Outdated: networkimage — `networkimage` is resolved at 6.0.0, but 6.0.1 is the newest release tagged on https://github.com/gonzalezreal/NetworkImage within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update networkimage` reaches this one with no change to Package.swift.
  • Outdated: promises — `promises` is resolved at 2.4.0, but 2.4.1 is the newest release tagged on https://github.com/google/promises.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update promises` reaches this one with no change to Package.swift.
  • Outdated: sparkle — `sparkle` is resolved at 2.10.0, but 2.10.1 is the newest release tagged on https://github.com/sparkle-project/Sparkle within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update sparkle` reaches this one with no change to Package.swift.
  • Outdated: swift-case-paths — `swift-case-paths` is resolved at 1.7.0, but 1.10.0 is the newest release tagged on https://github.com/pointfreeco/swift-case-paths within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-case-paths` reaches this one with no change to Package.swift.
  • Outdated: swift-clocks — `swift-clocks` is resolved at 1.0.5, but 1.1.1 is the newest release tagged on https://github.com/pointfreeco/swift-clocks within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-clocks` reaches this one with no change to Package.swift.
  • Outdated: swift-collections — `swift-collections` is resolved at 1.1.1, but 1.7.5 is the newest release tagged on https://github.com/apple/swift-collections within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-collections` reaches this one with no change to Package.swift.
  • Outdated: swift-concurrency-extras — `swift-concurrency-extras` is resolved at 1.3.2, but 1.4.3 is the newest release tagged on https://github.com/pointfreeco/swift-concurrency-extras within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-concurrency-extras` reaches this one with no change to Package.swift.
  • Outdated: swift-custom-dump — `swift-custom-dump` is resolved at 1.3.3, but 1.7.3 is the newest release tagged on https://github.com/pointfreeco/swift-custom-dump within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-custom-dump` reaches this one with no change to Package.swift.
  • Outdated: swift-dependencies — `swift-dependencies` is resolved at 1.9.2, but 1.17.1 is the newest release tagged on https://github.com/pointfreeco/swift-dependencies within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-dependencies` reaches this one with no change to Package.swift.
  • + 10 more in this group — see findings.md.
D10 · Test Quality · Skipped (documented) · ×3
  • Skipped (documented): mapsStatusToRecoveryPresentation OnlySwitchTests/PrivilegedOperations/PrivilegedAccessViewModelTests.swift:11 — Skipped with a documented reason — a deferral, not lazy debt: Privileged access disabled
  • Skipped (documented): everySavedToolAppearsInManifestRegardlessOfLegacySharingKey Modules/Tests/ModulesTests/AphroditeRemoteSnapshotEncoderTests.swift:12 — Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait
  • Skipped (documented): obsoleteSharingBooleanDoesNotChangeDecodedApp Modules/Tests/ModulesTests/AphroditeTests.swift:1330 — Skipped with a documented reason — a deferral, not lazy debt: disabled by a .disabled(…) trait

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d8e46bda62ec402dae11dd41d6f67b39/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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d8e46bda62ec402dae11dd41d6f67b39/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .0artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.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 46 file(s) — `Modules/Sources/Aphrodite/AphroditeApp.swift`, `Modules/Sources/Aphrodite/AphroditeIconValidation.swift`, `Modules/Sources/Aphrodite/AphroditeReducer.swift`, `Modules/Sources/DesktopPet/DesktopPetController.swift`, `Modules/Sources/DesktopPet/DesktopPetLayout.swift`, … (+41 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a183d7-d424-7a56-9962-804c4de89919 · 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