Public report — Petrichor, published 1 Oct 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this survey Filed cd_8ed3a85520ba4b17bc37ea0f5d4e0bf1 Filed 1 October 2026, 11:01 UTC Public

Kushalpandya/Petrichor

Measured 1 October 2026, 10:55 UTC

49% Weak
CriticalWeakAdequateStrongExemplary

Medium · 47,954 LoC · 1 projects · rebuild ~0.3 person-years · weakest lens: Readiness (36%)

Findings by grade

31 critical 205 serious 11 minor 47 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
1 October 2026, 10:55 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

33/36dimensions tool-verifieddeterministic · confidence 1.0 · 3 LLM-assisted, advisory
234findings with an exact file:lineof 247 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
36/125dimensions across the health lenses47954 LoC · 1 projects — wide & deep
Chapters

Executive summary

This system presents a fragile operational standing with an overall health score of 49%. While the underlying code is well-structured and architecturally sound, the lack of operational safeguards creates significant exposure for the business. The asset is medium-sized, representing approximately 0.3 person-years of effort to rebuild, which translates to a modest investment of roughly €44,000. This relatively low rebuild cost highlights that the primary risk is not the complexity of the logic, but the absence of safety nets during daily operations.

The most critical vulnerability lies in Production Readiness, which scored only 36%. This lens measures whether the system is safe to operate, including testing, observability, and security. Without automated tests, there is no safety net to catch regressions, meaning every change carries a high risk of introducing defects that could disrupt service or incur costly hotfixes. This gap directly threatens delivery speed and reliability, as teams must manually verify changes or risk deploying broken functionality. The absence of test coverage is a tangible barrier to confident, rapid iteration.

A secondary concern is Security Exposure, currently at 61%. While not critically low, the lack of automated security scanning in the development pipeline means vulnerabilities can slip through to production unnoticed. This creates a latent risk where security regressions are only caught after deployment, increasing the cost and complexity of remediation. The current state relies on manual processes or post-deployment detection, which is insufficient for maintaining a secure and compliant environment.

On the positive side, the codebase exhibits strong Code Health (88%) and Architecture (97%). The logic is clean, maintainable, and well-organized, which reduces long-term maintenance costs and makes it easier for new engineers to contribute. This solid foundation means that when operational gaps are addressed, the system will be highly resilient and easy to evolve.

To maximize leverage, the immediate priority is to integrate automated security scanning (SAST) into the CI pipeline. This low-effort, high-impact step will prevent security regressions from reaching production, providing immediate protection with minimal disruption. Following this, establishing a basic suite of automated tests is essential to stabilize the system and enable faster, safer releases. This focused approach addresses the highest risks first, turning a fragile asset into a reliable business enabler.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 36% · 46% weightDomain Modelling 56% · 25% weightMaturity 58% · 14% weightPerformance 61% · 8% weightSecurity 61% · 4% weightCode Health 88% · 2% weightArchitecture 97% · 1% weight

Raise Readiness 36 → 70 (the Healthy floor) ⇒ headline 49 → ~60.

New since the last scan (53+)

53 finding(s) are new versus the previous scan (2026-09-15) — surfaced by this scheduled scan itself, no pull request required.

  • D1 · FullTrack.qualityScore (cyclomatic 32) Models/Core/FullTrack.swift
  • D1 · ContentView.body (cyclomatic 26) Views/Main/ContentView.swift
  • D1 · LibraryManager.loadMusicLibrary (cyclomatic 23) Managers/Library/LibraryManager.swift
  • D1 · TrackTableView.body (cyclomatic 17) Views/Components/TrackViews/TrackTableView.swift
  • D1 · TrackTableView.tableView (cyclomatic 16) Views/Components/TrackViews/TrackTableView.swift
  • D2 · FullTrack.qualityScore (cognitive 49) Models/Core/FullTrack.swift
  • D2 · ContentView.body (cognitive 27) Views/Main/ContentView.swift
  • D2 · LibrarySidebarView.body (cognitive 25) Views/Library/LibrarySidebarView.swift
  • D2 · TrackTableView.body (cognitive 21) Views/Components/TrackViews/TrackTableView.swift
  • D2 · TrackTableView.tableView (cognitive 18) Views/Components/TrackViews/TrackTableView.swift
  • D2 · LyricsManager.requestLRCLIB (cognitive 17) Managers/LyricsManager.swift
  • D2 · LibraryManager.prepareFolderForScanning (cognitive 17) Managers/Library/LibraryManager.swift
  • D2 · EntityDetailView.entityArtwork (cognitive 16) Views/Home/EntityDetailView.swift
  • D3 · MethodTooLong: TrackTableView.tableView Views/Components/TrackViews/TrackTableView.swift
  • D3 · MethodTooLong: ContentView.body Views/Main/ContentView.swift
  • D3 · FileTooLong: Database/DMFolders.swift Managers/Database/DMFolders.swift
  • D3 · MethodTooLong: EqualizerPreset.config Models/Core/EqualizerPreset.swift
  • D4 · Edited copy of a member (25 corresponding lines) Views/Immersive/ImmersiveView.swift
  • D4 · Edited copy of a member (12 corresponding lines) Models/Core/FullTrack.swift
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) Models/Enums/LibraryFilterType.swift
  • D4 · Duplicated block (25 lines × 2) Views/Immersive/ImmersiveView.swift
  • D4 · Duplicated block (20–21 lines × 2) Views/Components/TrackViews/TrackListView.swift
  • D4 · Duplicated block (19 lines × 2) Views/Main/TrackDetailView.swift
  • D4 · Duplicated block (16 lines × 2) Views/Components/TrackViews/TrackTableOptionsDropdown.swift
  • D4 · Duplicated block (14 lines × 2) Views/Components/NowPlaying/NowPlayingControlsView.swift
  • D4 · Duplicated block (14 lines × 2) Views/Components/TrackViews/StationTableView.swift
  • D4 · Duplicated block (14 lines × 2) Views/Folders/FoldersView.swift
  • D4 · Duplicated block (14 lines × 2) Views/Main/PlayerView.swift
  • D4 · Duplicated block (13 lines × 2) Views/Folders/FoldersView.swift
  • D4 · Duplicated block (12 lines × 3) Views/Folders/FoldersView.swift
  • D4 · Duplicated block (12 lines × 2) Views/Playlists/Sheets/RegularPlaylistEditorSheet.swift
  • D4 · Duplicated block (11 lines × 6) Models/Enums/LibraryFilterType.swift
  • D4 · Duplicated block (11 lines × 2) Models/Enums/LibraryFilterType.swift
  • D4 · Duplicated block (10 lines × 2) Models/Core/FullTrack.swift
  • D4 · Duplicated block (10 lines × 2) Models/Core/SmartPlaylistField.swift
  • D4 · Duplicated block (10 lines × 2) Views/Components/NowPlaying/NowPlayingControlsView.swift
  • D4 · Duplicated block (10 lines × 2) Views/Home/EntityDetailView.swift
  • D4 · Duplicated block (9 lines × 3) Views/Components/TrackViews/StationTableView.swift
  • D4 · Duplicated block (9 lines × 2) Managers/Database/DMFolders.swift
  • D4 · Duplicated block (8 lines × 2) Views/Components/TrackViews/StationTableView.swift
  • D4 · Duplicated block (8 lines × 2) Views/Components/TrackViews/TrackTableView.swift
  • D4 · Duplicated block (8 lines × 2) Views/Components/TrackViews/TrackTableView.swift
  • D4 · Duplicated block (7 lines × 5) Views/Components/TrackViews/TrackTableView.swift
  • D4 · Duplicated block (7 lines × 3) Views/Home/EntityDetailView.swift
  • D4 · Duplicated block (7 lines × 2) Views/Home/EntityDetailView.swift
  • D4 · Duplicated block (7 lines × 2) Views/Main/PlayerView.swift
  • D4 · Duplicated block (1–5 lines × 6) Managers/Database/DMSetup.swift
  • D4 · Duplicated block (5 lines × 4) Managers/Database/DMSetup.swift
  • D4 · Duplicated block (6 lines × 2) Views/Playlists/StationCollectionContentView.swift
  • D15 · Hotspot: Views/Main/ContentView.swift Views/Main/ContentView.swift
  • D15 · Hotspot: Views/Components/TrackViews/TrackTableView.swift Views/Components/TrackViews/TrackTableView.swift
  • D35 · Change-coupling hub: PlaylistsView.swift → FoldersView.swift, HomeView.swift, LibraryView.swift Views/Playlists/PlaylistsView.swift
  • D35 · Change coupling: FoldersView.swift ↔ LibraryView.swift Views/Folders/FoldersView.swift

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €15,000–€74,000
Cost to rebuild€15,000–€74,000 (0.1–0.5 person-years (246–780 h), ~1 engineer)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 49% quality) — the last 20% of quality is most of the work
Size & shapeMedium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~0.3 person-years of build effort (about ~€44,000 to rebuild). Its weakest lens is Readiness at 36% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 1 No automated tests finding(s) in Code Coverage.
+11.0 pts · Low effort · Code Coverage
2
Resolve the 1 No tests found finding(s) in Test Distribution.
+11.0 pts · Low effort · Test Distribution
3
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.
+11.3 pts · Medium effort · Security & performance tooling

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Medium asset (~0.3 person-years to rebuild), and its weakest lens is Readiness at 36%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Medium, ~0.3 person-years rebuild (47,954 LoC) · weakest lens: Readiness 36%
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: 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. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ 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.

At a glance — Code Health · 88% · Strong ·

At a glance — Architecture · 97% · Exemplary ·

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

At a glance — Readiness · 36% · Weak · gated by D8, D9, P3 ·

At a glance — Security · 61% · Adequate · gated by D36 ·

At a glance — Domain Modelling · 56% · Adequate · gated by DM6 ·

At a glance — Performance · 61% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection12High / Critical

Roadmap

First, integrate automated security scanning into the CI pipeline to block regressions before they land. Next, resolve the identified gaps in code coverage and test distribution to ensure comprehensive validation. Finally, enforce CI gates by explicitly running tests on merge and maintain a changelog to track release hygiene.

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

Do thisHelpsEffortDimension
Resolve the 1 No automated tests finding(s) in Code Coverage.+11.0 ptsLowCode Coverage
Resolve the 1 No tests found finding(s) in Test Distribution.+11.0 ptsLowTest Distribution
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.+11.3 ptsMediumSecurity & performance tooling
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+11.0 ptsMediumRelease Hygiene
Run the test suite in CI via an explicit runner step (`xcodebuild test` for the toolchain this pipeline already uses) and gate merges on it.+6.9 ptsMediumCI/CD gates
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.6 ptsLowADR Quality
Keep the ORM/table mapping and web-framework types on a boundary adapter; leave the domain entity framework-free (map row↔domain through a repository).+2.3 ptsMediumDomain ↔ infrastructure boundary
Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.+2.2 ptsMediumRich vs anemic domain model

File quality

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

FileScoreBandWorst signal
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
Views/Home/EntityDetailView.swift5.6MixedCognitive Complexity: EntityDetailView.pinEntity (cognitive 20)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
Managers/Playlist/PlaylistManager.swift5.9MixedCognitive Complexity: PlaylistManager.matchTracksToLibrary (cognitive 16)
Views/Folders/FoldersView.swift5.9MixedCode Duplication: Duplicated block (14 lines × 2)
Views/Components/TrackContextMenu.swift6.3MixedCode Duplication: Duplicated block (16 lines × 2)
Managers/MenuBarManager.swift6.3MixedCode Duplication: Duplicated block (10 lines × 3)
Managers/Database/DatabaseManager.swift7.0MixedCyclomatic Complexity: DatabaseManager.updateAdditionalMetadata (cyclomatic 38)
Managers/Library/LibraryManager.swift7.0MixedCyclomatic Complexity: LibraryManager.loadMusicLibrary (cyclomatic 23)
Application/AppDelegate.swift7.0MixedCognitive Complexity: AppDelegate.applicationDockMenu (cognitive 18)
Managers/Database/DMSetup.swift7.0MixedCode Duplication: Edited copy of a member (10 corresponding lines)
Managers/ArtistBioManager.swift7.0MixedCyclomatic Complexity: ArtistBioManager.fetchMissingArtistImages (cyclomatic 31)
Views/Components/TrackViews/TrackTableView.swift7.0MixedCyclomatic Complexity: TrackTableView.body (cyclomatic 17)
Models/Core/FullTrack.swift7.0MixedCyclomatic Complexity: FullTrack.qualityScore (cyclomatic 32)
Managers/PlaybackManager.swift7.1MixedCyclomatic Complexity: PlaybackManager.audioPlayerStateChanged (cyclomatic 22)
Models/Enums/LibraryFilterType.swift7.1MixedCognitive Complexity: LibraryFilterType.getFilterItems (cognitive 22)
Utilities/ImageUtils.swift7.1MixedCognitive Complexity: ImageUtils.drawGeometry (cognitive 21)
Managers/Database/DMDiscoverQueries.swift7.1MixedCode Duplication: Duplicated block (11–14 lines × 2)
Views/Main/ContentView.swift7.2MixedCyclomatic Complexity: ContentView.body (cyclomatic 26)
Managers/InternetRadioManager.swift7.2MixedCyclomatic Complexity: InternetRadioManager.downloadTopStations (cyclomatic 19)

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

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

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

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

Could not be resolved — 47

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

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

What we checked — 36 dimensions across the health lenses
D1D2D3D4D6D8D9D12D13D14D15D17D19D20D21D28D29D34D35D36AX10AX3AX4AX9DM4DM5DM6M1M2M3M4P1P2P3P6PF2

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, 234 of 247 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 measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0f71b-3dd1-74a5-adb8-5125b6c18248.

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 (8 contributor(s) across 569 commit(s) sampled, automation and bot accounts excluded). One of them holds 98% of the history; the other 7 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.
  • 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 a COLLECTOR 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 engineering on that marker — no change to the scan image can close it.
  • D26 Project Cohesion — 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm package, a Go module, a Cargo crate, a Python, Composer, Bundler, Mix, rebar3, sbt, SwiftPM or pub package) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
  • D30 Dependency Vulnerabilities — 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. Osv: the scanner produced no output at all, so no dependency was actually scanned. 'osv-scanner' exited 128 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the 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. `Core/Metadata/MetadataMapping.swift`, `Managers/ArtistBioManager.swift`, `Managers/Database/DMCategoryQueries.swift`, `Managers/Database/DMQueries.swift`, `Managers/Database/DMTrackProcessing.swift`, … (+36 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.
  • D43 Malicious Dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Osv: the scanner produced no output at all, so no dependency was actually scanned. 'osv-scanner' exited 128 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the repository.
  • 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.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (Petrichor.xcodeproj/project.pbxproj). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, or an npm dev script. None was found, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — 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 data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — 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 finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P1 CI/CD gates — 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. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
  • P10 Library API & versioning — 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 NuGet packaging and C# public API, and npm, PyPI, crates.io, Maven/Gradle, Go module, RubyGems, Composer, SwiftPM, pub.dev and Hex package manifests only, and no .NET project and no package manifest of those ecosystems was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P8 Schema migrations — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads EF Core usage in C# and the schema tooling its file scan recognises only, and no .NET project was loaded, and this repository's language is not one the scan models, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • PF3 Async & latency hygiene — 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. Those languages colour their functions async, so blocking inside them is the same defect this card counts elsewhere, but their blocking vocabulary is not modelled yet. That is a gap in this analyzer's language reach — not a finding that the code is free of it.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • 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 is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript and Java source only, and no C# was loaded and no JavaScript/TypeScript or Java was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript and Java source only, and no C# was loaded and no JavaScript/TypeScript or Java was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Kotlin and Scala source only, and no C# was loaded, no Java, Kotlin or Scala was found, and this repository's Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java and Rust source only, and no C# was loaded and no Java or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala source only, and no C# was loaded and no Scala was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X6 Hand-rolled structured-format parsing — 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 Python, JavaScript/TypeScript, Go, Java/Kotlin/Scala, Ruby, PHP and Rust source only, and no C# was loaded and none of those languages was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X7 Silent fallback defaults — 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#, Python, TypeScript/JavaScript, Rust, Go, Java and Kotlin syntax only, and no C#, Python, TypeScript/JavaScript, Rust, Go, Java or Kotlin was loaded for this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • 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.
  • 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.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • 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").
  • 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.
  • 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.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

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

31 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DatabaseManager.updateAdditionalMetadata at 38. A further 4 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 EqualizerPreset.config at 24 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: Models/Core/EqualizerPreset.swift (EqualizerPreset.config at 24), Models/Core/SmartPlaylistField.swift (SmartField.displayName at 16). 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.

DatabaseManager.updateAdditionalMetadata (cyclomatic 38)Managers/Database/DatabaseManager.swift:131
FullTrack.qualityScore (cyclomatic 32)Models/Core/FullTrack.swift:311
ArtistBioManager.fetchMissingArtistImages (cyclomatic 31)Managers/ArtistBioManager.swift:108
DatabaseManager.resolveDiscoverEntities (cyclomatic 26)Managers/Database/DatabaseManager.swift:224
DatabaseManager.updateCoreMetadata (cyclomatic 26)Managers/Database/DatabaseManager.swift:83

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

What to do

  1. Resolve the 1 DatabaseManager.updateAdditionalMetadata (cyclomatic 38) finding(s) in Cyclomatic Complexity — start with DatabaseManager.swift. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 FullTrack.qualityScore (cyclomatic 32) finding(s) in Cyclomatic Complexity — start with FullTrack.swift. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 ArtistBioManager.fetchMissingArtistImages (cyclomatic 31) finding(s) in Cyclomatic Complexity — start with ArtistBioManager.swift. — One of this dimension's main actionable groups (1 warning-level).
  4. 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 Complexity6.5 / 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 6.5 / 10 · rule-coverage 100% · ceiling Prevented

60 method(s) exceeded the cognitive complexity threshold of 15; the worst was LibraryManager.loadMusicLibrary at 60.

LibraryManager.loadMusicLibrary (cognitive 60)Managers/Library/LibraryManager.swift:11
ArtistBioManager.fetchMissingArtistImages (cognitive 52)Managers/ArtistBioManager.swift:108
DatabaseManager.processBatch (cognitive 52)Managers/Database/DatabaseManager.swift:47
FullTrack.qualityScore (cognitive 49)Models/Core/FullTrack.swift:311
DatabaseManager.resolveDiscoverEntities (cognitive 46)Managers/Database/DatabaseManager.swift:224

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

What to do

  1. Resolve the 1 LibraryManager.loadMusicLibrary (cognitive 60) finding(s) in Cognitive Complexity — start with LibraryManager.swift. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 ArtistBioManager.fetchMissingArtistImages (cognitive 52) finding(s) in Cognitive Complexity — start with ArtistBioManager.swift. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 DatabaseManager.processBatch (cognitive 52) finding(s) in Cognitive Complexity — start with DatabaseManager.swift. — One of this dimension's main actionable groups (1 warning-level).
  4. 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.7 / 10Strong✓ Tool-verified

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

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

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

19 god class(es) detected.

TooManyMethods: DatabaseManager · ×7Managers/Database/DatabaseManager.swift:12
MethodTooLong: PlaybackManager.releasePlaybackForIdleIfHidden · ×6Managers/PlaybackManager.swift:11
FileTooLong: Database/DMFolders.swift · ×6Managers/Database/DMFolders.swift

What to do

  1. Resolve the 7 TooManyMethods finding(s) in God Classes — start with DatabaseManager.swift, LibraryManager.swift, PlaylistManager.swift. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 6 MethodTooLong finding(s) in God Classes — start with PlaybackManager.swift, DatabaseMigration.swift, TrackTableView.swift. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 6 FileTooLong finding(s) in God Classes — start with DMFolders.swift, TrackTableView.swift, PlaybackManager.swift. — One of this dimension's main actionable groups (6 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.1 / 10Stronggated by 94 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.1 / 10 · rule-coverage 100% · ceiling Verified

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

Duplicated block (7 lines × 2) · ×10Managers/Database/DMQueries.swift:838
Duplicated block (6 lines × 2) · ×8Managers/ArtistBioManager.swift:312
Duplicated block (10 lines × 2) · ×7Managers/Database/DMPlaylists.swift:25
Duplicated block (14 lines × 2) · ×6Utilities/Constants.swift:265
Duplicated block (8 lines × 2) · ×6Managers/Playlist/PMRegularPlaylists.swift:228

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

What to do

  1. Resolve the 10 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with DMQueries.swift, DMSetup.swift, RadioStation.swift. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 8 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with DMSetup.swift (2), AlbumAlias.swift (2), AlbumArtist.swift (2). — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 7 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with DMPlaylists.swift, MenuBarManager.swift, FullTrack.swift. — One of this dimension's main actionable groups (7 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

4 of 40 classes have LCOM4 above 3.

Low cohesion: AppDelegate (LCOM4 21) · ×4Application/AppDelegate.swift:11

What to do

  1. Resolve the 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with AppDelegate.swift, AutomationManager.swift, PlaylistManager.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.

D8 · Code Coverage0.0 / 10Critical✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

No automated tests — no test code was found in this repository.

No automated tests

What to do

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

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

D9 · Test Distribution0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

No test suite found.

No tests found

What to do

  1. Resolve the 1 No tests found finding(s) in Test Distribution. — One of this dimension's main actionable groups (1 recommendation-level).

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

D12 · Dependency Hygiene9.9 / 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 9.9 / 10 · rule-coverage 100% · ceiling Verified

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

Outdated: crescendokit

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 3 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 2 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. 2 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

Top hotspots: Managers/PlaybackManager.swift (11×22=242); Views/Main/ContentView.swift (9×26=234); Views/Components/TrackViews/TrackTableView.swift (6×17=102) Repeated repair below the complexity floor: Managers/Database/DMNormalization.swift (3 of 4 changes were fixes)

Hotspot: Managers/PlaybackManager.swift · ×7Managers/PlaybackManager.swift:826
Repeated repair: Managers/Database/DMNormalization.swiftManagers/Database/DMNormalization.swift:19

What to do

  1. Resolve the 7 Hotspot finding(s) in Churn × Complexity Hotspots — start with PlaybackManager.swift, ContentView.swift, TrackTableView.swift. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with DMNormalization.swift. — One of this dimension's main actionable groups (1 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 47954 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation QualityStrong◐ Sampled · advisory

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

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

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

The repository's root README is clear and complete for an offline music player app: it shows the icon, GitHub download links, a release badge, a hero screenshot, and a feature list with links to supported-formats documentation. The docs/LOCALIZATION.md file explains Apple's String Catalog localization strategy (no Swift code changes), step-by-step translation process, plural handling, brand-name rules, and testing without changing your Mac's language; it is clipped mid-sentence but the outline confirms all listed sections exist.

What to do

  1. Improve Documentation Quality — currently 7.0/10. — The repository's root README is clear and complete for an offline music player app: it shows the icon, GitHub download links, a release badge, a hero screenshot, and a feature list with links to supported-formats documentation. The docs/LOCALIZATION.md file explains Apple's String Catalog localization strategy (no Swift code changes), step-by-step translation process, plural handling, brand-name rules, and testing without changing your Mac's language; it is clipped mid-sentence but the outline confirms all listed sections exist.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

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.4 / 10Adequategated by 12 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.4 / 10 · rule-coverage 100% · ceiling Documented

12 finding(s): 0 critical, 12 high, 0 medium, 0 low. 11 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 8 file(s) — `Managers/ArtistBioManager.swift`, `Managers/Database/DMCategoryQueries.swift` (line 227, line 239), `Managers/Database/DMQueries.swift` (line 369, line 370, line 371, …), `Views/Components/Widgets/NotificationTray.swift` (line 442), `Views/Main/ContentView.swift` (line 810), … (+3 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

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. No action in Static Analysis (SAST) — all 11 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 (11 issue-level, 0 of them charged here).

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

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

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 165 of the 204 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.5 / 10Stronggated by 4 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.5 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: LibraryView.swift↔PlaylistsView.swift 100%; FoldersView.swift↔LibraryView.swift 92%; FoldersView.swift↔PlaylistsView.swift 80%

Change coupling: FoldersView.swift ↔ LibraryView.swift · ×3Views/Folders/FoldersView.swift
Change-coupling hub: PlaylistsView.swift → FoldersView.swift, HomeView.swift, LibraryView.swiftViews/Playlists/PlaylistsView.swift

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with FoldersView.swift, TrackContextMenu.swift, EntityDetailView.swift. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with PlaylistsView.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.

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

Frontend & cross-cutting dimensions

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

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

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

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

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

What to do

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

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

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

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

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

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

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 model6.1 / 10Adequate✓ 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. — Core/ArtistParser.swift:498
  • `Data` 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. — Managers/ProblemReportManager.swift:291

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 boundary2.8 / 10Weak✓ 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.

  • `Album` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/Album.swift:4
  • `AlbumAlias` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/AlbumAlias.swift:6
  • `AlbumArtist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/AlbumArtist.swift:4
  • `Artist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/Artist.swift:4
  • `ArtistAlias` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/ArtistAlias.swift:6
  • `Folder` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/Folder.swift:4
  • `FullTrack` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/FullTrack.swift:4
  • `Genre` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/Genre.swift:4
  • `PinnedItem` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/PinnedItem.swift:4
  • `Playlist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/Playlist.swift:127
  • `PlaylistTrack` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/PlaylistTrack.swift:4
  • `RadioStation` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/RadioStation.swift:49
  • `PlaylistStation` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/RadioStation.swift:207
  • `Track` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/Track.swift:6
  • `TrackArtist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/TrackArtist.swift:4
  • `TrackGenre` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository). — Models/Core/TrackGenre.swift:4

What to do

  • Keep the ORM/table mapping and web-framework types on a boundary adapter; leave the domain entity framework-free (map row↔domain through a repository).
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

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
M2 · Architecture documentation3.0 / 10Weak✓ 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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
M3 · Folder & project structure6.0 / 10Adequate✓ 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.
  • Start a test surface where your build system looks for one (tests/, test/, spec/, or your ecosystem's test source set) — the separation follows from putting the first tests in the right place.
M4 · Documentation accuracy8.0 / 10Strong◐ Sampled · advisory

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

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

  • README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.

What to do

  • Reconcile the README with reality: README advertises Docker containerisation, but no Dockerfile/compose file exists.
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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

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

What to do

  • Run the test suite in CI via an explicit runner step (`xcodebuild test` for the toolchain this pipeline already uses) and gate merges on it.
P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF2 · Allocation hygiene6.1 / 10Adequate✓ Tool-verified

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

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

What to do

  • Raise allocation-aware density on the hot paths — currently 8 use(s) across 55,360 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.

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 Health88%StrongSolid.
Architecture97%ExemplaryStrongest area.
Maturity58%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness36%Weak — gated by D8, D9, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security61%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling56%Adequate — gated by DM6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance61%AdequateAcceptable, with room to improve.
Not evidenced — 5 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 84 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 Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • 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.
  • D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
  • 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.
  • 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. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 measured no build unit over this repository's .swift source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D30 Dependency Vulnerabilities — Scanner failed to run — not a clean result
  • 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) — 41 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — Scanner failed to run — not a clean result
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — Not applicable — this Xcode build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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# syntax, and none was loaded for this repository. 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
  • P10 Library API & versioning — 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 Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF3 Async & latency hygiene — Sync-over-async was not assessed: this repository's async code is written in Swift, whose blocking calls this check does not model yet. That is a gap in the analyzer's language reach, not a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • 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 reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X26 Unsynchronised callback handoff — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X28 Index access outside its own emptiness guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — 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
  • X7 Silent fallback defaults — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 31 finding(s)
DM6 · Domain ↔ infrastructure boundary · Domain fused to persistence infrastructure · ×16
  • Domain fused to persistence infrastructure: Album Models/Core/Album.swift:4 — `Album` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: AlbumAlias Models/Core/AlbumAlias.swift:6 — `AlbumAlias` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: AlbumArtist Models/Core/AlbumArtist.swift:4 — `AlbumArtist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: Artist Models/Core/Artist.swift:4 — `Artist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: ArtistAlias Models/Core/ArtistAlias.swift:6 — `ArtistAlias` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: Folder Models/Core/Folder.swift:4 — `Folder` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: FullTrack Models/Core/FullTrack.swift:4 — `FullTrack` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: Genre Models/Core/Genre.swift:4 — `Genre` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PinnedItem Models/Core/PinnedItem.swift:4 — `PinnedItem` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: Playlist Models/Core/Playlist.swift:127 — `Playlist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PlaylistTrack Models/Core/PlaylistTrack.swift:4 — `PlaylistTrack` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: RadioStation Models/Core/RadioStation.swift:49 — `RadioStation` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: PlaylistStation Models/Core/RadioStation.swift:207 — `PlaylistStation` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: Track Models/Core/Track.swift:6 — `Track` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: TrackArtist Models/Core/TrackArtist.swift:4 — `TrackArtist` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
  • Domain fused to persistence infrastructure: TrackGenre Models/Core/TrackGenre.swift:4 — `TrackGenre` is a domain concept fused to persistence ON ITS OWN DECLARATION (the GRDB `PersistableRecord`/`FetchableRecord` conformance), with no separate pure-domain layer — the domain entity IS the ORM row (active-record). A schema/persistence change ripples straight into the domain type. Keep the ORM/table mapping on a boundary adapter and the domain entity framework-free (or map row↔domain through a repository).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
DM4 · Rich vs anemic domain model · Anemic domain model · ×2
  • Anemic domain model: String Core/ArtistParser.swift:498 — `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.
  • Anemic domain model: Data Managers/ProblemReportManager.swift:291 — `Data` 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D8 · Code Coverage · No automated tests · ×1
  • No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (XCTest or Swift Testing), and run it in CI so the gap cannot reopen.
Serious — 205 finding(s)
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×10
  • Duplicated block (7 lines × 2) Managers/Database/DMQueries.swift:838 — Managers/Database/DMQueries.swift:838-844 | Managers/Database/DMQueries.swift:865-871 — 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 `Managers/Database/DMQueries.swift:838` 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, `Managers/Database/DMQueries.swift:864` calls `filter` and `Managers/Database/DMQueries.swift:837` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) Managers/Database/DMSetup.swift:75 — Managers/Database/DMSetup.swift:75-81 | Managers/Database/DMSetup.swift:116-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) Models/Core/RadioStation.swift:30 — Models/Core/RadioStation.swift:30-36 | Views/Components/TrackViews/TrackTableView.swift:741-747 — 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 `Models/Core/RadioStation.swift:30` 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) Utilities/ImageUtils.swift:144 — Utilities/ImageUtils.swift:144-150 | Views/Components/TrackViews/TrackTableView.swift:741-747 — 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 `Utilities/ImageUtils.swift:144` 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) Views/Components/TrackContextMenu.swift:276 — Views/Components/TrackContextMenu.swift:276-286 | Views/Components/TrackContextMenu.swift:329-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Views/Components/TrackContextMenu.swift:276` 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) Views/Components/TrackViews/TrackListView.swift:257 — Views/Components/TrackViews/TrackListView.swift:257-263 | Views/Components/TrackViews/TrackTableView.swift:564-570 — 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 `Views/Components/TrackViews/TrackListView.swift:257` 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) Views/Home/EntityDetailView.swift:239 — Views/Home/EntityDetailView.swift:239-245 | Views/Playlists/PlaylistDetailView.swift:197-203 — 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 `Views/Home/EntityDetailView.swift:239` 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) Views/Main/PlayerView.swift:237 — Views/Main/PlayerView.swift:237-243 | Views/Main/PlayerView.swift:286-292 — 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 `Views/Main/PlayerView.swift:237` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Views/Main/PlayerView.swift:293` calls `help` and `Views/Main/PlayerView.swift:244` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) Views/Main/TrackDetailView.swift:286 — Views/Main/TrackDetailView.swift:286-292 | Views/Main/TrackDetailView.swift:294-300 — 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, `Views/Main/TrackDetailView.swift:284` calls `String`, `formattedShortDuration` and `Views/Main/TrackDetailView.swift:292` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) Views/Immersive/ImmersiveView.swift:461 — Views/Immersive/ImmersiveView.swift:461-467 | Views/MiniPlayer/MiniPlayerView.swift:501-507 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×8
  • Duplicated block (6 lines × 2) Managers/ArtistBioManager.swift:312 — Managers/ArtistBioManager.swift:312-317 | Managers/ArtistBioManager.swift:393-398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) Managers/Database/DMSetup.swift:243 — Managers/Database/DMSetup.swift:243-248 | Managers/Database/DMSetup.swift:349-354 — 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 `Managers/Database/DMSetup.swift:243` 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) Managers/Database/DMSetup.swift:521 — Managers/Database/DMSetup.swift:521-526 | Managers/Database/DMSetup.swift:537-542 — 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 `Managers/Database/DMSetup.swift:521` 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) Models/Core/AlbumAlias.swift:22 — Models/Core/AlbumAlias.swift:22-27 | Models/Core/ArtistAlias.swift:22-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Models/Core/AlbumArtist.swift:12 — Models/Core/AlbumArtist.swift:12-17 | Models/Core/TrackArtist.swift:12-17 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `role` to `String = "primary"` in one and `String = "artist"` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) Models/Core/AlbumAlias.swift:36 — Models/Core/AlbumAlias.swift:36-41 | Models/Core/ArtistAlias.swift:36-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Models/Core/AlbumArtist.swift:41 — Models/Core/AlbumArtist.swift:41-46 | Models/Core/TrackArtist.swift:41-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Views/Playlists/StationCollectionContentView.swift:44 — Views/Playlists/StationCollectionContentView.swift:44-49 | Views/Radio/InternetRadioView.swift:133-138 — 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×7
  • Hotspot: Managers/PlaybackManager.swift Managers/PlaybackManager.swift:826 — Managers/PlaybackManager.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in PlaybackManager.audioPlayerStateChanged at line 826. 3 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Managers/PlaybackManager.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: Views/Main/ContentView.swift Views/Main/ContentView.swift:90 — Views/Main/ContentView.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ContentView.body at line 90. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Views/Main/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: Views/Components/TrackViews/TrackTableView.swift Views/Components/TrackViews/TrackTableView.swift:57 — Views/Components/TrackViews/TrackTableView.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in TrackTableView.body at line 57. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Views/Components/TrackViews/TrackTableView.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: Managers/Library/LibraryManager.swift Managers/Library/LibraryManager.swift:11 — Managers/Library/LibraryManager.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in LibraryManager.loadMusicLibrary at line 11. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Managers/Library/LibraryManager.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: Application/AppCoordinator.swift Application/AppCoordinator.swift:219 — Application/AppCoordinator.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AppCoordinator.restore at line 219. 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-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Application/AppCoordinator.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: Managers/Database/DatabaseManager.swift Managers/Database/DatabaseManager.swift:47 — Managers/Database/DatabaseManager.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in DatabaseManager.processBatch at line 47. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Managers/Database/DatabaseManager.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: Utilities/ImageUtils.swift Utilities/ImageUtils.swift:275 — Utilities/ImageUtils.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ImageUtils.drawGeometry at line 275. 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-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Utilities/ImageUtils.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · TooManyMethods · ×7
  • TooManyMethods: DatabaseManager Managers/Database/DatabaseManager.swift:12 — TooManyMethods — 286 methods. The bar is 30 methods; this is 256 over it, 9.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LibraryManager Managers/Library/LibraryManager.swift:12 — TooManyMethods — 117 methods. The bar is 30 methods; this is 87 over it, 3.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlaylistManager Managers/Playlist/PlaylistManager.swift:11 — TooManyMethods — 105 methods. The bar is 30 methods; this is 75 over it, 3.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: PlaybackManager Managers/PlaybackManager.swift:13 — TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.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: CrescendoPlaybackBackend Core/Playback/CrescendoPlaybackBackend.swift:22 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. Most of these members implement repository.PlaybackBackend (37 of 54 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: PlaybackEngine Core/Playback/PlaybackEngine.swift:304 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PetrichorApp PetrichorApp.swift:3 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×7
  • Duplicated block (10 lines × 2) Managers/Database/DMPlaylists.swift:25 — Managers/Database/DMPlaylists.swift:25-34 | Managers/Database/DMPlaylists.swift:135-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. Read the line range as the matched WINDOW rather than a finished unit: at `Managers/Database/DMPlaylists.swift:25` 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, `Managers/Database/DMPlaylists.swift:37` calls `Date` and `Managers/Database/DMPlaylists.swift:147` 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 (10 lines × 2) Managers/MenuBarManager.swift:184 — Managers/MenuBarManager.swift:184-193 | Managers/MenuBarManager.swift:216-225 — 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 `Managers/MenuBarManager.swift:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Models/Core/FullTrack.swift:290 — Models/Core/FullTrack.swift:290-299 | Models/Core/Track.swift:286-295 — before extracting anything, compare `Models/Core/FullTrack.swift` and `Models/Core/Track.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 `Models/Core/FullTrack.swift:290` 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 (10 lines × 2) Models/Core/SmartPlaylistField.swift:149 — Models/Core/SmartPlaylistField.swift:149-158 | Models/Core/SmartPlaylistField.swift:160-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) Utilities/ImageUtils.swift:43 — Utilities/ImageUtils.swift:43-53 | Utilities/ImageUtils.swift:385-394 — 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 `Utilities/ImageUtils.swift:43` 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) Views/Components/NowPlaying/NowPlayingControlsView.swift:75 — Views/Components/NowPlaying/NowPlayingControlsView.swift:75-84 | Views/Components/NowPlaying/NowPlayingControlsView.swift:120-129 — 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 `Views/Components/NowPlaying/NowPlayingControlsView.swift:75` 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) Views/Home/EntityDetailView.swift:201 — Views/Home/EntityDetailView.swift:201-210 | Views/Playlists/PlaylistDetailView.swift:174-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. Read the line range as the matched WINDOW rather than a finished unit: at `Views/Home/EntityDetailView.swift:201` 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.
D3 · God Classes · MethodTooLong · ×6
  • MethodTooLong: PlaybackManager.releasePlaybackForIdleIfHidden Managers/PlaybackManager.swift:11 — MethodTooLong — releasePlaybackForIdleIfHidden runs 375 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 275 over it, 3.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DatabaseMigrator.setupMigrator Managers/Database/DatabaseMigration.swift:15 — MethodTooLong — setupMigrator runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TrackTableView.tableView Views/Components/TrackViews/TrackTableView.swift:181 — MethodTooLong — tableView 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: PlaylistManager.installRestoredQueue Managers/Playlist/PlaylistManager.swift:10 — MethodTooLong — installRestoredQueue runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ContentView.body Views/Main/ContentView.swift:90 — MethodTooLong — body runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: EqualizerPreset.config Models/Core/EqualizerPreset.swift:32 — MethodTooLong — config runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · FileTooLong · ×6
  • FileTooLong: Database/DMFolders.swift Managers/Database/DMFolders.swift — FileTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 137 over it, 1.27× 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: TrackViews/TrackTableView.swift Views/Components/TrackViews/TrackTableView.swift — FileTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: TrackTableView (3-587). The bar is 500 significant lines; this is 104 over it, 1.21× 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: Managers/PlaybackManager.swift Managers/PlaybackManager.swift — FileTooLong — 547 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: PlaybackManager (13-703). The bar is 500 significant lines; this is 47 over it, 1.09× 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: Main/ContentView.swift Views/Main/ContentView.swift — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: ContentView (41-550). The bar is 500 significant lines; this is 42 over it, 1.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Main/PlayerView.swift Views/Main/PlayerView.swift — FileTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: PlayerView (47-549). The bar is 500 significant lines; this is 35 over it, 1.07× 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: ./PetrichorApp.swift PetrichorApp.swift — FileTooLong — 517 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 17 over it, 1.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) Utilities/Constants.swift:265 — Utilities/Constants.swift:265-278 | Utilities/Constants.swift:281-294 — 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 (14 lines × 2) Views/Components/ArtistImageSheet.swift:227 — Views/Components/ArtistImageSheet.swift:227-240 | Views/Playlists/Sheets/PlaylistArtworkSheet.swift:143-156 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) Views/Components/NowPlaying/NowPlayingControlsView.swift:96 — Views/Components/NowPlaying/NowPlayingControlsView.swift:96-109 | Views/Main/PlayerView.swift:262-275 — 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 `Views/Components/NowPlaying/NowPlayingControlsView.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.
  • Duplicated block (14 lines × 2) Views/Components/TrackViews/StationTableView.swift:259 — Views/Components/TrackViews/StationTableView.swift:259-272 | Views/Components/TrackViews/TrackListView.swift:485-498 — 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 `Views/Components/TrackViews/StationTableView.swift:259` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) Views/Folders/FoldersView.swift:63 — Views/Folders/FoldersView.swift:63-76 | Views/Playlists/PlaylistsView.swift:41-54 — 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 `Views/Folders/FoldersView.swift:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) Views/Main/PlayerView.swift:406 — Views/Main/PlayerView.swift:406-419 | Views/Main/PlayerView.swift:426-439 — 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 `Views/Main/PlayerView.swift:406` 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 lines × 2) · ×6
  • Duplicated block (8 lines × 2) Managers/Playlist/PMRegularPlaylists.swift:228 — Managers/Playlist/PMRegularPlaylists.swift:228-235 | Managers/Playlist/PMRegularPlaylists.swift:272-279 — 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) Managers/ScrobbleManager.swift:278 — Managers/ScrobbleManager.swift:278-285 | Managers/ScrobbleManager.swift:327-334 — 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 `Managers/ScrobbleManager.swift:278` 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) Models/Core/FullTrack.swift:215 — Models/Core/FullTrack.swift:215-222 | Models/Core/Track.swift:172-179 — before extracting anything, compare `Models/Core/FullTrack.swift` and `Models/Core/Track.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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.
  • Duplicated block (8 lines × 2) Views/Components/TrackViews/StationTableView.swift:110 — Views/Components/TrackViews/StationTableView.swift:110-117 | Views/Components/TrackViews/StationTableView.swift:121-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 `Views/Components/TrackViews/StationTableView.swift:110` 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) Views/Components/TrackViews/TrackTableView.swift:192 — Views/Components/TrackViews/TrackTableView.swift:192-199 | Views/Components/TrackViews/TrackTableView.swift:216-223 — 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 `Views/Components/TrackViews/TrackTableView.swift:192` 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) Views/Components/TrackViews/TrackTableView.swift:303 — Views/Components/TrackViews/TrackTableView.swift:303-310 | Views/Components/TrackViews/TrackTableView.swift:315-322 — 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 `Views/Components/TrackViews/TrackTableView.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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×6
  • Duplicated block (5 lines × 2) Managers/Database/DMSetup.swift:145 — Managers/Database/DMSetup.swift:145-149 | Managers/Database/DMSetup.swift:256-260 — 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 `Managers/Database/DMSetup.swift:145` 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 (5 lines × 2) Managers/Database/DMSetup.swift:298 — Managers/Database/DMSetup.swift:298-302 | Managers/Database/DMSetup.swift:311-315 — 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 `Managers/Database/DMSetup.swift:298` 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 (5 lines × 2) Managers/Database/DMTrackProcessing.swift:308 — Managers/Database/DMTrackProcessing.swift:308-312 | Managers/Database/DMTrackProcessing.swift:353-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) Managers/ScrobbleManager.swift:177 — Managers/ScrobbleManager.swift:177-181 | Managers/ScrobbleManager.swift:220-224 — 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 `Managers/ScrobbleManager.swift:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) Managers/Database/DMDiscoverQueries.swift:434 — Managers/Database/DMDiscoverQueries.swift:434-438 | Managers/Database/DMDiscoverQueries.swift:646-650 — 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 `Managers/Database/DMDiscoverQueries.swift:434` 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) Models/Core/Lyrics.swift:131 — Models/Core/Lyrics.swift:131-135 | Models/Core/Lyrics.swift:138-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×5
  • Duplicated block (9 lines × 2) Managers/Database/DMDiscoverQueries.swift:479 — Managers/Database/DMDiscoverQueries.swift:479-487 | Managers/Database/DMDiscoverQueries.swift:690-698 — 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 `Managers/Database/DMDiscoverQueries.swift:479` 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 (9 lines × 2) Managers/Database/DMFolders.swift:701 — Managers/Database/DMFolders.swift:701-709 | Managers/Database/DMFolders.swift:794-802 — 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) Managers/Playlist/PMSmartPlaylists.swift:212 — Managers/Playlist/PMSmartPlaylists.swift:212-220 | Managers/Playlist/PlaylistManager.swift:145-153 — 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 `Managers/Playlist/PMSmartPlaylists.swift:212` 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) Utilities/ImageUtils.swift:27 — Utilities/ImageUtils.swift:27-35 | Utilities/ImageUtils.swift:375-383 — 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 `Utilities/ImageUtils.swift:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Views/Components/ArtistImageSheet.swift:273 — Views/Components/ArtistImageSheet.swift:273-282 | Views/Components/ArtistImageSheet.swift:323-331 — 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 `Views/Components/ArtistImageSheet.swift:273` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: AppDelegate (LCOM4 21) Application/AppDelegate.swift:11 — AppDelegate's methods fall into 21 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 21 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: AutomationManager (LCOM4 7) Managers/Automation/AutomationManager.swift:19 — AutomationManager's methods fall into 7 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 7 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: PlaylistManager (LCOM4 5) Managers/Playlist/PlaylistManager.swift:11 — PlaylistManager'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: MenuBarManager (LCOM4 4) Managers/MenuBarManager.swift:11 — MenuBarManager'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.
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: FoldersView.swift ↔ LibraryView.swift Views/Folders/FoldersView.swift — `Views/Folders/FoldersView.swift` and `Views/Library/LibraryView.swift` change together 92% of the time (23 of the 25 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 23 shared commits counted here, the most recent 3 are `566dc90d` Group tracks by album when viewed under artist types (#371); `27ef8b87` Improve tracks list scroll performance (#228); `89a18309` Update views stack to cleanup unnecessary nesting (#223) — run `git show` on any of them.
  • Change coupling: TrackContextMenu.swift ↔ ContentView.swift Views/Components/TrackContextMenu.swift — `Views/Components/TrackContextMenu.swift` and `Views/Main/ContentView.swift` change together 58% of the time (7 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 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 `6183d0af` Fix identity handling for albums with the same name (#380); `ace0eea0` Add support for multi-select tracks for various actions (#141); `40ca6849` Unify playlist creation to handle different flows efficiently — run `git show` on any of them.
  • Change coupling: EntityDetailView.swift ↔ PlaylistDetailView.swift Views/Home/EntityDetailView.swift — `Views/Home/EntityDetailView.swift` and `Views/Playlists/PlaylistDetailView.swift` change together 52% of the time (14 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 14 shared commits counted here, the most recent 3 are `ece98b59` Update Pin/Unpin button icon for usability (#387); `566dc90d` Group tracks by album when viewed under artist types (#371); `65769b32` Use `scaledToFill` instead of `aspectRatio` modifier (#362) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) Managers/Database/DMSetup.swift:572 — Managers/Database/DMSetup.swift:572-583 | Managers/Database/DatabaseMigration.swift:249-267 — 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 `Managers/Database/DMSetup.swift:572` 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) Models/Core/FullTrack.swift:76 — Models/Core/FullTrack.swift:76-87 | Models/Core/Track.swift:75-86 — before extracting anything, compare `Models/Core/FullTrack.swift` and `Models/Core/Track.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 `Models/Core/FullTrack.swift:76` 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, `Models/Core/FullTrack.swift:88` calls `ExtendedMetadata` and `Models/Core/Track.swift:87` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) Views/Playlists/Sheets/RegularPlaylistEditorSheet.swift:231 — Views/Playlists/Sheets/RegularPlaylistEditorSheet.swift:231-242 | Views/Playlists/Sheets/RegularPlaylistEditorSheet.swift:311-322 — 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 · Edited copy of a member (10 corresponding lines) · ×2
  • Edited copy of a member (10 corresponding lines) Managers/Database/DMSetup.swift:140 — Managers/Database/DMSetup.swift:140-149 | Managers/Database/DMSetup.swift:251-260 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Managers/Database/DMSetup.swift:239 — Managers/Database/DMSetup.swift:239-248 | Managers/Database/DMSetup.swift:345-354 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Managers/ArtistBioManager.swift:301 — Managers/ArtistBioManager.swift:301-341 | Managers/ArtistBioManager.swift:344-375 | Managers/ArtistBioManager.swift:378-413 | Managers/ArtistBioManager.swift:433-470 — 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) Managers/Database/DMSetup.swift:58 — Managers/Database/DMSetup.swift:58-96 | Managers/Database/DMSetup.swift:99-137 | Managers/Database/DMSetup.swift:273-289 | Managers/Database/DMSetup.swift:318-342 — 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 (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) Managers/ScrobbleManager.swift:256 — Managers/ScrobbleManager.swift:256-275 | Managers/ScrobbleManager.swift:301-321 — 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 `Managers/ScrobbleManager.swift:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20–21 lines × 2) Views/Components/TrackViews/TrackListView.swift:467 — Views/Components/TrackViews/TrackListView.swift:467-487 | Views/Components/TrackViews/TrackTableView.swift:777-796 — 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 `Views/Components/TrackViews/TrackListView.swift:467` 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) Views/Components/TrackContextMenu.swift:19 — Views/Components/TrackContextMenu.swift:19-34 | Views/Components/TrackContextMenu.swift:84-99 — 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 (16 lines × 2) Views/Components/TrackViews/TrackTableOptionsDropdown.swift:266 — Views/Components/TrackViews/TrackTableOptionsDropdown.swift:266-281 | Views/Radio/InternetRadioView.swift:175-190 — 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 `Views/Components/TrackViews/TrackTableOptionsDropdown.swift:266` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) Managers/Database/DMTrackProcessing.swift:329 — Managers/Database/DMTrackProcessing.swift:329-343 | Managers/Database/DMTrackProcessing.swift:378-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) Views/Components/EntityGridView.swift:257 — Views/Components/EntityGridView.swift:257-271 | Views/Components/EntityListView.swift:541-555 — 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) · ×2
  • Duplicated block (13 lines × 2) Managers/Database/DMTrackProcessing.swift:224 — Managers/Database/DMTrackProcessing.swift:224-236 | Managers/Database/DMTrackProcessing.swift:287-299 — 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 `Managers/Database/DMTrackProcessing.swift:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) Views/Folders/FoldersView.swift:67 — Views/Folders/FoldersView.swift:67-79 | Views/Folders/FoldersView.swift:122-134 — 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 `Views/Folders/FoldersView.swift:67` 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 (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) Managers/ArtistBioManager.swift:317 — Managers/ArtistBioManager.swift:317-328 | Managers/ArtistBioManager.swift:450-460 — 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 `Managers/ArtistBioManager.swift:317` 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 (11–12 lines × 2) Managers/Database/DMMetadata.swift:287 — Managers/Database/DMMetadata.swift:287-298 | Managers/Database/DMMetadata.swift:339-349 — 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 `Managers/Database/DMMetadata.swift:287` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `artistId` to `Int64) async throws -> (data: Data?` in one and `Int64` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) Models/Enums/LibraryFilterType.swift:14 — Models/Enums/LibraryFilterType.swift:14-24 | Models/Enums/LibraryFilterType.swift:38-48 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) Views/Components/NoMusicEmptyStateView.swift:96 — Views/Components/NoMusicEmptyStateView.swift:96-109 | Views/Settings/LibraryTabView.swift:394-404 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×2
  • Duplicated block (5 lines × 4) Managers/ArtistBioManager.swift:313 — Managers/ArtistBioManager.swift:313-317 | Managers/ArtistBioManager.swift:351-355 | Managers/ArtistBioManager.swift:394-398 | Managers/ArtistBioManager.swift:446-450 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Managers/ArtistBioManager.swift:445` calls `setValue` and `Managers/ArtistBioManager.swift:312` 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 (5 lines × 4) Managers/Database/DMSetup.swift:494 — Managers/Database/DMSetup.swift:494-501 | Managers/Database/DMSetup.swift:524-528 | Managers/Database/DatabaseMigration.swift:59-63 | Managers/Database/DatabaseMigration.swift:67-74 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Managers/Database/DMSetup.swift:494` 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.
D1 · Cyclomatic Complexity · DatabaseManager.updateAdditionalMetadata (cyclomatic 38) · ×1
  • DatabaseManager.updateAdditionalMetadata (cyclomatic 38) Managers/Database/DatabaseManager.swift:131 — DatabaseManager.updateAdditionalMetadata has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · FullTrack.qualityScore (cyclomatic 32) · ×1
  • FullTrack.qualityScore (cyclomatic 32) Models/Core/FullTrack.swift:311 — FullTrack.qualityScore 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 · ArtistBioManager.fetchMissingArtistImages (cyclomatic 31) · ×1
  • ArtistBioManager.fetchMissingArtistImages (cyclomatic 31) Managers/ArtistBioManager.swift:108 — ArtistBioManager.fetchMissingArtistImages has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DatabaseManager.resolveDiscoverEntities (cyclomatic 26) · ×1
  • DatabaseManager.resolveDiscoverEntities (cyclomatic 26) Managers/Database/DatabaseManager.swift:224 — DatabaseManager.resolveDiscoverEntities has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · DatabaseManager.updateCoreMetadata (cyclomatic 26) · ×1
  • DatabaseManager.updateCoreMetadata (cyclomatic 26) Managers/Database/DatabaseManager.swift:83 — DatabaseManager.updateCoreMetadata has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ContentView.body (cyclomatic 26) · ×1
  • ContentView.body (cyclomatic 26) Views/Main/ContentView.swift:90 — ContentView.body has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DatabaseManager.processBatch (cyclomatic 24) · ×1
  • DatabaseManager.processBatch (cyclomatic 24) Managers/Database/DatabaseManager.swift:47 — DatabaseManager.processBatch 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · DatabaseManager.mergeArtists (cyclomatic 23) · ×1
  • DatabaseManager.mergeArtists (cyclomatic 23) Managers/Database/DatabaseManager.swift:41 — DatabaseManager.mergeArtists has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · LibraryManager.loadMusicLibrary (cyclomatic 23) · ×1
  • LibraryManager.loadMusicLibrary (cyclomatic 23) Managers/Library/LibraryManager.swift:11 — LibraryManager.loadMusicLibrary 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 · PlaybackManager.audioPlayerStateChanged (cyclomatic 22) · ×1
  • PlaybackManager.audioPlayerStateChanged (cyclomatic 22) Managers/PlaybackManager.swift:826 — PlaybackManager.audioPlayerStateChanged 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 · LibraryManager.warmDiscoverPlaylistArtwork (cyclomatic 22) · ×1
  • LibraryManager.warmDiscoverPlaylistArtwork (cyclomatic 22) Managers/Library/LibraryManager.swift:18 — LibraryManager.warmDiscoverPlaylistArtwork 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 · DatabaseManager.findOrCreateAlbum (cyclomatic 20) · ×1
  • DatabaseManager.findOrCreateAlbum (cyclomatic 20) Managers/Database/DatabaseManager.swift:149 — DatabaseManager.findOrCreateAlbum has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · DatabaseManager.processFile (cyclomatic 20) · ×1
  • DatabaseManager.processFile (cyclomatic 20) Managers/Database/DatabaseManager.swift:199 — DatabaseManager.processFile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · LibraryManager.refreshLibrary (cyclomatic 20) · ×1
  • LibraryManager.refreshLibrary (cyclomatic 20) Managers/Library/LibraryManager.swift:256 — LibraryManager.refreshLibrary 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 · InternetRadioManager.downloadTopStations (cyclomatic 19) · ×1
  • InternetRadioManager.downloadTopStations (cyclomatic 19) Managers/InternetRadioManager.swift:228 — InternetRadioManager.downloadTopStations has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DatabaseManager.getTracksForPinnedItem (cyclomatic 19) · ×1
  • DatabaseManager.getTracksForPinnedItem (cyclomatic 19) Managers/Database/DatabaseManager.swift:134 — DatabaseManager.getTracksForPinnedItem has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · TrackDetailView.appendBasicTrackInfo (cyclomatic 19) · ×1
  • TrackDetailView.appendBasicTrackInfo (cyclomatic 19) Views/Main/TrackDetailView.swift:275 — TrackDetailView.appendBasicTrackInfo has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · InternetRadioManager.backfillArtwork (cyclomatic 18) · ×1
  • InternetRadioManager.backfillArtwork (cyclomatic 18) Managers/InternetRadioManager.swift:314 — InternetRadioManager.backfillArtwork 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 · ArtistBioManager.searchTMDBImages (cyclomatic 17) · ×1
  • ArtistBioManager.searchTMDBImages (cyclomatic 17) Managers/ArtistBioManager.swift:433 — ArtistBioManager.searchTMDBImages 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 · DatabaseManager.convertArtworkToHEIC (cyclomatic 17) · ×1
  • DatabaseManager.convertArtworkToHEIC (cyclomatic 17) Managers/Database/DatabaseManager.swift:199 — DatabaseManager.convertArtworkToHEIC 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. This is NOT this file's highest cyclomatic complexity: DatabaseManager.buildExpression (cyclomatic 18) 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · TrackTableView.body (cyclomatic 17) · ×1
  • TrackTableView.body (cyclomatic 17) Views/Components/TrackViews/TrackTableView.swift:57 — TrackTableView.body has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppCoordinator.restore (cyclomatic 16) · ×1
  • AppCoordinator.restore (cyclomatic 16) Application/AppCoordinator.swift:219 — AppCoordinator.restore 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 · DatabaseManager.getTrackCountForPinnedPlaylists (cyclomatic 16) · ×1
  • DatabaseManager.getTrackCountForPinnedPlaylists (cyclomatic 16) Managers/Database/DatabaseManager.swift:222 — DatabaseManager.getTrackCountForPinnedPlaylists 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: DatabaseManager.buildExpression (cyclomatic 18) 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Managers/Database/DatabaseManager.swift holds 15 of the 31 methods over the threshold — including the worst — and 117 of the 207 points over it (57%), 5.6× the next-largest file (Managers/Library/LibraryManager.swift at 21). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · LibraryManager.performDiscoverLoad (cyclomatic 16) · ×1
  • LibraryManager.performDiscoverLoad (cyclomatic 16) Managers/Library/LibraryManager.swift:386 — LibraryManager.performDiscoverLoad 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 · TrackSortField.getComparator (cyclomatic 16) · ×1
  • TrackSortField.getComparator (cyclomatic 16) Views/Components/TrackViews/TrackTableOptionsDropdown.swift:42 — TrackSortField.getComparator 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 · TrackTableView.tableView (cyclomatic 16) · ×1
  • TrackTableView.tableView (cyclomatic 16) Views/Components/TrackViews/TrackTableView.swift:181 — TrackTableView.tableView 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: Managers/Database/DMNormalization.swift Managers/Database/DMNormalization.swift:19 — Managers/Database/DMNormalization.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 ScanLookupCache.albumKey at line 19), 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 identity handling for albums with the same name (#380)”; “Fix tracks occasionally showing incorrect artwork (#368)”; “Fix track Go-to menu to show artists' names correctly (#338)”. 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-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 19:04:22 -04:00' --until='2026-09-30 19:04:22 -04:00' --full-history --no-merges -- Managers/Database/DMNormalization.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.
D2 · Cognitive Complexity · LibraryManager.loadMusicLibrary (cognitive 60) · ×1
  • LibraryManager.loadMusicLibrary (cognitive 60) Managers/Library/LibraryManager.swift:11 — LibraryManager.loadMusicLibrary has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (31 pts), error handling 5 (22 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArtistBioManager.fetchMissingArtistImages (cognitive 52) · ×1
  • ArtistBioManager.fetchMissingArtistImages (cognitive 52) Managers/ArtistBioManager.swift:108 — ArtistBioManager.fetchMissingArtistImages has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 3 (7 pts), boolean chains 6, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatabaseManager.processBatch (cognitive 52) · ×1
  • DatabaseManager.processBatch (cognitive 52) Managers/Database/DatabaseManager.swift:47 — DatabaseManager.processBatch has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 6 (11 pts), error handling 2 (6 pts), ternaries 2 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FullTrack.qualityScore (cognitive 49) · ×1
  • FullTrack.qualityScore (cognitive 49) Models/Core/FullTrack.swift:311 — FullTrack.qualityScore has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 8 (24 pts), if/else 16 (18 pts), match/switch 2 (4 pts), boolean chains 3 (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 · DatabaseManager.resolveDiscoverEntities (cognitive 46) · ×1
  • DatabaseManager.resolveDiscoverEntities (cognitive 46) Managers/Database/DatabaseManager.swift:224 — DatabaseManager.resolveDiscoverEntities has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 5 (10 pts), loops 5 (10 pts), boolean chains 6, match/switch 1 (4 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 · DatabaseManager.updateAdditionalMetadata (cognitive 37) · ×1
  • DatabaseManager.updateAdditionalMetadata (cognitive 37) Managers/Database/DatabaseManager.swift:131 — DatabaseManager.updateAdditionalMetadata has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 22, if/else 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.
D2 · Cognitive Complexity · DatabaseManager.convertArtworkToHEIC (cognitive 35) · ×1
  • DatabaseManager.convertArtworkToHEIC (cognitive 35) Managers/Database/DatabaseManager.swift:199 — DatabaseManager.convertArtworkToHEIC has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (8 pts), ternaries 2 (6 pts), boolean chains 4, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatabaseManager.processFile (cognitive 34) · ×1
  • DatabaseManager.processFile (cognitive 34) Managers/Database/DatabaseManager.swift:199 — DatabaseManager.processFile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 11, error handling 1 (nesting depth added 14). 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 · InternetRadioManager.backfillArtwork (cognitive 31) · ×1
  • InternetRadioManager.backfillArtwork (cognitive 31) Managers/InternetRadioManager.swift:314 — InternetRadioManager.backfillArtwork has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryManager.refreshLibrary (cognitive 29) · ×1
  • LibraryManager.refreshLibrary (cognitive 29) Managers/Library/LibraryManager.swift:256 — LibraryManager.refreshLibrary has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 3 (6 pts), loops 3 (4 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 · DatabaseManager.getTrackCountForPinnedPlaylists (cognitive 28) · ×1
  • DatabaseManager.getTrackCountForPinnedPlaylists (cognitive 28) Managers/Database/DatabaseManager.swift:222 — DatabaseManager.getTrackCountForPinnedPlaylists has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6, loops 2 (5 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryManager.warmDiscoverPlaylistArtwork (cognitive 28) · ×1
  • LibraryManager.warmDiscoverPlaylistArtwork (cognitive 28) Managers/Library/LibraryManager.swift:18 — LibraryManager.warmDiscoverPlaylistArtwork has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, loops 3, 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 · DatabaseManager.getTracksForPinnedItem (cognitive 27) · ×1
  • DatabaseManager.getTracksForPinnedItem (cognitive 27) Managers/Database/DatabaseManager.swift:134 — DatabaseManager.getTracksForPinnedItem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ContentView.body (cognitive 27) · ×1
  • ContentView.body (cognitive 27) Views/Main/ContentView.swift:90 — ContentView.body has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, boolean chains 9, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DatabaseManager.mergeArtists (cognitive 25) · ×1
  • DatabaseManager.mergeArtists (cognitive 25) Managers/Database/DatabaseManager.swift:41 — DatabaseManager.mergeArtists has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts), loops 2 (3 pts), 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 · DatabaseManager.updateCoreMetadata (cognitive 25) · ×1
  • DatabaseManager.updateCoreMetadata (cognitive 25) Managers/Database/DatabaseManager.swift:83 — DatabaseManager.updateCoreMetadata has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DatabaseManager.findOrCreateAlbum (cognitive 25) · ×1
  • DatabaseManager.findOrCreateAlbum (cognitive 25) Managers/Database/DatabaseManager.swift:149 — DatabaseManager.findOrCreateAlbum has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 10, 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 · LibrarySidebarView.body (cognitive 25) · ×1
  • LibrarySidebarView.body (cognitive 25) Views/Library/LibrarySidebarView.swift:22 — LibrarySidebarView.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, ternaries 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 · PlaybackManager.audioPlayerStateChanged (cognitive 24) · ×1
  • PlaybackManager.audioPlayerStateChanged (cognitive 24) Managers/PlaybackManager.swift:826 — PlaybackManager.audioPlayerStateChanged has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 3, 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 · LibraryView.updateFilteredTracks (cognitive 24) · ×1
  • LibraryView.updateFilteredTracks (cognitive 24) Views/Library/LibraryView.swift:259 — LibraryView.updateFilteredTracks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 1 (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 · Playlist.renderCollageArtwork (cognitive 23) · ×1
  • Playlist.renderCollageArtwork (cognitive 23) Models/Core/Playlist.swift:451 — Playlist.renderCollageArtwork has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (6 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryFilterType.getFilterItems (cognitive 22) · ×1
  • LibraryFilterType.getFilterItems (cognitive 22) Models/Enums/LibraryFilterType.swift:209 — LibraryFilterType.getFilterItems has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArtistBioManager.searchTMDBImages (cognitive 21) · ×1
  • ArtistBioManager.searchTMDBImages (cognitive 21) Managers/ArtistBioManager.swift:433 — ArtistBioManager.searchTMDBImages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InternetRadioManager.downloadTopStations (cognitive 21) · ×1
  • InternetRadioManager.downloadTopStations (cognitive 21) Managers/InternetRadioManager.swift:228 — InternetRadioManager.downloadTopStations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ImageUtils.drawGeometry (cognitive 21) · ×1
  • ImageUtils.drawGeometry (cognitive 21) Utilities/ImageUtils.swift:275 — ImageUtils.drawGeometry has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (8 pts), ternaries 3 (7 pts), match/switch 2 (4 pts), boolean chains 1, if/else 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · LibraryFilterType.trackMatches (cognitive 21) · ×1
  • LibraryFilterType.trackMatches (cognitive 21) Models/Enums/LibraryFilterType.swift:258 — LibraryFilterType.trackMatches has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TrackTableView.body (cognitive 21) · ×1
  • TrackTableView.body (cognitive 21) Views/Components/TrackViews/TrackTableView.swift:57 — TrackTableView.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (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 · LibraryManager.selectRoundRobin (cognitive 20) · ×1
  • LibraryManager.selectRoundRobin (cognitive 20) Managers/Library/LibraryManager.swift:51 — LibraryManager.selectRoundRobin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EntityDetailView.pinEntity (cognitive 20) · ×1
  • EntityDetailView.pinEntity (cognitive 20) Views/Home/EntityDetailView.swift:514 — EntityDetailView.pinEntity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · TrackDetailView.appendBasicTrackInfo (cognitive 20) · ×1
  • TrackDetailView.appendBasicTrackInfo (cognitive 20) Views/Main/TrackDetailView.swift:275 — TrackDetailView.appendBasicTrackInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 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 · AppCoordinator.restore (cognitive 19) · ×1
  • AppCoordinator.restore (cognitive 19) Application/AppCoordinator.swift:219 — AppCoordinator.restore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1, match/switch 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 · DatabaseManager.getDistinctValues (cognitive 19) · ×1
  • DatabaseManager.getDistinctValues (cognitive 19) Managers/Database/DatabaseManager.swift:146 — DatabaseManager.getDistinctValues has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 1 (3 pts), 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 · LibraryManager.getTrackCountForPinnedItems (cognitive 19) · ×1
  • LibraryManager.getTrackCountForPinnedItems (cognitive 19) Managers/Library/LibraryManager.swift:224 — LibraryManager.getTrackCountForPinnedItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PinnedItem.matches (cognitive 19) · ×1
  • PinnedItem.matches (cognitive 19) Models/Core/PinnedItem.swift:198 — PinnedItem.matches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, 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 · AppDelegate.applicationDockMenu (cognitive 18) · ×1
  • AppDelegate.applicationDockMenu (cognitive 18) Application/AppDelegate.swift:216 — AppDelegate.applicationDockMenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 5 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlaybackManager.restoreAudioEffectsSettings (cognitive 18) · ×1
  • PlaybackManager.restoreAudioEffectsSettings (cognitive 18) Managers/PlaybackManager.swift:635 — PlaybackManager.restoreAudioEffectsSettings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 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 · LibraryManager.loadEntitiesAsync (cognitive 18) · ×1
  • LibraryManager.loadEntitiesAsync (cognitive 18) Managers/Library/LibraryManager.swift:496 — LibraryManager.loadEntitiesAsync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, 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 · TrackTableView.tableView (cognitive 18) · ×1
  • TrackTableView.tableView (cognitive 18) Views/Components/TrackViews/TrackTableView.swift:181 — TrackTableView.tableView has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10, if/else 5 (7 pts), boolean chains 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 · ArtistBioManager.fetchArtistBio (cognitive 17) · ×1
  • ArtistBioManager.fetchArtistBio (cognitive 17) Managers/ArtistBioManager.swift:474 — ArtistBioManager.fetchArtistBio has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 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 · LyricsManager.requestLRCLIB (cognitive 17) · ×1
  • LyricsManager.requestLRCLIB (cognitive 17) Managers/LyricsManager.swift:119 — LyricsManager.requestLRCLIB has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatabaseManager.mergeAlbums (cognitive 17) · ×1
  • DatabaseManager.mergeAlbums (cognitive 17) Managers/Database/DatabaseManager.swift:130 — DatabaseManager.mergeAlbums has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), boolean chains 3, 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 · LibraryManager.performDiscoverLoad (cognitive 17) · ×1
  • LibraryManager.performDiscoverLoad (cognitive 17) Managers/Library/LibraryManager.swift:386 — LibraryManager.performDiscoverLoad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LibraryManager.prepareFolderForScanning (cognitive 17) · ×1
  • LibraryManager.prepareFolderForScanning (cognitive 17) Managers/Library/LibraryManager.swift:200 — LibraryManager.prepareFolderForScanning has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 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 · LibraryManager.determineFoldersToRefresh (cognitive 17) · ×1
  • LibraryManager.determineFoldersToRefresh (cognitive 17) Managers/Library/LibraryManager.swift:428 — LibraryManager.determineFoldersToRefresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FolderHierarchyBuilder.buildSubtree (cognitive 16) · ×1
  • FolderHierarchyBuilder.buildSubtree (cognitive 16) Managers/FolderHierarchyBuilder.swift:32 — FolderHierarchyBuilder.buildSubtree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 1 (2 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 · ImageUtils.extractDominantColors (cognitive 16) · ×1
  • ImageUtils.extractDominantColors (cognitive 16) Utilities/ImageUtils.swift:164 — ImageUtils.extractDominantColors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatabaseMigrator.setupMigrator (cognitive 16) · ×1
  • DatabaseMigrator.setupMigrator (cognitive 16) Managers/Database/DatabaseMigration.swift:15 — DatabaseMigrator.setupMigrator has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (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 · PlaylistManager.matchTracksToLibrary (cognitive 16) · ×1
  • PlaylistManager.matchTracksToLibrary (cognitive 16) Managers/Playlist/PlaylistManager.swift:213 — PlaylistManager.matchTracksToLibrary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (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 · EntityDetailView.entityArtwork (cognitive 16) · ×1
  • EntityDetailView.entityArtwork (cognitive 16) Views/Home/EntityDetailView.swift:196 — EntityDetailView.entityArtwork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 2 (5 pts), boolean chains 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.
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: PlaylistsView.swift → FoldersView.swift, HomeView.swift, LibraryView.swift Views/Playlists/PlaylistsView.swift — `Views/Playlists/PlaylistsView.swift` changes together with 3 other files — `Views/Folders/FoldersView.swift`, `Views/Home/HomeView.swift`, `Views/Library/LibraryView.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) Views/Immersive/ImmersiveView.swift:382 — Views/Immersive/ImmersiveView.swift:382-429 | Views/MiniPlayer/MiniPlayerView.swift:292-328 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) Models/Core/FullTrack.swift:288 — Models/Core/FullTrack.swift:288-299 | Models/Core/Track.swift:284-295 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Models/Enums/LibraryFilterType.swift:50 — Models/Enums/LibraryFilterType.swift:50-60 | Models/Enums/LibraryFilterType.swift:65-75 | Models/Enums/LibraryFilterType.swift:80-90 | Models/Enums/LibraryFilterType.swift:101-111 | Models/Enums/LibraryFilterType.swift:126-136 | Models/Enums/LibraryFilterType.swift:162-172 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (31 lines × 3) · ×1
  • Duplicated block (31 lines × 3) Managers/Database/DMCategoryQueries.swift:182 — Managers/Database/DMCategoryQueries.swift:182-212 | Managers/Database/DMCategoryQueries.swift:284-314 | Managers/Database/DMCategoryQueries.swift:325-355 — 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 `Managers/Database/DMCategoryQueries.swift:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) Views/Components/Sidebar/SidebarListView.swift:29 — Views/Components/Sidebar/SidebarListView.swift:29-55 | Views/Components/SidebarView.swift:25-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) Views/Immersive/ImmersiveView.swift:383 — Views/Immersive/ImmersiveView.swift:383-407 | Views/MiniPlayer/MiniPlayerView.swift:296-320 — 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 `Views/Immersive/ImmersiveView.swift:383` 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, `Views/MiniPlayer/MiniPlayerView.swift:295` calls `Spacer` and `Views/Immersive/ImmersiveView.swift:382` 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 (12–21 lines × 2) · ×1
  • Duplicated block (12–21 lines × 2) Managers/Database/DMSetup.swift:492 — Managers/Database/DMSetup.swift:492-503 | Managers/Database/DatabaseMigration.swift:56-76 — 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 `Managers/Database/DMSetup.swift:492` 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) · ×1
  • Duplicated block (19 lines × 2) Views/Main/TrackDetailView.swift:241 — Views/Main/TrackDetailView.swift:241-259 | Views/Main/TrackDetailView.swift:445-463 — 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 `Views/Main/TrackDetailView.swift:241` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Views/Main/TrackDetailView.swift:464` calls `transition`, `combined`, `move` and `Views/Main/TrackDetailView.swift:260` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) Models/Core/FullTrack.swift:145 — Models/Core/FullTrack.swift:145-161 | Models/Core/Track.swift:124-140 — before extracting anything, compare `Models/Core/FullTrack.swift` and `Models/Core/Track.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 `Models/Core/FullTrack.swift:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) Managers/Database/DMDiscoverQueries.swift:617 — Managers/Database/DMDiscoverQueries.swift:617-630 | Managers/Database/DMDiscoverResolution.swift:14-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Managers/Database/DMDiscoverQueries.swift:617` 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 (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) Views/Folders/FoldersView.swift:66 — Views/Folders/FoldersView.swift:66-77 | Views/Folders/FoldersView.swift:121-132 | Views/Playlists/PlaylistsView.swift:44-55 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Views/Folders/FoldersView.swift:66` 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 (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) Models/Enums/LibraryFilterType.swift:50 — Models/Enums/LibraryFilterType.swift:50-60 | Models/Enums/LibraryFilterType.swift:65-75 | Models/Enums/LibraryFilterType.swift:80-90 | Models/Enums/LibraryFilterType.swift:101-111 | Models/Enums/LibraryFilterType.swift:126-136 | Models/Enums/LibraryFilterType.swift:162-172 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Models/Enums/LibraryFilterType.swift:95` calls `localizedDisplay` and `Models/Enums/LibraryFilterType.swift:65` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) Managers/MenuBarManager.swift:155 — Managers/MenuBarManager.swift:155-164 | Managers/MenuBarManager.swift:173-182 | Managers/MenuBarManager.swift:205-214 — 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 `Managers/MenuBarManager.swift:155` 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 (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) Views/Components/TrackViews/StationTableView.swift:265 — Views/Components/TrackViews/StationTableView.swift:265-273 | Views/Components/TrackViews/TrackListView.swift:491-499 | Views/Components/TrackViews/TrackTableView.swift:800-808 — 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 `Views/Components/TrackViews/StationTableView.swift:265` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Views/Components/TrackViews/TrackListView.swift:502` calls `task`, `artworkIdentity`, `loadArtwork` and `Views/Components/TrackViews/StationTableView.swift:274` 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–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) Views/Components/ListHeader.swift:163 — Views/Components/ListHeader.swift:163-170 | Views/Components/ListHeader.swift:187-195 — 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 `Views/Components/ListHeader.swift:163` 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–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) Managers/Database/DMSetup.swift:60 — Managers/Database/DMSetup.swift:60-67 | Managers/Database/DMSetup.swift:101-108 | Managers/Database/DMSetup.swift:320-326 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) Managers/Database/DMSetup.swift:76 — Managers/Database/DMSetup.swift:76-83 | Managers/Database/DMSetup.swift:330-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) Views/Components/TrackViews/TrackTableView.swift:246 — Views/Components/TrackViews/TrackTableView.swift:246-252 | Views/Components/TrackViews/TrackTableView.swift:257-263 | Views/Components/TrackViews/TrackTableView.swift:267-274 | Views/Components/TrackViews/TrackTableView.swift:279-285 | Views/Components/TrackViews/TrackTableView.swift:289-296 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Views/Components/TrackViews/TrackTableView.swift:246` 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, `Views/Components/TrackViews/TrackTableView.swift:246` calls `font`, `isCurrentTrack` and `Views/Components/TrackViews/TrackTableView.swift:267` does not — after which the two agree again for 5 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) Views/Home/EntityDetailView.swift:199 — Views/Home/EntityDetailView.swift:199-205 | Views/Main/TrackDetailView.swift:175-181 | Views/Playlists/PlaylistDetailView.swift:172-178 — 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 `Views/Home/EntityDetailView.swift:199` 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, `Views/Main/TrackDetailView.swift:182` calls `id` and `Views/Home/EntityDetailView.swift:206` 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 (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) Managers/Database/DMDiscoverQueries.swift:515 — Managers/Database/DMDiscoverQueries.swift:515-520 | Managers/Database/DMDiscoverQueries.swift:727-733 — 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 `Managers/Database/DMDiscoverQueries.swift:515` 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 (2–6 lines × 5) · ×1
  • Duplicated block (2–6 lines × 5) Managers/Database/DMSetup.swift:451 — Managers/Database/DMSetup.swift:451-452 | Managers/Database/DMSetup.swift:467-468 | Managers/Database/DMSetup.swift:516-517 | Managers/Database/DMSetup.swift:528-533 | Managers/Database/DMSetup.swift:544-549 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Managers/Database/DMSetup.swift:528` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Managers/Database/DMSetup.swift:552` calls `createInternetRadioIndices` and `Managers/Database/DMSetup.swift:454` 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 (1–5 lines × 6) · ×1
  • Duplicated block (1–5 lines × 6) Managers/Database/DMSetup.swift:472 — Managers/Database/DMSetup.swift:472-477 | Managers/Database/DMSetup.swift:479-479 | Managers/Database/DMSetup.swift:483-492 | Managers/Database/DMSetup.swift:511-515 | Managers/Database/DatabaseMigration.swift:49-53 | Managers/Database/DatabaseMigration.swift:244-257 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Managers/Database/DMSetup.swift:511` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Managers/Database/DMSetup.swift:478` calls `createIndexIfNotExists` and `Managers/Database/DMSetup.swift:479` 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 (2–5 lines × 6) · ×1
  • Duplicated block (2–5 lines × 6) Managers/Database/DMSetup.swift:452 — Managers/Database/DMSetup.swift:452-453 | Managers/Database/DMSetup.swift:469-473 | Managers/Database/DMSetup.swift:482-488 | Managers/Database/DMSetup.swift:517-520 | Managers/Database/DMSetup.swift:568-578 | Managers/Database/DatabaseMigration.swift:240-253 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Managers/Database/DMSetup.swift:469` 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, `Managers/Database/DMSetup.swift:520` calls `createIndexIfNotExists` and `Managers/Database/DMSetup.swift:473` 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 (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) Managers/Database/DMSetup.swift:77 — Managers/Database/DMSetup.swift:77-83 | Managers/Database/DMSetup.swift:277-281 | Managers/Database/DMSetup.swift:331-335 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Managers/Database/DMSetup.swift:336` calls `column`, `notNull`, `defaults` and `Managers/Database/DMSetup.swift:282` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) Managers/Database/DMDiscoverQueries.swift:749 — Managers/Database/DMDiscoverQueries.swift:749-754 | Managers/Database/DMDiscoverQueries.swift:775-780 | Managers/Database/DMDiscoverQueries.swift:801-806 — 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 `Managers/Database/DMDiscoverQueries.swift:749` 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.
Minor — 10 finding(s)
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/`.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D9 · Test Distribution · No tests found · ×1
  • No tests found — No test suite could be collected — no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (XCTest or Swift Testing) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here.
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'.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift — README advertises Docker containerisation, but no Dockerfile/compose file exists — searched for: `dockerfile`, `docker-compose`, `compose.yaml`, `compose.yml`. Each was matched case- and separator-insensitively against file and directory NAMES anywhere in the tree, and against the CONTENTS of manifest files (package.json, *.csproj, *.props, *.slnx, *.yml, Dockerfile); the README's own prose never counts, so a claim is never refuted by merely being made. Nothing outside that search was read — a footprint living only in a submodule, in a file type not listed here, or under a name none of those terms matches is not seen, and this row is then wrong.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 8917 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.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Minor — 1 finding(s)
D12 · Dependency Hygiene · Outdated · ×1
  • Outdated: crescendokit — `crescendokit` is resolved at 1.2.3, but 1.3.0 is the newest release tagged on https://github.com/kushalpandya/CrescendoKit within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update crescendokit` reaches this one with no change to Package.swift.

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-28aadcfc27214fdebdbfc52993137f64/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-28aadcfc27214fdebdbfc52993137f64/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 .12artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive .0—
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 41 file(s) — `Core/Metadata/MetadataMapping.swift`, `Managers/ArtistBioManager.swift`, `Managers/Database/DMCategoryQueries.swift`, `Managers/Database/DMQueries.swift`, `Managers/Database/DMTrackProcessing.swift`, … (+36 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .0—

Run 01a0f71b-3dd1-74a5-adb8-5125b6c18248 · 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