Public report — Sidekick, published 30 Sep 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_087ecaa350fd415e8034cb35c422e74b Filed 30 September 2026, 22:03 UTC Public

Johnbean393/Sidekick

Measured 30 September 2026, 21:57 UTC

50% Adequate
CriticalWeakAdequateStrongExemplary

Medium · 42,194 LoC · rebuild ~0.3 person-years · weakest lens: Readiness (30%)

Findings by grade

4 critical 166 serious 20 minor 48 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
30 September 2026, 21:57 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 ▸

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

Executive summary

The system holds an adequate standing with an overall health score of 50%. While the core logic is sound, the asset carries real operational risk due to significant gaps in how it is tested and deployed. This is a medium-sized system, representing a modest rebuild effort of roughly 0.3 person-years, yet its fragility in production readiness threatens delivery speed and reliability.

The most critical issue is operational fragility. With a readiness score of only 30%, the system lacks the safety nets required for stable operation. There is no automated verification that changes work, and disaster recovery procedures are not formally defined or tested. This exposes the business to potential outages and slow recovery times, turning minor updates into high-stakes events that could disrupt service and erode user trust.

A secondary concern is the hidden cost of complexity. Although the code structure is generally clean, certain areas carry a complexity tax that slows down every change. Developers spend extra time understanding and modifying these parts, which compounds as the codebase grows. This inefficiency reduces team velocity and increases the likelihood of defects slipping into production, ultimately raising long-term maintenance costs.

On the positive side, the architecture is robust, and the domain modeling is excellent, meaning the business logic is well-captured and easy to understand for new team members. Security practices are also strong, minimizing exposure to external threats. These strengths provide a solid foundation that makes remediation of the weaker areas more manageable.

To focus first, the team should implement a continuous integration workflow that automatically builds and runs tests on every change. This single action provides the highest leverage by catching errors early and establishing a baseline for reliability. Once this is in place, documenting recovery procedures and maintaining a changelog will further stabilize the system. The current picture is partial, as performance and event-driven patterns were not measured, but addressing readiness is the immediate priority.

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 30% · 46% weightAccessibility 53% · 25% weightMaturity 69% · 14% weightCode Health 85% · 8% weightSecurity 89% · 4% weightArchitecture 94% · 2% weightDomain Modelling 100% · 1% weight

Raise Readiness 30 → 70 (the Healthy floor) ⇒ headline 50 → ~65.

Code composition — where the lines go
Tests 100%
New since the last scan (61+)

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

  • D1 · String.modelParameterCount (cyclomatic 26) Sidekick/Extensions/Extension+String.swift
  • D2 · String.modelParameterCount (cognitive 52) Sidekick/Extensions/Extension+String.swift
  • D2 · String.familyVersion (cognitive 29) Sidekick/Extensions/Extension+String.swift
  • D2 · String.modelProvider (cognitive 18) Sidekick/Extensions/Extension+String.swift
  • D2 · chat.renderIncremental (cognitive 18) Sidekick/Resources/ChatMarkdownWebView/chat.js
  • D2 · ModelSelectorDropdown.dropdownContent (cognitive 17) Sidekick/Views/Model/ModelSelectorDropdown.swift
  • D2 · ModelSelectionView.body (cognitive 17) Sidekick/Views/Setup/ModelSelectionView.swift
  • D2 · MessageContentView.textContent (cognitive 17) Sidekick/Views/Chat/Conversation/Messages/Message/MessageContentView.swift
  • D2 · main.swift.checkHeartbeat (cognitive 16) Sidekick/Logic/Inference/llama.cpp/llama-server-watchdog/main.swift
  • D2 · chat.groupTopLevel (cognitive 16) Sidekick/Resources/ChatMarkdownWebView/chat.js
  • D3 · FileTooLong: llama.cpp/LlamaServer+Chat.swift Sidekick/Logic/Inference/llama.cpp/LlamaServer+Chat.swift
  • D3 · FileTooLong: ChatMarkdownWebView/chat.js Sidekick/Resources/ChatMarkdownWebView/chat.js
  • D3 · MethodTooLong: Theme.gitHub Sidekick/Extensions/UI/Extension+Theme.swift
  • D4 · Members sharing a duplicated core (6 members, 50+ identical tokens) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift
  • D4 · Members sharing a duplicated core (5 members, 50+ identical tokens) Sidekick/Views/Expert/Resource/ResourceSectionView.swift
  • D4 · Members sharing a duplicated core (4 members, 50+ identical tokens) Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.swift
  • D4 · Duplicated block (35 lines × 2) Sidekick/Views/Model/ModelSelectorDropdown.swift
  • D4 · Duplicated block (22 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift
  • D4 · Duplicated block (21 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift
  • D4 · Duplicated block (19 lines × 2) Sidekick/Views/Chat/Conversation/Canvas/Snapshot/SnapshotExportButton.swift
  • D4 · Duplicated block (18 lines × 2) Sidekick/Views/Settings/InferenceSettingsView.swift
  • D4 · Duplicated block (16 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift
  • D4 · Duplicated block (13–14 lines × 2) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift
  • D4 · Duplicated block (12 lines × 2) Sidekick/Views/Misc/ScrollMask.swift
  • D4 · Duplicated block (12 lines × 2) Sidekick/Views/Model/ModelSelectorDropdown.swift
  • D4 · Duplicated block (12 lines × 2) Sidekick/Views/Settings/Model/ServerModelSettingsView.swift
  • D4 · Duplicated block (12 lines × 2) Sidekick/Extensions/UI/Extension+Theme.swift
  • D4 · Duplicated block (11 lines × 2) Sidekick/Views/Settings/RetrievalSettingsView.swift
  • D4 · Duplicated block (11 lines × 2) Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift
  • D4 · Duplicated block (11 lines × 2) Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift
  • D4 · Duplicated block (10 lines × 5) Sidekick/Views/Expert/Resource/ResourceSectionView.swift
  • D4 · Duplicated block (10 lines × 3) Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift
  • D4 · Duplicated block (10 lines × 3) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift
  • D4 · Duplicated block (10 lines × 2) Sidekick/Views/Settings/Model/ServerModelSettingsView.swift
  • D4 · Duplicated block (10 lines × 2) Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift
  • D4 · Duplicated block (8–9 lines × 3) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift
  • D4 · Duplicated block (8–9 lines × 3) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift
  • D4 · Duplicated block (8 lines × 3) Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift
  • D4 · Duplicated block (7 lines × 4) Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.swift
  • D4 · Duplicated block (7 lines × 2) Sidekick/Extensions/Extension+String.swift
  • D4 · Duplicated block (19 lines × 2) Sidekick/Extensions/Extension+IndexItem.swift
  • D4 · Duplicated block (7 lines × 2) Sidekick/Types/Conversation/Message/ReferencedURL.swift
  • D4 · Duplicated block (10 lines × 3) Sidekick/Views/Expert/ExpertEditorView.swift
  • D4 · Duplicated block (10 lines × 2) Sidekick/Types/Conversation/Functions/Function.swift
  • D4 · Duplicated block (10 lines × 2) Sidekick/Extensions/UI/Extension+Binding.swift
  • D4 · Duplicated block (13 lines × 3) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleButton.swift
  • D4 · Duplicated block (10 lines × 2) Sidekick/Types/Conversation/Functions/Default Functions/CalendarFunctions.swift
  • D6 · Low cohesion: String (LCOM4 22) Sidekick/Extensions/Extension+String.swift
  • D6 · Low cohesion: URL (LCOM4 5) Sidekick/Extensions/Extension+URL.swift
  • D6 · Low cohesion: Array (LCOM4 4) Sidekick/Extensions/Extension+Array.swift
  • D12 · Floating branch dependency: default-models
  • D12 · Floating branch dependency: eventsource
  • D12 · Floating branch dependency: extractkit-macos
  • D12 · Floating branch dependency: fskit-macos
  • D12 · Floating branch dependency: googlesearch
  • D12 · Floating branch dependency: latexswiftui
  • D12 · Floating branch dependency: launchatlogin-modern
  • D12 · Floating branch dependency: similarity-search-kit
  • D12 · Floating branch dependency: swiftdraw
  • AC3 · Page without a main landmark Sidekick/Resources/ChatMarkdownWebView/chat.html
  • AC3 · Page without a main landmark Sidekick/Resources/conversationExportTemplate.html

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 — €13,000–€67,000
Cost to rebuild€13,000–€67,000 (0.1–0.4 person-years (222–704 h), ~1 engineer)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 50% 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 ~€40,000 to rebuild). Its weakest lens is Readiness at 30% — 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 9 Floating branch dependency finding(s) in Dependency Hygiene.
+9.0 pts · Low effort · Dependency Hygiene
2
Add a CI workflow that builds and runs the test suite on every push/PR.
+17.4 pts · Medium effort · CI/CD gates
3
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
+17.1 pts · Medium effort · DR & Backup

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 30%. 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 (42,194 LoC) · weakest lens: Readiness 30%
→ 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 CI workflow that builds and runs the test suite on every push/PR. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a CI workflow that builds and runs the test suite on every push/PR.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 7.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 2–5% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 7.2/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

3 modules, 1 dependency. Every dependency points down the layering — no cycles.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 Sidekick.Resources.ChatMarkdownWebView2 repository3 Sidekick~Views~Chat~Conversation~Messages
1 Sidekick.Resources.ChatMarkdownWebView
2 repository
3 Sidekick~Views~Chat~Conversation~Messages9
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…s.ChatMarkdownWebViewrepository…Conversation~Messages…s.ChatMarkdownWebView1repository2…Conversation~Messages39

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

At a glance — Architecture · 94% · Exemplary ·

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

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

At a glance — Security · 89% · Strong ·

At a glance — Domain Modelling · 100% · Exemplary ·

At a glance — Accessibility · 53% · Adequate · gated by AC6 ·

Roadmap

First, establish a CI workflow to automatically build and test every change, while resolving floating branch dependencies to ensure stability. Next, document disaster recovery procedures with tested restore steps and maintain a changelog to track release history. Finally, improve page structure by adding essential semantic elements like language attributes and main landmarks, and remove meta-refreshes to enhance accessibility and usability.

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

Do thisHelpsEffortDimension
Resolve the 9 Floating branch dependency finding(s) in Dependency Hygiene.+9.0 ptsLowDependency Hygiene
Add a CI workflow that builds and runs the test suite on every push/PR.+17.4 ptsMediumCI/CD gates
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+17.1 ptsMediumDR & Backup
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+16.1 ptsMediumRelease Hygiene
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with SidekickUITests.swift.+4.6 ptsLowTest Quality
Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with SidekickUITests.swift.+4.6 ptsLowTest Quality
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+6.9 ptsMediumPage structure
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+6.9 ptsMediumVisual & motion safety

File quality

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

FileScoreBandWorst signal
SidekickUITests/SidekickUITests.swift5.5MixedTest Quality: Assertions commented out: testExample
Sidekick/Extensions/Extension+String.swift5.6MixedCyclomatic Complexity: String.modelParameterCount (cyclomatic 26)
Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift5.7MixedCyclomatic Complexity: LlamaServer.getChatCompletionInternal (cyclomatic 72)
Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift5.7MixedCyclomatic Complexity: ChatParameters.toJSON (cyclomatic 37)
Sidekick/Logic/Inference/Model.swift5.7MixedCyclomatic Complexity: Model.listenThinkRespond (cyclomatic 20)
Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift5.9MixedCode Duplication: Duplicated block (22 lines × 2)
Sidekick/Views/Chat/Conversation/Controls/Input Field/MultilineTextEditor.swift7.0MixedCognitive Complexity: MultilineTextField.updateNSView (cognitive 17)
Sidekick/Resources/ChatMarkdownWebView/chat.js7.0MixedCyclomatic Complexity: (anonymous) (cyclomatic 158)
Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift7.0MixedCognitive Complexity: CommunityDetector.detectBaseCommunities (cognitive 24)
Sidekick/Views/Chat/Conversation/Controls/Input Field/PromptInputField.swift7.1MixedCyclomatic Complexity: PromptInputField.generateChatResponse (cyclomatic 22)
Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift7.1MixedCode Duplication: Members sharing a duplicated core (6 members, 50+ identical tokens)
Sidekick/Types/Expert/Resource.swift7.2MixedCyclomatic Complexity: Resource.updateIndex (cyclomatic 33)
Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift7.2MixedCyclomatic Complexity: DuckDuckGoSearch.search (cyclomatic 21)
Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift7.2MixedCognitive Complexity: GGUFMetadataReader.readArchitectureInfo (cognitive 27)
Sidekick/Logic/Data Models/ModelManager.swift7.2MixedCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
Sidekick/Types/Model/KnownModel.swift7.4MixedCyclomatic Complexity: KnownModel.init (cyclomatic 25)
Sidekick/Logic/Services/RAGIndexingService.swift7.4MixedCyclomatic Complexity: RAGIndexingService.updateResourcesIndex (cyclomatic 23)
Sidekick/Logic/Utilities/ChatScreenshotHTMLBuilder.swift7.4MixedCyclomatic Complexity: ChatScreenshotHTMLBuilder.payload (cyclomatic 21)
Sidekick/Views/Model/ModelSelectorDropdown.swift7.4MixedCognitive Complexity: ModelSelectorDropdown.dropdownContent (cognitive 17)
Sidekick/Types/Agent/DeepResearchAgent.swift7.4MixedGod Classes: ClassTooLong: DeepResearchAgent

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

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

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

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

Could not be resolved — 48

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. 37 of 40 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 — 40 dimensions across the health lenses
D1D2D3D4D6D9D10D12D13D14D15D17D19D20D21D28D29D34D35AC2AC3AC5AC6AC7AX10AX9DM4DM5DM6M1M2M3M4P1P2P3P5P6S1X29

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, 161 of 190 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 01a0f452-31a9-70d8-94cf-ca56ccf3aa82.

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.

  • D5 Coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • 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 (6 contributor(s) across 592 commit(s) sampled, automation and bot accounts excluded). One of them holds 98% of the history; the other 5 hold 0.4% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • 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, so this ecosystem's public API has no collector, and the remedy is to write one — 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. `Sidekick/Logic/Data Models/ExpertManager.swift`, `Sidekick/Logic/Data Models/ModelManager.swift`, `Sidekick/Logic/Data Models/ServerArgumentsManager.swift`, `Sidekick/Logic/Data Models/SourcesManager.swift`, `Sidekick/Logic/Tips/Tips.swift`, … (+15 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.
  • AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and no container it models, or knows cannot hold a captive, was found in this repository's source, 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.
  • AX2 Stateful singletons — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection singletons in C#, Spring/JSR-330/CDI singletons in Java and Kotlin, and module state in Python request handlers only, and this repository's product is written in Swift, which was left unread, 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.
  • AX3 Project dependency cycles — 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 which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt, RubyGems, Composer, Mix/rebar3 and pub builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX4 Dependency direction — 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 direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt, RubyGems, Composer, Mix/rebar3 and pub builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX8 Test isolation — 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 which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt, RubyGems, Composer, Mix/rebar3 and pub builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and 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: 6 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, 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.
  • 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.
  • 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.
  • 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 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.
  • 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 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.
  • 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 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.
  • 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 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.
  • 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 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.
  • 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 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.
  • 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.
  • 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. X7 measured the part of this repository it reads (C#, Python, TypeScript/JavaScript, Rust and Go), and its Swift source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

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

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

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

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

18 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was (anonymous) at 158. A further 2 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being KnownModel.fullIdentifier at 18 — they are counted neither in the figure above nor in this dimension's score.

(anonymous) (cyclomatic 158)Sidekick/Resources/ChatMarkdownWebView/chat.js:10
(anonymous) (cyclomatic 136)Sidekick/Resources/ChatMarkdownWebView/screenshot.js:7
LlamaServer.getChatCompletionInternal (cyclomatic 72)Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift:103
ChatParameters.toJSON (cyclomatic 37)Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift:211
Resource.updateIndex (cyclomatic 33)Sidekick/Types/Expert/Resource.swift:261

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

What to do

  1. Resolve the 1 (anonymous) (cyclomatic 158) finding(s) in Cyclomatic Complexity — start with chat.js. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 (anonymous) (cyclomatic 136) finding(s) in Cyclomatic Complexity — start with screenshot.js. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 LlamaServer.getChatCompletionInternal (cyclomatic 72) finding(s) in Cyclomatic Complexity — start with LlamaServer.swift. — One of this dimension's main actionable groups (1 warning-level).
  4. Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

45 method(s) exceeded the cognitive complexity threshold of 15; the worst was LlamaServer.getChatCompletionInternal at 192.

(anonymous)::renderIncremental (cognitive 18) · ×3Sidekick/Resources/ChatMarkdownWebView/chat.js:252
LlamaServer.getChatCompletionInternal (cognitive 192)Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift:103
(anonymous) (cognitive 147)Sidekick/Resources/ChatMarkdownWebView/screenshot.js:7
Resource.updateIndex (cognitive 68)Sidekick/Types/Expert/Resource.swift:261
String.modelParameterCount (cognitive 52)Sidekick/Extensions/Extension+String.swift:619

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

What to do

  1. Resolve the 3 (anonymous) finding(s) in Cognitive Complexity — start with chat.js (3). — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 LlamaServer.getChatCompletionInternal (cognitive 192) finding(s) in Cognitive Complexity — start with LlamaServer.swift. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 (anonymous) (cognitive 147) finding(s) in Cognitive Complexity — start with screenshot.js. — One of this dimension's main actionable groups (1 warning-level).
  4. Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

14 god class(es) detected.

MethodTooLong: Resource.updateIndex · ×5Sidekick/Types/Expert/Resource.swift:261
ClassTooLong: DeepResearchAgent · ×4Sidekick/Types/Agent/DeepResearchAgent.swift:13
FileTooLong: llama.cpp/LlamaServer+Chat.swift · ×4Sidekick/Logic/Inference/llama.cpp/LlamaServer+Chat.swift
TooManyMethods: ModelSidekick/Logic/Inference/Model.swift:15

What to do

  1. Resolve the 5 MethodTooLong finding(s) in God Classes — start with Resource.swift, RAGIndexingService.swift, PromptInputField.swift. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 4 ClassTooLong finding(s) in God Classes — start with DeepResearchAgent.swift, PromptInputField.swift, Resource.swift. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 4 FileTooLong finding(s) in God Classes — start with LlamaServer+Chat.swift, DeepResearchAgent.swift, PromptInputField.swift. — One of this dimension's main actionable groups (4 warning-level).
  4. Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

Duplicated block (12 lines × 2) · ×5Sidekick/Logic/Data Models/ModelManager.swift:124
Duplicated block (11 lines × 2) · ×5Sidekick/Views/Settings/RetrievalSettingsView.swift:191
Duplicated block (10 lines × 2) · ×5Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:133
Duplicated block (10 lines × 3) · ×4Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:89
Duplicated block (19 lines × 2) · ×3Sidekick/Views/Chat/Conversation/Canvas/Snapshot/SnapshotExportButton.swift:121

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

What to do

  1. Resolve the 5 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with ModelManager.swift, ScrollMask.swift, ModelSelectorDropdown.swift. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 5 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with RetrievalSettingsView.swift, CommunityDetector.swift, CollapsibleUserMessageView.swift. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 5 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with ServerModelSettingsView.swift, MessageReasoningProcessView.swift, Function.swift. — One of this dimension's main actionable groups (5 warning-level).
  4. Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

6 of 37 classes have LCOM4 above 3.

Low cohesion: String (LCOM4 22) · ×6Sidekick/Extensions/Extension+String.swift:12

What to do

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

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

D9 · Test Distribution8.8 / 10Strong✓ Tool-verified

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

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

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

32 test methods: 29 unit, 0 integration, 0 BDD, 3 e2e.

What to do

  1. Improve Test Distribution — currently 8.8/10. — 32 test methods: 29 unit, 0 integration, 0 BDD, 3 e2e.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality7.7 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

0 skipped, 4 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 32 tests.

Assertions commented out: testExampleSidekickUITests/SidekickUITests.swift:25
Test project verifies nothing: SidekickUITestsSidekickUITests/SidekickUITests.swift:25
No assertions: checkModelReccomendations · ×3SidekickTests/SidekickTests.swift:23

What to do

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

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

D12 · Dependency Hygiene7.3 5.3 / 10Adequate✓ 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 5.3 / 10 · rule-coverage 73% · ceiling Verified

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

Floating branch dependency: default-models · ×9
Outdated: codeeditorview · ×14

What to do

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

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 33 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 32 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. 6 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 Hotspots10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.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 42194 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 single README is a well-illustrated marketing document for Sidekick, the local-first LLM assistant that fetches and responds to information from websites and files without installing anything else. It opens with an app logo, download/license badges, a strong 'local first' tag, and a screenshot showing it answering a research question about Aztec-Spanish interactions. The body is rich in examples (e.g., the History paper demo) and features, but it ends before the architecture/design docs and the outlined sections such as Bring Your Own API Key, Function Calling, and Contributing appear — these are not yet present in the visible text.

What to do

  1. Improve Documentation Quality — currently 7.0/10. — The repository's single README is a well-illustrated marketing document for Sidekick, the local-first LLM assistant that fetches and responds to information from websites and files without installing anything else. It opens with an app logo, download/license badges, a strong 'local first' tag, and a screenshot showing it answering a research question about Aztec-Spanish interactions. The body is rich in examples (e.g., the History paper demo) and features, but it ends before the architecture/design docs and the outlined sections such as Bring Your Own API Key, Function Calling, and Contributing appear — these are not yet present in the visible text.

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)10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

semgrep found no security issues. semgrep hit a parse error in 1 file(s) — `SidekickTests/SidekickTests.swift` (line 69, line 70, line 104, …) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

✓ On the Gold path — maintain.

Detailed fixes: d29_recommendation.md.

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 144 of the 276 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: LlamaServer.swift↔ServerModelNameEditor.swift 70%; LlamaServer.swift↔FunctionCallsView.swift 60%; Extension+URL.swift↔LlamaServer.swift 54%

Change-coupling hub: LlamaServer.swift → Extension+URL.swift, Function.swift, FunctionCallsView.swift, InferenceSettingsView.swift, ServerModelNameEditor.swift · ×2Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift
Change coupling: ChatParameters.swift ↔ Function.swift · ×2Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift

What to do

  1. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with LlamaServer.swift, Model.swift. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 2 Change coupling finding(s) in Change Coupling — start with ChatParameters.swift, InferenceSettings.swift. — One of this dimension's main actionable groups (2 warning-level).

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

Frontend & cross-cutting dimensions

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

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

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

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

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

AC3 · Page structure4.0 / 10Weak✓ Tool-verified

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

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

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

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — Sidekick/Credits.html:4, Sidekick/Resources/ChatMarkdownWebView/screenshot.html:2, Sidekick/Resources/conversationExportTemplate.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. — Sidekick/Resources/ChatMarkdownWebView/chat.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×2) — Sidekick/Resources/ChatMarkdownWebView/chat.html:5, Sidekick/Resources/ChatMarkdownWebView/screenshot.html:5

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety3.5 / 10Weak✓ Tool-verified

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

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

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

  • This stylesheet animates but never checks prefers-reduced-motion, so motion-sensitive users can't opt out. Wrap motion in @media (prefers-reduced-motion: no-preference). — Sidekick/Resources/conversationExportTemplate.html:28
  • `.assistant .icon` sets color: white on background-color: #a0a0a0 — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sidekick/Resources/conversationExportTemplate.html:28

What to do

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

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

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

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

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

What to do

  • Enforce accessibility in the toolchain your project already uses: assert accessibility in your UI test suite with your toolkit's own matcher (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in CI so a regression blocks the merge.
AX10 · Code composition9.7 / 10Exemplary✓ Tool-verified

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

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

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

What to do

  • The domain core is a small share of production code, 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.
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 model10.0 / 10Exemplary✓ 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.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

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

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

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

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

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

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

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

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

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

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

What to do

  • 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 structure10.0 / 10Exemplary✓ Tool-verified

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

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ 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.

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

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

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

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

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P2 · Observability8.0 / 10Strong✓ Tool-verified

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

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

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

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

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

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

What to do

  • Run what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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.
S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. Deterministic.

  • `https://cdn.jsdelivr.net/npm/marked/marked.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 3 such include(s) across the repository's markup. — Sidekick/Resources/conversationExportTemplate.html:8

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

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

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

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health85%StrongSolid.
Architecture94%ExemplarySolid.
Maturity69%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness30%Weak — gated by P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security89%StrongSolid.
Domain Modelling100%ExemplaryStrongest area.
Accessibility53%Adequate — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 1 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
Not included — 80 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — 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
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • 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 — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test source is present (.swift) and this repository's suite is reachable only from an Apple platform: it ships Sidekick.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not re-run. Not scored: nothing was exercised.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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 .js, .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) — 20 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • 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 — D5 reads a .NET project-reference graph only — this repository's production source is .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: this repository's test suite is reachable only from an Apple platform — it ships Sidekick.xcodeproj and no SwiftPM manifest, so it is built by Xcode rather than by `swift test`. The analyzer runs on Linux, where no simulator exists, so the suite was not run and no coverage was instrumented. Not scored. To have the real number read, produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures.
  • DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
  • DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
  • DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — 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 — no CI workflow found
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: allocation awareness is rated where code engineers for it — at least 400 production lines that ship benchmarks or already use allocation-aware idioms (8 or more). This repository's Swift has 47,210 production line(s), 7 such use(s) and no benchmarks, so there is no allocation work to rate. The card is reward-only: its absence costs nothing.
  • 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.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — 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 — 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.
  • X25 Inert configuration knob — 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.
  • X26 Unsynchronised callback handoff — 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.
  • X27 Collection changed while being enumerated — 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.
  • X28 Index access outside its own emptiness 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.
  • 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 — 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.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 4 finding(s)
AC3 · Page structure · Viewport restricts zoom · ×2
  • Viewport restricts zoom Sidekick/Resources/ChatMarkdownWebView/chat.html:5 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom Sidekick/Resources/ChatMarkdownWebView/screenshot.html:5 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
D10 · Test Quality · Assertions commented out · ×1
  • Assertions commented out: testExample SidekickUITests/SidekickUITests.swift:25 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
D10 · Test Quality · Test project verifies nothing · ×1
  • Test project verifies nothing: SidekickUITests SidekickUITests/SidekickUITests.swift:25 — No conventional assertion call was detected in 3 of 3 tests in `SidekickUITests` — the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off — it is not an approval/verifier harness.
Serious — 166 finding(s)
D12 · Dependency Hygiene · Floating branch dependency · ×9
  • Floating branch dependency: default-models — Dependency `default-models` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: eventsource — Dependency `eventsource` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: extractkit-macos — Dependency `extractkit-macos` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: fskit-macos — Dependency `fskit-macos` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: googlesearch — Dependency `googlesearch` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: latexswiftui — Dependency `latexswiftui` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: launchatlogin-modern — Dependency `launchatlogin-modern` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: similarity-search-kit — Dependency `similarity-search-kit` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `main` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
  • Floating branch dependency: swiftdraw — Dependency `swiftdraw` is resolved in Sidekick.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch `latexswiftui` rather than a released version — the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit.
D6 · Cohesion (LCOM4) · Low cohesion · ×6
  • Low cohesion: String (LCOM4 22) Sidekick/Extensions/Extension+String.swift:12 — String's methods fall into 22 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 22 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: PromptController (LCOM4 5) Sidekick/Logic/View Controllers/PromptController.swift:18 — PromptController'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: URL (LCOM4 5) Sidekick/Extensions/Extension+URL.swift:10 — URL's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Coordinator (LCOM4 4) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:169 — Coordinator's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PromptingTextView (LCOM4 4) Sidekick/Views/Chat/Conversation/Controls/Input Field/MultilineTextEditor.swift:202 — PromptingTextView's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Array (LCOM4 4) Sidekick/Extensions/Extension+Array.swift:10 — Array'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.
D3 · God Classes · MethodTooLong · ×5
  • MethodTooLong: Resource.updateIndex Sidekick/Types/Expert/Resource.swift:261 — MethodTooLong — updateIndex runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× 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: RAGIndexingService.updateResourcesIndex Sidekick/Logic/Services/RAGIndexingService.swift:45 — MethodTooLong — updateResourcesIndex runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PromptInputField.generateChatResponse Sidekick/Views/Chat/Conversation/Controls/Input Field/PromptInputField.swift:581 — MethodTooLong — generateChatResponse 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.
  • MethodTooLong: Theme.gitHub Sidekick/Extensions/UI/Extension+Theme.swift:27 — MethodTooLong — gitHub runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DeepResearchAgent.researchSection Sidekick/Types/Agent/DeepResearchAgent.swift:356 — MethodTooLong — researchSection runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×5
  • Duplicated block (12 lines × 2) Sidekick/Logic/Data Models/ModelManager.swift:124 — Sidekick/Logic/Data Models/ModelManager.swift:124-135 | Sidekick/Logic/Data Models/ServerArgumentsManager.swift:129-140 — 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 `Sidekick/Logic/Data Models/ModelManager.swift:124` 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 (12 lines × 2) Sidekick/Views/Misc/ScrollMask.swift:14 — Sidekick/Views/Misc/ScrollMask.swift:14-25 | Sidekick/Views/Misc/ScrollMask.swift:27-38 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) Sidekick/Views/Model/ModelSelectorDropdown.swift:272 — Sidekick/Views/Model/ModelSelectorDropdown.swift:272-283 | Sidekick/Views/Settings/Model/ModelNameMenu.swift:128-139 — 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 `Sidekick/Views/Model/ModelSelectorDropdown.swift:272` 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 (12 lines × 2) Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:56 — Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:56-67 | Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:153-164 — 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 `Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) Sidekick/Extensions/UI/Extension+Theme.swift:50 — Sidekick/Extensions/UI/Extension+Theme.swift:50-61 | Sidekick/Extensions/UI/Extension+Theme.swift:63-74 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sidekick/Extensions/UI/Extension+Theme.swift:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) Sidekick/Views/Settings/RetrievalSettingsView.swift:191 — Sidekick/Views/Settings/RetrievalSettingsView.swift:191-201 | Sidekick/Views/Settings/RetrievalSettingsView.swift:216-226 — 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 `Sidekick/Views/Settings/RetrievalSettingsView.swift:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:379 — Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:379-389 | Sidekick/Logic/Utilities/GraphRAG/EntityExtractor.swift:267-277 — 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 `Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:379` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:93 — Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:93-103 | Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:129-139 — 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 `Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:93` 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, `Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:141` calls `frame` and `Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:105` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift:118 — Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift:118-128 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageStepsView.swift:107-117 — 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 `Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift:118` 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, `Sidekick/Views/Chat/Conversation/Messages/Message/MessageStepsView.swift:118` calls `frame` and `Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift:129` 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 (11 lines × 2) Sidekick/Logic/Inference/llama.cpp/LlamaServer+Chat.swift:63 — Sidekick/Logic/Inference/llama.cpp/LlamaServer+Chat.swift:63-73 | Sidekick/Logic/Inference/llama.cpp/LlamaServer+Chat.swift:104-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×5
  • Duplicated block (10 lines × 2) Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:133 — Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:133-142 | Sidekick/Views/Settings/RetrievalSettingsView.swift:163-172 — 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 `Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:133` 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, `Sidekick/Views/Settings/Model/ServerModelSettingsView.swift:144` calls `textContentType` and `Sidekick/Views/Settings/RetrievalSettingsView.swift:174` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift:99 — Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift:99-108 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageStepsView.swift:94-103 — 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 `Sidekick/Views/Chat/Conversation/Messages/Message/MessageReasoningProcessView.swift:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Sidekick/Types/Conversation/Functions/Function.swift:270 — Sidekick/Types/Conversation/Functions/Function.swift:270-279 | Sidekick/Types/Conversation/Functions/FunctionCallRecord.swift:41-50 — 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 (10 lines × 2) Sidekick/Extensions/UI/Extension+Binding.swift:85 — Sidekick/Extensions/UI/Extension+Binding.swift:85-94 | Sidekick/Views/Expert/Resource/ResourceSectionView.swift:342-351 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) Sidekick/Types/Conversation/Functions/Default Functions/CalendarFunctions.swift:56 — Sidekick/Types/Conversation/Functions/Default Functions/CalendarFunctions.swift:56-65 | Sidekick/Types/Conversation/Functions/Default Functions/ReminderFunctions.swift:63-72 — 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.
AC3 · Page structure · Page without a main landmark · ×4
  • Page without a main landmark Sidekick/Credits.html:4 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark Sidekick/Resources/ChatMarkdownWebView/chat.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark Sidekick/Resources/ChatMarkdownWebView/screenshot.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark Sidekick/Resources/conversationExportTemplate.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D3 · God Classes · ClassTooLong · ×4
  • ClassTooLong: DeepResearchAgent Sidekick/Types/Agent/DeepResearchAgent.swift:13 — ClassTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 222 over it, 1.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PromptInputField Sidekick/Views/Chat/Conversation/Controls/Input Field/PromptInputField.swift:14 — ClassTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 210 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.
  • ClassTooLong: Resource Sidekick/Types/Expert/Resource.swift:16 — ClassTooLong — 450 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 50 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ModelLoadConfigSheet Sidekick/Views/Settings/Model/ModelLoadConfigSheet.swift:15 — ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 8 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · FileTooLong · ×4
  • FileTooLong: llama.cpp/LlamaServer+Chat.swift Sidekick/Logic/Inference/llama.cpp/LlamaServer+Chat.swift — FileTooLong — 704 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 204 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Agent/DeepResearchAgent.swift Sidekick/Types/Agent/DeepResearchAgent.swift — FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DeepResearchAgent (13-1008). The bar is 500 significant lines; this is 126 over it, 1.25× 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: Input Field/PromptInputField.swift Sidekick/Views/Chat/Conversation/Controls/Input Field/PromptInputField.swift — FileTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: PromptInputField (14-963). The bar is 500 significant lines; this is 115 over it, 1.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ChatMarkdownWebView/chat.js Sidekick/Resources/ChatMarkdownWebView/chat.js — FileTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 84 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×4
  • Duplicated block (10 lines × 3) Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:89 — Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:89-98 | Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:125-134 | Sidekick/Views/Chat/Markdown/MarkdownCodeBlockView.swift:137-146 — 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 `Sidekick/Views/Chat/Conversation/Messages/Message/CollapsibleUserMessageView.swift:89` 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 × 3) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:152 — Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:152-161 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:167-176 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:182-191 — 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 `Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:152` 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 (10 lines × 3) Sidekick/Views/Expert/ExpertEditorView.swift:22 — Sidekick/Views/Expert/ExpertEditorView.swift:22-31 | Sidekick/Views/Expert/Resource/ResourceSectionView.swift:24-33 | Sidekick/Views/Expert/Resource/ResourceSelectionView.swift:62-71 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleButton.swift:60 — Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleButton.swift:60-69 | Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:108-117 | Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift:113-122 — before extracting anything, compare `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift` and `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 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.
D10 · Test Quality · No assertions · ×3
  • No assertions: checkModelReccomendations SidekickTests/SidekickTests.swift:23 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testLaunchPerformance SidekickUITests/SidekickUITests.swift:34 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testLaunch SidekickUITests/SidekickUITestsLaunchTests.swift:20 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · (anonymous) · ×3
  • (anonymous)::renderIncremental (cognitive 18) Sidekick/Resources/ChatMarkdownWebView/chat.js:252 — (anonymous)::renderIncremental has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3, boolean chains 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • (anonymous)::fullHighlightInside (cognitive 18) Sidekick/Resources/ChatMarkdownWebView/chat.js:402 — (anonymous)::fullHighlightInside has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, ternaries 1 (3 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.
  • (anonymous)::groupTopLevel (cognitive 16) Sidekick/Resources/ChatMarkdownWebView/chat.js:96 — (anonymous)::groupTopLevel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) Sidekick/Views/Chat/Conversation/Canvas/Snapshot/SnapshotExportButton.swift:121 — Sidekick/Views/Chat/Conversation/Canvas/Snapshot/SnapshotExportButton.swift:121-139 | Sidekick/Views/Chat/Conversation/Canvas/Snapshot/SnapshotExportButton.swift:258-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.bottom` in one and `.leading` 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 (19 lines × 2) Sidekick/Logic/Inference/Model+Inference.swift:602 — Sidekick/Logic/Inference/Model+Inference.swift:602-620 | Sidekick/Logic/Inference/Model+Inference.swift:794-812 — 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 `Sidekick/Logic/Inference/Model+Inference.swift:602` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) Sidekick/Extensions/Extension+IndexItem.swift:14 — Sidekick/Extensions/Extension+IndexItem.swift:14-32 | Sidekick/Types/Conversation/Message/SearchResult.swift:13-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:308 — Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:308-322 | Sidekick/Logic/Utilities/GraphRAG/EntityExtractor.swift:184-198 — 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 (15 lines × 2) Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:256 — Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:256-270 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageView.swift:305-319 — 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 `Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:256` 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 (15 lines × 2) Sidekick/Logic/Inference/Model+Inference.swift:440 — Sidekick/Logic/Inference/Model+Inference.swift:440-454 | Sidekick/Logic/Inference/Model+Inference.swift:681-695 — 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 `Sidekick/Logic/Inference/Model+Inference.swift:440` 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) · ×3
  • Duplicated block (8 lines × 2) Sidekick/Logic/Utilities/ChatScreenshotHTMLBuilder.swift:221 — Sidekick/Logic/Utilities/ChatScreenshotHTMLBuilder.swift:221-228 | Sidekick/Views/Chat/Conversation/Messages/Message/FunctionCallsView.swift:116-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sidekick/Logic/Utilities/ChatScreenshotHTMLBuilder.swift:221` 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) Sidekick/Logic/Utilities/ChatScreenshotRenderer.swift:565 — Sidekick/Logic/Utilities/ChatScreenshotRenderer.swift:565-572 | Sidekick/Logic/Utilities/ChatScreenshotRenderer.swift:575-582 — 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 (8 lines × 2) Sidekick/Types/Conversation/Functions/Default Functions/CalendarFunctions.swift:70 — Sidekick/Types/Conversation/Functions/Default Functions/CalendarFunctions.swift:70-77 | Sidekick/Types/Conversation/Functions/Default Functions/ReminderFunctions.swift:78-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: LlamaServer.swift → Extension+URL.swift, Function.swift, FunctionCallsView.swift, InferenceSettingsView.swift, ServerModelNameEditor.swift Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift — `Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift` changes together with 5 other files — `Sidekick/Extensions/Extension+URL.swift`, `Sidekick/Types/Conversation/Functions/Function.swift`, `Sidekick/Views/Chat/Conversation/Messages/Message/FunctionCallsView.swift`, `Sidekick/Views/Settings/InferenceSettingsView.swift`, `Sidekick/Views/Settings/Model/ServerModelNameEditor.swift` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
  • Change-coupling hub: Model.swift → ChatParameters.swift, Notifications.swift, FunctionCallsView.swift Sidekick/Logic/Inference/Model.swift — `Sidekick/Logic/Inference/Model.swift` changes together with 3 other files — `Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift`, `Sidekick/Types/Notifications.swift`, `Sidekick/Views/Chat/Conversation/Messages/Message/FunctionCallsView.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.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: ChatParameters.swift ↔ Function.swift Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift — `Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift` and `Sidekick/Types/Conversation/Functions/Function.swift` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 8 shared commits counted here, the most recent 3 are `33e40a9d` feat: Improve tool calling reliability; `609ef0b4` feat: Updated embedded docs; `570a3aae` fix: Tool calling with local models — run `git show` on any of them.
  • Change coupling: InferenceSettings.swift ↔ ServerModelNameEditor.swift Sidekick/Logic/Settings/InferenceSettings.swift — `Sidekick/Logic/Settings/InferenceSettings.swift` and `Sidekick/Views/Settings/Model/ServerModelNameEditor.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 5 shared commits counted here, the most recent 3 are `ac7735cc` feat: Allow selecting local worker model; `8754f892` fix: Fixed issue where `/v1/models/` would fail to return models (at that commit the file was still `Sidekick/Views/Settings/ServerModelNameEditor.swift`); `9dd2a2e1` Added auto conversation title generation and allow configuring a "Wor… (at that commit the file was still `Sidekick/Views/Settings/ServerModelNameEditor.swift`) — run `git show` on any of them.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Sidekick/Logic/Data Models/ModelManager.swift:215 — Sidekick/Logic/Data Models/ModelManager.swift:215-241 | Sidekick/Logic/Persistence/SidekickSchema.swift:152-184 | Sidekick/Logic/Persistence/SidekickSchema.swift:420-450 | Sidekick/Types/Conversation/Message/Message.swift:729-763 — 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) Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.swift:61 — Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.swift:61-78 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:69-94 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageView.swift:194-212 | Sidekick/Views/Chat/Conversation/Messages/Options/SourcesButton.swift:15-30 — 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 (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift:58 — Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift:58-79 | Sidekick/Views/Styles/ChatStyle.swift:39-60 — 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 `Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift:58` 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 (22 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:128 — Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:128-149 | Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift:159-180 — before extracting anything, compare `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift` and `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×2
  • Duplicated block (8–9 lines × 3) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:36 — Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:36-43 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:72-80 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:180-188 — 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 `Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 3) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:109 — Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:109-116 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:150-158 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:165-173 — 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 `Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:109` 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 (7 lines × 2) · ×2
  • Duplicated block (7 lines × 2) Sidekick/Extensions/Extension+String.swift:625 — Sidekick/Extensions/Extension+String.swift:625-631 | Sidekick/Extensions/Extension+String.swift:751-757 — 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 `Sidekick/Extensions/Extension+String.swift:625` 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) Sidekick/Types/Conversation/Message/ReferencedURL.swift:20 — Sidekick/Types/Conversation/Message/ReferencedURL.swift:20-26 | Sidekick/Types/Conversation/TemporaryResource.swift:32-38 — 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.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard Sidekick/Resources/conversationExportTemplate.html:28 — This stylesheet animates but never checks prefers-reduced-motion, so motion-sensitive users can't opt out. Wrap motion in @media (prefers-reduced-motion: no-preference).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.6 · ×1
  • Low contrast colour pair in CSS (2.6:1) Sidekick/Resources/conversationExportTemplate.html:28 — `.assistant .icon` sets color: white on background-color: #a0a0a0 — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no accessibility linting at author time and no automated accessibility check in tests or CI. Add your UI toolkit's own accessibility assertion to the test suite (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in the pipeline. What was searched, so you can tell an absence from a miss: the 6 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 158) · ×1
  • (anonymous) (cyclomatic 158) Sidekick/Resources/ChatMarkdownWebView/chat.js:10 — (anonymous) has cyclomatic complexity 158 (threshold 15). Of this number, 17 points are the body's own statements and 141 belong to 45 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 136) · ×1
  • (anonymous) (cyclomatic 136) Sidekick/Resources/ChatMarkdownWebView/screenshot.js:7 — (anonymous) has cyclomatic complexity 136 (threshold 15). Most of this is not in the body itself: 12 of the 136 points are its own statements and the rest belongs to 47 function items inside it that branch (buildRow, applyHighlight, buildFunctionCalls::(anonymous), …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · LlamaServer.getChatCompletionInternal (cyclomatic 72) · ×1
  • LlamaServer.getChatCompletionInternal (cyclomatic 72) Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift:103 — LlamaServer.getChatCompletionInternal has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatParameters.toJSON (cyclomatic 37) · ×1
  • ChatParameters.toJSON (cyclomatic 37) Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift:211 — ChatParameters.toJSON has cyclomatic complexity 37 (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 · Resource.updateIndex (cyclomatic 33) · ×1
  • Resource.updateIndex (cyclomatic 33) Sidekick/Types/Expert/Resource.swift:261 — Resource.updateIndex has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LlamaServerError.isContextWindowError (cyclomatic 28) · ×1
  • LlamaServerError.isContextWindowError (cyclomatic 28) Sidekick/Logic/Inference/llama.cpp/Types/LlamaServerError.swift:53 — LlamaServerError.isContextWindowError has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · String.modelParameterCount (cyclomatic 26) · ×1
  • String.modelParameterCount (cyclomatic 26) Sidekick/Extensions/Extension+String.swift:619 — String.modelParameterCount has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KnownModel.init (cyclomatic 25) · ×1
  • KnownModel.init (cyclomatic 25) Sidekick/Types/Model/KnownModel.swift:542 — KnownModel.init has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RAGIndexingService.updateResourcesIndex (cyclomatic 23) · ×1
  • RAGIndexingService.updateResourcesIndex (cyclomatic 23) Sidekick/Logic/Services/RAGIndexingService.swift:45 — RAGIndexingService.updateResourcesIndex 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 · PromptInputField.generateChatResponse (cyclomatic 22) · ×1
  • PromptInputField.generateChatResponse (cyclomatic 22) Sidekick/Views/Chat/Conversation/Controls/Input Field/PromptInputField.swift:581 — PromptInputField.generateChatResponse 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 · ChatScreenshotHTMLBuilder.payload (cyclomatic 21) · ×1
  • ChatScreenshotHTMLBuilder.payload (cyclomatic 21) Sidekick/Logic/Utilities/ChatScreenshotHTMLBuilder.swift:73 — ChatScreenshotHTMLBuilder.payload has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DuckDuckGoSearch.search (cyclomatic 21) · ×1
  • DuckDuckGoSearch.search (cyclomatic 21) Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift:91 — DuckDuckGoSearch.search has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Model.listenThinkRespond (cyclomatic 20) · ×1
  • Model.listenThinkRespond (cyclomatic 20) Sidekick/Logic/Inference/Model.swift:18 — Model.listenThinkRespond 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 · ChatParameters.init (cyclomatic 20) · ×1
  • ChatParameters.init (cyclomatic 20) Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift:62 — ChatParameters.init has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LlamaServer.startServer (cyclomatic 17) · ×1
  • LlamaServer.startServer (cyclomatic 17) Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift:57 — LlamaServer.startServer 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.
D2 · Cognitive Complexity · LlamaServer.getChatCompletionInternal (cognitive 192) · ×1
  • LlamaServer.getChatCompletionInternal (cognitive 192) Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift:103 — LlamaServer.getChatCompletionInternal has cognitive complexity 192 (threshold 15). Drivers by points: if/else 48 (152 pts), error handling 3 (14 pts), loops 3 (8 pts), boolean chains 7, ternaries 4 (6 pts), match/switch 4 (5 pts) (nesting depth added 123). 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 · (anonymous) (cognitive 147) · ×1
  • (anonymous) (cognitive 147) Sidekick/Resources/ChatMarkdownWebView/screenshot.js:7 — (anonymous) has cognitive complexity 147 (threshold 15). Drivers by points: if/else 57 (70 pts), boolean chains 54, error handling 10 (14 pts), loops 4, ternaries 4, match/switch 1 (nesting depth added 17). Most of this is not in the body itself: 8 of the 147 points are its own statements and the rest belongs to 47 function items inside it that branch (buildRow, applyHighlight, detectLanguageName, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Resource.updateIndex (cognitive 68) · ×1
  • Resource.updateIndex (cognitive 68) Sidekick/Types/Expert/Resource.swift:261 — Resource.updateIndex has cognitive complexity 68 (threshold 15). Drivers by points: if/else 27 (47 pts), loops 4 (11 pts), boolean chains 6, error handling 2, match/switch 1, ternaries 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · String.modelParameterCount (cognitive 52) · ×1
  • String.modelParameterCount (cognitive 52) Sidekick/Extensions/Extension+String.swift:619 — String.modelParameterCount has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (42 pts), ternaries 1 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 27). 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 · ChatParameters.toJSON (cognitive 36) · ×1
  • ChatParameters.toJSON (cognitive 36) Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift:211 — ChatParameters.toJSON has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19, ternaries 16, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RAGIndexingService.updateResourcesIndex (cognitive 35) · ×1
  • RAGIndexingService.updateResourcesIndex (cognitive 35) Sidekick/Logic/Services/RAGIndexingService.swift:45 — RAGIndexingService.updateResourcesIndex has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 4 (7 pts), boolean chains 4, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphDatabase.loadGraph (cognitive 32) · ×1
  • GraphDatabase.loadGraph (cognitive 32) Sidekick/Logic/Utilities/GraphRAG/GraphDatabase.swift:229 — GraphDatabase.loadGraph has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (9 pts), boolean chains 3, error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatScreenshotHTMLBuilder.payload (cognitive 31) · ×1
  • ChatScreenshotHTMLBuilder.payload (cognitive 31) Sidekick/Logic/Utilities/ChatScreenshotHTMLBuilder.swift:73 — ChatScreenshotHTMLBuilder.payload has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LlamaServerError.isContextWindowError (cognitive 31) · ×1
  • LlamaServerError.isContextWindowError (cognitive 31) Sidekick/Logic/Inference/llama.cpp/Types/LlamaServerError.swift:53 — LlamaServerError.isContextWindowError has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 18, if/else 9 (13 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KnownModel.init (cognitive 30) · ×1
  • KnownModel.init (cognitive 30) Sidekick/Types/Model/KnownModel.swift:542 — KnownModel.init has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (14 pts), ternaries 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · String.familyVersion (cognitive 29) · ×1
  • String.familyVersion (cognitive 29) Sidekick/Extensions/Extension+String.swift:745 — String.familyVersion has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (19 pts), ternaries 1 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Model.listenThinkRespond (cognitive 28) · ×1
  • Model.listenThinkRespond (cognitive 28) Sidekick/Logic/Inference/Model.swift:18 — Model.listenThinkRespond has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, error handling 1 (4 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatParameters.init (cognitive 28) · ×1
  • ChatParameters.init (cognitive 28) Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift:62 — ChatParameters.init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, match/switch 2 (6 pts), loops 1 (3 pts), ternaries 1 (nesting depth added 7). 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 · PromptInputField.generateChatResponse (cognitive 28) · ×1
  • PromptInputField.generateChatResponse (cognitive 28) Sidekick/Views/Chat/Conversation/Controls/Input Field/PromptInputField.swift:581 — PromptInputField.generateChatResponse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 8, error handling 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatScreenshotScope.resolve (cognitive 27) · ×1
  • ChatScreenshotScope.resolve (cognitive 27) Sidekick/Logic/Utilities/ChatScreenshotScope.swift:101 — ChatScreenshotScope.resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 1 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GGUFMetadataReader.readArchitectureInfo (cognitive 27) · ×1
  • GGUFMetadataReader.readArchitectureInfo (cognitive 27) Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:66 — GGUFMetadataReader.readArchitectureInfo has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DuckDuckGoSearch.search (cognitive 27) · ×1
  • DuckDuckGoSearch.search (cognitive 27) Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift:91 — DuckDuckGoSearch.search has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 7, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Snapshot.extractCode (cognitive 26) · ×1
  • Snapshot.extractCode (cognitive 26) Sidekick/Types/Conversation/Canvas/Snapshot.swift:166 — Snapshot.extractCode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GGUFMetadataReader.readChatTemplateInfo (cognitive 24) · ×1
  • GGUFMetadataReader.readChatTemplateInfo (cognitive 24) Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:162 — GGUFMetadataReader.readChatTemplateInfo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (2 pts), boolean chains 1, 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 · CommunityDetector.detectBaseCommunities (cognitive 24) · ×1
  • CommunityDetector.detectBaseCommunities (cognitive 24) Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:141 — CommunityDetector.detectBaseCommunities has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 7 (12 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphDatabase.saveGraph (cognitive 24) · ×1
  • GraphDatabase.saveGraph (cognitive 24) Sidekick/Logic/Utilities/GraphRAG/GraphDatabase.swift:138 — GraphDatabase.saveGraph has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (15 pts), if/else 4 (8 pts), error handling 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · MessageSubset.init (cognitive 23) · ×1
  • MessageSubset.init (cognitive 23) Sidekick/Types/Conversation/Message/Message.swift:437 — MessageSubset.init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LlamaServer.startServer (cognitive 22) · ×1
  • LlamaServer.startServer (cognitive 22) Sidekick/Logic/Inference/llama.cpp/LlamaServer.swift:57 — LlamaServer.startServer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 8 (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 · CommunityDetector.detectCommunities (cognitive 22) · ×1
  • CommunityDetector.detectCommunities (cognitive 22) Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:31 — CommunityDetector.detectCommunities has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (11 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphRetriever.retrieve (cognitive 22) · ×1
  • GraphRetriever.retrieve (cognitive 22) Sidekick/Logic/Utilities/GraphRAG/GraphRetriever.swift:38 — GraphRetriever.retrieve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 5 (6 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 · String.modelProvider (cognitive 18) · ×1
  • String.modelProvider (cognitive 18) Sidekick/Extensions/Extension+String.swift:780 — String.modelProvider has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chat.renderIncremental (cognitive 18) · ×1
  • chat.renderIncremental (cognitive 18) Sidekick/Resources/ChatMarkdownWebView/chat.js:252 — chat.renderIncremental has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3, boolean chains 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Model.displayedPendingMessage (cognitive 17) · ×1
  • Model.displayedPendingMessage (cognitive 17) Sidekick/Logic/Inference/Model.swift:176 — Model.displayedPendingMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, 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 · KnownModel.findModel (cognitive 17) · ×1
  • KnownModel.findModel (cognitive 17) Sidekick/Types/Model/KnownModel.swift:103 — KnownModel.findModel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelSelectorDropdown.dropdownContent (cognitive 17) · ×1
  • ModelSelectorDropdown.dropdownContent (cognitive 17) Sidekick/Views/Model/ModelSelectorDropdown.swift:368 — ModelSelectorDropdown.dropdownContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, ternaries 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 · ModelSelectionView.body (cognitive 17) · ×1
  • ModelSelectionView.body (cognitive 17) Sidekick/Views/Setup/ModelSelectionView.swift:34 — ModelSelectionView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · DuckDuckGoSearch.decodeHTMLEntities (cognitive 17) · ×1
  • DuckDuckGoSearch.decodeHTMLEntities (cognitive 17) Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift:35 — DuckDuckGoSearch.decodeHTMLEntities has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 4, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Site.extractSite (cognitive 17) · ×1
  • Site.extractSite (cognitive 17) Sidekick/Types/Conversation/Canvas/Snapshot.swift:245 — Site.extractSite has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 1 (4 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 · AssetResolver.resolve (cognitive 17) · ×1
  • AssetResolver.resolve (cognitive 17) Sidekick/Views/Chat/Markdown/ChatMarkdownAssetSchemeHandler.swift:239 — AssetResolver.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultilineTextField.updateNSView (cognitive 17) · ×1
  • MultilineTextField.updateNSView (cognitive 17) Sidekick/Views/Chat/Conversation/Controls/Input Field/MultilineTextEditor.swift:69 — MultilineTextField.updateNSView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5 (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 · MessageContentView.textContent (cognitive 17) · ×1
  • MessageContentView.textContent (cognitive 17) Sidekick/Views/Chat/Conversation/Messages/Message/MessageContentView.swift:60 — MessageContentView.textContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (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 · MermaidRenderer.render (cognitive 16) · ×1
  • MermaidRenderer.render (cognitive 16) Sidekick/Logic/Utilities/Tools/MermaidRenderer/MermaidRenderer.swift:85 — MermaidRenderer.render has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.swift.checkHeartbeat (cognitive 16) · ×1
  • main.swift.checkHeartbeat (cognitive 16) Sidekick/Logic/Inference/llama.cpp/llama-server-watchdog/main.swift:43 — main.swift.checkHeartbeat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chat.groupTopLevel (cognitive 16) · ×1
  • chat.groupTopLevel (cognitive 16) Sidekick/Resources/ChatMarkdownWebView/chat.js:96 — chat.groupTopLevel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: Model Sidekick/Logic/Inference/Model.swift:15 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:369 — Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:369-406 | Sidekick/Logic/Utilities/GraphRAG/EntityExtractor.swift:257-291 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:34 — Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:34-65 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:70-104 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:107-146 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:149-161 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:164-176 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:179-191 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) Sidekick/Views/Expert/Resource/ResourceSectionView.swift:120 — Sidekick/Views/Expert/Resource/ResourceSectionView.swift:120-134 | Sidekick/Views/Settings/GeneralSettingsView.swift:109-122 | Sidekick/Views/Settings/GeneralSettingsView.swift:124-137 | Sidekick/Views/Settings/GeneralSettingsView.swift:163-177 | Sidekick/Views/Settings/InferenceSettingsView.swift:302-314 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) Sidekick/Views/Model/ModelSelectorDropdown.swift:635 — Sidekick/Views/Model/ModelSelectorDropdown.swift:635-669 | Sidekick/Views/Model/ModelSelectorDropdown.swift:689-723 — 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 `Sidekick/Views/Model/ModelSelectorDropdown.swift:635` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–25 lines × 2) · ×1
  • Duplicated block (22–25 lines × 2) Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:69 — Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:69-90 | Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:165-189 — 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 `Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) Sidekick/Logic/Data Models/ModelManager.swift:216 — Sidekick/Logic/Data Models/ModelManager.swift:216-238 | Sidekick/Logic/Persistence/SidekickSchema.swift:423-445 — 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 `Sidekick/Logic/Data Models/ModelManager.swift:216` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sidekick/Logic/Persistence/SidekickSchema.swift:421` calls `UUID` and `Sidekick/Logic/Data Models/ModelManager.swift:215` 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 (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift:81 — Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift:81-101 | Sidekick/Views/Styles/ChatStyle.swift:62-82 — 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 `Sidekick/Views/Chat/Conversation/Controls/Input Field/ChatPromptEditor.swift:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) Sidekick/Logic/Utilities/Tavily.swift:87 — Sidekick/Logic/Utilities/Tavily.swift:87-106 | Sidekick/Logic/Utilities/Tavily.swift:168-187 — 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 `Sidekick/Logic/Utilities/Tavily.swift:87` 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 (14–18 lines × 4) · ×1
  • Duplicated block (14–18 lines × 4) Sidekick/Logic/Data Models/ModelManager.swift:228 — Sidekick/Logic/Data Models/ModelManager.swift:228-241 | Sidekick/Logic/Persistence/SidekickSchema.swift:168-184 | Sidekick/Logic/Persistence/SidekickSchema.swift:435-450 | Sidekick/Types/Conversation/Message/Message.swift:746-763 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sidekick/Logic/Data Models/ModelManager.swift:228` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) Sidekick/Views/Settings/InferenceSettingsView.swift:145 — Sidekick/Views/Settings/InferenceSettingsView.swift:145-162 | Sidekick/Views/Settings/InferenceSettingsView.swift:219-236 — 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 `Sidekick/Views/Settings/InferenceSettingsView.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 (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) Sidekick/Logic/Inference/Model+Inference.swift:396 — Sidekick/Logic/Inference/Model+Inference.swift:396-412 | Sidekick/Logic/Inference/Model+Inference.swift:640-656 — 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 `Sidekick/Logic/Inference/Model+Inference.swift:396` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:324 — Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:324-338 | Sidekick/Logic/Utilities/GraphRAG/EntityExtractor.swift:199-214 — 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 (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:50 — Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:50-65 | Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift:51-66 — before extracting anything, compare `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift` and `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–15 lines × 2) · ×1
  • Duplicated block (8–15 lines × 2) Sidekick/Views/Chat/Conversation/ChatStyle.swift:27 — Sidekick/Views/Chat/Conversation/ChatStyle.swift:27-34 | Sidekick/Views/Styles/ChatStyle.swift:96-110 — 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 `Sidekick/Views/Chat/Conversation/ChatStyle.swift:27` 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 (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:48 — Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:48-61 | Sidekick/Logic/Utilities/GraphRAG/CommunityDetector.swift:105-118 | Sidekick/Logic/Utilities/GraphRAG/EntityExtractor.swift:88-101 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:189 — Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:189-202 | Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift:215-228 — before extracting anything, compare `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift` and `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:186` calls `createChecklistMenu` and `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift:213` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:38 — Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:38-50 | Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:74-87 — 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 `Sidekick/Extensions/AppKit/Extension+NSMutableAttributedString.swift:38` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) Sidekick/Logic/Data Models/ExpertManager.swift:243 — Sidekick/Logic/Data Models/ExpertManager.swift:243-254 | Sidekick/Logic/Persistence/JSONImporter.swift:248-260 — 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 `Sidekick/Logic/Data Models/ExpertManager.swift:243` 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 (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) Sidekick/Logic/Data Models/InferenceRecords.swift:34 — Sidekick/Logic/Data Models/InferenceRecords.swift:34-44 | Sidekick/Logic/Persistence/JSONImporter.swift:374-383 — 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 `Sidekick/Logic/Persistence/JSONImporter.swift:374` 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 (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) Sidekick/Views/Expert/Resource/ResourceSectionView.swift:120 — Sidekick/Views/Expert/Resource/ResourceSectionView.swift:120-129 | Sidekick/Views/Settings/GeneralSettingsView.swift:109-118 | Sidekick/Views/Settings/GeneralSettingsView.swift:124-133 | Sidekick/Views/Settings/GeneralSettingsView.swift:163-172 | Sidekick/Views/Settings/InferenceSettingsView.swift:302-311 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sidekick/Views/Expert/Resource/ResourceSectionView.swift:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sidekick/Views/Settings/GeneralSettingsView.swift:175` calls `disabled` and `Sidekick/Views/Settings/GeneralSettingsView.swift:121` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:96 — Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:96-104 | Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:192-201 — 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 `Sidekick/Logic/Inference/llama.cpp/GGUFMetadataReader.swift:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) Sidekick/Types/Conversation/Functions/Default Functions/WebFunctions.swift:123 — Sidekick/Types/Conversation/Functions/Default Functions/WebFunctions.swift:123-132 | Sidekick/Types/Conversation/Message/Message.swift:194-201 — 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 (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) Sidekick/Logic/Data Models/ConversationManager.swift:154 — Sidekick/Logic/Data Models/ConversationManager.swift:154-162 | Sidekick/Logic/Data Models/Memories.swift:113-120 — 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 `Sidekick/Logic/Data Models/ConversationManager.swift:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:72 — Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:72-79 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageView.swift:199-206 | Sidekick/Views/Chat/Conversation/Messages/Options/SourcesButton.swift:18-25 — 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 `Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:81` calls `foregroundStyle` and `Sidekick/Views/Chat/Conversation/Messages/Options/SourcesButton.swift:27` 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 (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.swift:67 — Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.swift:67-73 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageOptionsView.swift:74-80 | Sidekick/Views/Chat/Conversation/Messages/Message/MessageView.swift:201-207 | Sidekick/Views/Chat/Conversation/Messages/Options/SourcesButton.swift:20-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sidekick/Views/Chat/Conversation/Messages/Message/MessageCopyButton.swift:75` calls `scaleEffect` and `Sidekick/Views/Chat/Conversation/Messages/Message/MessageView.swift:209` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleButton.swift:46 — Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleButton.swift:46-58 | Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift:94-106 | Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift:99-111 — before extracting anything, compare `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleChecklistMenuButton.swift` and `Sidekick/Views/Chat/Conversation/Controls/Input Field/CapsuleMenuButton.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) Sidekick/Types/Conversation/Functions/Default Functions/CalendarFunctions.swift:80 — Sidekick/Types/Conversation/Functions/Default Functions/CalendarFunctions.swift:80-91 | Sidekick/Types/Conversation/Functions/Default Functions/ReminderFunctions.swift:88-96 | Sidekick/Types/Conversation/Functions/Default Functions/WebFunctions.swift:53-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×1
  • Duplicated block (5 lines × 2) Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift:58 — Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift:58-62 | Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift:73-77 — 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 `Sidekick/Logic/Utilities/Web/DuckDuckGoSearch.swift:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity Sidekick/Resources/conversationExportTemplate.html:8 — `https://cdn.jsdelivr.net/npm/marked/marked.min.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 3 such include(s) across the repository's markup.
Minor — 6 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×2
  • Duplicated predicate Sidekick/Resources/ChatMarkdownWebView/chat.js:413 — `el.className && el.className.indexOf("language-") !== -1` appears character-identically in 2 files — Sidekick/Resources/ChatMarkdownWebView/chat.js, Sidekick/Resources/ChatMarkdownWebView/screenshot.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Sidekick/Resources/ChatMarkdownWebView/chat.js:492 — `pre.closest && pre.closest(".sk-codeblock")` appears character-identically in 2 files — Sidekick/Resources/ChatMarkdownWebView/chat.js, Sidekick/Resources/ChatMarkdownWebView/screenshot.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
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.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
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 — 14 finding(s)
D12 · Dependency Hygiene · Outdated · ×14
  • Outdated: codeeditorview — `codeeditorview` is resolved at 0.15.3, but 0.16.0 is the newest release tagged on https://github.com/mchakravarty/CodeEditorView within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update codeeditorview` reaches this one with no change to Package.swift.
  • Outdated: highlightr — `highlightr` is resolved at 2.2.1, but 2.3.0 is the newest release tagged on https://github.com/raspu/Highlightr within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update highlightr` reaches this one with no change to Package.swift.
  • Outdated: lrucache — `lrucache` is resolved at 1.2.0, but 1.3.0 is the newest release tagged on https://github.com/nicklockwood/LRUCache.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update lrucache` reaches this one with no change to Package.swift.
  • Outdated: mathjaxswift — `mathjaxswift` is resolved at 3.4.0, but 3.5.0 is the newest release tagged on https://github.com/colinc86/MathJaxSwift within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update mathjaxswift` reaches this one with no change to Package.swift.
  • Outdated: securedefaults — `securedefaults` is resolved at 1.2.2, but 1.2.3 is the newest release tagged on https://github.com/vpeschenkov/SecureDefaults within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update securedefaults` reaches this one with no change to Package.swift.
  • Outdated: sparkle — `sparkle` is resolved at 2.6.4, but 2.10.0 is the newest release tagged on https://github.com/sparkle-project/Sparkle within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update sparkle` reaches this one with no change to Package.swift.
  • Outdated: sqlite.swift — `sqlite.swift` is resolved at 0.15.4, but 0.16.0 is the newest release tagged on https://github.com/stephencelis/SQLite.swift within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update sqlite.swift` reaches this one with no change to Package.swift.
  • Outdated: swift-atomics — `swift-atomics` is resolved at 1.3.0, but 1.3.1 is the newest release tagged on https://github.com/apple/swift-atomics.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-atomics` reaches this one with no change to Package.swift.
  • Outdated: swift-markdown-ui — `swift-markdown-ui` is resolved at 2.4.0, but 2.4.1 is the newest release tagged on https://github.com/gonzalezreal/swift-markdown-ui within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-markdown-ui` reaches this one with no change to Package.swift.
  • Outdated: swift-toolchain-sqlite — `swift-toolchain-sqlite` is resolved at 1.0.4, but 1.0.13 is the newest release tagged on https://github.com/swiftlang/swift-toolchain-sqlite within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-toolchain-sqlite` reaches this one with no change to Package.swift.
  • Outdated: swiftsoup — `swiftsoup` is resolved at 2.11.1, but 2.13.9 is the newest release tagged on https://github.com/scinfu/SwiftSoup within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swiftsoup` reaches this one with no change to Package.swift.
  • Outdated: swiftuix — `swiftuix` is resolved at 0.2.4, but 0.3.2 is the newest release tagged on https://github.com/SwiftUIX/SwiftUIX within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swiftuix` reaches this one with no change to Package.swift.
  • Outdated: symbolpicker — `symbolpicker` is resolved at 1.5.3, but 1.6.2 is the newest release tagged on https://github.com/xnth97/SymbolPicker within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update symbolpicker` reaches this one with no change to Package.swift.
  • Outdated: xmlcoder — `xmlcoder` is resolved at 0.14.0, but 0.18.2 is the newest release tagged on https://github.com/maxdesiatov/XMLCoder.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update xmlcoder` 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-c9c30a84d6c6434cab1e1ea638a3d5e6/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-c9c30a84d6c6434cab1e1ea638a3d5e6/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 .0artifacts/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 20 file(s) — `Sidekick/Logic/Data Models/ExpertManager.swift`, `Sidekick/Logic/Data Models/ModelManager.swift`, `Sidekick/Logic/Data Models/ServerArgumentsManager.swift`, `Sidekick/Logic/Data Models/SourcesManager.swift`, `Sidekick/Logic/Tips/Tips.swift`, … (+15 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .0—

Run 01a0f452-31a9-70d8-94cf-ca56ccf3aa82 · 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