Public report of uzairansaruzi/hermex, published 29 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, 29 October 2026, 13:02 UTC Β· Survey ID cd_f3e6f1e52a16403d83e3e6a3e1eba692

uzairansaruzi/hermex

Measured 29 October 2026, 12:57 UTC, at code version 15f89b6

No regression since the last survey Code coverage: not measuredTest reliability: not measured

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

Code coverage is not measured: Xcode and a simulator are needed to run it.

Test reliability is not measured: The suite is built by Xcode and needs an Apple platform to run.

CAI score 63out 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 large codebase: 135,128 lines of product code in 4 projects, tests not counted Β· Estimated rebuild effort: about 1.7 person-years Β· Weakest lens: Code Health, 58

Findings by how serious they are

6 critical 697 serious 16 minor

14 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
29 October 2026, 12:57 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 β–Έ

62of 62 dimensions measured by tools.
713of 719 findings point to an exact file and line, so you can open each one in the code. The other 6 concern the repository as a whole, such as missing documentation.
62dimensions across 7 lenses, read from 135,128 lines of product code in 4 projects.
Chapters

Executive summary

uzairansaruzi/hermex falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 63 out of 100 and is rated Adequate, and five of its six critical findings are security problems in the build pipeline and in its automatic dependency updates.

Code Health, at 58, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step for the work it takes is recording design decisions, worth about 3 points. Adopting a type checker would lift Code Health itself, worth about 4 points.

Four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One automatic update takes new releases before a bad one can be spotted. Pinning each tool to an exact version and setting a waiting period for automatic updates would close both risks. Moving the business rules into the object that owns the data would take care of the business object that only holds data.

The product code is 135,128 lines, about €250,000 to rebuild.

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

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

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Product code 60%Tests 40%
New since the last survey: 43 findings

These 43 critical or serious findings weren't in the previous survey, on 15 October 2026.

  • Cyclomatic Complexity Β· ChatViewModel.performChatSend (cyclomatic 23) HermesMobile/Features/Chat/ChatViewModel.swift
  • Cyclomatic Complexity Β· HermesConnection.beginSignIn (cyclomatic 21) HermesMobile/Networking/Hermes/HermesConnection.swift
  • Cyclomatic Complexity Β· ChatViewModel.toggleListening (cyclomatic 17) HermesMobile/Features/Chat/ChatViewModel.swift
  • Cyclomatic Complexity Β· ChatViewModel.sendMessage (cyclomatic 16) HermesMobile/Features/Chat/ChatViewModel.swift
  • Cognitive Complexity Β· ChatViewModel.performChatSend (cognitive 35) HermesMobile/Features/Chat/ChatViewModel.swift
  • Cognitive Complexity Β· ChatViewModel.sendMessage (cognitive 20) HermesMobile/Features/Chat/ChatViewModel.swift
  • Cognitive Complexity Β· TranscriptMediaThumbnailView.body (cognitive 20) HermesMobile/Features/Chat/TranscriptMediaView.swift
  • Cognitive Complexity Β· SessionListViewModel.searchHermes (cognitive 19) HermesMobile/Features/SessionList/SessionListViewModel.swift
  • Cognitive Complexity Β· ChatViewModel.toggleListening (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift
  • Cognitive Complexity Β· HermesSessionListView.regularWidthDetail (cognitive 16) HermesMobile/Features/SessionList/HermesSessionListView.swift
  • Cognitive Complexity Β· SessionListViewModel.changeHermesSession (cognitive 16) HermesMobile/Features/SessionList/SessionListViewModel.swift
  • God Classes Β· TooManyMethods: ComposerChipTextView HermesMobile/Features/Chat/ComposerChipTextView.swift
  • God Classes Β· FileTooLong: Hermes/HermesREST.swift HermesMobile/Networking/Hermes/HermesREST.swift
  • God Classes Β· ClassTooLong: ComposerChipTextView HermesMobile/Features/Chat/ComposerChipTextView.swift
  • God Classes Β· TooManyMethods: MoveToHermesModel HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift
  • God Classes Β· FileTooLong: MoveToHermes/MoveToHermesModel.swift HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift
  • Code Duplication Β· Members sharing a duplicated core (8 members, 50+ identical tokens) HermesMobile/Features/Chat/ChatComposerConfigLoader.swift
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift
  • Code Duplication Β· Duplicated block (12 lines × 3) HermesMobile/Models/ServerAccount.swift
  • Code Duplication Β· Duplicated block (7 lines × 2) HermesMobile/Features/Settings/AddServerView.swift
  • Code Duplication Β· Duplicated block (5 lines × 2) HermesMobile/Features/Chat/MarkdownMathFormatter.swift
  • Code Duplication Β· Duplicated block (5 lines × 2) HermesMobile/Networking/Hermes/HermesEnvironmentClient.swift
  • Test Quality Β· No assertions: testAMovesConnectionWaitsForARefreshRetiredAfterItWasMade HermesMobileTests/HermesConnectionTests.swift
  • Test Quality Β· No assertions: testTheServersOwnConnectionWaitsForAMovesRefreshClosedAfterItWasMade HermesMobileTests/HermesConnectionTests.swift
  • Test Quality Β· No assertions: testInlineCodeHeavyParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift
  • Test Quality Β· No assertions: testBareURLParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift
  • Test Quality Β· No assertions: testSchemelessWWWLinkParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift
  • Test Quality Β· No assertions: testSSEClientReportsTransportErrorWhenServerClosesStream HermesMobileTests/SSEClientTests.swift
  • Test Quality Β· No assertions: testInitialRefreshStartsBeforeDelayedDeepLinkFinishes HermesMobileTests/SessionNavigationStateTests.swift
  • Test Quality Β· No assertions: testRegularHermesSessionsOwnsASplit HermesMobileTests/SessionNavigationStateTests.swift
  • Test Quality Β· No assertions: testCompactHermesSessionsStillPushesInItsCallerStack HermesMobileTests/SessionNavigationStateTests.swift
  • Test Quality Β· No assertions: testRegularBotsHomeOwnsASplit HermesMobileTests/SessionNavigationStateTests.swift
  • Test Quality Β· No assertions: testCompactBotsHomeKeepsItsCallerStack HermesMobileTests/SessionNavigationStateTests.swift
  • Test Quality Β· No assertions: testProfileSwitchKeepsTheOpenChat HermesMobileTests/SessionNavigationStateTests.swift
  • Test Quality Β· No assertions: testCachedToLiveFirstPageKeepsTheOpenChat HermesMobileTests/SessionNavigationStateTests.swift
  • Test Quality Β· No assertions: testReloadDroppingTheOpenChatOffThePageKeepsItOpen HermesMobileTests/SessionNavigationStateTests.swift
  • Churn × Complexity Hotspots Β· Repeated repair: HermesMobile/Networking/APIClient.swift HermesMobile/Networking/APIClient.swift
  • Churn × Complexity Hotspots Β· Repeated repair: HermesMobile/Features/Chat/MarkdownMathFormatter.swift HermesMobile/Features/Chat/MarkdownMathFormatter.swift
  • Change Coupling Β· Change coupling: ChatViewModel.swift ↔ HermesConversation.swift HermesMobile/Features/Chat/ChatViewModel.swift
  • Change Coupling Β· Change-coupling hub: ChatView.swift β†’ HermesConversation.swift, HermesMobileApp.swift, HermesCall.swift HermesMobile/Features/Chat/ChatView.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Networking/Hermes/HermesConnection.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Networking/Hermes/HermesGateway.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: 34 findings

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

  • Cyclomatic Complexity Β· HermesConversation.identify (cyclomatic 16) HermesMobile/Features/Hermes/HermesConversation.swift
  • Cyclomatic Complexity Β· MoveToHermesModel.scan (cyclomatic 16) HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift
  • God Classes Β· MethodTooLong: HermesREST.request HermesMobile/Networking/Hermes/HermesREST.swift
  • God Classes Β· MethodTooLong: HermesSessionListView.body HermesMobile/Features/SessionList/HermesSessionListView.swift
  • God Classes Β· MethodTooLong: BotsInboxView.attachPresentations HermesMobile/Features/Bots/BotsInboxView.swift
  • Code Duplication Β· Members sharing a duplicated core (7 members, 50+ identical tokens) HermesMobile/Features/Chat/ChatComposerConfigLoader.swift
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift
  • Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift
  • Code Duplication Β· Duplicated block (6 lines × 2) HermesMobile/Features/Chat/MarkdownMathFormatter.swift
  • Test Quality Β· Skipped test: testDelegationCompletionCardKeepsTheFullReportInItsSheet HermesMobileTests/BotChatPresentationTests.swift
  • Test Quality Β· Skipped test: testSaveVideoFileToPhotoLibraryIntegration HermesMobileTests/TranscriptMediaPreviewViewModelTests.swift
  • Test Quality Β· Skipped test: testInvalidVideoIsRejectedByPhotoLibraryIntegration HermesMobileTests/TranscriptMediaPreviewViewModelTests.swift
  • Test Quality Β· No assertions: testChatNavigationHasBackgroundAtScrollEdge HermesMobileTests/AdaptiveGlassTests.swift
  • Test Quality Β· No assertions: testABackwardsSeqRebuildsFromTheSnapshot HermesMobileTests/HermesChatTurnTests.swift
  • Test Quality Β· No assertions: testPollingDelayDoesNotRetainFeatureState HermesMobileTests/KanbanLiveUpdateTests.swift
  • Churn × Complexity Hotspots Β· Hotspot: HermesMobile/Features/Kanban/KanbanCardDetailView.swift HermesMobile/Features/Kanban/KanbanCardDetailView.swift
  • Churn × Complexity Hotspots Β· Hotspot: HermesMobile/Features/Kanban/KanbanCardEditorState.swift HermesMobile/Features/Kanban/KanbanCardEditorState.swift
  • Churn × Complexity Hotspots Β· Repeated repair: HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift
  • Change Coupling Β· Change coupling: ChatView.swift ↔ HermesCall.swift HermesMobile/Features/Chat/ChatView.swift
  • Change Coupling Β· Change coupling: ChatView.swift ↔ HermesMobileApp.swift HermesMobile/Features/Chat/ChatView.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/HermexPushProvisioner.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/BotsInboxView.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/BotSearchView.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/BotSearchView.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/BotRoomView.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Bots/BotRoomReader.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/InlineAudioPlayerView.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesSlashCommands.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesDelegatedWork.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesDelegatedWork.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/HermesChatSideTasks.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/FilePathSearch.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/FilePathSearch.swift
  • Exception handling Β· Swallowed exception (caught, then discarded) HermesMobile/Features/Chat/CustomAttachmentPicker.swift
Rebuild cost: about €250,000 Β· Estimate
Cost to rebuild€84,000 to €420,000, for 1,407 to 4,465 hours of work, about 1.7 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 63. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 135,128 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 No ADRs found finding(s) in ADR Quality.
Raises the score by about 3 points Β· Low effort Β· ADR Quality
2
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s β€” `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`.
Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out β€” narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.
Raises the score by about 4 points Β· Medium effort Β· Nullable reference types
3
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.
Raises the score by about 3 points Β· Medium effort Β· Architecture documentation

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 €250,000 to build again, about 1.7 person-years of work. Its weakest lens is Code Health, at 58 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first Β· First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 ADR 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

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 HermesLiveActivityWidget HermesLiveActivityWidget HermesMobile HermesMobile HermesNotificationService HermesNotificationService HermesShareExtension HermesShareExtension

At a glance β€” Code Health Β· 58% Β· Adequate Β· gated by X5 Β·

At a glance β€” Architecture Β· 90% Β· Adequate Β· gated by D26 Β·

At a glance β€” Maturity Β· 61% Β· Adequate Β· gated by M2 Β·

At a glance β€” Readiness Β· 60% Β· Adequate Β· gated by P3, P4 Β·

At a glance β€” Security Β· 96% Β· Exemplary Β·

At a glance β€” Domain Modelling Β· 89% Β· Strong Β·

At a glance β€” Performance Β· 77% Β· Strong Β·

Security & Compliance β€” OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 β€” Injection6High / Critical

Roadmap

Begin by adopting a type checker to systematically eliminate nil risks file by file, ensuring every assertion is justified by narrowed logic. Simultaneously, establish a practice of documenting significant design decisions in a dedicated folder to preserve architectural context. Next, automate your release process in CI to guarantee that deployments are repeatable and easily reversible. Finally, address the widespread issue of swallowed exceptions by ensuring all errors are properly handled or logged rather than discarded.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+3.3 ptsLowADR Quality
Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s β€” `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out β€” narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.+3.6 ptsMediumNullable reference types
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.7 ptsMediumArchitecture documentation
Automate the release in CI β€” a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact β€” so releases are repeatable and reversible.+2.4 ptsMediumDeployment & Rollback
Swallowed exception (caught, then discarded)+2.1 ptsMediumException handling
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) β€” or `semgrep --config=auto`, which runs on any language β€” so a security regression fails the build instead of landing.+2.0 ptsMediumSecurity & performance tooling
Raise allocation-aware density on the hot paths β€” currently 10 use(s) across 148,547 production line(s) (~0.1/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.+1.1 ptsMediumAllocation hygiene
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity β€” start with HermesREST.request (cyclomatic 176).+0.5 ptsMediumCyclomatic Complexity

File quality

Per-file score 0–10 β€” a quality signature. Of 179 files carrying findings, judged against the Production bar: 0% slop Β· 64% mixed Β· 36% near-clean.

FileScoreBandWorst signal
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
HermesMobile/Features/Chat/ChatViewModel.swift5.5MixedCyclomatic Complexity: ChatViewModel.submitHermesPrompt (cyclomatic 26)
HermesMobile/Features/Chat/ChatView.swift5.5MixedCyclomatic Complexity: ChatView.sendDraftMessage (cyclomatic 23)
HermesMobile/Features/Chat/ChatComposerView.swift5.5MixedCyclomatic Complexity: MessageComposerView.composerWithLifecycle (cyclomatic 30)
HermesMobile/Features/Chat/ResponseSelectionInput.swift5.9MixedCyclomatic Complexity: ResponseSelectionInput.document (cyclomatic 16)
HermesMobile/Features/Chat/ComposerChipTextView.swift5.9MixedGod Classes: TooManyMethods: ComposerChipTextView
HermesMobile/Features/Chat/ChatComposerTextInputView.swift6.3MixedCyclomatic Complexity: Coordinator.syncFocus (cyclomatic 17)
HermesMobile/Features/Chat/ChatStreamCoordinator.swift7.0MixedCyclomatic Complexity: ChatStreamCoordinator.handle (cyclomatic 44)
HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift7.0MixedCyclomatic Complexity: HermesChatTurnCoordinator.apply (cyclomatic 42)
HermesMobile/Features/SessionList/SessionListViewModel.swift7.0MixedCyclomatic Complexity: SessionListViewModel.reloadHermes (cyclomatic 33)
HermesMobile/LiveActivities/AgentLiveActivityManager.swift7.0MixedCyclomatic Complexity: AgentLiveActivityManager.update (cyclomatic 27)
HermesMobile/Persistence/ChatDraftStore.swift7.0MixedCyclomatic Complexity: ChatDraftStore.stageAttachment (cyclomatic 27)
HermesMobile/Features/Kanban/KanbanFeatureState.swift7.0MixedCyclomatic Complexity: KanbanFeatureState.refreshBoard (cyclomatic 26)
HermesMobile/Features/Bots/BotInbox.swift7.0MixedCyclomatic Complexity: BotInbox.open (cyclomatic 32)
HermesMobile/Features/SessionList/SessionListView.swift7.0MixedCyclomatic Complexity: SessionListView.body (cyclomatic 25)
HermesMobile/Features/Onboarding/OnboardingViewModel.swift7.0MixedCyclomatic Complexity: OnboardingViewModel.addHermesServer (cyclomatic 20)
HermesMobile/Features/SessionList/HermesSessionListView.swift7.0MixedCyclomatic Complexity: HermesSessionListView.body (cyclomatic 18)
HermesMobile/Features/SessionList/SessionListComponents.swift7.0MixedCyclomatic Complexity: SessionRowContextMenu.body (cyclomatic 18)
HermesMobile/Features/Kanban/KanbanCardDetailView.swift7.0MixedCognitive Complexity: KanbanCardDetailContent.mutationSection (cognitive 26)
HermesMobileTests/SessionNavigationStateTests.swift7.0MixedTest Quality: No assertions: testInitialRefreshStartsBeforeDelayedDeepLinkFinishes

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 β€” 6

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 β€” 697

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 β€” 16

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

Could not be resolved β€” 14

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. 62 of 62 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 β€” 62 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D17D20D26D28D29D30D34D35D37D43AX10AX3AX4AX8AX9DM4DM5DM6M1M2M3M4P1P2P3P4P6PF2PF3X1X12X13X14X15X16X17X18X19X21X22X23X24X25X26X27X28X29X3X30X5

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, 713 of 719 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 01a187bd-17d7-79cd-9d03-18e0f58fdb28.

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.

  • 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 (28 contributor(s) across 580 commit(s) sampled, automation and bot accounts excluded). One of them holds 91% of the history; the other 27 hold 0.3% 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.
  • D21 Naming Consistency β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run β€” this says nothing about whether its names are consistent.
  • D22 Internal API Consistency β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises β€” so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker β€” not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
  • 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. `HermesMobile/AppIntents/ProfileEntity.swift`, `HermesMobile/Auth/AppLock.swift`, `HermesMobile/Auth/AuthManager.swift`, `HermesMobile/ContentView.swift`, `HermesMobile/Features/Bots/BotConnectionView.swift`, … (+49 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.
  • 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: a native UI project (HermesMobile.xcodeproj/project.pbxproj). 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.
  • GD1 Unfinished & placeholder code β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Swift is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β€” not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs β€” not measured this run β€” Watchdog could not measure this here. That is a gap on our side β€” a collector, parser or image we have not built yet β€” and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Swift is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β€” not a finding that the repository is free of what this check looks for.
  • 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.
  • 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.
  • 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 named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach β€” not a finding that the repository is free of what this check looks for.
  • 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. 14 further occurrence(s) are not listed individually; the score already reflects all 54.

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.
  • 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.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body β€” a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present β€” it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see β€” only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) β€” controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

123 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was HermesREST.request at 176. A further 13 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 Endpoint.path at 129 β€” they are counted neither in the figure above nor in this dimension's score. 7 files carry no cyclomatic complexity row at all for this reason β€” every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: HermesMobile/Features/Chat/ProviderGlyph.swift (ProviderGlyphKind.resolve at 34), HermesMobile/Networking/Bots/BotProtocol.swift (BotFailure.errorDescription at 22), HermesMobile/Models/Session.swift (SessionSummary.sourceDisplayLabel at 20), HermesMobile/Networking/SSEClient.swift (SSEEventDecoder.decode at 19), HermesMobile/Features/Bots/BotProfileAppearance.swift (BotAvatarExpression.geometry at 17), and 2 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

HermesREST.request (cyclomatic 176)HermesMobile/Networking/Hermes/HermesREST.swift:362
HermesCall.admit (cyclomatic 107)HermesMobile/Networking/Hermes/HermesCall.swift:541
HermesCall.params (cyclomatic 82)HermesMobile/Networking/Hermes/HermesCall.swift:354
Endpoint.queryItems (cyclomatic 58)HermesMobile/Networking/Endpoints.swift:411
BotRoomView.body (cyclomatic 50)HermesMobile/Features/Bots/BotRoomView.swift:32

+ 118 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 Cyclomatic Complexity β€” start with HermesREST.request (cyclomatic 176). β€” Refactoring it lifts Cyclomatic Complexity from 5.4 to about 5.8/10.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D2 Β· Cognitive Complexity5.6 / 10Adequateβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 5.6 / 10 Β· rule-coverage 100% Β· ceiling Prevented

204 method(s) exceeded the cognitive complexity threshold of 15; the worst was HermesREST.request at 142.

HermesREST.request (cognitive 142)HermesMobile/Networking/Hermes/HermesREST.swift:362
ChatStreamCoordinator.performReconnectIfNeeded (cognitive 81)HermesMobile/Features/Chat/ChatStreamCoordinator.swift:484
HermesCall.admit (cognitive 66)HermesMobile/Networking/Hermes/HermesCall.swift:541
SessionListViewModel.reloadHermes (cognitive 62)HermesMobile/Features/SessionList/SessionListViewModel.swift:1941
BotChatControls.apply (cognitive 61)HermesMobile/Features/Bots/BotChatControls.swift:149

+ 199 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 HermesREST.request (cognitive 142). β€” Refactoring it lifts Cognitive Complexity from 5.6 to about 5.8/10.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

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

96 god class(es) detected.

FileTooLong: Chat/ChatViewModel.swift Β· Γ—34HermesMobile/Features/Chat/ChatViewModel.swift
TooManyMethods: ChatViewModel Β· Γ—25HermesMobile/Features/Chat/ChatViewModel.swift:219
ClassTooLong: ChatViewModel Β· Γ—21HermesMobile/Features/Chat/ChatViewModel.swift:219
MethodTooLong: Endpoint.path Β· Γ—16HermesMobile/Networking/Endpoints.swift:150

What to do

  1. Resolve the 34 FileTooLong finding(s) in God Classes β€” start with ChatViewModel.swift, ChatView.swift, KanbanLabView.swift. β€” One of this dimension's main actionable groups (34 warning-level).
  2. Resolve the 25 TooManyMethods finding(s) in God Classes β€” start with ChatViewModel.swift, APIClient.swift, KanbanFeatureState.swift. β€” One of this dimension's main actionable groups (25 warning-level).
  3. Resolve the 21 ClassTooLong finding(s) in God Classes β€” start with ChatViewModel.swift, ChatView.swift, KanbanFeatureState.swift. β€” One of this dimension's main actionable groups (21 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D4 Β· Code Duplication9.5 / 10Stronggated by 133 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.5 / 10 Β· rule-coverage 100% Β· ceiling Verified

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

Duplicated block (7 lines × 2) Β· Γ—14HermesMobile/Features/Bots/BotPendingRequestCard.swift:313
Duplicated block (9 lines × 2) Β· Γ—11HermesMobile/Features/Bots/BotCreateView.swift:261
Duplicated block (5 lines × 2) Β· Γ—11HermesMobile/Features/Chat/MessageBubbleView.swift:327
Duplicated block (8 lines × 2) Β· Γ—9HermesMobile/Features/Bots/BotCreateView.swift:234
Duplicated block (17 lines × 2) Β· Γ—8HermesMobile/Features/Chat/CameraPickerView.swift:492

+ 42 more group(s) β€” more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication β€” start with KanbanCardDetailView.swift (2), BotPendingRequestCard.swift, ChatTranscriptSupportingViews.swift. β€” One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 11 Duplicated block (9 lines × 2) finding(s) in Code Duplication β€” start with TranscriptMediaView.swift (2), BotCreateView.swift, ChatViewModel.swift. β€” One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 11 Duplicated block (5 lines × 2) finding(s) in Code Duplication β€” start with MessageBubbleView.swift, KanbanCardDetailView.swift, GitDiffView.swift. β€” One of this dimension's main actionable groups (11 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D5 Β· Coupling10.0 / 10Exemplaryβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

4 production modules (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, and main-sequence distance (abstractness) is not computed for these modules yet.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d5_recommendation.md.

D6 Β· Cohesion (LCOM4)9.7 / 10Stronggated by 4 serious findingsβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.7 / 10 Β· rule-coverage 100% Β· ceiling Verified

4 of 146 classes have LCOM4 above 3.

Low cohesion: Coordinator (LCOM4 6) Β· Γ—4HermesMobile/Features/Chat/ChatComposerTextInputView.swift:302

What to do

  1. Resolve the 4 Low cohesion finding(s) in Cohesion (LCOM4) β€” start with ChatComposerTextInputView.swift, ComposerChipTextView.swift, ResponseSelectionInput.swift. β€” One of this dimension's main actionable groups (4 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Verified β€” provenance only; does not change the score.

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

D9 Β· Test 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

3139 test methods: 3139 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 75 test function(s) across 7 file(s) declaring at least one β€” every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d9_recommendation.md.

D10 Β· Test Quality9.8 / 10Stronggated by 32 serious findingsβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.8 / 10 Β· rule-coverage 100% Β· ceiling Prevented

3 skipped, 29 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3064 tests.

No assertions: testChatNavigationHasOpaqueBackgroundWhenTransparencyIsReduced Β· Γ—29HermesMobileTests/AdaptiveGlassTests.swift:38
Skipped test: testPinFileMatchesRuntimeConstant Β· Γ—3HermesMobileTests/BotConnectionVersionTests.swift:15

What to do

  1. Resolve the 29 No assertions finding(s) in Test Quality β€” start with SessionNavigationStateTests.swift (8), HermesChatTurnTests.swift (3), HermexPushProvisioningTests.swift (3). β€” One of this dimension's main actionable groups (29 warning-level).
  2. Resolve the 3 Skipped test finding(s) in Test Quality β€” start with BotConnectionVersionTests.swift, LocalizationCatalogTests.swift, PushRegistrationTests.swift. β€” One of this dimension's main actionable groups (3 warning-level).
  3. Enforce Test Quality in CI to reach Verified (currently Documented). β€” Hardens enforcement from Documented toward Prevented β€” provenance only; does not change the score.

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

D12 Β· Dependency Hygiene10.0 / 10Exemplaryβœ“ 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 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d12_recommendation.md.

D13 Β· Secret Scanning10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Prevented

Secret scan ran and found no leaked secrets.

βœ“ On the Gold path β€” maintain.

Detailed fixes: d13_recommendation.md.

D14 Β· License Compliance10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Verified

0 of 8 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 7 of them read from the licence file the repository carries at the revision Package.resolved pins, and 1 β€” 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. 1 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.2 / 10Stronggated by 60 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.2 / 10 Β· rule-coverage 100% Β· ceiling Documented

Top hotspots: HermesMobile/Networking/Hermes/HermesREST.swift (41×176=7216); HermesMobile/Networking/Hermes/HermesCall.swift (25×107=2675); HermesMobile/Features/Chat/ChatView.swift (99×23=2277) Repeated repair below the complexity floor: HermesMobile/Models/ServerCatalog.swift (5 of 6 changes were fixes); HermesMobile/Features/Chat/ChatPendingActionCoordinator.swift (3 of 5 changes were fixes); HermesMobile/Networking/APIClient.swift (3 of 5 changes were fixes)

Hotspot: HermesMobile/Networking/Hermes/HermesREST.swift Β· Γ—50HermesMobile/Networking/Hermes/HermesREST.swift:362
Repeated repair: HermesMobile/Models/ServerCatalog.swift Β· Γ—10HermesMobile/Models/ServerCatalog.swift:435

What to do

  1. Resolve the 50 Hotspot finding(s) in Churn × Complexity Hotspots β€” start with HermesREST.swift, HermesCall.swift, ChatView.swift. β€” One of this dimension's main actionable groups (50 warning-level).
  2. Resolve the 10 Repeated repair finding(s) in Churn × Complexity Hotspots β€” start with ServerCatalog.swift, ChatPendingActionCoordinator.swift, APIClient.swift. β€” One of this dimension's main actionable groups (10 warning-level).

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

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 135128 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

1 of 1 build units (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)8.0 / 10Adequategated by 5 critical findingsβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 8.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

6 finding(s): 0 critical, 5 high, 1 medium, 0 low. 4 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` β€” one pinning decision is charged once, not once per lens. semgrep hit a parse error in 15 file(s) β€” `HermesMobile/Auth/AppLock.swift` (line 207, line 208, line 209, …), `HermesMobile/Auth/AuthManager.swift` (line 157), `HermesMobile/Features/Chat/ChatView.swift` (line 2445), `HermesMobile/Features/Chat/ChatViewModel.swift`, `HermesMobile/Features/Kanban/KanbanFeatureState.swift` (line 1761), … (+10 more) β€” so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) β€” start with REDACTED. β€” One of this dimension's main actionable groups (1 warning-level).
  3. No action in Static Analysis (SAST) β€” all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. β€” One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md Β· top locations in Appendix A, every location in findings.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 Freshness10.0 / 10Exemplaryβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d34_recommendation.md.

D35 Β· Change Coupling9.8 / 10Stronggated by 3 serious findingsβœ“ Tool-verified

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

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 9.8 / 10 Β· rule-coverage 100% Β· ceiling Documented

Strongest change-coupling: ChatViewModel.swift↔HermesConversation.swift 64%; ChatView.swift↔HermesConversation.swift 55%; ChatView.swift↔HermesCall.swift 50%

Change coupling: ChatViewModel.swift ↔ HermesConversation.swift Β· Γ—2HermesMobile/Features/Chat/ChatViewModel.swift:1
Change-coupling hub: ChatView.swift β†’ HermesConversation.swift, HermesMobileApp.swift, HermesCall.swiftHermesMobile/Features/Chat/ChatView.swift

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling β€” start with ChatViewModel.swift, ChatComposerView.swift. β€” One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling β€” start with ChatView.swift. β€” One of this dimension's main actionable groups (1 warning-level).

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

D37 Β· Vulnerability-disclosure Policy10.0 / 10Exemplaryβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d37_recommendation.md.

D43 Β· Malicious Dependencies10.0 / 10Exemplaryβœ“ Tool-verified

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

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

Maturity: Documented β†’ Verified β†’ Prevented Β· effective 10.0 / 10 Β· rule-coverage 100% Β· ceiling Documented

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

βœ“ On the Gold path β€” maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 Β· Code composition9.7 / 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 β€” check that business logic isn't leaking into the application/infrastructure layers (a thin domain is the anemic-domain smell).
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.

DM4 Β· Rich vs anemic domain model7.4 / 10Strongβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether domain entities own their behaviour β€” a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query β€” only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query β€” logic-bearing domain types outside the convention are invisible.

  • `String` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) β€” the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. β€” HermesMobile/Models/ANSIEscapes.swift:8

What to do

  • Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
DM5 Β· Encapsulated state10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether a reference entity protects its own invariants β€” a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state β€” public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 Β· Domain ↔ infrastructure boundary10.0 / 10Exemplaryβœ“ Tool-verified

Other Β· Domain Modelling β€” Whether the domain layer stays free of infrastructure dependencies β€” a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.

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

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

M1 Β· Documentation (README)6.7 / 10Adequateβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README β€” the high-level shape.
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 structure8.0 / 10Strongβœ“ Tool-verified

Maturity Β· Maturity β€” Whether the repo is organised deliberately β€” src/test separation and consistent project naming.

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

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

What to do

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

Maturity Β· Maturity β€” Whether the README actually describes the code that exists (LLM-judged, advisory).

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

P1 Β· CI/CD gates10.0 / 10Exemplaryβ—‹ Nothing flagged

Readiness Β· Readiness β€” Whether an automated pipeline builds and tests every change.

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

P2 Β· Observability8.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 tooling3.0 / 10Weakβœ“ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 16534 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. β€” REDACTED:24

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) β€” or `semgrep --config=auto`, which runs on any language β€” so a security regression fails the build instead of landing.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 Β· Deployment & Rollback2.0 / 10Criticalβœ“ Tool-verified

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

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

  • No release automation was found in CI β€” neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.

What to do

  • Automate the release in CI β€” a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact β€” so releases are repeatable and reversible.
P6 Β· Release Hygiene10.0 / 10Exemplaryβœ“ Tool-verified

Readiness Β· Readiness β€” Whether releases are traceable β€” a maintained changelog and explicit version stamping.

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

PF2 Β· Allocation hygiene6.0 / 10Adequateβœ“ Tool-verified

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

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

What to do

  • Raise allocation-aware density on the hot paths β€” currently 10 use(s) across 148,547 production line(s) (~0.1/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 hygiene10.0 / 10Exemplaryβœ“ Tool-verified

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

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

X1 Β· Async correctness10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 Β· Unreachable branch10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X13 Β· Undrained process stream10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X14 Β· Bypassable address classification10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X15 Β· Unvalidated length from an untrusted reader10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X16 Β· Unfloored truncation loop10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X17 Β· Uncapped recursion over a caller-supplied document10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Security β€” Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go β€” an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value β€” `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind β€” that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 Β· Disposal-pattern correctness10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a type's disposal matches what it OWNS β€” releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer β€” an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) β€” a class whose superclass or mixin lies outside the repository is not judged β€” and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 Β· Unrestored process-global state10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a method that temporarily changes state belonging to the whole process β€” the working directory, an environment variable β€” puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 Β· Side-effecting pattern guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X22 Β· Contradicted release guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X23 Β· Unguarded diagnostic materialisation10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X24 Β· Document value interpolated into markup unescaped10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X25 Β· Inert configuration knob10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X26 Β· Unsynchronised callback handoff10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X27 Β· Collection changed while being enumerated10.0 / 10Exemplaryβ—‹ Nothing flagged

Other Β· Code Health β€” Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone β€” CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a walk over a `Hash` or `Set` (`each`, `each_pair`, `map`, `for … in` and the other block walks) leaves it alone β€” Ruby refuses `rehash`, `replace`, `compare_by_identity` and `transform_keys!` on a Hash, and `reset`, `replace`, `compare_by_identity` and `map!` on a Set, while it is being iterated: the call raises `RuntimeError` at once and the remaining entries are never seen.

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

X28 Β· Index access outside its own emptiness guard10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X29 Β· Per-element action decided by a fixed element10.0 / 10Exemplaryβ—‹ Nothing flagged

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

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

X3 Β· Exception handling5.6 / 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. (×38) β€” HermesMobile/ContentView.swift:306, HermesMobile/Push/PushRegistrar.swift:582, HermesMobile/Push/PushRegistrar.swift:600, …
  • 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. (×2) β€” HermesMobile/Networking/Hermes/HermesBrowserSignIn.swift:81, HermesMobile/Features/SessionList/SessionListViewModel.swift:2132

What to do

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

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

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

X5 Β· Nullable reference types2.0 / 10Criticalβœ“ Tool-verified

Other Β· Code Health β€” Whether Ruby's type checker checks nil and is not undermined by assertions β€” a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.

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

  • This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 1 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.

What to do

  • Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s β€” `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out β€” narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.

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 Health58%Adequate β€” gated by X5Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Architecture90%Adequate β€” gated by D26Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Maturity61%Adequate β€” gated by M2Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Readiness60%Adequate β€” gated by P3, P4Capped at Fair by a Critical contributor β€” resolve it before relying on this lens.
Security96%ExemplaryStrongest area.
Domain Modelling89%StrongSolid.
Performance77%StrongSolid.
Unscored β€” 1 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 β€” 10 observation(s) recorded Β· Advisory β€” this card reports evidence and never carries a score.
Not evidenced β€” 2 control(s) we could not find positive evidence for

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

  • 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.
  • P5 DR & Backup β€” not evidenced β€” repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included β€” 59 check(s) not relevant to this codebase

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

  • AC1 Text alternatives β€” No web markup found β€” accessibility is not applicable to this repository.
  • AC2 Forms & labels β€” No web markup found β€” accessibility is not applicable to this repository.
  • AC3 Page structure β€” No web markup found β€” accessibility is not applicable to this repository.
  • AC4 Keyboard semantics β€” No web markup found β€” accessibility is not applicable to this repository.
  • AC5 ARIA correctness β€” No web markup found β€” accessibility is not applicable to this repository.
  • AC6 Visual & motion safety β€” No web markup found β€” accessibility is not applicable to this repository.
  • AC7 A11y enforcement β€” No web markup found β€” accessibility is not applicable to this repository.
  • AX1 Captive dependencies β€” Not applicable: this repository's Swift imports no dependency-injection container and defines no container of its own β€” nothing that both registers and resolves bindings, and nothing that names two lifetimes β€” so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons β€” No container singleton was found, so there is no shared instance for concurrent requests to race on. No 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 class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state 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 β€” no class or module declares an abstract method
  • 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.
  • C4 Data Retention β€” No personal data detected in a persisted data model β€” no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE β€” and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights β€” No personal data detected in a persisted data model β€” no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE β€” and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability β€” Test source is present (.swift) and this repository's suite is reachable only from an Apple platform: it ships HermesMobile.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not re-run. Not scored: nothing was exercised.
  • 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 β€” No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D21 Naming Consistency β€” Naming consistency is measured on C# only; Python, Ruby, Swift not measured.
  • D22 Internal API Consistency β€” The exposed public-API surface could not be collected β€” no C#/VB projects loaded.
  • D23 Boundary Type-Coupling β€” No bounded-context organisation was detected either β€” neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (β‰₯2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it β€” e.g. `architecture:` β†’ `contexts:` β†’ `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value β€” D24 reads C# and Visual Basic comments only β€” this repository's production source is .py, .rb, .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) β€” 54 file(s) were not parsed by semgrep β€” the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing β€” The CI pipeline builds and tests but publishes no released artifact β€” no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).
  • 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: this repository's test suite is reachable only from an Apple platform β€” it ships HermesMobile.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not run and no coverage was instrumented. Not scored. To have the real number read, 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.
  • DM1 Aggregate boundaries β€” not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) β€” reported as guidance rather than measured
  • DM2 Strongly-typed ids β€” no in-repo typed-id idiom β€” primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling β€” not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module β€” reported as guidance rather than measured
  • DM7 Repository granularity β€” not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable β€” reported as guidance rather than measured
  • ED2 Event/command shape β€” not scored β€” deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency β€” no mutating command handlers or message consumers detected β€” idempotency check not applicable
  • ES1 Event Sourcing β€” not scored β€” this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code β€” no source files were read β€” this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs β€” not analysed β€” these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty β€” Reported, not scored β€” and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience β€” not applicable β€” no HTTP server, API framework or worker entry point was found in the Python, Ruby, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations β€” no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage β€” 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.
  • 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.
  • 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 β€” This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-logger would be judged.
  • X6 Hand-rolled structured-format parsing β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand β€” Advisory β€” this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A β€” Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical β€” 6 finding(s)
D29 Β· Static Analysis (SAST) Β· REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
DM4 Β· Rich vs anemic domain model Β· Anemic domain model Β· Γ—1
  • Anemic domain model: String HermesMobile/Models/ANSIEscapes.swift:8 β€” `String` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) β€” the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Serious β€” 697 finding(s)
D15 Β· Churn × Complexity Hotspots Β· Hotspot Β· Γ—50
  • Hotspot: HermesMobile/Networking/Hermes/HermesREST.swift HermesMobile/Networking/Hermes/HermesREST.swift:362 β€” HermesMobile/Networking/Hermes/HermesREST.swift changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 176 in HermesREST.request at line 362. 5 of those changes were fix/bug commits, and the other 36 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesREST.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: HermesMobile/Networking/Hermes/HermesCall.swift HermesMobile/Networking/Hermes/HermesCall.swift:541 β€” HermesMobile/Networking/Hermes/HermesCall.swift changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 107 in HermesCall.admit at line 541. 5 of those changes were fix/bug commits, and the other 20 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesCall.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: HermesMobile/Features/Chat/ChatView.swift HermesMobile/Features/Chat/ChatView.swift:2567 β€” HermesMobile/Features/Chat/ChatView.swift changed 99 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ChatView.sendDraftMessage at line 2567. 25 of those changes were fix/bug commits, and the other 74 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatView.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: HermesMobile/Features/Chat/ChatViewModel.swift HermesMobile/Features/Chat/ChatViewModel.swift:3100 β€” HermesMobile/Features/Chat/ChatViewModel.swift changed 83 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ChatViewModel.submitHermesPrompt at line 3100. 27 of those changes were fix/bug commits, and the other 56 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatViewModel.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: HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1030 β€” HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in HermesChatTurnCoordinator.apply at line 1030. 5 of those changes were fix/bug commits, and the other 32 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/HermesChatTurnCoordinator.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: HermesMobile/Features/Chat/ChatComposerView.swift HermesMobile/Features/Chat/ChatComposerView.swift:567 β€” HermesMobile/Features/Chat/ChatComposerView.swift changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in MessageComposerView.composerWithLifecycle at line 567. 12 of those changes were fix/bug commits, and the other 31 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatComposerView.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: HermesMobile/Networking/Endpoints.swift HermesMobile/Networking/Endpoints.swift:150 β€” HermesMobile/Networking/Endpoints.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 129 in Endpoint.path at line 150. 3 of those changes were fix/bug commits, 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/Endpoints.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: HermesMobile/Features/Bots/BotRoomView.swift HermesMobile/Features/Bots/BotRoomView.swift:32 β€” HermesMobile/Features/Bots/BotRoomView.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in BotRoomView.body at line 32. 5 of those changes were fix/bug commits, and the other 15 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotRoomView.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: HermesMobile/Features/Chat/ChatStreamCoordinator.swift HermesMobile/Features/Chat/ChatStreamCoordinator.swift:802 β€” HermesMobile/Features/Chat/ChatStreamCoordinator.swift changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in ChatStreamCoordinator.handle at line 802. 10 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatStreamCoordinator.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: HermesMobile/Features/SessionList/SessionListView.swift HermesMobile/Features/SessionList/SessionListView.swift:208 β€” HermesMobile/Features/SessionList/SessionListView.swift changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in SessionListView.body at line 208. 9 of those changes were fix/bug commits, and the other 27 changed it for other reasons β€” this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one β€” a file this often edited pays the complexity back every time. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/SessionList/SessionListView.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: HermesMobile/Features/Bots/BotInbox.swift HermesMobile/Features/Bots/BotInbox.swift:337 β€” HermesMobile/Features/Bots/BotInbox.swift changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in BotInbox.open at line 337. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotInbox.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: HermesMobile/Networking/Bots/BotProtocol.swift HermesMobile/Networking/Bots/BotProtocol.swift:73 β€” HermesMobile/Networking/Bots/BotProtocol.swift changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in BotFailure.errorDescription at line 73. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/Bots/BotProtocol.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: HermesMobile/Features/SessionList/SessionListViewModel.swift HermesMobile/Features/SessionList/SessionListViewModel.swift:1941 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in SessionListViewModel.reloadHermes at line 1941. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/SessionList/SessionListViewModel.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: HermesMobile/Features/Chat/ChatTranscriptView.swift HermesMobile/Features/Chat/ChatTranscriptView.swift:689 β€” HermesMobile/Features/Chat/ChatTranscriptView.swift changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ChatTranscriptMessageBlock.== at line 689. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatTranscriptView.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: HermesMobile/Features/Bots/BotsInboxView.swift HermesMobile/Features/Bots/BotsInboxView.swift:147 β€” HermesMobile/Features/Bots/BotsInboxView.swift changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in BotsInboxView.list at line 147. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotsInboxView.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: HermesMobile/Features/Bots/BotConnectionView.swift HermesMobile/Features/Bots/BotConnectionView.swift:496 β€” HermesMobile/Features/Bots/BotConnectionView.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in BotConnectionSetup.connect at line 496. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotConnectionView.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: HermesMobile/Networking/Hermes/HermesConnection.swift HermesMobile/Networking/Hermes/HermesConnection.swift:196 β€” HermesMobile/Networking/Hermes/HermesConnection.swift changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in HermesConnection.beginSignIn at line 196. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesConnection.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: HermesMobile/Features/Bots/BotRoomReader.swift HermesMobile/Features/Bots/BotRoomReader.swift:108 β€” HermesMobile/Features/Bots/BotRoomReader.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in BotRoomReader.open at line 108. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotRoomReader.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: HermesMobile/Networking/Hermes/HermesGateway.swift HermesMobile/Networking/Hermes/HermesGateway.swift:205 β€” HermesMobile/Networking/Hermes/HermesGateway.swift changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in HermesGateway.send at line 205. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/Hermes/HermesGateway.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: HermesMobile/Features/Bots/BotConnection.swift HermesMobile/Features/Bots/BotConnection.swift:58 β€” HermesMobile/Features/Bots/BotConnection.swift changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in BotConnection.address at line 58. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Bots/BotConnection.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: HermesMobile/Features/SessionList/SessionListComponents.swift HermesMobile/Features/SessionList/SessionListComponents.swift:1139 β€” HermesMobile/Features/SessionList/SessionListComponents.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SessionRowContextMenu.body at line 1139. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/SessionList/SessionListComponents.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: HermesMobile/Features/SessionList/HermesSessionListView.swift HermesMobile/Features/SessionList/HermesSessionListView.swift:192 β€” HermesMobile/Features/SessionList/HermesSessionListView.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in HermesSessionListView.body at line 192. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/SessionList/HermesSessionListView.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: HermesMobile/ContentView.swift HermesMobile/ContentView.swift:132 β€” HermesMobile/ContentView.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ContentView.handleOpenURL at line 132. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/ContentView.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: HermesMobile/Features/Kanban/KanbanFeatureState.swift HermesMobile/Features/Kanban/KanbanFeatureState.swift:2472 β€” HermesMobile/Features/Kanban/KanbanFeatureState.swift changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in KanbanFeatureState.refreshBoard at line 2472. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Kanban/KanbanFeatureState.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: HermesMobile/LiveActivities/AgentLiveActivityManager.swift HermesMobile/LiveActivities/AgentLiveActivityManager.swift:391 β€” HermesMobile/LiveActivities/AgentLiveActivityManager.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AgentLiveActivityManager.update at line 391. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/LiveActivities/AgentLiveActivityManager.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.
  • + 25 more in this group β€” see findings.md.
X3 Β· Exception handling Β· Swallowed exception (caught, then discarded) Β· Γ—38
  • Swallowed exception (caught, then discarded) HermesMobile/ContentView.swift:306 β€” `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) HermesMobile/Push/PushRegistrar.swift:582 β€” `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) HermesMobile/Push/PushRegistrar.swift:600 β€” `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) HermesMobile/Persistence/ChatDraftStore.swift:1169 β€” `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) HermesMobile/Networking/Hermes/HermesConnection.swift:176 β€” `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) HermesMobile/Networking/Hermes/HermesConnection.swift:724 β€” `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) HermesMobile/Networking/Hermes/HermesGateway.swift:165 β€” `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) HermesMobile/Networking/Hermes/HermesGateway.swift:224 β€” `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) HermesMobile/Networking/Hermes/HermesGateway.swift:378 β€” `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) HermesMobile/Networking/Hermes/HermesGitClient.swift:303 β€” `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) HermesMobile/Networking/Hermes/HermesKanbanClient.swift:387 β€” `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) HermesMobile/Networking/Hermes/HermesSessionActions.swift:102 β€” `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) HermesMobile/Networking/Bots/BotArtifactDownload.swift:70 β€” `catch` takes every exception and records none of it β€” the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:882 β€” `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) HermesMobile/Features/Shared/ActionToast.swift:73 β€” `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) HermesMobile/Features/SessionList/SessionListView.swift:1241 β€” `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) HermesMobile/Features/SessionList/SessionListViewModel.swift:2118 β€” `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) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:391 β€” `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) HermesMobile/Features/MoveToHermes/MoveToHermesJournal.swift:186 β€” `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) HermesMobile/Features/MoveToHermes/MoveToHermesJournal.swift:193 β€” `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) HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:306 β€” `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) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:178 β€” `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) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:284 β€” `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) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:331 β€” `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) HermesMobile/Features/MoveToHermes/MoveToHermesScan.swift:225 β€” `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.
  • + 13 more in this group β€” see findings.md.
D3 Β· God Classes Β· FileTooLong Β· Γ—34
  • FileTooLong: Chat/ChatViewModel.swift HermesMobile/Features/Chat/ChatViewModel.swift β€” FileTooLong β€” 5800 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: ChatViewModel (221-7659). The bar is 500 significant lines; this is 5300 over it, 11.60× 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: Chat/ChatView.swift HermesMobile/Features/Chat/ChatView.swift β€” FileTooLong β€” 2763 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: ChatView (254-4038). The bar is 500 significant lines; this is 2263 over it, 5.53× 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: Kanban/KanbanLabView.swift HermesMobile/Features/Kanban/KanbanLabView.swift β€” FileTooLong β€” 2229 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1729 over it, 4.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Kanban/KanbanFeatureState.swift HermesMobile/Features/Kanban/KanbanFeatureState.swift β€” FileTooLong β€” 2216 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: KanbanFeatureState (353-3010). The bar is 500 significant lines; this is 1716 over it, 4.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β€” the parts that share the same inputs and are named together β€” into its own unit in a sibling file, and have the original call them.
  • FileTooLong: SessionList/SessionListViewModel.swift HermesMobile/Features/SessionList/SessionListViewModel.swift β€” FileTooLong β€” 1769 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: SessionListViewModel (88-2730). The bar is 500 significant lines; this is 1269 over it, 3.54× 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: SessionList/SessionListView.swift HermesMobile/Features/SessionList/SessionListView.swift β€” FileTooLong β€” 1408 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: SessionListView (83-1630). The bar is 500 significant lines; this is 908 over it, 2.82× 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: SessionList/SessionListComponents.swift HermesMobile/Features/SessionList/SessionListComponents.swift β€” FileTooLong β€” 1362 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 862 over it, 2.72× 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: Chat/ChatComposerView.swift HermesMobile/Features/Chat/ChatComposerView.swift β€” FileTooLong β€” 1102 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: MessageComposerView (142-1751). The bar is 500 significant lines; this is 602 over it, 2.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body β€” the parts that share the same inputs and are named together β€” into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Chat/HermesChatTurnCoordinator.swift HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift β€” FileTooLong β€” 1052 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 552 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Models/Kanban.swift HermesMobile/Models/Kanban.swift β€” FileTooLong β€” 901 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 401 over it, 1.80× 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: Chat/ComposerVoiceInputController.swift HermesMobile/Features/Chat/ComposerVoiceInputController.swift β€” FileTooLong β€” 891 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: ComposerVoiceInputController (15-927). The bar is 500 significant lines; this is 391 over it, 1.78× 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: Chat/ChatStreamCoordinator.swift HermesMobile/Features/Chat/ChatStreamCoordinator.swift β€” FileTooLong β€” 880 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: ChatStreamCoordinator (148-1336). The bar is 500 significant lines; this is 380 over it, 1.76× 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: LiveActivities/AgentLiveActivityManager.swift HermesMobile/LiveActivities/AgentLiveActivityManager.swift β€” FileTooLong β€” 880 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: AgentLiveActivityManager (182-1158). The bar is 500 significant lines; this is 380 over it, 1.76× 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: Chat/MarkdownRenderer.swift HermesMobile/Features/Chat/MarkdownRenderer.swift β€” FileTooLong β€” 879 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 379 over it, 1.76× 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: Persistence/ChatDraftStore.swift HermesMobile/Persistence/ChatDraftStore.swift β€” FileTooLong β€” 863 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 363 over it, 1.73× 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: MoveToHermes/MoveToHermesView.swift HermesMobile/Features/MoveToHermes/MoveToHermesView.swift β€” FileTooLong β€” 811 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 311 over it, 1.62× 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: SessionList/HermesSessionListView.swift HermesMobile/Features/SessionList/HermesSessionListView.swift β€” FileTooLong β€” 795 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: HermesSessionListView (34-866). The bar is 500 significant lines; this is 295 over it, 1.59× 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: Chat/ChatTranscriptSupportingViews.swift HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift β€” FileTooLong β€” 768 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 268 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Chat/CustomAttachmentPicker.swift HermesMobile/Features/Chat/CustomAttachmentPicker.swift β€” FileTooLong β€” 734 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 234 over it, 1.47× 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: Models/Session.swift HermesMobile/Models/Session.swift β€” FileTooLong β€” 727 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 227 over it, 1.45× 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: Chat/ChatTranscriptView.swift HermesMobile/Features/Chat/ChatTranscriptView.swift β€” FileTooLong β€” 721 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 221 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Chat/TranscriptMediaView.swift HermesMobile/Features/Chat/TranscriptMediaView.swift β€” FileTooLong β€” 695 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 195 over it, 1.39× 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: Chat/MessageBubbleView.swift HermesMobile/Features/Chat/MessageBubbleView.swift β€” FileTooLong β€” 615 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: MessageBubbleView (3-624). The bar is 500 significant lines; this is 115 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.
  • FileTooLong: Bots/BotsInboxView.swift HermesMobile/Features/Bots/BotsInboxView.swift β€” FileTooLong β€” 613 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 113 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Config/AppTheme.swift HermesMobile/Config/AppTheme.swift β€” FileTooLong β€” 593 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 93 over it, 1.19× 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.
  • + 9 more in this group β€” see findings.md.
D10 Β· Test Quality Β· No assertions Β· Γ—29
  • No assertions: testChatNavigationHasOpaqueBackgroundWhenTransparencyIsReduced HermesMobileTests/AdaptiveGlassTests.swift:38 β€” 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: testRoomSearchHitScrollsToItsSequenceAndDoesNotFollowNewMessages HermesMobileTests/BotChatPresentationTests.swift:188 β€” 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: testWarmRoomSearchShowsItsTargetBeforeRefreshing HermesMobileTests/BotChatPresentationTests.swift:192 β€” 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: testAttachmentAndSettingsUpdatesDoNotDisturbEachOtherOrText HermesMobileTests/ChatDraftStoreTests.swift:463 β€” 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: testQueuedMessagesMergeIntoEmptyDraft HermesMobileTests/ChatDraftStoreTests.swift:611 β€” 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: testHandlersThatCaptureTheOwnerDoNotOutliveIt HermesMobileTests/ChatScrollPolicyTests.swift:315 β€” 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: testAMissingSideSessionShowsTheResultUnavailable HermesMobileTests/HermesChatSideTaskTests.swift:433 β€” 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: testAGapRebuildsFromTheSnapshot HermesMobileTests/HermesChatTurnTests.swift:666 β€” 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: testARebuildKeepsNewDeltasThatRepeatTheReply HermesMobileTests/HermesChatTurnTests.swift:672 β€” 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: testARebuildDropsOnlyTheDeltasAfterTheReplayedText HermesMobileTests/HermesChatTurnTests.swift:682 β€” 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: testAMovesConnectionWaitsForARefreshRetiredAfterItWasMade HermesMobileTests/HermesConnectionTests.swift:636 β€” 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: testTheServersOwnConnectionWaitsForAMovesRefreshClosedAfterItWasMade HermesMobileTests/HermesConnectionTests.swift:646 β€” 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: testPassiveReadCannotReplaceAFinishedUpdate HermesMobileTests/HermexPushProvisioningTests.swift:1384 β€” 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: testPassiveReadCannotReplaceAFinishedRecheck HermesMobileTests/HermexPushProvisioningTests.swift:1388 β€” 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: testPassiveReadCannotReplaceAFinishedRestart HermesMobileTests/HermexPushProvisioningTests.swift:1392 β€” 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: testInlineCodeHeavyParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift:893 β€” 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: testBareURLParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift:897 β€” 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: testSchemelessWWWLinkParagraphRendersOnAPhoneStack HermesMobileTests/MarkdownMathRendererTests.swift:901 β€” 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: testSSEClientForwardsHeartbeatComments HermesMobileTests/SSEClientTests.swift:97 β€” 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: testSSEClientReportsTransportErrorWhenAnOpenStreamDrops HermesMobileTests/SSEClientTests.swift:121 β€” 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: testSSEClientReportsTransportErrorWhenServerClosesStream HermesMobileTests/SSEClientTests.swift:151 β€” 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: testInitialRefreshStartsBeforeDelayedDeepLinkFinishes HermesMobileTests/SessionNavigationStateTests.swift:97 β€” 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: testRegularHermesSessionsOwnsASplit HermesMobileTests/SessionNavigationStateTests.swift:818 β€” 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: testCompactHermesSessionsStillPushesInItsCallerStack HermesMobileTests/SessionNavigationStateTests.swift:822 β€” 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: testRegularBotsHomeOwnsASplit HermesMobileTests/SessionNavigationStateTests.swift:826 β€” 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.
  • + 4 more in this group β€” see findings.md.
D3 Β· God Classes Β· TooManyMethods Β· Γ—25
  • TooManyMethods: ChatViewModel HermesMobile/Features/Chat/ChatViewModel.swift:219 β€” TooManyMethods β€” 370 methods. The bar is 30 methods; this is 340 over it, 12.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: APIClient HermesMobile/Networking/APIClient.swift:3 β€” TooManyMethods β€” 173 methods, declared across 17 files: Networking/APIClient+Kanban.swift (26), Networking/APIClient+Cron.swift (24), Networking/APIClient+Sessions.swift (22), Networking/APIClient+ServerPanels.swift (20), +13 more file(s). The bar is 30 methods; this is 143 over it, 5.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: KanbanFeatureState HermesMobile/Features/Kanban/KanbanFeatureState.swift:351 β€” TooManyMethods β€” 132 methods. The bar is 30 methods; this is 102 over it, 4.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SessionListViewModel HermesMobile/Features/SessionList/SessionListViewModel.swift:86 β€” TooManyMethods β€” 123 methods. The bar is 30 methods; this is 93 over it, 4.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ChatView HermesMobile/Features/Chat/ChatView.swift:254 β€” TooManyMethods β€” 114 methods. The bar is 30 methods; this is 84 over it, 3.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HermesChatTurnCoordinator HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:139 β€” TooManyMethods β€” 96 methods. The bar is 30 methods; this is 66 over it, 3.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ReviewDiffCanvasView HermesMobile/Features/Workspace/ReviewDiff/ReviewDiffCanvasView.swift:51 β€” TooManyMethods β€” 64 methods, declared across 3 files: ReviewDiff/ReviewDiffCanvasView.swift (30), ReviewDiff/ReviewDiffCanvasView+Drawing.swift (25), ReviewDiff/ReviewDiffCanvasView+Accessibility.swift (9). The bar is 30 methods; this is 34 over it, 2.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: BotInbox HermesMobile/Features/Bots/BotInbox.swift:10 β€” TooManyMethods β€” 58 methods. The bar is 30 methods; this is 28 over it, 1.93× 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: SessionListView HermesMobile/Features/SessionList/SessionListView.swift:82 β€” TooManyMethods β€” 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ChatStreamCoordinator HermesMobile/Features/Chat/ChatStreamCoordinator.swift:146 β€” TooManyMethods β€” 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: AgentLiveActivityManager HermesMobile/LiveActivities/AgentLiveActivityManager.swift:181 β€” 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: AuthManager HermesMobile/Auth/AuthManager.swift:4 β€” TooManyMethods β€” 44 methods, declared across 2 files: Auth/AuthManager.swift (36), Auth/AuthManager+MoveToHermes.swift (8). The bar is 30 methods; this is 14 over it, 1.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: HermesChatRequests HermesMobile/Features/Chat/HermesChatRequests.swift:24 β€” TooManyMethods β€” 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HermesGitClient HermesMobile/Networking/Hermes/HermesGitClient.swift:23 β€” 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: View HermesMobile/Config/NotificationOffer.swift:69 β€” TooManyMethods β€” 38 methods, declared across 16 files: Shared/AdaptiveGlassModifier.swift (8), Chat/PendingRequestSurfaces.swift (4), SessionList/SessionListComponents.swift (4), Chat/ChatScrollPolicy.swift (3), +12 more file(s). The bar is 30 methods; this is 8 over it, 1.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ChatDraftStore HermesMobile/Persistence/ChatDraftStore.swift:589 β€” 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: ComposerVoiceInputController HermesMobile/Features/Chat/ComposerVoiceInputController.swift:13 β€” TooManyMethods β€” 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ChatAttachmentCoordinator HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:26 β€” TooManyMethods β€” 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BotRoomReader HermesMobile/Features/Bots/BotRoomReader.swift:9 β€” 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: MarkdownMathFormatter HermesMobile/Features/Chat/MarkdownMathFormatter.swift:3 β€” TooManyMethods β€” 35 methods, declared across 3 files: Chat/MarkdownMathFormatter+Support.swift (16), Chat/MarkdownMathFormatter.swift (13), Chat/MarkdownMathFormatter+Environments.swift (6). The bar is 30 methods; this is 5 over it, 1.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ComposerChipTextView HermesMobile/Features/Chat/ComposerChipTextView.swift:6 β€” TooManyMethods β€” 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ResponseSelectionInput HermesMobile/Features/Chat/ResponseSelectionInput.swift:5 β€” TooManyMethods β€” 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BotProfileEditor HermesMobile/Features/Bots/BotProfileEditor.swift:56 β€” 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.
  • TooManyMethods: MessageComposerView HermesMobile/Features/Chat/ChatComposerView.swift:142 β€” 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.
  • TooManyMethods: MoveToHermesModel HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:53 β€” 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.
D3 Β· God Classes Β· ClassTooLong Β· Γ—21
  • ClassTooLong: ChatViewModel HermesMobile/Features/Chat/ChatViewModel.swift:219 β€” ClassTooLong β€” 4692 significant lines (blank, comment-only and punctuation-only lines excluded), 370 methods. The bar is 400 significant lines; this is 4292 over it, 11.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ChatView HermesMobile/Features/Chat/ChatView.swift:254 β€” ClassTooLong β€” 2383 significant lines (blank, comment-only and punctuation-only lines excluded), 114 methods. The bar is 400 significant lines; this is 1983 over it, 5.96× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: KanbanFeatureState HermesMobile/Features/Kanban/KanbanFeatureState.swift:351 β€” ClassTooLong β€” 1976 significant lines (blank, comment-only and punctuation-only lines excluded), 132 methods. The bar is 400 significant lines; this is 1576 over it, 4.94× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SessionListViewModel HermesMobile/Features/SessionList/SessionListViewModel.swift:86 β€” ClassTooLong β€” 1713 significant lines (blank, comment-only and punctuation-only lines excluded), 123 methods. The bar is 400 significant lines; this is 1313 over it, 4.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SessionListView HermesMobile/Features/SessionList/SessionListView.swift:82 β€” ClassTooLong β€” 1014 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 614 over it, 2.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MessageComposerView HermesMobile/Features/Chat/ChatComposerView.swift:142 β€” ClassTooLong β€” 1008 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 608 over it, 2.52× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: KanbanStatusFocusView HermesMobile/Features/Kanban/KanbanLabView.swift:137 β€” ClassTooLong β€” 1002 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 602 over it, 2.51× 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: ChatStreamCoordinator HermesMobile/Features/Chat/ChatStreamCoordinator.swift:146 β€” ClassTooLong β€” 776 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 376 over it, 1.94× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ComposerVoiceInputController HermesMobile/Features/Chat/ComposerVoiceInputController.swift:13 β€” ClassTooLong β€” 643 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 243 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AgentLiveActivityManager HermesMobile/LiveActivities/AgentLiveActivityManager.swift:181 β€” ClassTooLong β€” 641 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 241 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Endpoint HermesMobile/Networking/Endpoints.swift:3 β€” ClassTooLong β€” 582 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 182 over it, 1.46× 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: HermesSessionListView HermesMobile/Features/SessionList/HermesSessionListView.swift:34 β€” ClassTooLong β€” 558 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 158 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ModelPickerSheet HermesMobile/Features/Shared/ModelPickerSheet.swift:10 β€” ClassTooLong β€” 477 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 77 over it, 1.19× 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: HermesShareDraft HermesMobile/Features/Share/SharedDraftStore.swift:69 β€” ClassTooLong β€” 470 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: KanbanCardDetailContent HermesMobile/Features/Kanban/KanbanCardDetailView.swift:26 β€” ClassTooLong β€” 461 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 61 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: ChatDraftStore HermesMobile/Persistence/ChatDraftStore.swift:589 β€” ClassTooLong β€” 456 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 56 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: AuthManager HermesMobile/Auth/AuthManager.swift:4 β€” ClassTooLong β€” 450 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 50 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HermesCall HermesMobile/Networking/Hermes/HermesCall.swift:12 β€” ClassTooLong β€” 437 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 37 over it, 1.09× 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: ComposerChipTextView HermesMobile/Features/Chat/ComposerChipTextView.swift:6 β€” ClassTooLong β€” 436 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 36 over it, 1.09× 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: OnboardingViewModel HermesMobile/Features/Onboarding/OnboardingViewModel.swift:11 β€” ClassTooLong β€” 421 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 21 over it, 1.05× 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: ToolCallGroup HermesMobile/Models/ToolCall.swift:119 β€” ClassTooLong β€” 406 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 Β· God Classes Β· MethodTooLong Β· Γ—16
  • MethodTooLong: Endpoint.path HermesMobile/Networking/Endpoints.swift:150 β€” MethodTooLong β€” path runs 258 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 158 over it, 2.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • MethodTooLong: SessionListView.body HermesMobile/Features/SessionList/SessionListView.swift:208 β€” MethodTooLong β€” body runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× 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: ChatViewModel.loadMessages HermesMobile/Features/Chat/ChatViewModel.swift:1837 β€” MethodTooLong β€” loadMessages runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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: MessageComposerView.composerWithLifecycle HermesMobile/Features/Chat/ChatComposerView.swift:567 β€” MethodTooLong β€” composerWithLifecycle runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× 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: HermesCall.params HermesMobile/Networking/Hermes/HermesCall.swift:354 β€” MethodTooLong β€” params runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • MethodTooLong: ChatView.messageComposer HermesMobile/Features/Chat/ChatView.swift:519 β€” MethodTooLong β€” messageComposer runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× 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: Endpoint.queryItems HermesMobile/Networking/Endpoints.swift:411 β€” MethodTooLong β€” queryItems runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • MethodTooLong: BotRoomView.body HermesMobile/Features/Bots/BotRoomView.swift:32 β€” MethodTooLong β€” body runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • MethodTooLong: CronJobEditorSheet.body HermesMobile/Features/Tasks/CronJobEditorSheet.swift:82 β€” MethodTooLong β€” body runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • MethodTooLong: ChatView.messageContent HermesMobile/Features/Chat/ChatView.swift:1962 β€” MethodTooLong β€” messageContent runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: KanbanStatusFocusView.body HermesMobile/Features/Kanban/KanbanLabView.swift:165 β€” 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: WebuiServerSections.body HermesMobile/Features/Settings/WebuiServerSettings.swift:27 β€” MethodTooLong β€” body runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body β€” the runs of statements that work on the same values and would earn the same name β€” into its own named unit, and have this one call them in order.
  • MethodTooLong: MessageComposerView.body HermesMobile/Features/Chat/ChatComposerView.swift:813 β€” MethodTooLong β€” body runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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: ChatView.chatContent HermesMobile/Features/Chat/ChatView.swift:1077 β€” MethodTooLong β€” chatContent runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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: ChatStreamCoordinator.performReconnectIfNeeded HermesMobile/Features/Chat/ChatStreamCoordinator.swift:484 β€” MethodTooLong β€” performReconnectIfNeeded 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: ChatTranscriptView.transcriptScrollContent HermesMobile/Features/Chat/ChatTranscriptView.swift:330 β€” MethodTooLong β€” transcriptScrollContent 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 (7 lines × 2) Β· Γ—14
  • Duplicated block (7 lines × 2) HermesMobile/Features/Bots/BotPendingRequestCard.swift:313 β€” HermesMobile/Features/Bots/BotPendingRequestCard.swift:313-319 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:415-421 β€” 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 `HermesMobile/Features/Bots/BotPendingRequestCard.swift:313` 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) HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1042 β€” HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1042-1048 | HermesMobile/Features/Chat/ChatTranscriptView.swift:1049-1055 β€” 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 `HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1042` 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 before the matched lines, `HermesMobile/Features/Chat/ChatTranscriptView.swift:1048` calls `foregroundStyle` and `HermesMobile/Features/Chat/ChatTranscriptSupportingViews.swift:1041` does not β€” after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) HermesMobile/Features/Chat/FilePathAutocompleteView.swift:44 β€” HermesMobile/Features/Chat/FilePathAutocompleteView.swift:44-50 | HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:56-62 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/FilePathAutocompleteView.swift:44` 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) HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:5 β€” HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:5-11 | HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:19-25 β€” 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 `HermesMobile/Features/Chat/MarkdownMathFormatter+Environments.swift:5` 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 (7 lines × 2) HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:343 β€” HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:343-349 | HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:379-385 β€” 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 `HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:343` 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) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:416 β€” HermesMobile/Features/Kanban/KanbanCardDetailView.swift:416-422 | HermesMobile/Features/Kanban/KanbanLabView.swift:1250-1256 β€” 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:416` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) HermesMobile/Features/Onboarding/OnboardingComponents.swift:305 β€” HermesMobile/Features/Onboarding/OnboardingComponents.swift:305-311 | HermesMobile/Features/Onboarding/OnboardingTailscalePage.swift:26-32 β€” 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 `HermesMobile/Features/Onboarding/OnboardingComponents.swift:305` 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) HermesMobile/Features/Settings/AddServerView.swift:169 β€” HermesMobile/Features/Settings/AddServerView.swift:169-175 | HermesMobile/Features/Settings/AddServerView.swift:199-205 β€” 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 `HermesMobile/Features/Settings/AddServerView.swift:169` 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) HermesMobile/Features/Workspace/GitCommitView.swift:327 β€” HermesMobile/Features/Workspace/GitCommitView.swift:327-333 | HermesMobile/Features/Workspace/GitWorkspaceView.swift:222-228 β€” 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 `HermesMobile/Features/Workspace/GitCommitView.swift:327` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) HermesMobile/Features/Workspace/GitDiffView.swift:139 β€” HermesMobile/Features/Workspace/GitDiffView.swift:139-145 | HermesMobile/Features/Workspace/SourceViewer/SourceFileSurface.swift:121-127 β€” 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 (7 lines × 2) HermesMobile/Persistence/CacheStore.swift:86 β€” HermesMobile/Persistence/CacheStore.swift:86-92 | HermesMobile/Persistence/CacheStore.swift:166-172 β€” 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 `HermesMobile/Persistence/CacheStore.swift:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (7 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:428 β€” HermesMobile/Features/Kanban/KanbanCardDetailView.swift:428-434 | HermesMobile/Features/Kanban/KanbanLabView.swift:1302-1308 β€” 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 (7 lines × 2) HermesMobile/Networking/APIClient+Projects.swift:24 β€” HermesMobile/Networking/APIClient+Projects.swift:24-30 | HermesMobile/Networking/APIClient+Sessions.swift:92-98 β€” 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 (7 lines × 2) HermesMobile/Networking/Hermes/HermesREST.swift:560 β€” HermesMobile/Networking/Hermes/HermesREST.swift:560-566 | HermesMobile/Networking/Hermes/HermesREST.swift:568-574 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied β€” no decision has to be handed back and re-acted on.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 2) Β· Γ—11
  • Duplicated block (9 lines × 2) HermesMobile/Features/Bots/BotCreateView.swift:261 β€” HermesMobile/Features/Bots/BotCreateView.swift:261-269 | HermesMobile/Features/Bots/BotProfileEditorView.swift:327-335 β€” 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 `HermesMobile/Features/Bots/BotCreateView.swift:261` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:3819 β€” HermesMobile/Features/Chat/ChatViewModel.swift:3819-3827 | HermesMobile/Features/Chat/ChatViewModel.swift:3938-3946 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:125 β€” HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:125-133 | HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:136-144 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) HermesMobile/Features/Chat/MessageBubbleView.swift:802 β€” HermesMobile/Features/Chat/MessageBubbleView.swift:802-810 | HermesMobile/Features/Chat/MessageBubbleView.swift:921-929 β€” 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) HermesMobile/Features/Chat/TranscriptMediaView.swift:483 β€” HermesMobile/Features/Chat/TranscriptMediaView.swift:483-491 | HermesMobile/Features/Chat/TranscriptMediaView.swift:633-641 β€” 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 `HermesMobile/Features/Chat/TranscriptMediaView.swift:483` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) HermesMobile/Features/Chat/TranscriptMediaView.swift:525 β€” HermesMobile/Features/Chat/TranscriptMediaView.swift:525-533 | HermesMobile/Features/Chat/TranscriptMediaView.swift:617-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. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/TranscriptMediaView.swift:525` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) HermesMobile/Features/Onboarding/OnboardingComponents.swift:95 β€” HermesMobile/Features/Onboarding/OnboardingComponents.swift:95-103 | HermesMobile/Features/Onboarding/OnboardingComponents.swift:266-274 β€” 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 `HermesMobile/Features/Onboarding/OnboardingComponents.swift:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) HermesMobile/Features/Share/SharedDraftStore.swift:185 β€” HermesMobile/Features/Share/SharedDraftStore.swift:185-193 | HermesMobile/Features/Share/SharedDraftStore.swift:248-256 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) HermesMobile/Networking/Endpoints.swift:630 β€” HermesMobile/Networking/Endpoints.swift:630-638 | HermesMobile/Networking/Endpoints.swift:641-649 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) HermesMobile/Features/Chat/ComposerVoiceNoteRecorder.swift:189 β€” HermesMobile/Features/Chat/ComposerVoiceNoteRecorder.swift:189-197 | HermesMobile/Features/Chat/InlineAudioPlayerView.swift:348-356 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) HermesMobile/Features/SessionList/SessionListComponents.swift:705 β€” HermesMobile/Features/SessionList/SessionListComponents.swift:705-713 | HermesMobile/Features/SessionList/SessionListView.swift:986-994 β€” 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 (5 lines × 2) Β· Γ—11
  • Duplicated block (5 lines × 2) HermesMobile/Features/Chat/MessageBubbleView.swift:327 β€” HermesMobile/Features/Chat/MessageBubbleView.swift:327-331 | HermesMobile/Features/Chat/TranscriptLinkPreviewView.swift:244-248 β€” 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 `HermesMobile/Features/Chat/MessageBubbleView.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 (5 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:461 β€” HermesMobile/Features/Kanban/KanbanCardDetailView.swift:461-465 | HermesMobile/Features/Kanban/KanbanLabView.swift:1359-1363 β€” 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:461` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) HermesMobile/Features/Workspace/GitDiffView.swift:100 β€” HermesMobile/Features/Workspace/GitDiffView.swift:100-104 | HermesMobile/Features/Workspace/SourceViewer/SourceFileSurface.swift:91-95 β€” 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 `HermesMobile/Features/Workspace/GitDiffView.swift:100` 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) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:272 β€” HermesMobile/Features/Kanban/KanbanCardDetailState.swift:272-276 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:2233-2237 β€” 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) HermesMobile/Features/Bots/BotCreateView.swift:278 β€” HermesMobile/Features/Bots/BotCreateView.swift:278-282 | HermesMobile/Features/Bots/BotProfileEditorView.swift:344-348 β€” 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) HermesMobile/Features/Insights/InsightsView.swift:18 β€” HermesMobile/Features/Insights/InsightsView.swift:18-22 | HermesMobile/Features/Skills/SkillsView.swift:17-21 β€” 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `client` to `any InsightsDataClient` in one and `any SkillsDataClient` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH β€” their common supertype where they have one, or a new abstraction over them where they do not β€” and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) HermesMobile/Features/SessionList/SessionListViewModel.swift:2543 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift:2543-2547 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:354-358 β€” 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) HermesMobile/Features/Share/SharedDraftStore.swift:676 β€” HermesMobile/Features/Share/SharedDraftStore.swift:676-680 | HermesMobile/Persistence/ChatDraftAttachmentStore.swift:179-183 β€” 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) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:259 β€” HermesMobile/Features/Chat/MarkdownMathFormatter.swift:259-263 | HermesMobile/Features/Chat/MarkdownMathFormatter.swift:277-281 β€” 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 `HermesMobile/Features/Chat/MarkdownMathFormatter.swift:259` 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) HermesMobile/Features/Workspace/FileReference.swift:38 β€” HermesMobile/Features/Workspace/FileReference.swift:38-42 | HermesMobile/Features/Workspace/FileReference.swift:60-64 β€” 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) HermesMobile/Networking/Hermes/HermesEnvironmentClient.swift:156 β€” HermesMobile/Networking/Hermes/HermesEnvironmentClient.swift:156-160 | HermesMobile/Networking/Hermes/HermesSkillsClient.swift:112-116 β€” 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.
D15 Β· Churn × Complexity Hotspots Β· Repeated repair Β· Γ—10
  • Repeated repair: HermesMobile/Models/ServerCatalog.swift HermesMobile/Models/ServerCatalog.swift:435 β€” HermesMobile/Models/ServerCatalog.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is UpdatesCheckResponse.forcedCheckOutcome at line 435), 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(chat): honor saved server TTS preferences (#991)”; β€œfix(chat): a refused steer must not stop the run (#906)”; β€œfix(chat): count "Working for" and "Worked for" from the server's turn start (#408)”; β€œfix(picker): expose the full model catalog”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Models/ServerCatalog.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: HermesMobile/Features/Chat/ChatPendingActionCoordinator.swift HermesMobile/Features/Chat/ChatPendingActionCoordinator.swift:214 β€” HermesMobile/Features/Chat/ChatPendingActionCoordinator.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 9 (its worst body is ChatPendingActionCoordinator.applyApprovalUpdate at line 214), 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(chat): keep pending approvals visible after stream transitions (#631)”; β€œfix(approval): require explicit response success (#268)”; β€œfix(chat): make stream liveness recovery transport-aware (#216)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/ChatPendingActionCoordinator.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: HermesMobile/Networking/APIClient.swift HermesMobile/Networking/APIClient.swift:168 β€” HermesMobile/Networking/APIClient.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 8 (its worst body is APIClient.sendBoundedData at line 168), 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(networking): stop a redirect from carrying a sign-in password to another host (#1282)”; β€œfix: route chat stream query + multipart errors through APIClient contract (#548)”; β€œfix(chat): retry the reconnect probe after a transport drop (#585)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/APIClient.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: HermesMobile/Features/Chat/ResponseTextSelection.swift HermesMobile/Features/Chat/ResponseTextSelection.swift:181 β€” HermesMobile/Features/Chat/ResponseTextSelection.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 9 (its worst body is ResponseSelectionRenderer.draw at line 181), 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(chat): keep a settled reply's header and footer clear of its text (#1245)”; β€œfix(chat): render inline LaTeX accurately (#989)”; β€œfix(chat): reduce scrolling lag in long conversations (#463)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/ResponseTextSelection.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: HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift HermesMobile/Features/Chat/SlashCommandAutocompleteView.swift:152 β€” HermesMobile/Features/Chat/SlashCommandAutocompleteView.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 8 (its worst body is SlashCommandAutocompleteView.commandList at line 152), 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(chat): unify corner radius of surfaces stacked above the composer (#411)”; β€œfix(chat): offer only skills when the slash trigger is mid-sentence (#391)”; β€œfix(picker): expose the full model catalog”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/SlashCommandAutocompleteView.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: HermesMobile/Models/UploadResponse.swift HermesMobile/Models/UploadResponse.swift:51 β€” HermesMobile/Models/UploadResponse.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 8 (its worst body is ImagePreviewDownsampler.previewData at line 51), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(chat): a refused steer must not stop the run (#906)”; β€œfix(chat): allow sending attachments without composer text (#407)”; β€œfix(chat): persist composer attachments and settings with drafts (#298)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Models/UploadResponse.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: HermesMobile/Features/Chat/MarkdownMathFormatter.swift HermesMobile/Features/Chat/MarkdownMathFormatter.swift:258 β€” HermesMobile/Features/Chat/MarkdownMathFormatter.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is InlineDelimiter.isOpen at line 258), 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(chat): stop currency amounts from pairing into inline math spans (#1337)”; β€œfix(chat): render inline LaTeX accurately (#989)”; β€œfix(chat): render inline assignment math (#334)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Chat/MarkdownMathFormatter.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: HermesMobile/Networking/APIClient+Sessions.swift HermesMobile/Networking/APIClient+Sessions.swift:7 β€” HermesMobile/Networking/APIClient+Sessions.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is APIClient.sessions at line 7), 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(sessions): a new chat started under a project filter joins that project (#925)”; β€œfix(sessions): continue CLI and messaging sessions (#320)”; β€œfix(sessions): duplicate via /api/session/duplicate instead of branch (#267)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/APIClient+Sessions.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: HermesMobile/Features/Settings/DefaultModelPickerView.swift HermesMobile/Features/Settings/DefaultModelPickerView.swift:55 β€” HermesMobile/Features/Settings/DefaultModelPickerView.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is DefaultModelPickerView.loadStatus at line 55), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot β€” the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: β€œfix(picker): expose the full model catalog”; β€œfix(models): persist and match the default model with its provider”; β€œfix(models): preserve provider identity when matching (#269)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Features/Settings/DefaultModelPickerView.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: HermesMobile/Networking/APIClient+Chat.swift HermesMobile/Networking/APIClient+Chat.swift:100 β€” HermesMobile/Networking/APIClient+Chat.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is APIClient.steerChat at line 100), 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(chat): a refused steer must not stop the run (#906)”; β€œfix: route chat stream query + multipart errors through APIClient contract (#548)”; β€œfix(chat): retry the reconnect probe after a transport drop (#585)”. 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-31..2026-10-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-31 02:45:23 -04:00' --until='2026-10-29 02:45:23 -04:00' --full-history --no-merges -- HermesMobile/Networking/APIClient+Chat.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 Β· Duplicated block (8 lines × 2) Β· Γ—9
  • Duplicated block (8 lines × 2) HermesMobile/Features/Bots/BotCreateView.swift:234 β€” HermesMobile/Features/Bots/BotCreateView.swift:234-241 | HermesMobile/Features/Bots/BotProfileEditorView.swift:294-301 β€” 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 `HermesMobile/Features/Bots/BotCreateView.swift:234` 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) HermesMobile/Features/Chat/ChatViewModel.swift:3835 β€” HermesMobile/Features/Chat/ChatViewModel.swift:3835-3842 | HermesMobile/Features/Chat/ChatViewModel.swift:4324-4331 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) HermesMobile/Features/Chat/ComposerChipTextView.swift:460 β€” HermesMobile/Features/Chat/ComposerChipTextView.swift:460-468 | HermesMobile/Features/Chat/ComposerChipTextView.swift:486-493 β€” 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 `HermesMobile/Features/Chat/ComposerChipTextView.swift:460` 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 (8 lines × 2) HermesMobile/Features/Chat/HermesBtwPanel.swift:166 β€” HermesMobile/Features/Chat/HermesBtwPanel.swift:166-173 | HermesMobile/Features/Chat/HermesBtwPanel.swift:196-203 β€” 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 `HermesMobile/Features/Chat/HermesBtwPanel.swift:166` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `HermesMobile/Features/Chat/HermesBtwPanel.swift:174` calls `HermesBtwCloseButton` and `HermesMobile/Features/Chat/HermesBtwPanel.swift:204` 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 (8 lines × 2) HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187 β€” HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187-194 | HermesMobile/Features/Chat/TranscriptMedia.swift:647-654 β€” 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 `HermesMobile/Features/Chat/TranscriptLinkPreview.swift:187` 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) HermesMobile/Features/Chat/TranscriptMediaView.swift:359 β€” HermesMobile/Features/Chat/TranscriptMediaView.swift:359-366 | HermesMobile/Features/Chat/TranscriptMediaView.swift:475-482 β€” 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 `HermesMobile/Features/Chat/TranscriptMediaView.swift:359` 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) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:502 β€” HermesMobile/Features/Kanban/KanbanCardDetailView.swift:502-509 | HermesMobile/Features/Kanban/KanbanCardDetailView.swift:523-530 β€” 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:502` 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) HermesMobile/Models/Session.swift:392 β€” HermesMobile/Models/Session.swift:392-399 | HermesMobile/Models/Session.swift:873-880 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `HermesMobile/Models/Session.swift:390` calls `decodeLossyDoubleIfPresent`, `decodeLossyStringIfPresent` and `HermesMobile/Models/Session.swift:872` 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 (8 lines × 2) HermesMobile/Persistence/ChatDraftAttachmentStore.swift:156 β€” HermesMobile/Persistence/ChatDraftAttachmentStore.swift:156-163 | HermesMobile/Persistence/ChatDraftStore.swift:579-586 β€” 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 (17 lines × 2) Β· Γ—8
  • Duplicated block (17 lines × 2) HermesMobile/Features/Chat/CameraPickerView.swift:492 β€” HermesMobile/Features/Chat/CameraPickerView.swift:492-508 | HermesMobile/Features/Chat/CustomAttachmentPicker.swift:777-793 β€” 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 `HermesMobile/Features/Chat/CameraPickerView.swift:492` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:1168 β€” HermesMobile/Features/Chat/ChatViewModel.swift:1168-1184 | HermesMobile/Features/Chat/ChatViewModel.swift:1379-1395 β€” 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 `HermesMobile/Features/Chat/ChatViewModel.swift:1168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) HermesMobile/Features/SessionList/SessionListActionConfirmations.swift:13 β€” HermesMobile/Features/SessionList/SessionListActionConfirmations.swift:13-29 | HermesMobile/Features/Settings/ArchivedSessionsView.swift:86-102 β€” 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 `HermesMobile/Features/SessionList/SessionListActionConfirmations.swift:13` 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 (17 lines × 2) HermesMobile/Features/SessionList/SessionListComponents.swift:753 β€” HermesMobile/Features/SessionList/SessionListComponents.swift:753-769 | HermesMobile/Features/SessionList/SessionListComponents.swift:1071-1087 β€” 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 `HermesMobile/Features/SessionList/SessionListComponents.swift:753` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) HermesMobile/Features/SessionList/SessionListComponents.swift:1856 β€” HermesMobile/Features/SessionList/SessionListComponents.swift:1856-1872 | HermesMobile/Features/Settings/ArchivedSessionsView.swift:270-286 β€” 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 (17 lines × 2) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:347 β€” HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:347-363 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:276-292 β€” before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:347` 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 (17 lines × 2) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:270 β€” HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:270-286 | HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:301-317 β€” 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 `HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:270` 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 (17 lines × 2) HermesMobile/Networking/KanbanEventStreamClient.swift:116 β€” HermesMobile/Networking/KanbanEventStreamClient.swift:116-132 | HermesMobile/Networking/SSEClient.swift:52-68 β€” 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 `HermesMobile/Networking/KanbanEventStreamClient.swift:116` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 2) Β· Γ—8
  • Duplicated block (6 lines × 2) HermesMobile/Features/Bots/BotCreateView.swift:271 β€” HermesMobile/Features/Bots/BotCreateView.swift:271-276 | HermesMobile/Features/Bots/BotProfileEditorView.swift:337-342 β€” 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 `HermesMobile/Features/Bots/BotCreateView.swift:271` 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 (6 lines × 2) HermesMobile/Features/Chat/MarkdownRenderer.swift:37 β€” HermesMobile/Features/Chat/MarkdownRenderer.swift:37-42 | HermesMobile/Features/Chat/MarkdownRenderer.swift:123-128 β€” 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 `HermesMobile/Features/Chat/MarkdownRenderer.swift:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) HermesMobile/Features/Chat/MarkdownRenderer.swift:491 β€” HermesMobile/Features/Chat/MarkdownRenderer.swift:491-496 | HermesMobile/Features/Chat/MarkdownRenderer.swift:531-536 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/MarkdownRenderer.swift:491` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) HermesMobile/Features/Chat/MessageBubbleView.swift:760 β€” HermesMobile/Features/Chat/MessageBubbleView.swift:760-765 | HermesMobile/Features/Chat/TranscriptMediaView.swift:637-642 β€” 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 `HermesMobile/Features/Chat/MessageBubbleView.swift:760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) HermesMobile/Networking/Bots/BotProtocol.swift:18 β€” HermesMobile/Networking/Bots/BotProtocol.swift:18-23 | scripts/fixtures/HermesFixtureCapture.swift:161-166 β€” 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 `HermesMobile/Networking/Bots/BotProtocol.swift:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) HermesMobile/Persistence/CacheStore+Hermes.swift:86 β€” HermesMobile/Persistence/CacheStore+Hermes.swift:86-91 | HermesMobile/Persistence/CacheStore.swift:85-90 β€” 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 `HermesMobile/Persistence/CacheStore+Hermes.swift:86` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (6 lines × 2) HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:446 β€” HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:446-451 | HermesMobile/Models/TurnFileChangeSummary.swift:207-214 β€” 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 (6 lines × 2) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:142 β€” HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:142-147 | HermesMobile/Features/Chat/TranscriptMediaView.swift:916-921 β€” before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 2) Β· Γ—7
  • Duplicated block (11 lines × 2) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:97 β€” HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:97-107 | HermesMobile/Features/Workspace/FilePreviewView.swift:47-57 β€” 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 `HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:4007 β€” HermesMobile/Features/Chat/ChatViewModel.swift:4007-4017 | HermesMobile/Features/Chat/ChatViewModel.swift:4055-4065 β€” 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) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:259 β€” HermesMobile/Features/Kanban/KanbanCardDetailState.swift:259-269 | HermesMobile/Features/Kanban/KanbanCardEditorState.swift:474-484 β€” 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 (11 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:94 β€” HermesMobile/Features/Kanban/KanbanCardDetailView.swift:94-104 | HermesMobile/Features/Kanban/KanbanLabView.swift:287-297 β€” 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:401 β€” HermesMobile/Features/Kanban/KanbanCardDetailView.swift:401-411 | HermesMobile/Features/Kanban/KanbanLabView.swift:1235-1245 β€” 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 `HermesMobile/Features/Kanban/KanbanCardDetailView.swift:401` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) HermesMobile/Features/SessionList/SessionListComponents.swift:1614 β€” HermesMobile/Features/SessionList/SessionListComponents.swift:1614-1624 | HermesMobile/Features/SessionList/SessionListComponents.swift:1740-1750 β€” 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 `HermesMobile/Features/SessionList/SessionListComponents.swift:1614` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) HermesMobile/Models/Approval.swift:267 β€” HermesMobile/Models/Approval.swift:267-277 | HermesMobile/Models/Approval.swift:299-309 β€” 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 `HermesMobile/Models/Approval.swift:267` 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. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `HermesMobile/Models/Approval.swift:311` calls `AttributedString` and `HermesMobile/Models/Approval.swift:278` does not β€” after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 2) Β· Γ—6
  • Duplicated block (12 lines × 2) HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:288 β€” HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:288-299 | HermesMobile/Features/Chat/MessageBubbleView.swift:847-858 β€” 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 `HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:288` 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 (12 lines × 2) HermesMobile/Features/Chat/ClarificationRequestCard.swift:35 β€” HermesMobile/Features/Chat/ClarificationRequestCard.swift:35-48 | HermesMobile/Features/Chat/ClarificationRequestCard.swift:525-536 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/ClarificationRequestCard.swift:35` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) HermesMobile/Features/Chat/MarkdownRenderer.swift:368 β€” HermesMobile/Features/Chat/MarkdownRenderer.swift:368-379 | HermesMobile/Features/Chat/ToolCallLogRowView.swift:190-201 β€” 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 `HermesMobile/Features/Chat/MarkdownRenderer.swift:368` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2147 β€” HermesMobile/Features/Kanban/KanbanFeatureState.swift:2147-2158 | HermesMobile/Features/Kanban/KanbanFeatureState.swift:2191-2202 β€” 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) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:288 β€” HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:288-299 | HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:319-330 β€” 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 `HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:288` 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 (12 lines × 2) HermesMobile/Models/Approval.swift:376 β€” HermesMobile/Models/Approval.swift:376-387 | HermesMobile/Models/Clarification.swift:199-210 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once.
D4 Β· Code Duplication Β· Duplicated block (10 lines × 2) Β· Γ—5
  • Duplicated block (10 lines × 2) HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:303 β€” HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:303-312 | HermesMobile/Features/Chat/MessageBubbleView.swift:862-871 β€” 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 `HermesMobile/Features/Chat/ChatComposerAttachmentStripView.swift:303` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:251 β€” HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:251-260 | HermesMobile/Features/Chat/MarkdownRenderer.swift:493-502 β€” 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 `HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:251` 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 before the matched lines, `HermesMobile/Features/Chat/MarkdownRenderer.swift:492` calls `frame` and `HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:250` does not β€” after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) HermesMobile/Models/Approval.swift:121 β€” HermesMobile/Models/Approval.swift:121-130 | HermesMobile/Models/Clarification.swift:146-155 β€” 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 `HermesMobile/Models/Approval.swift:121` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) HermesMobile/Config/AppTheme.swift:865 β€” HermesMobile/Config/AppTheme.swift:865-874 | HermesMobile/Features/Settings/SettingsNotificationsPage.swift:96-105 β€” 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 (10 lines × 2) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:171 β€” HermesMobile/Features/Chat/MarkdownMathFormatter.swift:171-180 | HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:76-85 β€” 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 (13 lines × 2) Β· Γ—4
  • Duplicated block (13 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:4924 β€” HermesMobile/Features/Chat/ChatViewModel.swift:4924-4936 | HermesMobile/Features/Chat/ChatViewModel.swift:5010-5022 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) HermesMobile/Features/Chat/MarkdownMathFormatter.swift:292 β€” HermesMobile/Features/Chat/MarkdownMathFormatter.swift:292-304 | HermesMobile/Features/Chat/MarkdownMathSegmenter.swift:146-158 β€” 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 (13 lines × 2) HermesMobile/Features/Kanban/KanbanLabView.swift:2986 β€” HermesMobile/Features/Kanban/KanbanLabView.swift:2986-2998 | HermesMobile/Models/Kanban.swift:624-636 β€” 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 `HermesMobile/Features/Kanban/KanbanLabView.swift:2986` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) HermesMobile/Features/SessionList/SessionListViewModel.swift:1373 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift:1373-1385 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1420-1432 β€” 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 `HermesMobile/Features/SessionList/SessionListViewModel.swift:1373` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `HermesMobile/Features/SessionList/SessionListViewModel.swift:1386` calls `move` and `HermesMobile/Features/SessionList/SessionListViewModel.swift:1433` does not β€” after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D6 Β· Cohesion (LCOM4) Β· Low cohesion Β· Γ—4
  • Low cohesion: Coordinator (LCOM4 6) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:302 β€” Coordinator'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: ComposerChipTextView (LCOM4 6) HermesMobile/Features/Chat/ComposerChipTextView.swift:6 β€” ComposerChipTextView'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: ResponseSelectionInput (LCOM4 5) HermesMobile/Features/Chat/ResponseSelectionInput.swift:5 β€” ResponseSelectionInput'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: Coordinator (LCOM4 4) HermesMobile/Features/Chat/ImageLightboxView.swift:352 β€” Coordinator'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.
D10 Β· Test Quality Β· Skipped test Β· Γ—3
  • Skipped test: testPinFileMatchesRuntimeConstant HermesMobileTests/BotConnectionVersionTests.swift:15 β€” Skipped β€” throws XCTSkip
  • Skipped test: testShippedLanguageTranslationsHaveNoEmptyValues HermesMobileTests/LocalizationCatalogTests.swift:49 β€” Skipped β€” throws XCTSkip
  • Skipped test: testPairingsRoundTripPerServerInTheSharedAccessGroup HermesMobileTests/PushRegistrationTests.swift:1303 β€” Skipped β€” throws XCTSkip
D4 Β· Code Duplication Β· Duplicated block (20 lines × 2) Β· Γ—3
  • Duplicated block (20 lines × 2) HermesMobile/Config/AppIconChoice.swift:26 β€” HermesMobile/Config/AppIconChoice.swift:26-45 | HermesMobile/Config/AppIconChoice.swift:47-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 (20 lines × 2) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:258 β€” HermesMobile/Features/Chat/ComposerVoiceInputController.swift:258-277 | HermesMobile/Features/Chat/ComposerVoiceInputController.swift:311-330 β€” 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 `HermesMobile/Features/Chat/ComposerVoiceInputController.swift:258` 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 (20 lines × 2) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:79 β€” HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:79-98 | HermesMobile/Features/Chat/TranscriptMediaView.swift:783-802 β€” before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:79` 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 (19 lines × 2) Β· Γ—3
  • Duplicated block (19 lines × 2) HermesMobile/Features/Chat/ComposerFileTrigger.swift:61 β€” HermesMobile/Features/Chat/ComposerFileTrigger.swift:61-79 | HermesMobile/Features/Chat/ComposerSlashTrigger.swift:73-91 β€” 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 (19 lines × 2) HermesMobile/Features/Chat/HermesDelegatedWorkView.swift:288 β€” HermesMobile/Features/Chat/HermesDelegatedWorkView.swift:288-306 | HermesMobile/Features/Chat/HermesDelegatedWorkView.swift:375-393 β€” 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 (19 lines × 2) HermesMobile/Models/Session.swift:367 β€” HermesMobile/Models/Session.swift:367-385 | HermesMobile/Models/Session.swift:846-864 β€” 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 `HermesMobile/Models/Session.swift:367` 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.
D35 Β· Change Coupling Β· Change coupling Β· Γ—2
  • Change coupling: ChatViewModel.swift ↔ HermesConversation.swift HermesMobile/Features/Chat/ChatViewModel.swift:1 β€” `HermesMobile/Features/Chat/ChatViewModel.swift` and `HermesMobile/Features/Hermes/HermesConversation.swift` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β€” a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder β€” so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `c08c398d` fix(bots): follow a Bot Chat the host replaced (#1346); `5db9adcb` feat(hermes): open a Hermes session from a server-qualified link (#1185); `ad271390` feat(bots): give a bot's chat its pill, rules and mentions in the reg… β€” run `git show` on any of them.
  • Change coupling: ChatComposerView.swift ↔ ComposerChipTextView.swift HermesMobile/Features/Chat/ChatComposerView.swift:1 β€” `HermesMobile/Features/Chat/ChatComposerView.swift` and `HermesMobile/Features/Chat/ComposerChipTextView.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well β€” a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package β€” so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `033cdf0e` feat(chat): make hardware-keyboard sending truthful and complete (#1428); `0ca16a77` feat(chat): recall your last message with ↑ and preview staged docume…; `2edc8166` feat(bots): add Bot Mode preview behind a default-off toggle (#498) β€” run `git show` on any of them.
D4 Β· Code Duplication Β· Members sharing a duplicated core (4 members, 50+ identical tokens) Β· Γ—2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) HermesMobile/Features/SessionList/SessionListViewModel.swift:1081 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift:1081-1099 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1101-1118 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1123-1140 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1142-1159 β€” 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) HermesMobile/Features/SessionList/SessionListViewModel.swift:2714 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift:2714-2728 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:391-405 | HermesMobile/Features/Settings/DefaultProfilePickerView.swift:295-309 | HermesMobile/Features/Workspace/FileBrowserViewModel.swift:290-304 β€” 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 (30 lines × 2) Β· Γ—2
  • Duplicated block (30 lines × 2) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:118 β€” HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:118-147 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:24-53 β€” before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:118` 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 (30 lines × 2) HermesMobile/Persistence/CacheStore.swift:310 β€” HermesMobile/Persistence/CacheStore.swift:310-339 | HermesMobile/Persistence/CachedSession.swift:76-105 β€” the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach β€” a file they already depend on, or a new one alongside them β€” and call it from both call sites, so a change lands once.
D4 Β· Code Duplication Β· Duplicated block (17 lines × 3) Β· Γ—2
  • Duplicated block (17 lines × 3) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:79 β€” HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:79-95 | HermesMobile/Features/Chat/TranscriptMediaView.swift:783-799 | HermesMobile/Features/Workspace/FilePreviewView.swift:137-153 β€” before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:79` 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 (17 lines × 3) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:96 β€” HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:96-112 | HermesMobile/Features/Chat/TranscriptMediaView.swift:378-394 | HermesMobile/Features/Chat/TranscriptMediaView.swift:503-519 β€” before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (16 lines × 2) Β· Γ—2
  • Duplicated block (16 lines × 2) HermesMobile/Features/Chat/ChatView.swift:3350 β€” HermesMobile/Features/Chat/ChatView.swift:3350-3365 | HermesMobile/Features/Chat/ChatView.swift:3449-3464 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:23 β€” HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:23-38 | HermesMobile/Features/Chat/TranscriptMediaView.swift:693-708 β€” before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `HermesMobile/Features/Chat/TranscriptMediaView.swift:691` calls `Environment` and `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:21` does not β€” after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (13 lines × 3) Β· Γ—2
  • Duplicated block (13 lines × 3) HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:37 β€” HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:37-49 | HermesMobile/Features/Chat/MessageBubbleView.swift:56-68 | HermesMobile/Models/ChatMessage.swift:55-67 β€” 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 `HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:37` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 3) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:55 β€” HermesMobile/Features/Settings/DefaultProfilePickerView.swift:55-67 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:204-216 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:102-114 β€” 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:55` 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 (12 lines × 7) Β· Γ—2
  • Duplicated block (12 lines × 7) HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:38 β€” HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:38-49 | HermesMobile/Features/Chat/MessageBubbleView.swift:57-68 | HermesMobile/Features/Kanban/KanbanLabView.swift:2987-2998 | HermesMobile/Models/ChatMessage.swift:56-67 | HermesMobile/Models/Kanban.swift:625-636 | HermesMobile/Models/ServerCatalog.swift:260-271 | HermesMobile/Models/Session.swift:309-320 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:38` 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 (12 lines × 7) HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:42 β€” HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:42-53 | HermesMobile/Features/Chat/MessageBubbleView.swift:61-72 | HermesMobile/Features/Kanban/KanbanLabView.swift:2989-3000 | HermesMobile/Models/ChatMessage.swift:63-74 | HermesMobile/Models/Kanban.swift:635-646 | HermesMobile/Models/ServerCatalog.swift:263-274 | HermesMobile/Models/Session.swift:333-344 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 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 7 times. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:42` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 3) Β· Γ—2
  • Duplicated block (11 lines × 3) HermesMobile/Features/Chat/ChatViewModel.swift:4011 β€” HermesMobile/Features/Chat/ChatViewModel.swift:4011-4021 | HermesMobile/Features/Chat/ChatViewModel.swift:5179-5189 | HermesMobile/Features/Chat/ChatViewModel.swift:5219-5229 β€” all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites β€” resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) HermesMobile/Features/Chat/ChatViewModel.swift:5436 β€” HermesMobile/Features/Chat/ChatViewModel.swift:5436-5446 | HermesMobile/Features/Chat/ChatViewModel.swift:6593-6603 | HermesMobile/Features/Chat/ChatViewModel.swift:7079-7089 β€” 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 `HermesMobile/Features/Chat/ChatViewModel.swift:5436` 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 after the matched lines, `HermesMobile/Features/Chat/ChatViewModel.swift:6604` calls `scheduleStreamingScrollTrigger` and `HermesMobile/Features/Chat/ChatViewModel.swift:7090` 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 (5 lines × 3) Β· Γ—2
  • Duplicated block (5 lines × 3) HermesMobile/Features/Onboarding/OnboardingComponents.swift:130 β€” HermesMobile/Features/Onboarding/OnboardingComponents.swift:130-134 | HermesMobile/Features/Onboarding/OnboardingConnectPage.swift:38-42 | HermesMobile/Features/Settings/SettingsRows.swift:182-186 β€” 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 `HermesMobile/Features/Onboarding/OnboardingComponents.swift:130` 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 × 3) HermesMobile/Features/SessionList/SessionNavigationState.swift:132 β€” HermesMobile/Features/SessionList/SessionNavigationState.swift:132-136 | HermesMobile/Models/Kanban.swift:1330-1334 | HermesMobile/Networking/KanbanEventStreamClient.swift:55-59 β€” 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.
D4 Β· Code Duplication Β· Duplicated block (5 lines × 4) Β· Γ—2
  • Duplicated block (5 lines × 4) HermesMobile/Features/Chat/ChatView.swift:4159 β€” HermesMobile/Features/Chat/ChatView.swift:4159-4163 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1603-1607 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:383-387 | HermesMobile/Models/Session.swift:690-694 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
  • Duplicated block (5 lines × 4) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:486 β€” HermesMobile/Features/Kanban/KanbanCardEditorState.swift:486-490 | HermesMobile/Features/SessionList/SessionListView.swift:1438-1442 | HermesMobile/Features/SessionList/SessionRowView.swift:584-588 | HermesMobile/Models/ServerCatalog.swift:690-694 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
X3 Β· Exception handling Β· Swallowed exception (empty catch) Β· Γ—2
  • Swallowed exception (empty catch) HermesMobile/Networking/Hermes/HermesBrowserSignIn.swift:81 β€” 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) HermesMobile/Features/SessionList/SessionListViewModel.swift:2132 β€” 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.
D1 Β· Cyclomatic Complexity Β· HermesREST.request (cyclomatic 176) Β· Γ—1
  • HermesREST.request (cyclomatic 176) HermesMobile/Networking/Hermes/HermesREST.swift:362 β€” HermesREST.request has cyclomatic complexity 176 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· HermesCall.admit (cyclomatic 107) Β· Γ—1
  • HermesCall.admit (cyclomatic 107) HermesMobile/Networking/Hermes/HermesCall.swift:541 β€” HermesCall.admit has cyclomatic complexity 107 (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 Β· HermesCall.params (cyclomatic 82) Β· Γ—1
  • HermesCall.params (cyclomatic 82) HermesMobile/Networking/Hermes/HermesCall.swift:354 β€” HermesCall.params has cyclomatic complexity 82 (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 Β· Endpoint.queryItems (cyclomatic 58) Β· Γ—1
  • Endpoint.queryItems (cyclomatic 58) HermesMobile/Networking/Endpoints.swift:411 β€” Endpoint.queryItems has cyclomatic complexity 58 (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. This is NOT this file's highest cyclomatic complexity: Endpoint.path (cyclomatic 129) is higher and carries no row of its own β€” it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 Β· Cyclomatic Complexity Β· BotRoomView.body (cyclomatic 50) Β· Γ—1
  • BotRoomView.body (cyclomatic 50) HermesMobile/Features/Bots/BotRoomView.swift:32 β€” BotRoomView.body has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· ChatStreamCoordinator.handle (cyclomatic 44) Β· Γ—1
  • ChatStreamCoordinator.handle (cyclomatic 44) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:802 β€” ChatStreamCoordinator.handle has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· BotChatControls.apply (cyclomatic 42) Β· Γ—1
  • BotChatControls.apply (cyclomatic 42) HermesMobile/Features/Bots/BotChatControls.swift:149 β€” BotChatControls.apply has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· HermesChatTurnCoordinator.apply (cyclomatic 42) Β· Γ—1
  • HermesChatTurnCoordinator.apply (cyclomatic 42) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1030 β€” HermesChatTurnCoordinator.apply has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· MoveToHermesProgress.report (cyclomatic 41) Β· Γ—1
  • MoveToHermesProgress.report (cyclomatic 41) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:205 β€” MoveToHermesProgress.report has cyclomatic complexity 41 (threshold 15). Of this number, 39 points are the body's own statements and 2 belong to one function item inside it that branches. 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 Β· BotRoomReader.open (cyclomatic 34) Β· Γ—1
  • BotRoomReader.open (cyclomatic 34) HermesMobile/Features/Bots/BotRoomReader.swift:108 β€” BotRoomReader.open 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 Β· ChatStreamCoordinator.performReconnectIfNeeded (cyclomatic 33) Β· Γ—1
  • ChatStreamCoordinator.performReconnectIfNeeded (cyclomatic 33) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:484 β€” ChatStreamCoordinator.performReconnectIfNeeded has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· SessionListViewModel.reloadHermes (cyclomatic 33) Β· Γ—1
  • SessionListViewModel.reloadHermes (cyclomatic 33) HermesMobile/Features/SessionList/SessionListViewModel.swift:1941 β€” SessionListViewModel.reloadHermes has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· BotHistoryCache.appendRoom (cyclomatic 32) Β· Γ—1
  • BotHistoryCache.appendRoom (cyclomatic 32) HermesMobile/Features/Bots/BotHistoryCache.swift:130 β€” BotHistoryCache.appendRoom has cyclomatic complexity 32 (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 Β· BotInbox.open (cyclomatic 32) Β· Γ—1
  • BotInbox.open (cyclomatic 32) HermesMobile/Features/Bots/BotInbox.swift:337 β€” BotInbox.open 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 Β· MessageComposerView.composerWithLifecycle (cyclomatic 30) Β· Γ—1
  • MessageComposerView.composerWithLifecycle (cyclomatic 30) HermesMobile/Features/Chat/ChatComposerView.swift:567 β€” MessageComposerView.composerWithLifecycle has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· ComposerChipTokenizer.tokens (cyclomatic 29) Β· Γ—1
  • ComposerChipTokenizer.tokens (cyclomatic 29) HermesMobile/Features/Chat/ComposerChipToken.swift:158 β€” ComposerChipTokenizer.tokens has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· ToolCallSummaryFormatter.kind (cyclomatic 29) Β· Γ—1
  • ToolCallSummaryFormatter.kind (cyclomatic 29) HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:113 β€” ToolCallSummaryFormatter.kind has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 Β· Cyclomatic Complexity Β· AgentLiveActivityManager.update (cyclomatic 27) Β· Γ—1
  • AgentLiveActivityManager.update (cyclomatic 27) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:391 β€” AgentLiveActivityManager.update 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 Β· ChatDraftStore.stageAttachment (cyclomatic 27) Β· Γ—1
  • ChatDraftStore.stageAttachment (cyclomatic 27) HermesMobile/Persistence/ChatDraftStore.swift:1058 β€” ChatDraftStore.stageAttachment 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 Β· HermesTranscriptProjection.project (cyclomatic 27) Β· Γ—1
  • HermesTranscriptProjection.project (cyclomatic 27) HermesMobile/Features/Chat/HermesTranscriptHistory.swift:198 β€” HermesTranscriptProjection.project has cyclomatic complexity 27 (threshold 15). Of this number, 24 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 Β· KanbanCardEditorState.save (cyclomatic 27) Β· Γ—1
  • KanbanCardEditorState.save (cyclomatic 27) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:168 β€” KanbanCardEditorState.save 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 Β· SessionListViewModel.openHermes (cyclomatic 27) Β· Γ—1
  • SessionListViewModel.openHermes (cyclomatic 27) HermesMobile/Features/SessionList/SessionListViewModel.swift:1774 β€” SessionListViewModel.openHermes 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 Β· BotConnectionSetup.connect (cyclomatic 26) Β· Γ—1
  • BotConnectionSetup.connect (cyclomatic 26) HermesMobile/Features/Bots/BotConnectionView.swift:496 β€” BotConnectionSetup.connect 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 Β· BotRoomCreator.create (cyclomatic 26) Β· Γ—1
  • BotRoomCreator.create (cyclomatic 26) HermesMobile/Features/Bots/BotRoomCreator.swift:59 β€” BotRoomCreator.create 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 Β· BotRoomReader.command (cyclomatic 26) Β· Γ—1
  • BotRoomReader.command (cyclomatic 26) HermesMobile/Features/Bots/BotRoomReader.swift:381 β€” BotRoomReader.command 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 Β· ChatViewModel.submitHermesPrompt (cyclomatic 26) Β· Γ—1
  • ChatViewModel.submitHermesPrompt (cyclomatic 26) HermesMobile/Features/Chat/ChatViewModel.swift:3100 β€” ChatViewModel.submitHermesPrompt 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 Β· KanbanFeatureState.refreshBoard (cyclomatic 26) Β· Γ—1
  • KanbanFeatureState.refreshBoard (cyclomatic 26) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2472 β€” KanbanFeatureState.refreshBoard 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 Β· MoveToHermesJournal.decode (cyclomatic 26) Β· Γ—1
  • MoveToHermesJournal.decode (cyclomatic 26) HermesMobile/Features/MoveToHermes/MoveToHermesJournal.swift:266 β€” MoveToHermesJournal.decode 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 Β· HermesUpdateMachine.handle (cyclomatic 26) Β· Γ—1
  • HermesUpdateMachine.handle (cyclomatic 26) HermesMobile/Features/Settings/HermesUpdateMachine.swift:107 β€” HermesUpdateMachine.handle 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 Β· BotConnectionView.body (cyclomatic 25) Β· Γ—1
  • BotConnectionView.body (cyclomatic 25) HermesMobile/Features/Bots/BotConnectionView.swift:37 β€” BotConnectionView.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 Β· MoveToHermesReconcile.apply Β· Γ—1
  • MoveToHermesReconcile.apply::send (cyclomatic 25) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:160 β€” MoveToHermesReconcile.apply::send has cyclomatic complexity 25 (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 Β· SessionListView.body (cyclomatic 25) Β· Γ—1
  • SessionListView.body (cyclomatic 25) HermesMobile/Features/SessionList/SessionListView.swift:208 β€” SessionListView.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 Β· ChatTranscriptMessageBlock.== (cyclomatic 24) Β· Γ—1
  • ChatTranscriptMessageBlock.== (cyclomatic 24) HermesMobile/Features/Chat/ChatTranscriptView.swift:689 β€” ChatTranscriptMessageBlock.== has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 Β· Cyclomatic Complexity Β· ChatViewModel.restoreDraftSettings (cyclomatic 24) Β· Γ—1
  • ChatViewModel.restoreDraftSettings (cyclomatic 24) HermesMobile/Features/Chat/ChatViewModel.swift:1645 β€” ChatViewModel.restoreDraftSettings 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 Β· ChatViewModel.loadMessages (cyclomatic 24) Β· Γ—1
  • ChatViewModel.loadMessages (cyclomatic 24) HermesMobile/Features/Chat/ChatViewModel.swift:1837 β€” ChatViewModel.loadMessages 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 Β· HermesChatTurnCoordinator.reconcile (cyclomatic 24) Β· Γ—1
  • HermesChatTurnCoordinator.reconcile (cyclomatic 24) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1207 β€” HermesChatTurnCoordinator.reconcile has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· BotConnection.address (cyclomatic 23) Β· Γ—1
  • BotConnection.address (cyclomatic 23) HermesMobile/Features/Bots/BotConnection.swift:58 β€” BotConnection.address has cyclomatic complexity 23 (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 Β· ChatView.sendDraftMessage (cyclomatic 23) Β· Γ—1
  • ChatView.sendDraftMessage (cyclomatic 23) HermesMobile/Features/Chat/ChatView.swift:2567 β€” ChatView.sendDraftMessage 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 Β· ChatViewModel.performChatSend (cyclomatic 23) Β· Γ—1
  • ChatViewModel.performChatSend (cyclomatic 23) HermesMobile/Features/Chat/ChatViewModel.swift:3367 β€” ChatViewModel.performChatSend 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 Β· HermesChatRequests.setApprovalBypass (cyclomatic 23) Β· Γ—1
  • HermesChatRequests.setApprovalBypass (cyclomatic 23) HermesMobile/Features/Chat/HermesChatRequests.swift:411 β€” HermesChatRequests.setApprovalBypass 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 Β· SessionListViewModel.loadSessionForDeepLink (cyclomatic 23) Β· Γ—1
  • SessionListViewModel.loadSessionForDeepLink (cyclomatic 23) HermesMobile/Features/SessionList/SessionListViewModel.swift:899 β€” SessionListViewModel.loadSessionForDeepLink 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 Β· MessageAttachment.hermesTitle (cyclomatic 22) Β· Γ—1
  • MessageAttachment.hermesTitle (cyclomatic 22) HermesMobile/Models/MessageAttachment.swift:213 β€” MessageAttachment.hermesTitle 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 Β· ChatView.handleSlashExecutionResult (cyclomatic 22) Β· Γ—1
  • ChatView.handleSlashExecutionResult (cyclomatic 22) HermesMobile/Features/Chat/ChatView.swift:2797 β€” ChatView.handleSlashExecutionResult has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· TranscriptMediaPreviewViewModel.load (cyclomatic 22) Β· Γ—1
  • TranscriptMediaPreviewViewModel.load (cyclomatic 22) HermesMobile/Features/Chat/TranscriptMediaPreviewViewModel.swift:55 β€” TranscriptMediaPreviewViewModel.load has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· KanbanFeatureState.dispatcherAvailability (cyclomatic 22) Β· Γ—1
  • KanbanFeatureState.dispatcherAvailability (cyclomatic 22) HermesMobile/Features/Kanban/KanbanFeatureState.swift:549 β€” KanbanFeatureState.dispatcherAvailability 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 Β· ReviewDiffLoader.load (cyclomatic 22) Β· Γ—1
  • ReviewDiffLoader.load (cyclomatic 22) HermesMobile/Features/Workspace/GitDiffView.swift:242 β€” ReviewDiffLoader.load has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 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 Β· HermesGateway.send (cyclomatic 22) Β· Γ—1
  • HermesGateway.send (cyclomatic 22) HermesMobile/Networking/Hermes/HermesGateway.swift:205 β€” HermesGateway.send 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 Β· AgentLiveActivityManager.requestOrUpdateActivity (cyclomatic 21) Β· Γ—1
  • AgentLiveActivityManager.requestOrUpdateActivity (cyclomatic 21) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:794 β€” AgentLiveActivityManager.requestOrUpdateActivity 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 Β· PushActivityRegistrar.reconcile (cyclomatic 21) Β· Γ—1
  • PushActivityRegistrar.reconcile (cyclomatic 21) HermesMobile/Push/PushRegistrar.swift:573 β€” PushActivityRegistrar.reconcile 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 Β· HermesChatRequests.respondToConnection (cyclomatic 21) Β· Γ—1
  • HermesChatRequests.respondToConnection (cyclomatic 21) HermesMobile/Features/Chat/HermesChatRequests.swift:288 β€” HermesChatRequests.respondToConnection 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 Β· HermesChatTurnCoordinator.submit (cyclomatic 21) Β· Γ—1
  • HermesChatTurnCoordinator.submit (cyclomatic 21) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:450 β€” HermesChatTurnCoordinator.submit 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 Β· HermesDelegatedWork.loadTail (cyclomatic 21) Β· Γ—1
  • HermesDelegatedWork.loadTail (cyclomatic 21) HermesMobile/Features/Chat/HermesDelegatedWork.swift:239 β€” HermesDelegatedWork.loadTail 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 Β· HermesDelegatedWork.interrupt (cyclomatic 21) Β· Γ—1
  • HermesDelegatedWork.interrupt (cyclomatic 21) HermesMobile/Features/Chat/HermesDelegatedWork.swift:282 β€” HermesDelegatedWork.interrupt 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 Β· KanbanCardEditorState.intendedValuesAppear (cyclomatic 21) Β· Γ—1
  • KanbanCardEditorState.intendedValuesAppear (cyclomatic 21) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:410 β€” KanbanCardEditorState.intendedValuesAppear has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 Β· Cyclomatic Complexity Β· SessionListView.isQuietSessionListVisible (cyclomatic 21) Β· Γ—1
  • SessionListView.isQuietSessionListVisible (cyclomatic 21) HermesMobile/Features/SessionList/SessionListView.swift:483 β€” SessionListView.isQuietSessionListVisible has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 Β· Cyclomatic Complexity Β· SessionListViewModel.sessionForOpening (cyclomatic 21) Β· Γ—1
  • SessionListViewModel.sessionForOpening (cyclomatic 21) HermesMobile/Features/SessionList/SessionListViewModel.swift:959 β€” SessionListViewModel.sessionForOpening 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 Β· HermesConnection.beginSignIn (cyclomatic 21) Β· Γ—1
  • HermesConnection.beginSignIn (cyclomatic 21) HermesMobile/Networking/Hermes/HermesConnection.swift:196 β€” HermesConnection.beginSignIn 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 Β· KanbanCompatibilityValidator.validate (cyclomatic 20) Β· Γ—1
  • KanbanCompatibilityValidator.validate (cyclomatic 20) HermesMobile/Models/Kanban.swift:1270 β€” KanbanCompatibilityValidator.validate 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 Β· BotArtifactReference.path (cyclomatic 20) Β· Γ—1
  • BotArtifactReference.path (cyclomatic 20) HermesMobile/Features/Bots/BotArtifact.swift:28 β€” BotArtifactReference.path has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 Β· Cyclomatic Complexity Β· BotRoomProfileView.body (cyclomatic 20) Β· Γ—1
  • BotRoomProfileView.body (cyclomatic 20) HermesMobile/Features/Bots/BotRoomProfileView.swift:17 β€” BotRoomProfileView.body has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· BotSearchView.body (cyclomatic 20) Β· Γ—1
  • BotSearchView.body (cyclomatic 20) HermesMobile/Features/Bots/BotSearchView.swift:65 β€” BotSearchView.body 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 Β· ChatStreamCoordinator.recoverStaleStream (cyclomatic 20) Β· Γ—1
  • ChatStreamCoordinator.recoverStaleStream (cyclomatic 20) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:979 β€” ChatStreamCoordinator.recoverStaleStream 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 Β· ChatViewModel.runHermesSlashCommand (cyclomatic 20) Β· Γ—1
  • ChatViewModel.runHermesSlashCommand (cyclomatic 20) HermesMobile/Features/Chat/ChatViewModel.swift:4150 β€” ChatViewModel.runHermesSlashCommand 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 Β· HermesSessionLookup.resolve (cyclomatic 20) Β· Γ—1
  • HermesSessionLookup.resolve (cyclomatic 20) HermesMobile/Features/Hermes/HermesSessionLookup.swift:77 β€” HermesSessionLookup.resolve 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 Β· KanbanFeatureState.checkUncertainMutation (cyclomatic 20) Β· Γ—1
  • KanbanFeatureState.checkUncertainMutation (cyclomatic 20) HermesMobile/Features/Kanban/KanbanFeatureState.swift:927 β€” KanbanFeatureState.checkUncertainMutation 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 Β· OnboardingViewModel.addHermesServer (cyclomatic 20) Β· Γ—1
  • OnboardingViewModel.addHermesServer (cyclomatic 20) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:558 β€” OnboardingViewModel.addHermesServer has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 Β· Cyclomatic Complexity Β· BotAttachmentUpload.prepare (cyclomatic 20) Β· Γ—1
  • BotAttachmentUpload.prepare (cyclomatic 20) HermesMobile/Networking/Bots/BotAttachmentUpload.swift:26 β€” BotAttachmentUpload.prepare 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 Β· APIError.errorDescription (cyclomatic 19) Β· Γ—1
  • APIError.errorDescription (cyclomatic 19) HermesMobile/Networking/APIError.swift:10 β€” APIError.errorDescription has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform β€” the same kind of value, with no behaviour of its own β€” a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 Β· Cyclomatic Complexity Β· Record.draft (cyclomatic 19) Β· Γ—1
  • Record.draft (cyclomatic 19) HermesMobile/Persistence/ChatDraftStore.swift:467 β€” Record.draft has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· BotConnectionSetup.connectThroughBrowser (cyclomatic 19) Β· Γ—1
  • BotConnectionSetup.connectThroughBrowser (cyclomatic 19) HermesMobile/Features/Bots/BotConnectionView.swift:542 β€” BotConnectionSetup.connectThroughBrowser has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· BotInbox.reload (cyclomatic 19) Β· Γ—1
  • BotInbox.reload (cyclomatic 19) HermesMobile/Features/Bots/BotInbox.swift:609 β€” BotInbox.reload has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· HermexAttachmentImageProcessor.prepareSynchronously (cyclomatic 19) Β· Γ—1
  • HermexAttachmentImageProcessor.prepareSynchronously (cyclomatic 19) HermesMobile/Features/Chat/CustomAttachmentPicker.swift:277 β€” HermexAttachmentImageProcessor.prepareSynchronously has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· KanbanFeatureState.bulkActionsAvailability (cyclomatic 19) Β· Γ—1
  • KanbanFeatureState.bulkActionsAvailability (cyclomatic 19) HermesMobile/Features/Kanban/KanbanFeatureState.swift:603 β€” KanbanFeatureState.bulkActionsAvailability 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 Β· KanbanFeatureState.load (cyclomatic 19) Β· Γ—1
  • KanbanFeatureState.load (cyclomatic 19) HermesMobile/Features/Kanban/KanbanFeatureState.swift:982 β€” KanbanFeatureState.load has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· WebuiSessionTransfer.run (cyclomatic 19) Β· Γ—1
  • WebuiSessionTransfer.run (cyclomatic 19) HermesMobile/Features/MoveToHermes/WebuiSessionTransfer.swift:79 β€” WebuiSessionTransfer.run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· OnboardingViewModel.connect (cyclomatic 19) Β· Γ—1
  • OnboardingViewModel.connect (cyclomatic 19) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:484 β€” OnboardingViewModel.connect has cyclomatic complexity 19 (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 Β· SessionListViewModel.searchSessions (cyclomatic 19) Β· Γ—1
  • SessionListViewModel.searchSessions (cyclomatic 19) HermesMobile/Features/SessionList/SessionListViewModel.swift:576 β€” SessionListViewModel.searchSessions has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· ContentView.handleOpenURL (cyclomatic 18) Β· Γ—1
  • ContentView.handleOpenURL (cyclomatic 18) HermesMobile/ContentView.swift:132 β€” ContentView.handleOpenURL 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 Β· LeftoverLiveActivitySettlement.actions (cyclomatic 18) Β· Γ—1
  • LeftoverLiveActivitySettlement.actions (cyclomatic 18) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1356 β€” LeftoverLiveActivitySettlement.actions 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 Β· AgentRunActivitySanitizer.toolKind (cyclomatic 18) Β· Γ—1
  • AgentRunActivitySanitizer.toolKind (cyclomatic 18) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:372 β€” AgentRunActivitySanitizer.toolKind has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 Β· Cyclomatic Complexity Β· ChatDraftStore.appendShare (cyclomatic 18) Β· Γ—1
  • ChatDraftStore.appendShare (cyclomatic 18) HermesMobile/Persistence/ChatDraftStore.swift:739 β€” ChatDraftStore.appendShare has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· BotChatControls.reload (cyclomatic 18) Β· Γ—1
  • BotChatControls.reload (cyclomatic 18) HermesMobile/Features/Bots/BotChatControls.swift:113 β€” BotChatControls.reload 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 Β· BotCreateView.body (cyclomatic 18) Β· Γ—1
  • BotCreateView.body (cyclomatic 18) HermesMobile/Features/Bots/BotCreateView.swift:19 β€” BotCreateView.body 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 Β· BotSlashCatalog.skills (cyclomatic 18) Β· Γ—1
  • BotSlashCatalog.skills (cyclomatic 18) HermesMobile/Features/Bots/BotSlashCommands.swift:24 β€” BotSlashCatalog.skills 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 Β· ChatTranscriptView.transcriptScrollContent (cyclomatic 18) Β· Γ—1
  • ChatTranscriptView.transcriptScrollContent (cyclomatic 18) HermesMobile/Features/Chat/ChatTranscriptView.swift:330 β€” ChatTranscriptView.transcriptScrollContent 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 Β· ChatView.messageComposer (cyclomatic 18) Β· Γ—1
  • ChatView.messageComposer (cyclomatic 18) HermesMobile/Features/Chat/ChatView.swift:519 β€” ChatView.messageComposer 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 Β· ChatView.chatContent (cyclomatic 18) Β· Γ—1
  • ChatView.chatContent (cyclomatic 18) HermesMobile/Features/Chat/ChatView.swift:1077 β€” ChatView.chatContent 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 Β· TranscriptTurnFolds.derive (cyclomatic 18) Β· Γ—1
  • TranscriptTurnFolds.derive (cyclomatic 18) HermesMobile/Features/Chat/TranscriptTurnFolding.swift:87 β€” TranscriptTurnFolds.derive 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 Β· HermesConversation.reconcile (cyclomatic 18) Β· Γ—1
  • HermesConversation.reconcile (cyclomatic 18) HermesMobile/Features/Hermes/HermesConversation.swift:451 β€” HermesConversation.reconcile 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 Β· KanbanFeatureState.performBulkAction (cyclomatic 18) Β· Γ—1
  • KanbanFeatureState.performBulkAction (cyclomatic 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1667 β€” KanbanFeatureState.performBulkAction 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 Β· KanbanStatusFocusView.body (cyclomatic 18) Β· Γ—1
  • KanbanStatusFocusView.body (cyclomatic 18) HermesMobile/Features/Kanban/KanbanLabView.swift:165 β€” KanbanStatusFocusView.body 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 Β· MoveToHermesSheet.pausedDetails (cyclomatic 18) Β· Γ—1
  • MoveToHermesSheet.pausedDetails (cyclomatic 18) HermesMobile/Features/MoveToHermes/MoveToHermesView.swift:375 β€” MoveToHermesSheet.pausedDetails 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 Β· HermesSessionListView.body (cyclomatic 18) Β· Γ—1
  • HermesSessionListView.body (cyclomatic 18) HermesMobile/Features/SessionList/HermesSessionListView.swift:192 β€” HermesSessionListView.body 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 Β· SessionRowContextMenu.body (cyclomatic 18) Β· Γ—1
  • SessionRowContextMenu.body (cyclomatic 18) HermesMobile/Features/SessionList/SessionListComponents.swift:1139 β€” SessionRowContextMenu.body 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 Β· TaskDetailViewModel.followRunNow (cyclomatic 18) Β· Γ—1
  • TaskDetailViewModel.followRunNow (cyclomatic 18) HermesMobile/Features/Tasks/TaskDetailViewModel.swift:444 β€” TaskDetailViewModel.followRunNow 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 Β· AgentLiveActivityManager.observePush (cyclomatic 17) Β· Γ—1
  • AgentLiveActivityManager.observePush (cyclomatic 17) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1052 β€” AgentLiveActivityManager.observePush has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· CachedMessage.matches (cyclomatic 17) Β· Γ—1
  • CachedMessage.matches (cyclomatic 17) HermesMobile/Persistence/CachedMessage.swift:88 β€” CachedMessage.matches 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 Β· BotFaceBit.pose (cyclomatic 17) Β· Γ—1
  • BotFaceBit.pose (cyclomatic 17) HermesMobile/Features/Bots/BotFaceMotion.swift:170 β€” BotFaceBit.pose 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 Β· BotInbox.refreshRooms (cyclomatic 17) Β· Γ—1
  • BotInbox.refreshRooms (cyclomatic 17) HermesMobile/Features/Bots/BotInbox.swift:847 β€” BotInbox.refreshRooms 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 Β· BotProfileEditorView.body (cyclomatic 17) Β· Γ—1
  • BotProfileEditorView.body (cyclomatic 17) HermesMobile/Features/Bots/BotProfileEditorView.swift:26 β€” BotProfileEditorView.body has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 Β· Cyclomatic Complexity Β· HermexPushProvisioner.setUp (cyclomatic 17) Β· Γ—1
  • HermexPushProvisioner.setUp (cyclomatic 17) HermesMobile/Features/Bots/HermexPushProvisioner.swift:305 β€” HermexPushProvisioner.setUp has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: HermexPushProvisioner.message (cyclomatic 19) is higher and carries no row of its own β€” it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 Β· Cyclomatic Complexity Β· Coordinator.syncFocus (cyclomatic 17) Β· Γ—1
  • Coordinator.syncFocus (cyclomatic 17) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:490 β€” Coordinator.syncFocus 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 Β· MessageComposerView.slashQuery (cyclomatic 17) Β· Γ—1
  • MessageComposerView.slashQuery (cyclomatic 17) HermesMobile/Features/Chat/ChatComposerView.swift:419 β€” MessageComposerView.slashQuery 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 Β· ChatViewModel.toggleListening (cyclomatic 17) Β· Γ—1
  • ChatViewModel.toggleListening (cyclomatic 17) HermesMobile/Features/Chat/ChatViewModel.swift:6165 β€” ChatViewModel.toggleListening 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. This is NOT this file's highest cyclomatic complexity: ChatViewModel.executeServerSideSlashCommand (cyclomatic 19) is higher and carries no row of its own β€” it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 Β· Cyclomatic Complexity Β· ComposerVoiceInputController.finishServerRecording (cyclomatic 17) Β· Γ—1
  • ComposerVoiceInputController.finishServerRecording (cyclomatic 17) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:461 β€” ComposerVoiceInputController.finishServerRecording 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 Β· HermesConversation.answer (cyclomatic 17) Β· Γ—1
  • HermesConversation.answer (cyclomatic 17) HermesMobile/Features/Hermes/HermesConversation.swift:301 β€” HermesConversation.answer has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 Β· Cyclomatic Complexity Β· ProviderLimitCard.init (cyclomatic 17) Β· Γ—1
  • ProviderLimitCard.init (cyclomatic 17) HermesMobile/Features/Insights/InsightsModels.swift:389 β€” ProviderLimitCard.init 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 Β· OnboardingViewModel.testConnection (cyclomatic 17) Β· Γ—1
  • OnboardingViewModel.testConnection (cyclomatic 17) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:416 β€” OnboardingViewModel.testConnection 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 Β· HermesSessionListView.openPendingLink (cyclomatic 17) Β· Γ—1
  • HermesSessionListView.openPendingLink (cyclomatic 17) HermesMobile/Features/SessionList/HermesSessionListView.swift:713 β€” HermesSessionListView.openPendingLink 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 Β· SessionListViewModel.load (cyclomatic 17) Β· Γ—1
  • SessionListViewModel.load (cyclomatic 17) HermesMobile/Features/SessionList/SessionListViewModel.swift:406 β€” SessionListViewModel.load 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 Β· BotProfileEditor.save (cyclomatic 16) Β· Γ—1
  • BotProfileEditor.save (cyclomatic 16) HermesMobile/Features/Bots/BotProfileEditor.swift:310 β€” BotProfileEditor.save 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 Β· BotsInboxView.list (cyclomatic 16) Β· Γ—1
  • BotsInboxView.list (cyclomatic 16) HermesMobile/Features/Bots/BotsInboxView.swift:147 β€” BotsInboxView.list 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 Β· BotsInboxView.attachPresentations (cyclomatic 16) Β· Γ—1
  • BotsInboxView.attachPresentations (cyclomatic 16) HermesMobile/Features/Bots/BotsInboxView.swift:587 β€” BotsInboxView.attachPresentations 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 Β· HermexPushSettingsPage.pushSettings (cyclomatic 16) Β· Γ—1
  • HermexPushSettingsPage.pushSettings (cyclomatic 16) HermesMobile/Features/Bots/HermexPushSettingsPage.swift:80 β€” HermexPushSettingsPage.pushSettings 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 Β· ChatMessageActionMenu.items (cyclomatic 16) Β· Γ—1
  • ChatMessageActionMenu.items (cyclomatic 16) HermesMobile/Features/Chat/ChatMessageActions.swift:84 β€” ChatMessageActionMenu.items 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 Β· ChatViewModel.sendMessage (cyclomatic 16) Β· Γ—1
  • ChatViewModel.sendMessage (cyclomatic 16) HermesMobile/Features/Chat/ChatViewModel.swift:2866 β€” ChatViewModel.sendMessage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ChatViewModel.executeServerSideSlashCommand (cyclomatic 19) is higher and carries no row of its own β€” it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 Β· Cyclomatic Complexity Β· InlineMathTextRequest.parsed (cyclomatic 16) Β· Γ—1
  • InlineMathTextRequest.parsed (cyclomatic 16) HermesMobile/Features/Chat/DisplayMathView.swift:466 β€” InlineMathTextRequest.parsed 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 Β· MarkdownDiffFormatter.parse (cyclomatic 16) Β· Γ—1
  • MarkdownDiffFormatter.parse (cyclomatic 16) HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:113 β€” MarkdownDiffFormatter.parse 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 Β· ResponseSelectionInput.document (cyclomatic 16) Β· Γ—1
  • ResponseSelectionInput.document (cyclomatic 16) HermesMobile/Features/Chat/ResponseSelectionInput.swift:63 β€” ResponseSelectionInput.document 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 Β· InsightsViewModel.load (cyclomatic 16) Β· Γ—1
  • InsightsViewModel.load (cyclomatic 16) HermesMobile/Features/Insights/InsightsViewModel.swift:174 β€” InsightsViewModel.load 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 Β· KanbanFeatureState.handleStreamFrame (cyclomatic 16) Β· Γ—1
  • KanbanFeatureState.handleStreamFrame (cyclomatic 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2587 β€” KanbanFeatureState.handleStreamFrame 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 Β· KanbanFeatureState.scheduleCoalescedReconciliation (cyclomatic 16) Β· Γ—1
  • KanbanFeatureState.scheduleCoalescedReconciliation (cyclomatic 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2663 β€” KanbanFeatureState.scheduleCoalescedReconciliation 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 Β· MoveToHermesRunner.reconcile (cyclomatic 16) Β· Γ—1
  • MoveToHermesRunner.reconcile (cyclomatic 16) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:645 β€” MoveToHermesRunner.reconcile 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 Β· HermesREST.request (cognitive 142) Β· Γ—1
  • HermesREST.request (cognitive 142) HermesMobile/Networking/Hermes/HermesREST.swift:362 β€” HermesREST.request has cognitive complexity 142 (threshold 15). Drivers by points: if/else 52 (104 pts), boolean chains 19, ternaries 9 (18 pts), match/switch 1 (nesting depth added 61). 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 Β· ChatStreamCoordinator.performReconnectIfNeeded (cognitive 81) Β· Γ—1
  • ChatStreamCoordinator.performReconnectIfNeeded (cognitive 81) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:484 β€” ChatStreamCoordinator.performReconnectIfNeeded has cognitive complexity 81 (threshold 15). Drivers by points: if/else 20 (59 pts), boolean chains 9, error handling 3 (7 pts), ternaries 1 (5 pts), loops 1 (nesting depth added 47). 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 Β· HermesCall.admit (cognitive 66) Β· Γ—1
  • HermesCall.admit (cognitive 66) HermesMobile/Networking/Hermes/HermesCall.swift:541 β€” HermesCall.admit has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 57, match/switch 3 (5 pts), if/else 3 (4 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 Β· SessionListViewModel.reloadHermes (cognitive 62) Β· Γ—1
  • SessionListViewModel.reloadHermes (cognitive 62) HermesMobile/Features/SessionList/SessionListViewModel.swift:1941 β€” SessionListViewModel.reloadHermes has cognitive complexity 62 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 4 (10 pts), boolean chains 9, ternaries 2 (6 pts), error handling 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotChatControls.apply (cognitive 61) Β· Γ—1
  • BotChatControls.apply (cognitive 61) HermesMobile/Features/Bots/BotChatControls.swift:149 β€” BotChatControls.apply has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 16, ternaries 2 (7 pts), match/switch 2 (3 pts), error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotInbox.open (cognitive 58) Β· Γ—1
  • BotInbox.open (cognitive 58) HermesMobile/Features/Bots/BotInbox.swift:337 β€” BotInbox.open has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (48 pts), boolean chains 9, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesTranscriptProjection.project (cognitive 58) Β· Γ—1
  • HermesTranscriptProjection.project (cognitive 58) HermesMobile/Features/Chat/HermesTranscriptHistory.swift:198 β€” HermesTranscriptProjection.project has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (28 pts), ternaries 6 (18 pts), boolean chains 5, loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 32). Of this number, 55 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotRoomReader.open (cognitive 54) Β· Γ—1
  • BotRoomReader.open (cognitive 54) HermesMobile/Features/Bots/BotRoomReader.swift:108 β€” BotRoomReader.open has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 14, loops 3 (7 pts), ternaries 2 (6 pts), error handling 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatViewModel.loadMessages (cognitive 53) Β· Γ—1
  • ChatViewModel.loadMessages (cognitive 53) HermesMobile/Features/Chat/ChatViewModel.swift:1837 β€” ChatViewModel.loadMessages has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (40 pts), error handling 4 (10 pts), boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotRoomView.body (cognitive 51) Β· Γ—1
  • BotRoomView.body (cognitive 51) HermesMobile/Features/Bots/BotRoomView.swift:32 β€” BotRoomView.body has cognitive complexity 51 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 17, ternaries 5, error handling 1, match/switch 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 Β· ChatDraftStore.stageAttachment (cognitive 46) Β· Γ—1
  • ChatDraftStore.stageAttachment (cognitive 46) HermesMobile/Persistence/ChatDraftStore.swift:1058 β€” ChatDraftStore.stageAttachment has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 7 (15 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· MoveToHermesJournal.decode (cognitive 46) Β· Γ—1
  • MoveToHermesJournal.decode (cognitive 46) HermesMobile/Features/MoveToHermes/MoveToHermesJournal.swift:266 β€” MoveToHermesJournal.decode has cognitive complexity 46 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 3 (7 pts), match/switch 2 (6 pts), boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesConnection.beginSignIn (cognitive 44) Β· Γ—1
  • HermesConnection.beginSignIn (cognitive 44) HermesMobile/Networking/Hermes/HermesConnection.swift:196 β€” HermesConnection.beginSignIn has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (34 pts), ternaries 1 (4 pts), match/switch 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ComposerChipTokenizer.tokens (cognitive 43) Β· Γ—1
  • ComposerChipTokenizer.tokens (cognitive 43) HermesMobile/Features/Chat/ComposerChipToken.swift:158 β€” ComposerChipTokenizer.tokens has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 15, loops 3 (5 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 Β· MoveToHermesProgress.report (cognitive 43) Β· Γ—1
  • MoveToHermesProgress.report (cognitive 43) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:205 β€” MoveToHermesProgress.report has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 5 (13 pts), ternaries 3 (12 pts), if/else 5 (11 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 24). Of this number, 41 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· WebuiSessionTransfer.run (cognitive 43) Β· Γ—1
  • WebuiSessionTransfer.run (cognitive 43) HermesMobile/Features/MoveToHermes/WebuiSessionTransfer.swift:79 β€” WebuiSessionTransfer.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 4 (7 pts), match/switch 1 (4 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotRoomCreator.create (cognitive 42) Β· Γ—1
  • BotRoomCreator.create (cognitive 42) HermesMobile/Features/Bots/BotRoomCreator.swift:59 β€” BotRoomCreator.create has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 13, error handling 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesChatTurnCoordinator.apply (cognitive 42) Β· Γ—1
  • HermesChatTurnCoordinator.apply (cognitive 42) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1030 β€” HermesChatTurnCoordinator.apply has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 10, ternaries 1 (2 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 Β· BotRoomReader.command (cognitive 41) Β· Γ—1
  • BotRoomReader.command (cognitive 41) HermesMobile/Features/Bots/BotRoomReader.swift:381 β€” BotRoomReader.command has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 10, error handling 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· KanbanFeatureState.refreshBoard (cognitive 41) Β· Γ—1
  • KanbanFeatureState.refreshBoard (cognitive 41) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2472 β€” KanbanFeatureState.refreshBoard has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 8, ternaries 1 (3 pts), error handling 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatStreamCoordinator.handle (cognitive 40) Β· Γ—1
  • ChatStreamCoordinator.handle (cognitive 40) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:802 β€” ChatStreamCoordinator.handle has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· TranscriptMediaPreviewViewModel.load (cognitive 40) Β· Γ—1
  • TranscriptMediaPreviewViewModel.load (cognitive 40) HermesMobile/Features/Chat/TranscriptMediaPreviewViewModel.swift:55 β€” TranscriptMediaPreviewViewModel.load has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 8, error handling 1 (nesting depth added 16). 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 Β· KanbanCardEditorState.save (cognitive 40) Β· Γ—1
  • KanbanCardEditorState.save (cognitive 40) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:168 β€” KanbanCardEditorState.save has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4, error handling 2 (3 pts), match/switch 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesCall.params (cognitive 39) Β· Γ—1
  • HermesCall.params (cognitive 39) HermesMobile/Networking/Hermes/HermesCall.swift:354 β€” HermesCall.params has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 19). The drivers above price the dispatch low by construction β€” a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full β€” so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 Β· Cognitive Complexity Β· BotConnectionSetup.connect (cognitive 38) Β· Γ—1
  • BotConnectionSetup.connect (cognitive 38) HermesMobile/Features/Bots/BotConnectionView.swift:496 β€” BotConnectionSetup.connect has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 8 (13 pts), boolean chains 8, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ReviewDiffLoader.load (cognitive 38) Β· Γ—1
  • ReviewDiffLoader.load (cognitive 38) HermesMobile/Features/Workspace/GitDiffView.swift:242 β€” ReviewDiffLoader.load has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 5, loops 3, match/switch 1 (2 pts) (nesting depth added 17). Of this number, 36 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotSearchView.body (cognitive 37) Β· Γ—1
  • BotSearchView.body (cognitive 37) HermesMobile/Features/Bots/BotSearchView.swift:65 β€” BotSearchView.body has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 4 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth β€” most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 Β· Cognitive Complexity Β· HermexAttachmentImageProcessor.prepareSynchronously (cognitive 37) Β· Γ—1
  • HermexAttachmentImageProcessor.prepareSynchronously (cognitive 37) HermesMobile/Features/Chat/CustomAttachmentPicker.swift:277 β€” HermexAttachmentImageProcessor.prepareSynchronously has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 5 (16 pts), if/else 6 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SessionListViewModel.openHermes (cognitive 37) Β· Γ—1
  • SessionListViewModel.openHermes (cognitive 37) HermesMobile/Features/SessionList/SessionListViewModel.swift:1774 β€” SessionListViewModel.openHermes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 8, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· Endpoint.queryItems (cognitive 36) Β· Γ—1
  • Endpoint.queryItems (cognitive 36) HermesMobile/Networking/Endpoints.swift:411 β€” Endpoint.queryItems has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 16). 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 Β· ChatView.sendDraftMessage (cognitive 36) Β· Γ—1
  • ChatView.sendDraftMessage (cognitive 36) HermesMobile/Features/Chat/ChatView.swift:2567 β€” ChatView.sendDraftMessage has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 8, match/switch 1 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SessionListViewModel.loadSessionForDeepLink (cognitive 36) Β· Γ—1
  • SessionListViewModel.loadSessionForDeepLink (cognitive 36) HermesMobile/Features/SessionList/SessionListViewModel.swift:899 β€” SessionListViewModel.loadSessionForDeepLink has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 7, error handling 3 (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 Β· MessageComposerView.composerWithLifecycle (cognitive 35) Β· Γ—1
  • MessageComposerView.composerWithLifecycle (cognitive 35) HermesMobile/Features/Chat/ChatComposerView.swift:567 β€” MessageComposerView.composerWithLifecycle has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24 (26 pts), boolean chains 5, ternaries 3 (4 pts) (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 Β· ChatViewModel.performChatSend (cognitive 35) Β· Γ—1
  • ChatViewModel.performChatSend (cognitive 35) HermesMobile/Features/Chat/ChatViewModel.swift:3367 β€” ChatViewModel.performChatSend has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 8, error handling 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesConversation.answer (cognitive 34) Β· Γ—1
  • HermesConversation.answer (cognitive 34) HermesMobile/Features/Hermes/HermesConversation.swift:301 β€” HermesConversation.answer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (25 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 19). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· KanbanFeatureState.load (cognitive 34) Β· Γ—1
  • KanbanFeatureState.load (cognitive 34) HermesMobile/Features/Kanban/KanbanFeatureState.swift:982 β€” KanbanFeatureState.load has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 2 (5 pts), boolean chains 2, error handling 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· AgentLiveActivityManager.requestOrUpdateActivity (cognitive 33) Β· Γ—1
  • AgentLiveActivityManager.requestOrUpdateActivity (cognitive 33) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:794 β€” AgentLiveActivityManager.requestOrUpdateActivity has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 7, ternaries 2 (4 pts), loops 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotHistoryCache.appendRoom (cognitive 33) Β· Γ—1
  • BotHistoryCache.appendRoom (cognitive 33) HermesMobile/Features/Bots/BotHistoryCache.swift:130 β€” BotHistoryCache.appendRoom has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 21, if/else 5 (6 pts), ternaries 4 (5 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· HermesChatRequests.respondToConnection (cognitive 33) Β· Γ—1
  • HermesChatRequests.respondToConnection (cognitive 33) HermesMobile/Features/Chat/HermesChatRequests.swift:288 β€” HermesChatRequests.respondToConnection has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 9, ternaries 1 (4 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesChatRequests.setApprovalBypass (cognitive 33) Β· Γ—1
  • HermesChatRequests.setApprovalBypass (cognitive 33) HermesMobile/Features/Chat/HermesChatRequests.swift:411 β€” HermesChatRequests.setApprovalBypass has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 9, 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 Β· BotInbox.reload (cognitive 32) Β· Γ—1
  • BotInbox.reload (cognitive 32) HermesMobile/Features/Bots/BotInbox.swift:609 β€” BotInbox.reload has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 6, loops 2 (4 pts), error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatView.handleSlashExecutionResult (cognitive 32) Β· Γ—1
  • ChatView.handleSlashExecutionResult (cognitive 32) HermesMobile/Features/Chat/ChatView.swift:2797 β€” ChatView.handleSlashExecutionResult has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (31 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 Β· BotInbox.refreshRooms (cognitive 31) Β· Γ—1
  • BotInbox.refreshRooms (cognitive 31) HermesMobile/Features/Bots/BotInbox.swift:847 β€” BotInbox.refreshRooms has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 4, 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 Β· HermesDelegatedWork.interrupt (cognitive 31) Β· Γ—1
  • HermesDelegatedWork.interrupt (cognitive 31) HermesMobile/Features/Chat/HermesDelegatedWork.swift:282 β€” HermesDelegatedWork.interrupt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, 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 Β· SessionListViewModel.sessionForOpening (cognitive 31) Β· Γ—1
  • SessionListViewModel.sessionForOpening (cognitive 31) HermesMobile/Features/SessionList/SessionListViewModel.swift:959 β€” SessionListViewModel.sessionForOpening has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 8, error handling 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· PushActivityRegistrar.reconcile (cognitive 30) Β· Γ—1
  • PushActivityRegistrar.reconcile (cognitive 30) HermesMobile/Push/PushRegistrar.swift:573 β€” PushActivityRegistrar.reconcile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, error handling 3 (7 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatViewModel.restoreDraftSettings (cognitive 30) Β· Γ—1
  • ChatViewModel.restoreDraftSettings (cognitive 30) HermesMobile/Features/Chat/ChatViewModel.swift:1645 β€” ChatViewModel.restoreDraftSettings has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 10 (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 Β· SessionListViewModel.load (cognitive 30) Β· Γ—1
  • SessionListViewModel.load (cognitive 30) HermesMobile/Features/SessionList/SessionListViewModel.swift:406 β€” SessionListViewModel.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 3 (7 pts), boolean chains 4, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SessionListViewModel.searchSessions (cognitive 30) Β· Γ—1
  • SessionListViewModel.searchSessions (cognitive 30) HermesMobile/Features/SessionList/SessionListViewModel.swift:576 β€” SessionListViewModel.searchSessions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 6, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· FilePreviewViewModel.load (cognitive 30) Β· Γ—1
  • FilePreviewViewModel.load (cognitive 30) HermesMobile/Features/Workspace/FilePreviewViewModel.swift:56 β€” FilePreviewViewModel.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 2 (8 pts), error handling 2, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotConnectionView.body (cognitive 29) Β· Γ—1
  • BotConnectionView.body (cognitive 29) HermesMobile/Features/Bots/BotConnectionView.swift:37 β€” BotConnectionView.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 2, match/switch 1, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· ChatViewModel.submitHermesPrompt (cognitive 29) Β· Γ—1
  • ChatViewModel.submitHermesPrompt (cognitive 29) HermesMobile/Features/Chat/ChatViewModel.swift:3100 β€” ChatViewModel.submitHermesPrompt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 3, ternaries 2, error handling 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesUpdateMachine.handle (cognitive 29) Β· Γ—1
  • HermesUpdateMachine.handle (cognitive 29) HermesMobile/Features/Settings/HermesUpdateMachine.swift:107 β€” HermesUpdateMachine.handle has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 8, match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· String.strippingANSIEscapes (cognitive 29) Β· Γ—1
  • String.strippingANSIEscapes (cognitive 29) HermesMobile/Models/ANSIEscapes.swift:15 β€” String.strippingANSIEscapes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotsInboxView.list (cognitive 28) Β· Γ—1
  • BotsInboxView.list (cognitive 28) HermesMobile/Features/Bots/BotsInboxView.swift:147 β€” BotsInboxView.list has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 2 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatStreamCoordinator.recoverStaleStream (cognitive 28) Β· Γ—1
  • ChatStreamCoordinator.recoverStaleStream (cognitive 28) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:979 β€” ChatStreamCoordinator.recoverStaleStream has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 10, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ToolCallSummaryFormatter.kind (cognitive 28) Β· Γ—1
  • ToolCallSummaryFormatter.kind (cognitive 28) HermesMobile/Features/Chat/ToolCallSummaryFormatter.swift:113 β€” ToolCallSummaryFormatter.kind has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 18, if/else 10. 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 Β· HermesSessionLookup.resolve (cognitive 28) Β· Γ—1
  • HermesSessionLookup.resolve (cognitive 28) HermesMobile/Features/Hermes/HermesSessionLookup.swift:77 β€” HermesSessionLookup.resolve has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, loops 1 (2 pts), match/switch 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotRoomProfileView.body (cognitive 27) Β· Γ—1
  • BotRoomProfileView.body (cognitive 27) HermesMobile/Features/Bots/BotRoomProfileView.swift:17 β€” BotRoomProfileView.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· InsightsViewModel.load (cognitive 27) Β· Γ—1
  • InsightsViewModel.load (cognitive 27) HermesMobile/Features/Insights/InsightsViewModel.swift:174 β€” InsightsViewModel.load has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 4 (6 pts), boolean chains 4 (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 Β· AgentLiveActivityManager.update (cognitive 26) Β· Γ—1
  • AgentLiveActivityManager.update (cognitive 26) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:391 β€” AgentLiveActivityManager.update has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, ternaries 2 (5 pts), match/switch 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 Β· BotConnectionSetup.connectThroughBrowser (cognitive 26) Β· Γ—1
  • BotConnectionSetup.connectThroughBrowser (cognitive 26) HermesMobile/Features/Bots/BotConnectionView.swift:542 β€” BotConnectionSetup.connectThroughBrowser has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 8, if/else 4 (7 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 Β· HermesDelegatedWork.loadTail (cognitive 26) Β· Γ—1
  • HermesDelegatedWork.loadTail (cognitive 26) HermesMobile/Features/Chat/HermesDelegatedWork.swift:239 β€” HermesDelegatedWork.loadTail has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (11 pts), ternaries 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 Β· ResponseSelectionInput.document (cognitive 26) Β· Γ—1
  • ResponseSelectionInput.document (cognitive 26) HermesMobile/Features/Chat/ResponseSelectionInput.swift:63 β€” ResponseSelectionInput.document has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (6 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· KanbanCardDetailContent.mutationSection (cognitive 26) Β· Γ—1
  • KanbanCardDetailContent.mutationSection (cognitive 26) HermesMobile/Features/Kanban/KanbanCardDetailView.swift:345 β€” KanbanCardDetailContent.mutationSection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 1 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth β€” most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 Β· Cognitive Complexity Β· KanbanCardEditorState.reconcileAmbiguousOutcome (cognitive 26) Β· Γ—1
  • KanbanCardEditorState.reconcileAmbiguousOutcome (cognitive 26) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:354 β€” KanbanCardEditorState.reconcileAmbiguousOutcome has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 3, match/switch 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· MoveToHermesRemoval.sourceMessage (cognitive 26) Β· Γ—1
  • MoveToHermesRemoval.sourceMessage (cognitive 26) HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:777 β€” MoveToHermesRemoval.sourceMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotAttachmentUpload.prepare (cognitive 26) Β· Γ—1
  • BotAttachmentUpload.prepare (cognitive 26) HermesMobile/Networking/Bots/BotAttachmentUpload.swift:26 β€” BotAttachmentUpload.prepare has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), ternaries 4 (8 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 Β· ChatDraftStore.appendShare (cognitive 25) Β· Γ—1
  • ChatDraftStore.appendShare (cognitive 25) HermesMobile/Persistence/ChatDraftStore.swift:739 β€” ChatDraftStore.appendShare has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 3 (4 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). Of this number, 24 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesChatTurnCoordinator.reconcile (cognitive 25) Β· Γ—1
  • HermesChatTurnCoordinator.reconcile (cognitive 25) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1207 β€” HermesChatTurnCoordinator.reconcile has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 7, ternaries 5 (7 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· TranscriptTurnFolds.derive (cognitive 25) Β· Γ—1
  • TranscriptTurnFolds.derive (cognitive 25) HermesMobile/Features/Chat/TranscriptTurnFolding.swift:87 β€” TranscriptTurnFolds.derive has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 5 (7 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SessionListView.body (cognitive 25) Β· Γ—1
  • SessionListView.body (cognitive 25) HermesMobile/Features/SessionList/SessionListView.swift:208 β€” SessionListView.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· HermesGateway.send (cognitive 25) Β· Γ—1
  • HermesGateway.send (cognitive 25) HermesMobile/Networking/Hermes/HermesGateway.swift:205 β€” HermesGateway.send has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 9, error handling 3, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· MessageAttachment.hermesTitle (cognitive 24) Β· Γ—1
  • MessageAttachment.hermesTitle (cognitive 24) HermesMobile/Models/MessageAttachment.swift:213 β€” MessageAttachment.hermesTitle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 9, loops 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· ChatAttachmentCoordinator.performUpload (cognitive 24) Β· Γ—1
  • ChatAttachmentCoordinator.performUpload (cognitive 24) HermesMobile/Features/Chat/ChatAttachmentCoordinator.swift:291 β€” ChatAttachmentCoordinator.performUpload has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesChatRequests.deliver (cognitive 24) Β· Γ—1
  • HermesChatRequests.deliver (cognitive 24) HermesMobile/Features/Chat/HermesChatRequests.swift:361 β€” HermesChatRequests.deliver has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ReviewWordDiff.annotate (cognitive 24) Β· Γ—1
  • ReviewWordDiff.annotate (cognitive 24) HermesMobile/Features/Workspace/ReviewDiff/ReviewWordDiff.swift:22 β€” ReviewWordDiff.annotate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (7 pts), boolean chains 6 (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 Β· KanbanCompatibilityValidator.validate (cognitive 23) Β· Γ—1
  • KanbanCompatibilityValidator.validate (cognitive 23) HermesMobile/Models/Kanban.swift:1270 β€” KanbanCompatibilityValidator.validate has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotConnection.address (cognitive 23) Β· Γ—1
  • BotConnection.address (cognitive 23) HermesMobile/Features/Bots/BotConnection.swift:58 β€” BotConnection.address has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, loops 1, match/switch 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 Β· ChatTranscriptMessageBlock.== (cognitive 23) Β· Γ—1
  • ChatTranscriptMessageBlock.== (cognitive 23) HermesMobile/Features/Chat/ChatTranscriptView.swift:689 β€” ChatTranscriptMessageBlock.== has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 23. 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 Β· KanbanFeatureState.scheduleCoalescedReconciliation (cognitive 23) Β· Γ—1
  • KanbanFeatureState.scheduleCoalescedReconciliation (cognitive 23) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2663 β€” KanbanFeatureState.scheduleCoalescedReconciliation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· MoveToHermesSheet.pausedDetails (cognitive 23) Β· Γ—1
  • MoveToHermesSheet.pausedDetails (cognitive 23) HermesMobile/Features/MoveToHermes/MoveToHermesView.swift:375 β€” MoveToHermesSheet.pausedDetails has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 4, if/else 4, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· OnboardingViewModel.addHermesServer (cognitive 23) Β· Γ—1
  • OnboardingViewModel.addHermesServer (cognitive 23) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:558 β€” OnboardingViewModel.addHermesServer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 5 (6 pts), error handling 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· GitWorkspaceAvailabilityViewModel.quickCommit (cognitive 23) Β· Γ—1
  • GitWorkspaceAvailabilityViewModel.quickCommit (cognitive 23) HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift:294 β€” GitWorkspaceAvailabilityViewModel.quickCommit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· TurnFileChangeAggregator.candidates (cognitive 22) Β· Γ—1
  • TurnFileChangeAggregator.candidates (cognitive 22) HermesMobile/Models/TurnFileChangeSummary.swift:156 β€” TurnFileChangeAggregator.candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· PushRegistrar.updatePreferences (cognitive 22) Β· Γ—1
  • PushRegistrar.updatePreferences (cognitive 22) HermesMobile/Push/PushRegistrar.swift:263 β€” PushRegistrar.updatePreferences has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (4 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 Β· BotChatControls.reload (cognitive 22) Β· Γ—1
  • BotChatControls.reload (cognitive 22) HermesMobile/Features/Bots/BotChatControls.swift:113 β€” BotChatControls.reload has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, 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 Β· BotSlashCatalog.skills (cognitive 22) Β· Γ—1
  • BotSlashCatalog.skills (cognitive 22) HermesMobile/Features/Bots/BotSlashCommands.swift:24 β€” BotSlashCatalog.skills has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, loops 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermexPushSettingsPage.pushSettings (cognitive 22) Β· Γ—1
  • HermexPushSettingsPage.pushSettings (cognitive 22) HermesMobile/Features/Bots/HermexPushSettingsPage.swift:80 β€” HermexPushSettingsPage.pushSettings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (5 pts), match/switch 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 Β· ComposerVoiceInputController.finishServerRecording (cognitive 22) Β· Γ—1
  • ComposerVoiceInputController.finishServerRecording (cognitive 22) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:461 β€” ComposerVoiceInputController.finishServerRecording has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, error handling 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· KanbanFeatureState.checkUncertainMutation (cognitive 22) Β· Γ—1
  • KanbanFeatureState.checkUncertainMutation (cognitive 22) HermesMobile/Features/Kanban/KanbanFeatureState.swift:927 β€” KanbanFeatureState.checkUncertainMutation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 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 Β· KanbanFeatureState.performStatusMutation (cognitive 22) Β· Γ—1
  • KanbanFeatureState.performStatusMutation (cognitive 22) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1839 β€” KanbanFeatureState.performStatusMutation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, 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 Β· OnboardingViewModel.testConnection (cognitive 22) Β· Γ—1
  • OnboardingViewModel.testConnection (cognitive 22) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:416 β€” OnboardingViewModel.testConnection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SessionListViewModel.createSession (cognitive 22) Β· Γ—1
  • SessionListViewModel.createSession (cognitive 22) HermesMobile/Features/SessionList/SessionListViewModel.swift:1516 β€” SessionListViewModel.createSession has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· TaskDetailViewModel.followRunNow (cognitive 22) Β· Γ—1
  • TaskDetailViewModel.followRunNow (cognitive 22) HermesMobile/Features/Tasks/TaskDetailViewModel.swift:444 β€” TaskDetailViewModel.followRunNow has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (3 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· AgentLiveActivityManager.observePush (cognitive 21) Β· Γ—1
  • AgentLiveActivityManager.observePush (cognitive 21) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1052 β€” AgentLiveActivityManager.observePush has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 5). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· PushRegistrar.reregisterAllPairings (cognitive 21) Β· Γ—1
  • PushRegistrar.reregisterAllPairings (cognitive 21) HermesMobile/Push/PushRegistrar.swift:368 β€” PushRegistrar.reregisterAllPairings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotArtifactReference.path (cognitive 21) Β· Γ—1
  • BotArtifactReference.path (cognitive 21) HermesMobile/Features/Bots/BotArtifact.swift:28 β€” BotArtifactReference.path has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (7 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· BotCreateView.body (cognitive 21) Β· Γ—1
  • BotCreateView.body (cognitive 21) HermesMobile/Features/Bots/BotCreateView.swift:19 β€” BotCreateView.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, ternaries 4 (6 pts), boolean chains 3 (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 Β· BotProfileEditor.save (cognitive 21) Β· Γ—1
  • BotProfileEditor.save (cognitive 21) HermesMobile/Features/Bots/BotProfileEditor.swift:310 β€” BotProfileEditor.save has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, 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 Β· ChatViewModel.editMessage (cognitive 21) Β· Γ—1
  • ChatViewModel.editMessage (cognitive 21) HermesMobile/Features/Chat/ChatViewModel.swift:5656 β€” ChatViewModel.editMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesChatTurnCoordinator.submit (cognitive 21) Β· Γ—1
  • HermesChatTurnCoordinator.submit (cognitive 21) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:450 β€” HermesChatTurnCoordinator.submit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 4 (5 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 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 Β· HermesChatTurnCoordinator.branch (cognitive 21) Β· Γ—1
  • HermesChatTurnCoordinator.branch (cognitive 21) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:912 β€” HermesChatTurnCoordinator.branch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesChatTurnCoordinator.loadOlderHistory (cognitive 21) Β· Γ—1
  • HermesChatTurnCoordinator.loadOlderHistory (cognitive 21) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1403 β€” HermesChatTurnCoordinator.loadOlderHistory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, error handling 1 (nesting depth added 8). 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 Β· HermesConversation.reconcile (cognitive 21) Β· Γ—1
  • HermesConversation.reconcile (cognitive 21) HermesMobile/Features/Hermes/HermesConversation.swift:451 β€” HermesConversation.reconcile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 9, 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 Β· KanbanFeatureState.dispatcherAvailability (cognitive 21) Β· Γ—1
  • KanbanFeatureState.dispatcherAvailability (cognitive 21) HermesMobile/Features/Kanban/KanbanFeatureState.swift:549 β€” KanbanFeatureState.dispatcherAvailability has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· MoveToHermesReconcile.apply Β· Γ—1
  • MoveToHermesReconcile.apply::send (cognitive 21) HermesMobile/Features/MoveToHermes/MoveToHermesReconcile.swift:160 β€” MoveToHermesReconcile.apply::send has cognitive complexity 21 (threshold 15). Drivers by points: error handling 10, if/else 4 (5 pts), boolean chains 4, match/switch 2 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· MoveToHermesSheet.review (cognitive 21) Β· Γ—1
  • MoveToHermesSheet.review (cognitive 21) HermesMobile/Features/MoveToHermes/MoveToHermesView.swift:222 β€” MoveToHermesSheet.review has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SessionRowContextMenu.body (cognitive 21) Β· Γ—1
  • SessionRowContextMenu.body (cognitive 21) HermesMobile/Features/SessionList/SessionListComponents.swift:1139 β€” SessionRowContextMenu.body has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ProviderDisclosure.statusLine (cognitive 21) Β· Γ—1
  • ProviderDisclosure.statusLine (cognitive 21) HermesMobile/Features/Settings/ProvidersView.swift:226 β€” ProviderDisclosure.statusLine has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 4 (7 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 Β· HermesGitClient.commitSelected (cognitive 21) Β· Γ—1
  • HermesGitClient.commitSelected (cognitive 21) HermesMobile/Networking/Hermes/HermesGitClient.swift:266 β€” HermesGitClient.commitSelected has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (6 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· Record.draft (cognitive 20) Β· Γ—1
  • Record.draft (cognitive 20) HermesMobile/Persistence/ChatDraftStore.swift:467 β€” Record.draft has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 1 (2 pts), match/switch 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 Β· ChatDraftStore.transferDraft (cognitive 20) Β· Γ—1
  • ChatDraftStore.transferDraft (cognitive 20) HermesMobile/Persistence/ChatDraftStore.swift:978 β€” ChatDraftStore.transferDraft has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermexPushProvisioner.setUp (cognitive 20) Β· Γ—1
  • HermexPushProvisioner.setUp (cognitive 20) HermesMobile/Features/Bots/HermexPushProvisioner.swift:305 β€” HermexPushProvisioner.setUp has cognitive complexity 20 (threshold 15). Drivers by points: error handling 6 (9 pts), if/else 6 (9 pts), match/switch 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 Β· ChatViewModel.sendMessage (cognitive 20) Β· Γ—1
  • ChatViewModel.sendMessage (cognitive 20) HermesMobile/Features/Chat/ChatViewModel.swift:2866 β€” ChatViewModel.sendMessage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 1 (2 pts), ternaries 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 Β· ChatViewModel.runHermesSlashCommand (cognitive 20) Β· Γ—1
  • ChatViewModel.runHermesSlashCommand (cognitive 20) HermesMobile/Features/Chat/ChatViewModel.swift:4150 β€” ChatViewModel.runHermesSlashCommand has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (6 pts), match/switch 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· TranscriptMediaThumbnailView.body (cognitive 20) Β· Γ—1
  • TranscriptMediaThumbnailView.body (cognitive 20) HermesMobile/Features/Chat/TranscriptMediaView.swift:112 β€” TranscriptMediaThumbnailView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (3 pts), boolean chains 2, 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 Β· KanbanFeatureState.performBulkAction (cognitive 20) Β· Γ—1
  • KanbanFeatureState.performBulkAction (cognitive 20) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1667 β€” KanbanFeatureState.performBulkAction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, ternaries 1 (3 pts), match/switch 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· OnboardingViewModel.configureWebui (cognitive 20) Β· Γ—1
  • OnboardingViewModel.configureWebui (cognitive 20) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:614 β€” OnboardingViewModel.configureWebui has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 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 Β· SessionListView.isQuietSessionListVisible (cognitive 20) Β· Γ—1
  • SessionListView.isQuietSessionListVisible (cognitive 20) HermesMobile/Features/SessionList/SessionListView.swift:483 β€” SessionListView.isQuietSessionListVisible has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 19, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· SessionListViewModel.refreshActiveSessionStatesIfNeeded (cognitive 20) Β· Γ—1
  • SessionListViewModel.refreshActiveSessionStatesIfNeeded (cognitive 20) HermesMobile/Features/SessionList/SessionListViewModel.swift:671 β€” SessionListViewModel.refreshActiveSessionStatesIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (5 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· FileTreeSearch.splitWords (cognitive 20) Β· Γ—1
  • FileTreeSearch.splitWords (cognitive 20) HermesMobile/Features/Workspace/FileTree.swift:191 β€” FileTreeSearch.splitWords has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ReviewWordDiff.diff (cognitive 20) Β· Γ—1
  • ReviewWordDiff.diff (cognitive 20) HermesMobile/Features/Workspace/ReviewDiff/ReviewWordDiff.swift:196 β€” ReviewWordDiff.diff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ContentView.handleOpenURL (cognitive 19) Β· Γ—1
  • ContentView.handleOpenURL (cognitive 19) HermesMobile/ContentView.swift:132 β€” ContentView.handleOpenURL has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 2 (4 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 Β· AuthManager.commitMove (cognitive 19) Β· Γ—1
  • AuthManager.commitMove (cognitive 19) HermesMobile/Auth/AuthManager+MoveToHermes.swift:46 β€” AuthManager.commitMove has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· MemoryCanonicalizer.canonical (cognitive 19) Β· Γ—1
  • MemoryCanonicalizer.canonical (cognitive 19) HermesMobile/Models/Memory.swift:154 β€” MemoryCanonicalizer.canonical has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ToolCallGroup.uniqueToolCalls (cognitive 19) Β· Γ—1
  • ToolCallGroup.uniqueToolCalls (cognitive 19) HermesMobile/Models/ToolCall.swift:415 β€” ToolCallGroup.uniqueToolCalls has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotCreator.createProfile (cognitive 19) Β· Γ—1
  • BotCreator.createProfile (cognitive 19) HermesMobile/Features/Bots/BotCreator.swift:224 β€” BotCreator.createProfile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, 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 Β· BotApprovalRequest.init (cognitive 19) Β· Γ—1
  • BotApprovalRequest.init (cognitive 19) HermesMobile/Features/Bots/BotPendingRequest.swift:121 β€” BotApprovalRequest.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatViewModel.confirmFileChipReferences (cognitive 19) Β· Γ—1
  • ChatViewModel.confirmFileChipReferences (cognitive 19) HermesMobile/Features/Chat/ChatViewModel.swift:4824 β€” ChatViewModel.confirmFileChipReferences has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· MarkdownDiffFormatter.parse (cognitive 19) Β· Γ—1
  • MarkdownDiffFormatter.parse (cognitive 19) HermesMobile/Features/Chat/MarkdownDiffCodeBlock.swift:113 β€” MarkdownDiffFormatter.parse has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 2 (6 pts), match/switch 2 (5 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ProviderLimitCard.init (cognitive 19) Β· Γ—1
  • ProviderLimitCard.init (cognitive 19) HermesMobile/Features/Insights/InsightsModels.swift:389 β€” ProviderLimitCard.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· KanbanCardEditorState.intendedValuesAppear (cognitive 19) Β· Γ—1
  • KanbanCardEditorState.intendedValuesAppear (cognitive 19) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:410 β€” KanbanCardEditorState.intendedValuesAppear has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, match/switch 1. 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 Β· SessionListViewModel.searchHermes (cognitive 19) Β· Γ—1
  • SessionListViewModel.searchHermes (cognitive 19) HermesMobile/Features/SessionList/SessionListViewModel.swift:2306 β€” SessionListViewModel.searchHermes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· GitWorkspaceAvailabilityViewModel.checkout (cognitive 19) Β· Γ—1
  • GitWorkspaceAvailabilityViewModel.checkout (cognitive 19) HermesMobile/Features/Workspace/GitWorkspaceViewModel.swift:218 β€” GitWorkspaceAvailabilityViewModel.checkout has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 2, error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· LeftoverLiveActivitySettlement.actions (cognitive 18) Β· Γ—1
  • LeftoverLiveActivitySettlement.actions (cognitive 18) HermesMobile/LiveActivities/AgentLiveActivityManager.swift:1356 β€” LeftoverLiveActivitySettlement.actions has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· CacheStore.cacheHermesSessions (cognitive 18) Β· Γ—1
  • CacheStore.cacheHermesSessions (cognitive 18) HermesMobile/Persistence/CacheStore+Hermes.swift:81 β€” CacheStore.cacheHermesSessions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotRoomAction.init (cognitive 18) Β· Γ—1
  • BotRoomAction.init (cognitive 18) HermesMobile/Features/Bots/BotRoomAction.swift:18 β€” BotRoomAction.init has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (8 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 Β· MessageComposerView.slashQuery (cognitive 18) Β· Γ—1
  • MessageComposerView.slashQuery (cognitive 18) HermesMobile/Features/Chat/ChatComposerView.swift:419 β€” MessageComposerView.slashQuery has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (9 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· ChatView.chatContent (cognitive 18) Β· Γ—1
  • ChatView.chatContent (cognitive 18) HermesMobile/Features/Chat/ChatView.swift:1077 β€” ChatView.chatContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· ChatViewModel.loadOlderMessages (cognitive 18) Β· Γ—1
  • ChatViewModel.loadOlderMessages (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:2187 β€” ChatViewModel.loadOlderMessages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatViewModel.retryLastTurnFromSlashCommand (cognitive 18) Β· Γ—1
  • ChatViewModel.retryLastTurnFromSlashCommand (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:5218 β€” ChatViewModel.retryLastTurnFromSlashCommand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 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 Β· ChatViewModel.regenerateAssistantResponse (cognitive 18) Β· Γ—1
  • ChatViewModel.regenerateAssistantResponse (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:5773 β€” ChatViewModel.regenerateAssistantResponse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (5 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 Β· ChatViewModel.toggleListening (cognitive 18) Β· Γ—1
  • ChatViewModel.toggleListening (cognitive 18) HermesMobile/Features/Chat/ChatViewModel.swift:6165 β€” ChatViewModel.toggleListening 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 Β· ComposerVoiceInputController.fallbackFromServerFailure (cognitive 18) Β· Γ—1
  • ComposerVoiceInputController.fallbackFromServerFailure (cognitive 18) HermesMobile/Features/Chat/ComposerVoiceInputController.swift:558 β€” ComposerVoiceInputController.fallbackFromServerFailure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· InlineMathTextRequest.parsed (cognitive 18) Β· Γ—1
  • InlineMathTextRequest.parsed (cognitive 18) HermesMobile/Features/Chat/DisplayMathView.swift:466 β€” InlineMathTextRequest.parsed has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 1, ternaries 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· KanbanCardDetailState.submitComment (cognitive 18) Β· Γ—1
  • KanbanCardDetailState.submitComment (cognitive 18) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:98 β€” KanbanCardDetailState.submitComment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, 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 Β· KanbanCardEditorState.validate (cognitive 18) Β· Γ—1
  • KanbanCardEditorState.validate (cognitive 18) HermesMobile/Features/Kanban/KanbanCardEditorState.swift:279 β€” KanbanCardEditorState.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6 (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 Β· KanbanFeatureState.bulkActionsAvailability (cognitive 18) Β· Γ—1
  • KanbanFeatureState.bulkActionsAvailability (cognitive 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:603 β€” KanbanFeatureState.bulkActionsAvailability has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 Β· Cognitive Complexity Β· KanbanFeatureState.performDispatch (cognitive 18) Β· Γ—1
  • KanbanFeatureState.performDispatch (cognitive 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1331 β€” KanbanFeatureState.performDispatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· KanbanFeatureState.pollEvents (cognitive 18) Β· Γ—1
  • KanbanFeatureState.pollEvents (cognitive 18) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2743 β€” KanbanFeatureState.pollEvents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, error handling 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 Β· MoveToHermesModel.scan (cognitive 18) Β· Γ—1
  • MoveToHermesModel.scan (cognitive 18) HermesMobile/Features/MoveToHermes/MoveToHermesModel.swift:275 β€” MoveToHermesModel.scan has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 2, match/switch 1 (2 pts), loops 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 Β· MoveToHermesRunner.reconcile (cognitive 18) Β· Γ—1
  • MoveToHermesRunner.reconcile (cognitive 18) HermesMobile/Features/MoveToHermes/MoveToHermesRunner.swift:645 β€” MoveToHermesRunner.reconcile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· HermesSessionListView.body (cognitive 18) Β· Γ—1
  • HermesSessionListView.body (cognitive 18) HermesMobile/Features/SessionList/HermesSessionListView.swift:192 β€” HermesSessionListView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 4, match/switch 1. To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· SessionRowView.supplementalArea (cognitive 18) Β· Γ—1
  • SessionRowView.supplementalArea (cognitive 18) HermesMobile/Features/SessionList/SessionRowView.swift:287 β€” SessionRowView.supplementalArea has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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 Β· KanbanWebSocketEventClient.open (cognitive 18) Β· Γ—1
  • KanbanWebSocketEventClient.open (cognitive 18) HermesMobile/Networking/Hermes/HermesKanbanClient.swift:363 β€” KanbanWebSocketEventClient.open has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· AppLockSceneDelegate.update (cognitive 17) Β· Γ—1
  • AppLockSceneDelegate.update (cognitive 17) HermesMobile/Auth/AppLockWindow.swift:84 β€” AppLockSceneDelegate.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5 (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 Β· AgentRunActivitySanitizer.toolKind (cognitive 17) Β· Γ—1
  • AgentRunActivitySanitizer.toolKind (cognitive 17) HermesMobile/LiveActivities/AgentRunActivityAttributes.swift:372 β€” AgentRunActivitySanitizer.toolKind has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 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 Β· APIError.errorDescription (cognitive 17) Β· Γ—1
  • APIError.errorDescription (cognitive 17) HermesMobile/Networking/APIError.swift:10 β€” APIError.errorDescription has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (3 pts) (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 Β· Coordinator.syncFocus (cognitive 17) Β· Γ—1
  • Coordinator.syncFocus (cognitive 17) HermesMobile/Features/Chat/ChatComposerTextInputView.swift:490 β€” Coordinator.syncFocus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7 (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 Β· ChatMessageActionMenu.items (cognitive 17) Β· Γ—1
  • ChatMessageActionMenu.items (cognitive 17) HermesMobile/Features/Chat/ChatMessageActions.swift:84 β€” ChatMessageActionMenu.items has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 2 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· ChatTranscriptView.transcriptScrollContent (cognitive 17) Β· Γ—1
  • ChatTranscriptView.transcriptScrollContent (cognitive 17) HermesMobile/Features/Chat/ChatTranscriptView.swift:330 β€” ChatTranscriptView.transcriptScrollContent has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7, boolean chains 5, 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 Β· ChatView.messageComposer (cognitive 17) Β· Γ—1
  • ChatView.messageComposer (cognitive 17) HermesMobile/Features/Chat/ChatView.swift:519 β€” ChatView.messageComposer has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 3. To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· ChatViewModel.switchProfile (cognitive 17) Β· Γ—1
  • ChatViewModel.switchProfile (cognitive 17) HermesMobile/Features/Chat/ChatViewModel.swift:1511 β€” ChatViewModel.switchProfile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatViewModel.steerResponseFromSlashCommand (cognitive 17) Β· Γ—1
  • ChatViewModel.steerResponseFromSlashCommand (cognitive 17) HermesMobile/Features/Chat/ChatViewModel.swift:3834 β€” ChatViewModel.steerResponseFromSlashCommand has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesChatTurnCoordinator.applyInfo (cognitive 17) Β· Γ—1
  • HermesChatTurnCoordinator.applyInfo (cognitive 17) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:1117 β€” HermesChatTurnCoordinator.applyInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, 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 Β· StreamingMarkdownBlockSplitter.split (cognitive 17) Β· Γ—1
  • StreamingMarkdownBlockSplitter.split (cognitive 17) HermesMobile/Features/Chat/StreamingMarkdownSupport.swift:20 β€” StreamingMarkdownBlockSplitter.split has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, 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 Β· HermesConversation.identify (cognitive 17) Β· Γ—1
  • HermesConversation.identify (cognitive 17) HermesMobile/Features/Hermes/HermesConversation.swift:411 β€” HermesConversation.identify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 5). 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 Β· KanbanFeatureState.mutatePrerequisite (cognitive 17) Β· Γ—1
  • KanbanFeatureState.mutatePrerequisite (cognitive 17) HermesMobile/Features/Kanban/KanbanFeatureState.swift:1979 β€” KanbanFeatureState.mutatePrerequisite has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· OnboardingViewModel.connect (cognitive 17) Β· Γ—1
  • OnboardingViewModel.connect (cognitive 17) HermesMobile/Features/Onboarding/OnboardingViewModel.swift:484 β€” OnboardingViewModel.connect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· SessionProjectMoveMenu.body (cognitive 17) Β· Γ—1
  • SessionProjectMoveMenu.body (cognitive 17) HermesMobile/Features/SessionList/SessionListComponents.swift:1280 β€” SessionProjectMoveMenu.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 3 (6 pts), boolean chains 5 (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 Β· SessionListViewModel.refreshAttentionStates (cognitive 17) Β· Γ—1
  • SessionListViewModel.refreshAttentionStates (cognitive 17) HermesMobile/Features/SessionList/SessionListViewModel.swift:808 β€” SessionListViewModel.refreshAttentionStates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ArchivedSessionsViewModel.loadMore (cognitive 17) Β· Γ—1
  • ArchivedSessionsViewModel.loadMore (cognitive 17) HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:178 β€” ArchivedSessionsViewModel.loadMore has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· WebuiServerSettingsModel.waitForServerToReturn (cognitive 17) Β· Γ—1
  • WebuiServerSettingsModel.waitForServerToReturn (cognitive 17) HermesMobile/Features/Settings/WebuiServerSettingsModel.swift:208 β€” WebuiServerSettingsModel.waitForServerToReturn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ActionToastView.toastBody (cognitive 17) Β· Γ—1
  • ActionToastView.toastBody (cognitive 17) HermesMobile/Features/Shared/ActionToast.swift:125 β€” ActionToastView.toastBody has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· FileBrowserViewModel.loadRoot (cognitive 17) Β· Γ—1
  • FileBrowserViewModel.loadRoot (cognitive 17) HermesMobile/Features/Workspace/FileBrowserViewModel.swift:134 β€” FileBrowserViewModel.loadRoot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· DiffHunk.parse (cognitive 17) Β· Γ—1
  • DiffHunk.parse (cognitive 17) HermesMobile/Features/Workspace/GitDiffView.swift:361 β€” DiffHunk.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· HermesProjectTree.init (cognitive 17) Β· Γ—1
  • HermesProjectTree.init (cognitive 17) HermesMobile/Networking/Hermes/HermesProjects.swift:17 β€” HermesProjectTree.init has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SourceHighlighter.runsByLine (cognitive 17) Β· Γ—1
  • SourceHighlighter.runsByLine (cognitive 17) HermesMobile/Features/Workspace/SourceViewer/SourceHighlighter.swift:69 β€” SourceHighlighter.runsByLine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· CachedMessage.matches (cognitive 16) Β· Γ—1
  • CachedMessage.matches (cognitive 16) HermesMobile/Persistence/CachedMessage.swift:88 β€” CachedMessage.matches has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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 Β· BotHistoryCache.search (cognitive 16) Β· Γ—1
  • BotHistoryCache.search (cognitive 16) HermesMobile/Features/Bots/BotHistoryCache.swift:102 β€” BotHistoryCache.search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· BotInbox.configure (cognitive 16) Β· Γ—1
  • BotInbox.configure (cognitive 16) HermesMobile/Features/Bots/BotInbox.swift:566 β€” BotInbox.configure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (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 Β· BotRoomList.read (cognitive 16) Β· Γ—1
  • BotRoomList.read (cognitive 16) HermesMobile/Features/Bots/BotRoomCreator.swift:129 β€” BotRoomList.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 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 Β· BotsInboxView.attachPresentations (cognitive 16) Β· Γ—1
  • BotsInboxView.attachPresentations (cognitive 16) HermesMobile/Features/Bots/BotsInboxView.swift:587 β€” BotsInboxView.attachPresentations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 2, match/switch 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· HermexPushProvisioner.disable (cognitive 16) Β· Γ—1
  • HermexPushProvisioner.disable (cognitive 16) HermesMobile/Features/Bots/HermexPushProvisioner.swift:396 β€” HermexPushProvisioner.disable has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 3 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· ChatAttachmentPreviewViewModel.load (cognitive 16) Β· Γ—1
  • ChatAttachmentPreviewViewModel.load (cognitive 16) HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:363 β€” ChatAttachmentPreviewViewModel.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 Β· Cognitive Complexity Β· ChatStreamCoordinator.recoverStaleStreamIfNeeded (cognitive 16) Β· Γ—1
  • ChatStreamCoordinator.recoverStaleStreamIfNeeded (cognitive 16) HermesMobile/Features/Chat/ChatStreamCoordinator.swift:701 β€” ChatStreamCoordinator.recoverStaleStreamIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· HermesChatTurnCoordinator.upload (cognitive 16) Β· Γ—1
  • HermesChatTurnCoordinator.upload (cognitive 16) HermesMobile/Features/Chat/HermesChatTurnCoordinator.swift:518 β€” HermesChatTurnCoordinator.upload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1, 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 Β· HermesSlashReply.init (cognitive 16) Β· Γ—1
  • HermesSlashReply.init (cognitive 16) HermesMobile/Features/Chat/HermesSlashCommands.swift:131 β€” HermesSlashReply.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), 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 Β· ResponseSelectionRenderer.draw (cognitive 16) Β· Γ—1
  • ResponseSelectionRenderer.draw (cognitive 16) HermesMobile/Features/Chat/ResponseTextSelection.swift:181 β€” ResponseSelectionRenderer.draw has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 7). Of this number, 12 points are the body's own statements and 4 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 Β· HermesConversation.scheduleReconnect (cognitive 16) Β· Γ—1
  • HermesConversation.scheduleReconnect (cognitive 16) HermesMobile/Features/Hermes/HermesConversation.swift:551 β€” HermesConversation.scheduleReconnect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· KanbanCardDetailState.checkPendingCommentOutcome (cognitive 16) Β· Γ—1
  • KanbanCardDetailState.checkPendingCommentOutcome (cognitive 16) HermesMobile/Features/Kanban/KanbanCardDetailState.swift:204 β€” KanbanCardDetailState.checkPendingCommentOutcome has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, 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 Β· KanbanFeatureState.undoArchive (cognitive 16) Β· Γ—1
  • KanbanFeatureState.undoArchive (cognitive 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:854 β€” KanbanFeatureState.undoArchive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, 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 Β· KanbanFeatureState.handleStreamFrame (cognitive 16) Β· Γ—1
  • KanbanFeatureState.handleStreamFrame (cognitive 16) HermesMobile/Features/Kanban/KanbanFeatureState.swift:2587 β€” KanbanFeatureState.handleStreamFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· WebuiSessionTransfer.importMessage (cognitive 16) Β· Γ—1
  • WebuiSessionTransfer.importMessage (cognitive 16) HermesMobile/Features/MoveToHermes/WebuiSessionTransfer.swift:173 β€” WebuiSessionTransfer.importMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· HermesSessionListView.regularWidthDetail (cognitive 16) Β· Γ—1
  • HermesSessionListView.regularWidthDetail (cognitive 16) HermesMobile/Features/SessionList/HermesSessionListView.swift:405 β€” HermesSessionListView.regularWidthDetail has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3 (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 Β· HermesSessionListView.openPendingLink (cognitive 16) Β· Γ—1
  • HermesSessionListView.openPendingLink (cognitive 16) HermesMobile/Features/SessionList/HermesSessionListView.swift:713 β€” HermesSessionListView.openPendingLink has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 1, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· SessionListViewModel.rename (cognitive 16) Β· Γ—1
  • SessionListViewModel.rename (cognitive 16) HermesMobile/Features/SessionList/SessionListViewModel.swift:1166 β€” SessionListViewModel.rename has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 2 (4 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 Β· SessionListViewModel.duplicate (cognitive 16) Β· Γ—1
  • SessionListViewModel.duplicate (cognitive 16) HermesMobile/Features/SessionList/SessionListViewModel.swift:1220 β€” SessionListViewModel.duplicate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (5 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 Β· SessionListViewModel.changeHermesSession (cognitive 16) Β· Γ—1
  • SessionListViewModel.changeHermesSession (cognitive 16) HermesMobile/Features/SessionList/SessionListViewModel.swift:2408 β€” SessionListViewModel.changeHermesSession has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, ternaries 2 (4 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 Β· DefaultProfilePickerView.profileRow (cognitive 16) Β· Γ—1
  • DefaultProfilePickerView.profileRow (cognitive 16) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:170 β€” DefaultProfilePickerView.profileRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 6, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth β€” checks laid out side by side rather than stacked β€” so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 Β· Cognitive Complexity Β· CronJobEditorSheet.body (cognitive 16) Β· Γ—1
  • CronJobEditorSheet.body (cognitive 16) HermesMobile/Features/Tasks/CronJobEditorSheet.swift:82 β€” CronJobEditorSheet.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth β€” many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 Β· Cognitive Complexity Β· HermesGitClient.checkout (cognitive 16) Β· Γ—1
  • HermesGitClient.checkout (cognitive 16) HermesMobile/Networking/Hermes/HermesGitClient.swift:413 β€” HermesGitClient.checkout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 Β· Cognitive Complexity Β· check_string_catalog.extracted_keys (cognitive 16) Β· Γ—1
  • check_string_catalog.extracted_keys (cognitive 16) ci/check_string_catalog.py:31 β€” check_string_catalog.extracted_keys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 Β· Static Analysis (SAST) Β· REDACTED Β· Γ—1
  • REDACTED
D35 Β· Change Coupling Β· Change-coupling hub Β· Γ—1
  • Change-coupling hub: ChatView.swift β†’ HermesConversation.swift, HermesMobileApp.swift, HermesCall.swift HermesMobile/Features/Chat/ChatView.swift β€” `HermesMobile/Features/Chat/ChatView.swift` changes together with 3 other files β€” `HermesMobile/Features/Hermes/HermesConversation.swift`, `HermesMobile/HermesMobileApp.swift`, `HermesMobile/Networking/Hermes/HermesCall.swift` β€” none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 Β· Code Duplication Β· Members sharing a duplicated core (8 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:23 β€” HermesMobile/Features/Chat/ChatComposerConfigLoader.swift:23-53 | HermesMobile/Features/Chat/MessageBubbleView.swift:42-72 | HermesMobile/Features/Kanban/KanbanLabView.swift:2974-3000 | HermesMobile/Models/ChatMessage.swift:38-74 | HermesMobile/Models/Kanban.swift:604-646 | HermesMobile/Models/ServerAccount.swift:60-84 | HermesMobile/Models/ServerCatalog.swift:246-274 | HermesMobile/Models/Session.swift:274-344 β€” These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β€” it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain β€” factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 Β· Code Duplication Β· Members sharing a duplicated core (7 members, 50+ identical tokens) Β· Γ—1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:170 β€” HermesMobile/Features/Settings/DefaultProfilePickerView.swift:170-229 | HermesMobile/Features/Shared/ModelPickerSheet.swift:169-196 | HermesMobile/Features/Shared/ModelPickerSheet.swift:464-509 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:258-284 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:322-371 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:158-183 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:261-300 β€” These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below β€” it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain β€” factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 Β· Code Duplication Β· Duplicated block (47–50 lines × 2) Β· Γ—1
  • Duplicated block (47–50 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:5699 β€” HermesMobile/Features/Chat/ChatViewModel.swift:5699-5748 | HermesMobile/Features/Chat/ChatViewModel.swift:5810-5856 β€” 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 `HermesMobile/Features/Chat/ChatViewModel.swift:5699` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `HermesMobile/Features/Chat/ChatViewModel.swift:5807` calls `stopListening` and `HermesMobile/Features/Chat/ChatViewModel.swift:5696` does not β€” after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (29 lines × 2) Β· Γ—1
  • Duplicated block (29 lines × 2) HermesMobile/Features/Chat/TranscriptMediaView.swift:367 β€” HermesMobile/Features/Chat/TranscriptMediaView.swift:367-395 | HermesMobile/Features/Chat/TranscriptMediaView.swift:492-520 β€” 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 `HermesMobile/Features/Chat/TranscriptMediaView.swift:367` 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 (23 lines × 2) Β· Γ—1
  • Duplicated block (23 lines × 2) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:51 β€” HermesMobile/Features/Settings/DefaultProfilePickerView.swift:51-73 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:200-222 β€” 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.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 (20–23 lines × 2) Β· Γ—1
  • Duplicated block (20–23 lines × 2) HermesMobile/Features/Share/SharedDraftStore.swift:565 β€” HermesMobile/Features/Share/SharedDraftStore.swift:565-584 | HermesMobile/Features/Share/SharedDraftStore.swift:592-614 β€” 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 `HermesMobile/Features/Share/SharedDraftStore.swift:565` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 Β· Code Duplication Β· Duplicated block (21 lines × 2) Β· Γ—1
  • Duplicated block (21 lines × 2) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:264 β€” HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:264-284 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:163-183 β€” before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (18 lines × 2) Β· Γ—1
  • Duplicated block (18 lines × 2) HermesMobile/Config/AppTheme.swift:407 β€” HermesMobile/Config/AppTheme.swift:407-424 | HermesMobile/Config/AppTheme.swift:426-443 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited.
D4 Β· Code Duplication Β· Duplicated block (15–17 lines × 2) Β· Γ—1
  • Duplicated block (15–17 lines × 2) HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:149 β€” HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:149-163 | HermesMobile/Features/Chat/TranscriptMediaView.swift:923-939 β€” before extracting anything, compare `HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift` and `HermesMobile/Features/Chat/TranscriptMediaView.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 Β· Code Duplication Β· Duplicated block (15 lines × 2) Β· Γ—1
  • Duplicated block (15 lines × 2) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:208 β€” HermesMobile/Features/Settings/DefaultProfilePickerView.swift:208-222 | HermesMobile/Features/Shared/ModelPickerSheet.swift:477-491 β€” 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:208` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (14–15 lines × 2) Β· Γ—1
  • Duplicated block (14–15 lines × 2) HermesMobile/Features/Workspace/GitCommitView.swift:303 β€” HermesMobile/Features/Workspace/GitCommitView.swift:303-317 | HermesMobile/Features/Workspace/GitWorkspaceView.swift:208-221 β€” 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 (14 lines × 4) Β· Γ—1
  • Duplicated block (14 lines × 4) HermesMobile/Features/SessionList/SessionListViewModel.swift:2715 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift:2715-2728 | HermesMobile/Features/Settings/ArchivedSessionsViewModel.swift:392-405 | HermesMobile/Features/Settings/DefaultProfilePickerView.swift:296-309 | HermesMobile/Features/Workspace/FileBrowserViewModel.swift:291-304 β€” the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 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 (14 lines × 2) Β· Γ—1
  • Duplicated block (14 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:1401 β€” HermesMobile/Features/Chat/ChatViewModel.swift:1401-1414 | HermesMobile/Features/Chat/ChatViewModel.swift:4342-4355 β€” 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 `HermesMobile/Features/Chat/ChatViewModel.swift:1401` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 Β· Code Duplication Β· Duplicated block (13–14 lines × 2) Β· Γ—1
  • Duplicated block (13–14 lines × 2) HermesMobile/Features/Chat/ChatViewModel.swift:2248 β€” HermesMobile/Features/Chat/ChatViewModel.swift:2248-2261 | HermesMobile/Features/Chat/ChatViewModel.swift:5058-5070 β€” 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 `HermesMobile/Features/Chat/ChatViewModel.swift:2248` 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 before the matched lines, `HermesMobile/Features/Chat/ChatViewModel.swift:5057` calls `replacingTokensUsed` and `HermesMobile/Features/Chat/ChatViewModel.swift:2248` does not β€” after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (12–13 lines × 2) Β· Γ—1
  • Duplicated block (12–13 lines × 2) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:100 β€” HermesMobile/Features/Settings/DefaultProfilePickerView.swift:100-112 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:236-247 β€” 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 `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:247` calls `Text`, `Button` and `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:112` does not β€” after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (12 lines × 3) Β· Γ—1
  • Duplicated block (12 lines × 3) HermesMobile/Models/ServerAccount.swift:72 β€” HermesMobile/Models/ServerAccount.swift:72-83 | HermesMobile/Models/ServerCatalog.swift:260-271 | HermesMobile/Models/Session.swift:309-320 β€” 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. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Models/ServerAccount.swift:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (8–12 lines × 2) Β· Γ—1
  • Duplicated block (8–12 lines × 2) HermesMobile/Features/SessionList/HermesSessionListView.swift:817 β€” HermesMobile/Features/SessionList/HermesSessionListView.swift:817-824 | HermesMobile/Features/SessionList/SessionListView.swift:1339-1350 β€” 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 `HermesMobile/Features/SessionList/HermesSessionListView.swift:817` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (11 lines × 4) Β· Γ—1
  • Duplicated block (11 lines × 4) HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:270 β€” HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:270-280 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:355-365 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:169-179 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:284-294 β€” before extracting anything, compare `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift` and `HermesMobile/Features/Tasks/CronJobSkillsPicker.swift` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together β€” extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:270` it runs out through the closing brace of the declaration holding it β€” the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 Β· Code Duplication Β· Duplicated block (9 lines × 7) Β· Γ—1
  • Duplicated block (9 lines × 7) HermesMobile/Features/Settings/DefaultProfilePickerView.swift:215 β€” HermesMobile/Features/Settings/DefaultProfilePickerView.swift:215-223 | HermesMobile/Features/Shared/ModelPickerSheet.swift:184-192 | HermesMobile/Features/Shared/ModelPickerSheet.swift:484-492 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:273-281 | HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:358-366 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:172-180 | HermesMobile/Features/Tasks/CronJobSkillsPicker.swift:287-295 β€” there are 7 copies across 4 file(s) β€” more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `HermesMobile/Features/Settings/DefaultProfilePickerView.swift:215` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:368` calls `disabled`, `accessibilityLabel`, `details` and `HermesMobile/Features/Tasks/CronJobConfigurationPickers.swift:283` 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 (8 lines × 3) Β· Γ—1
  • Duplicated block (8 lines × 3) HermesMobile/Features/SessionList/SessionListViewModel.swift:1102 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift:1102-1109 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1124-1131 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1143-1150 β€” 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 `HermesMobile/Features/SessionList/SessionListViewModel.swift:1102` 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 (7–8 lines × 2) Β· Γ—1
  • Duplicated block (7–8 lines × 2) HermesMobile/Config/DevAutoLogin.swift:81 β€” HermesMobile/Config/DevAutoLogin.swift:81-87 | HermesMobile/Config/DevAutoLogin.swift:110-117 β€” both copies are in the same file, so extract the block into one function there and call it from each site β€” the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead β€” before the caller uses what it releases β€” so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. β˜… These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `HermesMobile/Config/DevAutoLogin.swift:109` calls `address` and `HermesMobile/Config/DevAutoLogin.swift:80` does not β€” after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 3) Β· Γ—1
  • Duplicated block (7 lines × 3) HermesMobile/Features/SessionList/SessionListViewModel.swift:1084 β€” HermesMobile/Features/SessionList/SessionListViewModel.swift:1084-1090 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1103-1109 | HermesMobile/Features/SessionList/SessionListViewModel.swift:1125-1131 β€” 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 `HermesMobile/Features/SessionList/SessionListViewModel.swift:1084` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows β€” the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run β€” a one-line delegation has no helper inside it to lift β€” so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 Β· Code Duplication Β· Duplicated block (6 lines × 3) Β· Γ—1
  • Duplicated block (6 lines × 3) HermesMobile/Features/Bots/BotConnectionView.swift:306 β€” HermesMobile/Features/Bots/BotConnectionView.swift:306-311 | HermesMobile/Features/Chat/HermesTurnOutcomeRow.swift:61-66 | HermesMobile/Features/Chat/SlashCommandExecutor.swift:94-103 β€” 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 `HermesMobile/Features/Bots/BotConnectionView.swift:306` 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–6 lines × 2) Β· Γ—1
  • Duplicated block (5–6 lines × 2) HermesMobile/Features/Chat/HermesChatSideTasks.swift:369 β€” HermesMobile/Features/Chat/HermesChatSideTasks.swift:369-374 | HermesMobile/Features/Chat/HermesSlashCommands.swift:298-302 β€” 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 `HermesMobile/Features/Chat/HermesChatSideTasks.swift:369` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (7–9 lines × 3) Β· Γ—1
  • Duplicated block (7–9 lines × 3) HermesMobile/Models/JSONValue.swift:11 β€” HermesMobile/Models/JSONValue.swift:11-17 | HermesMobile/Networking/Bots/BotProtocol.swift:8-16 | scripts/fixtures/HermesFixtureCapture.swift:151-159 β€” 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 `HermesMobile/Models/JSONValue.swift:11` it does not close everything it opens, so those exact lines cannot be lifted as they stand β€” widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names β€” the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 Β· Code Duplication Β· Duplicated block (7 lines × 4) Β· Γ—1
  • Duplicated block (7 lines × 4) HermesMobile/Features/SessionList/SessionListComponents.swift:1676 β€” HermesMobile/Features/SessionList/SessionListComponents.swift:1676-1682 | HermesMobile/Features/SessionList/SessionListComponents.swift:1780-1786 | HermesMobile/Features/Skills/SkillsView.swift:270-276 | HermesMobile/Features/Workspace/FilePreviewView.swift:330-336 β€” there are 4 copies across 3 file(s) β€” more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. 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.
P4 Β· Deployment & Rollback Β· No deployment automation Β· Γ—1
  • No deployment automation β€” No release automation was found in CI β€” neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
Minor β€” 16 finding(s)
X10 Β· Duplicated predicate Β· Duplicated predicate Β· Γ—10
  • Duplicated predicate HermesMobile/ContentView.swift:389 β€” `$0.kind == .webui && !moved.contains($0.id)` appears character-identically in 2 files β€” HermesMobile/ContentView.swift, HermesMobile/Features/MoveToHermes/MoveToHermesModel.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 HermesMobile/Features/Chat/ChatScrollPolicy.swift:333 β€” `$0.message.role == "user" && !$0.message.isSteerMessage` appears character-identically in 2 files β€” HermesMobile/Features/Chat/ChatScrollPolicy.swift, HermesMobile/Features/Chat/HermesChatActivity.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 HermesMobile/Features/Kanban/KanbanCardDetailState.swift:279 β€” `Task.isCancelled || error is CancellationError` appears character-identically in 2 files β€” HermesMobile/Features/Kanban/KanbanCardDetailState.swift, HermesMobile/Features/Kanban/KanbanFeatureState.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 HermesMobile/Features/Chat/ChatViewModel.swift:270 β€” `isViewingCachedData && !isCachedCopyProvisional` appears character-identically in 3 files β€” HermesMobile/Features/Chat/ChatViewModel.swift, HermesMobile/Features/SessionList/SessionListViewModel.swift, HermesMobile/Features/SessionList/SessionRowView.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 HermesMobile/Features/Chat/ChatView.swift:2302 β€” `message.role == "user" && message.attachments?.isEmpty == false` appears character-identically in 2 files β€” HermesMobile/Features/Chat/ChatView.swift, HermesMobile/Features/Chat/ChatViewModel.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 HermesMobile/Features/Chat/ChatScrollPolicy.swift:37 β€” `shouldFollowLatestMessage && !isDisclosureSettling` appears character-identically in 3 files β€” HermesMobile/Features/Chat/ChatScrollPolicy.swift, HermesMobile/Features/Chat/ChatTranscriptView.swift, HermesMobile/Features/Chat/ChatView.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 HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift:98 β€” `viewModel.isLoading && viewModel.preview == nil` appears character-identically in 2 files β€” HermesMobile/Features/Chat/ChatAttachmentPreviewView.swift, HermesMobile/Features/Workspace/FilePreviewView.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 HermesMobile/Features/SessionList/SessionListComponents.swift:744 β€” `viewModel.isLoading && viewModel.sessions.isEmpty` appears character-identically in 2 files β€” HermesMobile/Features/SessionList/SessionListComponents.swift, HermesMobile/Features/Settings/ArchivedSessionsView.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 HermesMobile/Features/Workspace/GitCommitView.swift:65 β€” `viewModel.isLoading && viewModel.status == nil` appears character-identically in 2 files β€” HermesMobile/Features/Workspace/GitCommitView.swift, HermesMobile/Features/Workspace/GitWorkspaceView.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 HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift:139 β€” `viewModel.isLoading || isSavingToPhotos || isExportingMedia` appears character-identically in 2 files β€” HermesMobile/Features/Chat/TranscriptMediaImageLightbox.swift, HermesMobile/Features/Chat/TranscriptMediaView.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.
D20 Β· ADR Quality Β· No ADRs found Β· Γ—1
  • No ADRs found β€” No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these β€” unnumbered files outside any recognised directory, without those headings β€” is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 Β· Project Cohesion Β· Projects may be oversized for their cohesion Β· Γ—1
  • Projects may be oversized for their cohesion β€” 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (135128 LoC, 1853 module-visible types across 34 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.
M2 Β· Architecture documentation Β· No ADRs Β· Γ—1
  • No ADRs β€” No Architecture Decision Records found β€” no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M3 Β· Folder & project structure Β· No src/ separation Β· Γ—1
  • No src/ separation β€” Production code isn't grouped under a src/ folder β€” it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P3 Β· Security & performance tooling Β· No SAST Β· Γ—1
  • No SAST REDACTED:24 β€” No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 16534 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.
X5 Β· Nullable reference types Β· Ruby's type checker does not check nil everywhere Β· Γ—1
  • Ruby's type checker does not check nil everywhere β€” This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 1 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.

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-9a8dbba1e41748aa85e471338123282c/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-9a8dbba1e41748aa85e471338123282c/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 .6artifacts/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 54 file(s) β€” `HermesMobile/AppIntents/ProfileEntity.swift`, `HermesMobile/Auth/AppLock.swift`, `HermesMobile/Auth/AuthManager.swift`, `HermesMobile/ContentView.swift`, `HermesMobile/Features/Bots/BotConnectionView.swift`, … (+49 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 β€” The CI pipeline builds and tests but publishes no released artifact β€” no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).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 01a187bd-17d7-79cd-9d03-18e0f58fdb28 Β· 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