Public report of caezium/burrow, published 15 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 15 November 2026, 02:29 UTC · Survey ID cd_40816b315f9d426e936a1296a49a4bae
caezium/burrow
Measured 15 November 2026, 02:28 UTC, at code version 5501d46
Code coverage is not measured: .NET and JavaScript/TypeScript suite (Unclassified, CouldNotMeasureNoCollector).
Boundary Type-Coupling is not measured: Bounded contexts not declared.
Knowledge freshness is not measured: Freshness signal contradicted by repo activity.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Up 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 65,198 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Production Readiness, 47
Findings by how serious they are
65 critical409 serious46 minor
19 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 02:28 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
57of 57 dimensions measured by tools.
511of 520 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
57dimensions across 6 lenses, read from 65,198 lines of product code in 4 projects.
caezium/burrow falls short of our standard for a preview release because its Testing dimensions are rated Critical, and we found no automated security scanning of the code, its secrets or its dependencies. It scores 59 out of 100, which alone would earn Adequate, but it is rated Weak: a rating can't sit more than one step above its weakest group.
Production Readiness, at 47, is the weakest lens and counts most in the score. The best first step is making the tests check their results, worth about 10 points. Adding automated security scanning comes next, worth about 7 points. Raising Production Readiness to 62 would lift the score to about 65.
Five known security holes in the packages the code depends on can be used by attackers. One password or key is open to anyone who can read the repository, and twenty-six errors are caught and ignored, so failures can go unnoticed. Updating the vulnerable packages, replacing the exposed password or key and handling or logging the ignored errors would close these risks. Passing outside input through environment variables would fix the pipeline step that puts outside input straight into a shell command, and pinning each tool to an exact version would deal with the pipeline tool referenced by a changeable name. Adding the test projects to the solution would take care of the 29 tests the build doesn't include.
The product code is 65,198 lines, about €120,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 62 findings
These 62 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one.
Test Coverage · No test reaches this file windows/typescript/src/components/ToolPages.tsx
Test Coverage · No test reaches this file windows/typescript/src/components/MonitorPage.tsx
Test Coverage · No test reaches this file windows/typescript/src/App.tsx
Test Coverage · No test reaches this file windows/typescript/src/components/SettingsPage.tsx
Test Coverage · No test reaches this file windows/typescript/src/lib/api.ts
Test Coverage · No test reaches this file windows/typescript/src/lib/format.ts
Test Coverage · No test reaches this file windows/typescript/src/main.tsx
Cancellation propagation · Async method without CancellationToken: AnalyzePage_Loaded windows/Pages/AnalyzePage.xaml.cs
Cancellation propagation · Async method without CancellationToken: CleanupPage_Loaded windows/Pages/CleanupPage.xaml.cs
Cancellation propagation · Async method without CancellationToken: CleanButton_Click windows/Pages/CleanupPage.xaml.cs
Cancellation propagation · Async method without CancellationToken: RefreshTimer_Tick windows/Pages/DashboardPage.xaml.cs
Cancellation propagation · Async method without CancellationToken: OptimizePage_Loaded windows/Pages/OptimizePage.xaml.cs
Cancellation propagation · Async method without CancellationToken: OptimizeButton_Click windows/Pages/OptimizePage.xaml.cs
Cancellation propagation · Async method without CancellationToken: RemoveLeftoversButton_Click windows/Pages/UninstallPage.xaml.cs
Cancellation propagation · Async method without CancellationToken: ScanAsync windows/ViewModels/CleanupViewModel.cs
Cancellation propagation · Async method without CancellationToken: CleanAsync windows/ViewModels/CleanupViewModel.cs
Cancellation propagation · Async method without CancellationToken: PreviewAsync windows/ViewModels/OptimizeViewModel.cs
Cancellation propagation · Async method without CancellationToken: OptimizeAsync windows/ViewModels/OptimizeViewModel.cs
Cancellation propagation · Async method without CancellationToken: CheckMoleAsync windows/ViewModels/UninstallViewModel.cs
Cancellation propagation · Async method without CancellationToken: ShowNearAsync windows/Views/TrayHudWindow.xaml.cs
Cancellation propagation · Async method without CancellationToken: ForwardOutputAsync windows/Tools/MoShim/Program.cs
Cancellation propagation · Async method without CancellationToken: HandleLineAsync windows/Tools/McpStdioBridge/Program.cs
Cancellation propagation · Async method without CancellationToken: HandleMessageAsync windows/Tools/McpStdioBridge/Program.cs
Cancellation propagation · Async method without CancellationToken: ForwardToHttpAsync windows/Tools/McpStdioBridge/Program.cs
Cancellation propagation · Async call defeats the CancellationToken: LaunchUninstallerAsync windows/Services/WindowsInstalledApplicationService.cs
Cancellation propagation · Async call defeats the CancellationToken: RemoveLeftoversAsync windows/Services/WindowsInstalledApplicationService.cs
Rebuild cost: about €120,000 · Estimate
Cost to rebuild
€40,000 to €200,000, for 665 to 2,119 hours of work, about 0.8 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 59. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 65,198 lines of product code
Comment lines
The estimate prices 65,014 lines. Comment lines count towards the size of 65,198 lines but aren't priced as work.
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 29 Tests excluded from compilation finding(s) in Test Quality — start with BurrowConductorServiceTests.cs, BurrowEnvelopeTests.cs, BurrowStartupOptionsTests.cs.
Raises the score by about 10 points · Medium effort · Test Quality
2
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Resolve the 26 EmptyCatchBlock finding(s) in Explicit Debt — start with LocalMcpServerService.cs (4), AppTelemetry.cs (3), WindowsInstalledApplicationService.cs (3).
Raises the score by about 5 points · Medium effort · Explicit Debt
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €120,000 to build again, about 0.8 person-years of work. Its weakest lens is Production Readiness, at 47 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 29 Tests excluded from compilation finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 10 points for medium effort, because it clears the 29 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
45 modules, with 28 dependencies between them. 2 loops run through 6 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 5 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
27 pairs of types, where a type in BurrowWin.ViewModels uses a type in BurrowWin.Models. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BurrowWin.ViewModels uses BurrowWin.Models, so a change to BurrowWin.Models can break BurrowWin.ViewModels, while a change to BurrowWin.ViewModels can't break BurrowWin.Models.
Position
Below the diagonal: BurrowWin.ViewModels uses a module listed above it, which is the healthy direction.
24→36 BurrowWin.ViewModels uses BurrowWin.Servicespart of a loop✕
Connections
24 pairs of types, where a type in BurrowWin.ViewModels uses a type in BurrowWin.Services.
BurrowWin.ViewModels uses BurrowWin.Services, so a change to BurrowWin.Services can break BurrowWin.ViewModels, while a change to BurrowWin.ViewModels can't break BurrowWin.Services.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
35 pairs of types, where a type in macos~Components uses a type in macos. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
macos~Components uses macos, so a change to macos can break macos~Components, while a change to macos~Components can't break macos.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→34 macos~PrivilegedHelper uses macospart of a loop✕
Connections
31 pairs of types, where a type in macos~PrivilegedHelper uses a type in macos. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
windows.typescript.electron uses windows.typescript.src.shared.contracts, so a change to windows.typescript.src.shared.contracts can break windows.typescript.electron, while a change to windows.typescript.electron can't break windows.typescript.src.shared.contracts.
Position
Below the diagonal: windows.typescript.electron uses a module listed above it, which is the healthy direction.
windows.typescript.electron.services.scanner uses windows.typescript.src.shared.contracts, so a change to windows.typescript.src.shared.contracts can break windows.typescript.electron.services.scanner, while a change to windows.typescript.electron.services.scanner can't break windows.typescript.src.shared.contracts.
Position
Below the diagonal: windows.typescript.electron.services.scanner uses a module listed above it, which is the healthy direction.
windows.typescript.electron.services.store uses windows.typescript.src.shared.contracts, so a change to windows.typescript.src.shared.contracts can break windows.typescript.electron.services.store, while a change to windows.typescript.electron.services.store can't break windows.typescript.src.shared.contracts.
Position
Below the diagonal: windows.typescript.electron.services.store uses a module listed above it, which is the healthy direction.
windows.typescript.electron.services.telemetry uses windows.typescript.src.shared.contracts, so a change to windows.typescript.src.shared.contracts can break windows.typescript.electron.services.telemetry, while a change to windows.typescript.electron.services.telemetry can't break windows.typescript.src.shared.contracts.
Position
Below the diagonal: windows.typescript.electron.services.telemetry uses a module listed above it, which is the healthy direction.
windows.typescript.src.components uses windows.typescript.src.shared.contracts, so a change to windows.typescript.src.shared.contracts can break windows.typescript.src.components, while a change to windows.typescript.src.components can't break windows.typescript.src.shared.contracts.
Position
Below the diagonal: windows.typescript.src.components uses a module listed above it, which is the healthy direction.
windows.typescript.src.lib.api uses windows.typescript.src.shared.contracts, so a change to windows.typescript.src.shared.contracts can break windows.typescript.src.lib.api, while a change to windows.typescript.src.lib.api can't break windows.typescript.src.shared.contracts.
Position
Below the diagonal: windows.typescript.src.lib.api uses a module listed above it, which is the healthy direction.
BurrowWin.Views uses BurrowWin.ViewModels, so a change to BurrowWin.ViewModels can break BurrowWin.Views, while a change to BurrowWin.Views can't break BurrowWin.ViewModels.
Position
Below the diagonal: BurrowWin.Views uses a module listed above it, which is the healthy direction.
33→36 BurrowWin.Views uses BurrowWin.Servicespart of a loop✕
Connections
3 pairs of types, where a type in BurrowWin.Views uses a type in BurrowWin.Services.
BurrowWin.Views uses BurrowWin.Services, so a change to BurrowWin.Services can break BurrowWin.Views, while a change to BurrowWin.Views can't break BurrowWin.Services.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
windows.typescript.electron.services.recycle uses windows.typescript.electron.services.scanner, so a change to windows.typescript.electron.services.scanner can break windows.typescript.electron.services.recycle, while a change to windows.typescript.electron.services.recycle can't break windows.typescript.electron.services.scanner.
Position
Below the diagonal: windows.typescript.electron.services.recycle uses a module listed above it, which is the healthy direction.
104 pairs of types, where a type in BurrowWin.Services uses a type in BurrowWin.Models. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
BurrowWin.Services uses BurrowWin.Models, so a change to BurrowWin.Models can break BurrowWin.Services, while a change to BurrowWin.Services can't break BurrowWin.Models.
Position
Below the diagonal: BurrowWin.Services uses a module listed above it, which is the healthy direction.
BurrowWin.Services uses BurrowWin.ViewModels, so a change to BurrowWin.ViewModels can break BurrowWin.Services, while a change to BurrowWin.Services can't break BurrowWin.ViewModels.
Position
Below the diagonal: BurrowWin.Services uses a module listed above it, which is the healthy direction.
BurrowWin.Services uses BurrowWin.Views, so a change to BurrowWin.Views can break BurrowWin.Services, while a change to BurrowWin.Services can't break BurrowWin.Views.
Position
Below the diagonal: BurrowWin.Services uses a module listed above it, which is the healthy direction.
repository uses macos~PrivilegedHelper, so a change to macos~PrivilegedHelper can break repository, while a change to repository can't break macos~PrivilegedHelper.
Position
Below the diagonal: repository uses a module listed above it, which is the healthy direction.
windows.typescript.electron.services uses windows.typescript.electron.services.lifecycle, so a change to windows.typescript.electron.services.lifecycle can break windows.typescript.electron.services, while a change to windows.typescript.electron.services can't break windows.typescript.electron.services.lifecycle.
Position
Below the diagonal: windows.typescript.electron.services uses a module listed above it, which is the healthy direction.
windows.typescript.electron.services uses windows.typescript.src.shared.contracts, so a change to windows.typescript.src.shared.contracts can break windows.typescript.electron.services, while a change to windows.typescript.electron.services can't break windows.typescript.src.shared.contracts.
Position
Below the diagonal: windows.typescript.electron.services uses a module listed above it, which is the healthy direction.
windows.typescript.electron.services uses windows.typescript.electron.services.recycle, so a change to windows.typescript.electron.services.recycle can break windows.typescript.electron.services, while a change to windows.typescript.electron.services can't break windows.typescript.electron.services.recycle.
Position
Below the diagonal: windows.typescript.electron.services uses a module listed above it, which is the healthy direction.
BurrowWin.Pages uses BurrowWin.ViewModels, so a change to BurrowWin.ViewModels can break BurrowWin.Pages, while a change to BurrowWin.Pages can't break BurrowWin.ViewModels.
Position
Below the diagonal: BurrowWin.Pages uses a module listed above it, which is the healthy direction.
BurrowWin.Pages uses BurrowWin.Services, so a change to BurrowWin.Services can break BurrowWin.Pages, while a change to BurrowWin.Pages can't break BurrowWin.Services.
Position
Below the diagonal: BurrowWin.Pages uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 59% · Adequate · gated by R3 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 — Software Supply Chain Failures
17
High / Critical
A05:2025 — Injection
3
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: Resolve the 29 Tests excluded from compilation finding(s) in Test Quality — start with BurrowConductorServiceTests.cs, BurrowEnvelopeTests.cs, BurrowStartupOptionsTests.cs; Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; Resolve the 26 EmptyCatchBlock finding(s) in Explicit Debt — start with LocalMcpServerService.cs (4), AppTelemetry.cs (3), WindowsInstalledApplicationService.cs (3).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 29 Tests excluded from compilation finding(s) in Test Quality — start with BurrowConductorServiceTests.cs, BurrowEnvelopeTests.cs, BurrowStartupOptionsTests.cs.
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Bring the 74 bodies over 15 down to 15 or less in Cognitive Complexity — start with ToolPages.DuplicatesPage (cognitive 65), OperationFlow.start (cognitive 62), ToolPages.CleanupScan (cognitive 62).
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 — 65
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 — 409
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 — 46
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 19
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 57 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 57 dimensions across the health lenses
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
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, 511 of 520 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 131 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 162 test source file(s) (.py, .swift, .ts) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: this repository's test suite spans .NET and JavaScript/TypeScript, and the JavaScript/TypeScript half could not be re-run — unit: measured (0 flaky); JavaScript/TypeScript (vitest via `npm ci --ignore-scripts` in windows/typescript/): not included — the dependency install for windows/typescript/ could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. No partial figure is published as if it were the whole: reliability is excluded from the score rather than counted as a near-zero.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the vitest suite in windows/typescript/ was NOT MEASURED: the dependency install for windows/typescript/ could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
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 (11 contributor(s) across 730 commit(s) sampled, automation and bot accounts excluded). One of them holds 96% of the history; the other 10 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.
D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'windows/BurrowWin.csproj' with message: The command ""/tmp/nuget-packages/microsoft.windows.sdk.buildtools/10.0.28000.1839/bin/10.0.28000.0/x86/mt.exe" -nologo -manifest "windows/obj/Debug/net8.0-windows10.0.26100.0/win-x64/Manifests/WindowsApp….
D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 26 deducted marker(s) and the 1.9/KLoC density on this row were taken over this repository's .NET projects ALONE: .swift (44,933 lines, 70% of production source) went unread, because every marker collector on this path is reached through a C# workspace. D17's marker collectors need a compiler we do not have for that language, so none of its nine marker kinds were read there. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D22 Internal API Consistency — 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. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
D23 Boundary Type-Coupling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (64,610 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D30 Dependency Vulnerabilities — measured, with a gap in what it reached — 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. The solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan. 2 of 3 declared ecosystem(s) (npm,osv) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `macos/Sources/CleanView.swift`, `macos/Sources/DB.swift`, `macos/Sources/LaunchDiagnostics.swift`, `macos/Sources/LoginItemsReader.swift`, `macos/Sources/MoInteractive.swift`, … (+6 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.
D34 Knowledge Freshness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 115 commits in the last 90 days, yet 32 of 45 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X28 Index access outside its own emptiness guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
Repo exclusion declarations: 8 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 REDACTED Scanning: REDACTED 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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
59 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was main.registerIPC at 55. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being ToolCatalog.dispatch at 30 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: macos/Sources/MCPServer.swift (MCPServer.response at 19), windows/Services/PurgeArtifactService.cs (PurgeArtifactService.IsPatternAllowedForProject at 19). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 54 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 10 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with main.registerIPC (cyclomatic 55), ToolPages.CleanupScan (cyclomatic 47), ToolPages.DuplicatesPage (cyclomatic 46). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 10 together lifts Cyclomatic Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 69 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 74 bodies over 15 down to 15 or less in Cognitive Complexity — start with ToolPages.DuplicatesPage (cognitive 65), OperationFlow.start (cognitive 62), ToolPages.CleanupScan (cognitive 62). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 74 together lifts Cognitive Complexity from 6.5 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 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.
Resolve the 13 FileTooLong finding(s) in God Classes — start with ToolPages.tsx, SoftwareView.swift, UpdatesView.swift. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 11 FunctionTooLong finding(s) in God Classes — start with ToolPages.tsx (6), MonitorPage.tsx (2), App.tsx. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 10 ClassTooLong finding(s) in God Classes — start with SettingsView.swift, MCP.swift, UpdatesView.swift. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
80 duplicated block group(s) detected. 5.2 % of the production lines (3,384 of 64,610) are in a reported copy. A further 85 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (7 corresponding lines) · ×8macos/Sources/PortsView.swift:278
Edited copy of a member (6 corresponding lines) · ×6macos/Sources/ElectronVersionResolver.swift:15
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5macos/Sources/AnalyzeView.swift:148
+ 69 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 17 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with SettingsView.swift (3), MCP.swift (2), CleanView.swift (2). — One of this dimension's main actionable groups (17 warning-level).
Resolve the 14 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with CleanReviewView.swift (3), SoftwareView.swift (2), LocalMcpServerService.cs. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 8 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with PortsView.swift, SettingsView.swift, MCP.swift. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
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.
Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with UpdateCheck.swift. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality0.0 / 10Critical✓ 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.
0 skipped, 0 zero-assertion, 131 excluded from compilation in 29 file(s), no mocking-framework packages referenced (hand-written doubles or no mocking) across 131 tests. Measured on the C# suite only — at least 162 test source file(s) (.py, .swift, .ts) went unread, so its test quality is unmeasured and is not in these counts.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/BurrowConductorServiceTests.cs · ×29windows/Tests/BurrowWin.Tests/BurrowConductorServiceTests.cs:14
What to do
Resolve the 29 Tests excluded from compilation finding(s) in Test Quality — start with BurrowConductorServiceTests.cs, BurrowEnvelopeTests.cs, BurrowStartupOptionsTests.cs. — One of this dimension's main actionable groups (29 issue-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
0 of 201 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 11 direct `PackageReference`(s), and 187 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.
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.
Resolve the 5 Hotspot finding(s) in Churn × Complexity Hotspots — start with OperationFlow.swift, SoftwareView.swift, AppDelegate.swift. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
26 deducted debt markers + unmeasured dead symbols across 11991 LoC in the .NET projects (1.9/KLoC) → score 6.3. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .swift (70% of production source) was not read, and carries at least 0 uncounted task marker(s) in 0 file(s).
Resolve the 26 EmptyCatchBlock finding(s) in Explicit Debt — start with LocalMcpServerService.cs (4), AppTelemetry.cs (3), WindowsInstalledApplicationService.cs (3). — One of this dimension's main actionable groups (26 issue-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 9 document(s) read across 5 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with BurrowWin.csproj. — 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.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
2 naming inconsistencies among 131 declarations measured against a convention their peers follow.
`augmentedPATH` spells `PATH` where 28 names in the project spell it `Path`macos/Sources/BurrowEngine.swift:105
`logicalCpu` spells `Cpu` where 13 names in the project spell it `CPU`macos/Sources/MoleStatus.swift:145
What to do
Resolve the 1 `augmentedPATH` spells `PATH` where 28 names in the project spell it… finding(s) in Naming Consistency — start with BurrowEngine.swift. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `logicalCpu` spells `Cpu` where 13 names in the project spell it `CPU` finding(s) in Naming Consistency — start with MoleStatus.swift. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
1 of 4 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionwindows/BurrowWin.csproj:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with BurrowWin.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
4 % of calls cross a namespace and 1 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: medium — clean/modular boundaries expected.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED 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.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
3 finding(s): 0 critical, 3 high, 0 medium, 0 low. 1 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 5 file(s) — `macos/Tests/BurrowEnvelopeTests.swift` (line 33, line 47, line 54, …), `macos/Tests/ConductorBundleFixture.swift` (line 22, lines 22–26, line 26, …), `macos/Tests/MoleWhitelistTests.swift` (lines 136–146, line 147), `windows/Services/WindowsGpuPerformanceCounterProvider.cs` (lines 131–132, lines 140–148), `windows/Tests/BurrowWin.Tests/WindowsGpuPerformanceCounterProviderTests.cs` (lines 62–63, line 69) — 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. In 2 of those file(s) — `windows/Services/WindowsGpuPerformanceCounterProvider.cs`, `windows/Tests/BurrowWin.Tests/WindowsGpuPerformanceCounterProviderTests.cs` — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. Separately, one or more rules could not re-parse an embedded snippet in 4 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 1 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (1 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
12 finding(s): 0 critical, 5 high, 7 medium, 0 low. Partial dependency scan: 2 of 3 declared ecosystem(s) were scanned (npm,osv), and the findings above are real and complete for them. nuget was not scanned (nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan), so this is not the whole dependency surface and the result is reported at reduced confidence.
REDACTED
REDACTED
What to do
Resolve the 7 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED (3). — One of this dimension's main actionable groups (7 warning-level).
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 1 Change coupling finding(s) in Change Coupling — start with CleanView.swift. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 5 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.
Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.
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.
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.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`ShellViewModel` is a singleton (one shared instance) but mutates instance state outside any lock (SelectedRoute, CanGoBack; e.g. `SelectedRoute` at line 26). — windows/ViewModels/ShellViewModel.cs:7
`NavigationService` is a singleton (one shared instance) but mutates instance state outside any lock (_frame; e.g. `_frame` at line 31). — windows/Services/NavigationService.cs:6
`WindowsTrayIconService` is a singleton (one shared instance) but mutates instance state outside any lock (_mainWindow, _windowHandle, _iconHandle, _isInitialized, _refreshTimer, _trayHudWindow; e.g. `_mainWindow` at line 77). — windows/Services/WindowsTrayIconService.cs:9
`TrayHudViewModel` is not registered, but the singleton `TrayHudWindow` creates it and keeps it in `ViewModel`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (SampleText, HealthScore, HealthLabel, CpuText, MemoryText, DiskText; e.g. `SampleText` at line 61). — windows/ViewModels/TrayHudViewModel.cs:8
What to do
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The namespaces BurrowWin.Services ↔ BurrowWin.ViewModels ↔ BurrowWin.Views depend on each other. The lightest dependency in the cycle is BurrowWin.Services → BurrowWin.ViewModels (BurrowWin.Services.WindowsTrayIconService → BurrowWin.ViewModels.ShellViewModel, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — windows/Services/WindowsTrayIconService.cs:4
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
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.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 12 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — .github/workflows/ci.yml:11
`windows/BurrowWin.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — windows/BurrowWin.csproj:79
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety8.6 / 10Strong✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
windows/typescript/src/components/ToolPages.tsx:601 · windows/typescript/src/components/ToolPages.tsx:1122 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — windows/typescript/src/components/ToolPages.tsx:601
windows/typescript/src/components/ToolPages.tsx:1208 · windows/typescript/src/components/ToolPages.tsx:1429 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/components/ToolPages.tsx:1208
windows/typescript/src/components/ToolPages.tsx:579 · windows/typescript/src/components/ToolPages.tsx:1282 · windows/typescript/src/components/ToolPages.tsx:1486 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/components/ToolPages.tsx:579
windows/typescript/electron/main.ts:255 · windows/typescript/electron/main.ts:343 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/electron/main.ts:255
windows/typescript/src/components/ToolPages.tsx:1102 · windows/typescript/src/components/ToolPages.tsx:1287 · windows/typescript/src/components/ToolPages.tsx:1491 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/components/ToolPages.tsx:1102
windows/typescript/src/components/ToolPages.tsx:1173 · windows/typescript/src/components/ToolPages.tsx:1703 — 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. — windows/typescript/src/components/ToolPages.tsx:1173
windows/typescript/src/components/ToolPages.tsx:1254 · windows/typescript/src/components/ToolPages.tsx:1456 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/components/ToolPages.tsx:1254
windows/typescript/src/components/MonitorPage.tsx:426 · windows/typescript/src/components/MonitorPage.tsx:522 · windows/typescript/src/components/MonitorPage.tsx:579 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/components/MonitorPage.tsx:426
windows/typescript/src/components/ToolPages.tsx:1393 · windows/typescript/src/components/ToolPages.tsx:1692 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/components/ToolPages.tsx:1393
windows/typescript/src/components/ToolPages.tsx:530 · windows/typescript/src/components/ToolPages.tsx:832 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/components/ToolPages.tsx:530
windows/typescript/src/components/MonitorPage.tsx:428 · windows/typescript/src/components/MonitorPage.tsx:524 · windows/typescript/src/components/MonitorPage.tsx:581 · windows/typescript/src/components/SettingsPage.tsx:47 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — windows/typescript/src/components/MonitorPage.tsx:428
windows/typescript/src/App.tsx:156 · windows/typescript/src/components/ToolPages.tsx:333 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — windows/typescript/src/App.tsx:156
windows/typescript/src/components/ToolPages.tsx:1590 · windows/typescript/src/components/ToolPages.tsx:1598 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — windows/typescript/src/components/ToolPages.tsx:1590
windows/typescript/electron/main.ts:228 · windows/typescript/electron/services/scanner.ts:67 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — windows/typescript/electron/main.ts:228
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
Overview has cyclomatic complexity 31 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/MonitorPage.tsx:118
CleanupScan has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/ToolPages.tsx:404
isSnapshot has cyclomatic complexity 27 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/store.ts:149
recycleReviewed has cyclomatic complexity 20 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/recycle.ts:14
DuplicatesPage has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/ToolPages.tsx:908
validateRoot has cyclomatic complexity 19 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:698
ScanControls has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/ToolPages.tsx:205
purge has cyclomatic complexity 15 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:449
scan has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:67
measure has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:336
collect has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/telemetry.ts:31
(anonymous) has cyclomatic complexity 13 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:513
revalidateCandidate has cyclomatic complexity 13 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:192
App has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/App.tsx:40
MigrationPage has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/ToolPages.tsx:1807
recycle has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/ToolPages.tsx:370
ConnectivityPage has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/ToolPages.tsx:1701
duplicates has cyclomatic complexity 12 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:510
artifactCategory has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:624
assertUnprotected has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/electron/services/scanner.ts:668
NetworkPage has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — windows/typescript/src/components/ToolPages.tsx:1512
Do you agree with this assessment?
R3 · Large Files2.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
windows/typescript/src/components/ToolPages.tsx has 1849 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — windows/typescript/src/components/ToolPages.tsx:1
windows/typescript/src/components/MonitorPage.tsx has 745 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — windows/typescript/src/components/MonitorPage.tsx:1
windows/typescript/electron/services/scanner.ts has 727 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — windows/typescript/electron/services/scanner.ts:1
windows/typescript/electron/main.ts has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — windows/typescript/electron/main.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage6.7 / 10Strong✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×6) — windows/typescript/electron/main.ts:1, windows/typescript/electron/services/system.ts:1, windows/typescript/electron/preload.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code9.9 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
2 file(s) (~320 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
Nothing in its class reads or assigns this private field (for a constructor parameter property: it is stored and never read), and no string key or test reaches it by name. Remove it, or use it where it was meant to take effect. — windows/typescript/electron/services/scanner.ts:310
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
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.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X10 Duplicated predicate — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 67 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX6 Interface segregation — AX6 reached only 27% of this repository's production lines — swift (44,933 lines), python (2,523 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D11 Test Reliability — Test reliability not measured — polyglot suite, one half not re-run
D12 Dependency Hygiene — Dependency hygiene not measured
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .py, .swift, .ts, .tsx, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 11 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
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.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — windows/typescript/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (5 value object(s))
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED5 Idempotency — 2 mutating command handler(s)/consumer(s) detected and 2 handler method(s) walked, but no persistent write was recognised in any of them — idempotency not assessed
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
IC1 Incompleteness & stubs — IC1 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found by the two searches this check runs — a BenchmarkDotNet package reference in any project file (loaded, or on disk), and a script whose name contains `benchmark` that this repository's CI runs. Neither can see a suite in another ecosystem's idiom, so this is not a verdict that the repository has none. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted, and nothing is asked of a repository that has none.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
X1 Async correctness — X1 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X12 Unreachable branch — X12 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — X13 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — X18 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — X2 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X21 Side-effecting pattern guard — X21 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X22 Contradicted release guard — X22 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — X27 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X28 Index access outside its own emptiness guard — X28 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X29 Per-element action decided by a fixed element — X29 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X3 Exception handling — X3 reached only 18% of this repository's production lines — swift (44,933 lines), typescript (5,224 lines), python (2,523 lines), javascript (588 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 65 finding(s)
D10 · Test Quality· Tests excluded from compilation · ×29
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/BurrowConductorServiceTests.cs windows/Tests/BurrowWin.Tests/BurrowConductorServiceTests.cs:14— 6 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/BurrowEnvelopeTests.cs windows/Tests/BurrowWin.Tests/BurrowEnvelopeTests.cs:11— 2 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/BurrowStartupOptionsTests.cs windows/Tests/BurrowWin.Tests/BurrowStartupOptionsTests.cs:8— 4 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/CleanPreviewParserTests.cs windows/Tests/BurrowWin.Tests/CleanPreviewParserTests.cs:9— 3 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/DeletionBatchProcessorTests.cs windows/Tests/BurrowWin.Tests/DeletionBatchProcessorTests.cs:9— 5 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/DiskAnalyzerServiceTests.cs windows/Tests/BurrowWin.Tests/DiskAnalyzerServiceTests.cs:16— 2 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/DiskTreemapLayoutTests.cs windows/Tests/BurrowWin.Tests/DiskTreemapLayoutTests.cs:9— 2 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/GpuTelemetryBackoffProviderTests.cs windows/Tests/BurrowWin.Tests/GpuTelemetryBackoffProviderTests.cs:10— 3 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/HistoryRangeCatalogTests.cs windows/Tests/BurrowWin.Tests/HistoryRangeCatalogTests.cs:9— 3 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/HttpServerSettingsPlannerTests.cs windows/Tests/BurrowWin.Tests/HttpServerSettingsPlannerTests.cs:9— 5 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/InstalledApplicationTests.cs windows/Tests/BurrowWin.Tests/InstalledApplicationTests.cs:8— 1 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/InstallerCleanupServiceTests.cs windows/Tests/BurrowWin.Tests/InstallerCleanupServiceTests.cs:16— 6 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/JsonApplicationSettingsServiceTests.cs windows/Tests/BurrowWin.Tests/JsonApplicationSettingsServiceTests.cs:18— 3 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/JsonOperationHistoryServiceTests.cs windows/Tests/BurrowWin.Tests/JsonOperationHistoryServiceTests.cs:18— 4 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/JsonSystemTelemetryHistoryServiceTests.cs windows/Tests/BurrowWin.Tests/JsonSystemTelemetryHistoryServiceTests.cs:20— 4 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/LocalMcpServerServiceTests.cs windows/Tests/BurrowWin.Tests/LocalMcpServerServiceTests.cs:12— 10 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/LocalStartupDiagnosticsServiceTests.cs windows/Tests/BurrowWin.Tests/LocalStartupDiagnosticsServiceTests.cs:10— 2 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/MoleEngineServiceTests.cs windows/Tests/BurrowWin.Tests/MoleEngineServiceTests.cs:16— 6 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/ProcessUsageAggregatorTests.cs windows/Tests/BurrowWin.Tests/ProcessUsageAggregatorTests.cs:9— 3 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/PurgeArtifactServiceTests.cs windows/Tests/BurrowWin.Tests/PurgeArtifactServiceTests.cs:15— 6 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/RecycleBinDeletionServiceTests.cs windows/Tests/BurrowWin.Tests/RecycleBinDeletionServiceTests.cs:20— 6 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/SystemMoleEngineProbeTests.cs windows/Tests/BurrowWin.Tests/SystemMoleEngineProbeTests.cs:8— 1 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/SystemTelemetryFormatterTests.cs windows/Tests/BurrowWin.Tests/SystemTelemetryFormatterTests.cs:10— 5 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/SystemTelemetrySamplerServiceTests.cs windows/Tests/BurrowWin.Tests/SystemTelemetrySamplerServiceTests.cs:9— 3 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
Tests excluded from compilation: windows/Tests/BurrowWin.Tests/TrayHudStatusFormatterTests.cs windows/Tests/BurrowWin.Tests/TrayHudStatusFormatterTests.cs:9— 2 test method(s) in this file, but `BurrowWin.csproj` drops it from the build with `<Compile Remove="Tests\**\*.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
EmptyCatchBlock windows/Services/AppTelemetry.cs:82— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/AppTelemetry.cs:175— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/AppTelemetry.cs:251— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/BurrowConductorService.cs:189— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/DiskAnalyzerService.cs:53— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/DiskAnalyzerService.cs:98— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/JsonSystemTelemetryHistoryService.cs:153— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/LocalMcpServerService.cs:136— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/LocalMcpServerService.cs:205— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/LocalMcpServerService.cs:223— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/LocalMcpServerService.cs:1368— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/LocalStartupDiagnosticsService.cs:49— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/MoleEngineService.cs:153— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/MoleEngineService.cs:369— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/PurgeArtifactService.cs:380— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/SystemTelemetrySamplerService.cs:94— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/WindowsInstalledApplicationService.cs:396— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/WindowsInstalledApplicationService.cs:408— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/WindowsInstalledApplicationService.cs:746— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/WindowsSystemTelemetryService.cs:78— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/WindowsSystemTelemetryService.cs:207— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/Services/WindowsTrayIconService.cs:512— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/ViewModels/InstallerViewModel.cs:338— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/ViewModels/InstallerViewModel.cs:374— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock windows/ViewModels/PurgeViewModel.cs:369— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
Namespace dependency cycle windows/Services/WindowsTrayIconService.cs:4— The namespaces BurrowWin.Services ↔ BurrowWin.ViewModels ↔ BurrowWin.Views depend on each other. The lightest dependency in the cycle is BurrowWin.Services → BurrowWin.ViewModels (BurrowWin.Services.WindowsTrayIconService → BurrowWin.ViewModels.ShellViewModel, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Duplicated block (5 lines × 2) macos/Sources/ConnectivityView.swift:73— macos/Sources/ConnectivityView.swift:73-77 | macos/Sources/TuneUpView.swift:144-148 — 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 `macos/Sources/ConnectivityView.swift:73` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) macos/Sources/DB.swift:326— macos/Sources/DB.swift:326-333 | macos/Sources/DB.swift:369-373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `macos/Sources/DB.swift:375` calls `sqlite3_bind_int64`, `Int64` and `macos/Sources/DB.swift:335` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) macos/Sources/HistoryView.swift:664— macos/Sources/HistoryView.swift:664-670 | macos/Sources/SpikeView.swift:73-77 — 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 `macos/Sources/HistoryView.swift:664` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.firstTextBaseline` 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 (5 lines × 2) macos/Sources/MCP.swift:643— macos/Sources/MCP.swift:643-647 | macos/Sources/MCP.swift:727-732 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) macos/Sources/PortsView.swift:110— macos/Sources/PortsView.swift:110-114 | macos/Sources/SoftwareView.swift:155-159 — 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 `macos/Sources/PortsView.swift:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) macos/Sources/SettingsView.swift:235— macos/Sources/SettingsView.swift:235-239 | macos/Sources/UpdatesView.swift:178-182 — 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 `macos/Sources/SettingsView.swift:235` 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, `macos/Sources/UpdatesView.swift:183` calls `accessibilityLabel`, `String`, `NSLocalizedString` and `macos/Sources/SettingsView.swift:240` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) macos/Sources/SettingsView.swift:941— macos/Sources/SettingsView.swift:941-945 | macos/Sources/SettingsView.swift:963-969 — 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 `macos/Sources/SettingsView.swift:941` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) macos/Sources/SettingsView.swift:1423— macos/Sources/SettingsView.swift:1423-1427 | macos/Sources/SettingsView.swift:1435-1439 — 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 `macos/Sources/SettingsView.swift:1423` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) macos/Sources/SnapshotProducer.swift:550— macos/Sources/SnapshotProducer.swift:550-554 | macos/Sources/SnapshotProducer.swift:607-611 — 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 `macos/Sources/SnapshotProducer.swift:550` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) macos/HelperSources/HelperService.swift:181— macos/HelperSources/HelperService.swift:181-185 | macos/Sources/PrivilegedHelper/HelperCodeRequirement.swift:278-282 — 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (5 lines × 2) macos/Sources/PopupView.swift:696— macos/Sources/PopupView.swift:696-700 | macos/Sources/StatusView.swift:1003-1007 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `macos/Sources/StatusView.swift:1001` calls `ProcessWatchdog` and `macos/Sources/PopupView.swift:694` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) macos/Sources/AnalyzeProgress.swift:50— macos/Sources/AnalyzeProgress.swift:50-54 | macos/Sources/MoleHistory.swift:67-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) macos/Sources/CleanView.swift:303— macos/Sources/CleanView.swift:303-307 | macos/Sources/SettingsView.swift:921-925 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) macos/Sources/CleanView.swift:415— macos/Sources/CleanView.swift:415-419 | macos/Sources/DupesView.swift:395-399 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) macos/Sources/DoctorView.swift:117— macos/Sources/DoctorView.swift:117-121 | macos/Sources/MCP.swift:828-832 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) macos/Sources/InstallerView.swift:271— macos/Sources/InstallerView.swift:271-275 | macos/Sources/SweepView.swift:205-209 — 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 `macos/Sources/InstallerView.swift:271` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) macos/Sources/MCP.swift:1002— macos/Sources/MCP.swift:1002-1006 | macos/Sources/MCP.swift:1008-1012 — 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 `macos/Sources/MCP.swift:1002` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) windows/Services/LocalMcpServerService.cs:387— windows/Services/LocalMcpServerService.cs:387-393 | windows/Services/LocalMcpServerService.cs:423-428 — 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 `windows/Services/LocalMcpServerService.cs:387` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) macos/Sources/CleanReviewView.swift:160— macos/Sources/CleanReviewView.swift:160-165 | macos/Sources/DupesView.swift:257-262 — 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 `macos/Sources/CleanReviewView.swift:160` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) macos/Sources/CleanReviewView.swift:233— macos/Sources/CleanReviewView.swift:233-238 | macos/Sources/OrphansView.swift:283-288 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `macos/Sources/CleanReviewView.swift:239` calls `accessibilityLabel`, `NSLocalizedString` and `macos/Sources/OrphansView.swift:289` 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 (6 lines × 2) macos/Sources/CleanReviewView.swift:293— macos/Sources/CleanReviewView.swift:293-299 | macos/Sources/SweepView.swift:239-244 — 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 `macos/Sources/CleanReviewView.swift:293` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) macos/Sources/Components/MiniChart.swift:72— macos/Sources/Components/MiniChart.swift:72-77 | macos/Sources/Components/MiniChart.swift:155-160 — 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 `macos/Sources/Components/MiniChart.swift:72` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) macos/Sources/DoctorView.swift:45— macos/Sources/DoctorView.swift:45-50 | macos/Sources/RestoreView.swift:38-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) macos/Sources/MCP.swift:1381— macos/Sources/MCP.swift:1381-1386 | macos/Sources/MCP.swift:1472-1477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) macos/Sources/OrphansView.swift:130— macos/Sources/OrphansView.swift:130-135 | macos/Sources/SweepView.swift:233-238 — 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 `macos/Sources/OrphansView.swift:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) macos/Sources/SoftwareView.swift:218— macos/Sources/SoftwareView.swift:218-223 | macos/Sources/SoftwareView.swift:235-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/SoftwareView.swift:218` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) macos/Sources/TaskReport.swift:132— macos/Sources/TaskReport.swift:132-137 | macos/Sources/TaskReport.swift:144-149 — 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 `macos/Sources/TaskReport.swift:132` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) macos/Sources/MenuBarWidgets.swift:672— macos/Sources/MenuBarWidgets.swift:672-677 | macos/Sources/MenuBarWidgets.swift:722-727 — 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 `macos/Sources/MenuBarWidgets.swift:672` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) macos/Sources/CleanupAuthorization.swift:390— macos/Sources/CleanupAuthorization.swift:390-395 | macos/Sources/DupeTrashSnapshot.swift:64-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) macos/Sources/PopupView.swift:421— macos/Sources/PopupView.swift:421-426 | macos/Sources/StatusView.swift:403-408 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) macos/Sources/SoftwareView.swift:165— macos/Sources/SoftwareView.swift:165-170 | macos/Sources/SoftwareView.swift:186-191 — 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 `macos/Sources/SoftwareView.swift:165` 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.
FileTooLong: components/ToolPages.tsx windows/typescript/src/components/ToolPages.tsx— FileTooLong — 1661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1161 over it, 3.32× 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: Sources/SoftwareView.swift macos/Sources/SoftwareView.swift— FileTooLong — 1019 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 519 over it, 2.04× 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: Sources/UpdatesView.swift macos/Sources/UpdatesView.swift— FileTooLong — 1011 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: UpdatesModel (514-1437). The bar is 500 significant lines; this is 511 over it, 2.02× 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: Sources/UpdateWorkflow.swift macos/Sources/UpdateWorkflow.swift— FileTooLong — 992 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 492 over it, 1.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Sources/SettingsView.swift macos/Sources/SettingsView.swift— FileTooLong — 980 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: SettingsView (22-1513). The bar is 500 significant lines; this is 480 over it, 1.96× 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: Sources/MCP.swift macos/Sources/MCP.swift— FileTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ToolCatalog (85-1546). The bar is 500 significant lines; this is 409 over it, 1.82× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Services/LocalMcpServerService.cs windows/Services/LocalMcpServerService.cs— FileTooLong — 890 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 390 over it, 1.78× 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: Sources/StatusView.swift macos/Sources/StatusView.swift— FileTooLong — 692 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 192 over it, 1.38× 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: components/MonitorPage.tsx windows/typescript/src/components/MonitorPage.tsx— FileTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 180 over it, 1.36× 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: services/scanner.ts windows/typescript/electron/services/scanner.ts— FileTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: ScanService (48-612). The bar is 500 significant lines; this is 99 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Sources/OperationFlow.swift macos/Sources/OperationFlow.swift— FileTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 94 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Sources/AppDelegate.swift macos/Sources/AppDelegate.swift— FileTooLong — 583 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: AppDelegate (26-945). The bar is 500 significant lines; this is 83 over it, 1.17× 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: Sources/PopupView.swift macos/Sources/PopupView.swift— FileTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: PopupView (39-667). The bar is 500 significant lines; this is 1 over it, 1.00× 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.
FunctionTooLong: MonitorPage.Overview windows/typescript/src/components/MonitorPage.tsx:118— FunctionTooLong — Overview runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65× 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.
FunctionTooLong: ToolPages.DuplicatesPage windows/typescript/src/components/ToolPages.tsx:908— FunctionTooLong — DuplicatesPage runs 232 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 132 over it, 2.32× 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.
FunctionTooLong: ToolPages.CleanupScan windows/typescript/src/components/ToolPages.tsx:404— FunctionTooLong — CleanupScan runs 225 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× 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.
FunctionTooLong: ToolPages.AnalyzePage windows/typescript/src/components/ToolPages.tsx:681— FunctionTooLong — AnalyzePage runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× 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.
FunctionTooLong: App.App windows/typescript/src/App.tsx:40— FunctionTooLong — App runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ToolPages.NetworkPage windows/typescript/src/components/ToolPages.tsx:1512— FunctionTooLong — NetworkPage runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SettingsPage.SettingsPage windows/typescript/src/components/SettingsPage.tsx:5— FunctionTooLong — SettingsPage runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: main.registerIPC windows/typescript/electron/main.ts:180— FunctionTooLong — registerIPC runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× 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.
FunctionTooLong: ToolPages.AppsPage windows/typescript/src/components/ToolPages.tsx:1169— FunctionTooLong — AppsPage runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: MonitorPage.MonitorPage windows/typescript/src/components/MonitorPage.tsx:620— FunctionTooLong — MonitorPage runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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.
FunctionTooLong: ToolPages.PortsPage windows/typescript/src/components/ToolPages.tsx:1402— FunctionTooLong — PortsPage runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
ClassTooLong: SettingsView macos/Sources/SettingsView.swift:22— ClassTooLong — 976 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 576 over it, 2.44× 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: ToolCatalog macos/Sources/MCP.swift:85— ClassTooLong — 892 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 492 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: UpdatesModel macos/Sources/UpdatesView.swift:513— ClassTooLong — 657 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 257 over it, 1.64× 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: AppDelegate macos/Sources/AppDelegate.swift:26— ClassTooLong — 580 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 180 over it, 1.45× 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: ElectronReplacementInstaller macos/Sources/UpdateWorkflow.swift:642— ClassTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 135 over it, 1.34× 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: ScanService windows/typescript/electron/services/scanner.ts:48— ClassTooLong — 455 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 55 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Telemetry macos/Sources/Telemetry.swift:13— ClassTooLong — 418 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 18 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PopupView macos/Sources/PopupView.swift:39— ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 16 over it, 1.04× 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: DashboardViewModel windows/ViewModels/DashboardViewModel.cs— ClassTooLong — 407 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 7 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.
ClassTooLong: PurgeArtifactService windows/Services/PurgeArtifactService.cs— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 4 over it, 1.01× 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 (7 corresponding lines) · ×8
Edited copy of a member (7 corresponding lines) macos/Sources/PortsView.swift:278— macos/Sources/PortsView.swift:278-286 | macos/Sources/UpdatesView.swift:338-344 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) macos/Sources/SettingsView.swift:988— macos/Sources/SettingsView.swift:988-994 | macos/Sources/TuneUpView.swift:335-342 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) macos/Sources/MCP.swift:1539— macos/Sources/MCP.swift:1539-1545 | macos/Sources/MoActions.swift:509-516 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) macos/Sources/Store.swift:40— macos/Sources/Store.swift:40-46 | macos/Sources/Store.swift:90-97 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) macos/Sources/CleanView.swift:259— macos/Sources/CleanView.swift:259-267 | macos/Sources/SweepView.swift:151-157 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) macos/Sources/OperationFlow.swift:809— macos/Sources/OperationFlow.swift:809-816 | macos/Sources/PrivilegeBroker.swift:243-249 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) windows/Pages/HistoryPage.xaml.cs:27— windows/Pages/HistoryPage.xaml.cs:27-33 | windows/Views/ShellPage.xaml.cs:43-50 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) windows/Services/BurrowConductorService.cs:35— windows/Services/BurrowConductorService.cs:35-41 | windows/Services/SystemMoleEngineProbe.cs:13-19 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
TooManyMethods: LocalMcpServerService windows/Services/LocalMcpServerService.cs— TooManyMethods — 843 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 30 methods; this is 33 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ToolCatalog macos/Sources/MCP.swift:85— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: UpdatesModel macos/Sources/UpdatesView.swift:513— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: WindowsInstalledApplicationService windows/Services/WindowsInstalledApplicationService.cs— TooManyMethods — 448 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: WindowsTrayIconService windows/Services/WindowsTrayIconService.cs— TooManyMethods — 300 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SettingsView macos/Sources/SettingsView.swift:22— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×6
Edited copy of a member (6 corresponding lines) macos/Sources/ElectronVersionResolver.swift:15— macos/Sources/ElectronVersionResolver.swift:15-20 | macos/Sources/GitHubReleaseResolver.swift:16-26 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) macos/Sources/OrphansView.swift:255— macos/Sources/OrphansView.swift:255-260 | macos/Sources/ProcessInspectorView.swift:109-114 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) macos/Sources/PortEnumerator.swift:118— macos/Sources/PortEnumerator.swift:118-123 | macos/Sources/PortEnumerator.swift:124-129 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) macos/Sources/Store.swift:497— macos/Sources/Store.swift:497-502 | macos/Sources/Store.swift:508-513 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) windows/ViewModels/InstallerViewModel.cs:248— windows/ViewModels/InstallerViewModel.cs:248-253 | windows/ViewModels/PurgeViewModel.cs:269-274 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) macos/Sources/MCP.swift:607— macos/Sources/MCP.swift:607-612 | macos/Sources/QueryServer.swift:469-476 — These two members are one piece of code written twice and then edited apart: 6 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.
R4 · Test Coverage· No test reaches this file · ×6
No test reaches this file windows/typescript/electron/main.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file windows/typescript/electron/services/system.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file windows/typescript/electron/preload.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file windows/typescript/scripts/build-electron.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file windows/typescript/scripts/dev.mjs:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file worker/index.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Hotspot: macos/Sources/OperationFlow.swift macos/Sources/OperationFlow.swift:244— macos/Sources/OperationFlow.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in OperationFlow.start at line 244. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:27:44 +00:00' --until='2026-11-14 14:27:44 +00:00' --full-history --no-merges -- macos/Sources/OperationFlow.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: macos/Sources/SoftwareView.swift macos/Sources/SoftwareView.swift:1353— macos/Sources/SoftwareView.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in SoftwareModel.engineUninstall at line 1353. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:27:44 +00:00' --until='2026-11-14 14:27:44 +00:00' --full-history --no-merges -- macos/Sources/SoftwareView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: macos/Sources/AppDelegate.swift macos/Sources/AppDelegate.swift:220— macos/Sources/AppDelegate.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AppDelegate.startServices at line 220. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:27:44 +00:00' --until='2026-11-14 14:27:44 +00:00' --full-history --no-merges -- macos/Sources/AppDelegate.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: macos/HelperSources/HelperService.swift macos/HelperSources/HelperService.swift:621— macos/HelperSources/HelperService.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in HelperService.execute at line 621. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:27:44 +00:00' --until='2026-11-14 14:27:44 +00:00' --full-history --no-merges -- macos/HelperSources/HelperService.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: .github/scripts/upstream_watch.py .github/scripts/upstream_watch.py:163— .github/scripts/upstream_watch.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in upstream_watch.do_releases at line 163. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 14:27:44 +00:00' --until='2026-11-14 14:27:44 +00:00' --full-history --no-merges -- .github/scripts/upstream_watch.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
Members sharing a duplicated core (4 members, 50+ identical tokens) macos/Sources/AnalyzeView.swift:148— macos/Sources/AnalyzeView.swift:148-184 | macos/Sources/DupesView.swift:59-106 | macos/Sources/OrphansView.swift:50-97 | macos/Sources/PhotosView.swift:51-98 — 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) macos/Sources/CleanReviewView.swift:190— macos/Sources/CleanReviewView.swift:190-251 | macos/Sources/DupesView.swift:285-331 | macos/Sources/OrphansView.swift:262-294 | macos/Sources/PhotosView.swift:237-257 — 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) macos/Sources/DupesView.swift:29— macos/Sources/DupesView.swift:29-55 | macos/Sources/NetView.swift:27-50 | macos/Sources/OrphansView.swift:27-46 | macos/Sources/PhotosView.swift:28-47 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) macos/Sources/DupesView.swift:143— macos/Sources/DupesView.swift:143-159 | macos/Sources/NetView.swift:104-116 | macos/Sources/OrphansView.swift:153-169 | macos/Sources/PhotosView.swift:135-151 — 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) macos/Sources/ProcessInspectorView.swift:74— macos/Sources/ProcessInspectorView.swift:74-95 | macos/Sources/ProcessTreeView.swift:27-52 | macos/Sources/SettingsView.swift:1247-1275 | macos/Sources/StatusView.swift:647-665 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) macos/Sources/SoftwareView.swift:161— macos/Sources/SoftwareView.swift:161-170 | macos/Sources/SoftwareView.swift:182-191 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) macos/Sources/HomebrewEnvironment.swift:33— macos/Sources/HomebrewEnvironment.swift:33-44 | macos/Sources/LoginItemsReader.swift:59-68 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) macos/Sources/OptimizeView.swift:118— macos/Sources/OptimizeView.swift:118-133 | macos/Sources/SweepView.swift:248-257 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) macos/Sources/Components/PermissionRow.swift:63— macos/Sources/Components/PermissionRow.swift:63-72 | macos/Sources/OrphansView.swift:141-151 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) macos/Sources/ActivityView.swift:145— macos/Sources/ActivityView.swift:145-157 | macos/Sources/PopupView.swift:755-764 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×5
Edited copy of a member (4 corresponding lines) macos/Sources/MachOArch.swift:63— macos/Sources/MachOArch.swift:63-66 | macos/Sources/MachOArch.swift:67-70 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) macos/Sources/CrashReporter.swift:335— macos/Sources/CrashReporter.swift:335-338 | macos/Sources/CrashReporter.swift:340-343 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) macos/Sources/MoInteractive.swift:138— macos/Sources/MoInteractive.swift:138-143 | macos/Sources/MoInteractive.swift:147-150 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) macos/Sources/NetView.swift:74— macos/Sources/NetView.swift:74-77 | macos/Sources/DupesView.swift:109-112 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) macos/Sources/PopupView.swift:501— macos/Sources/PopupView.swift:501-504 | macos/Sources/StatusView.swift:774-779 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) windows/Services/RecycleBinDeletionService.cs:82— windows/Services/RecycleBinDeletionService.cs:82-91 | windows/Services/RecycleBinDeletionService.cs:122-130 — 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 `windows/Services/RecycleBinDeletionService.cs:82` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) macos/Sources/DupesView.swift:305— macos/Sources/DupesView.swift:305-313 | macos/Sources/PhotosView.swift:240-248 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/PhotosView.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) macos/Sources/DupesView.swift:323— macos/Sources/DupesView.swift:323-331 | macos/Sources/PhotosView.swift:249-257 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/PhotosView.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:323` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) macos/Sources/Telemetry.swift:310— macos/Sources/Telemetry.swift:310-318 | macos/Sources/Telemetry.swift:530-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) macos/Sources/AppDelegate.swift:147— macos/Sources/AppDelegate.swift:147-155 | macos/Sources/AppDelegate.swift:381-389 — 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.
MethodTooLong: ToolCatalog.descriptors macos/Sources/MCP.swift:93— MethodTooLong — descriptors runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× 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: SettingsView.generalTab macos/Sources/SettingsView.swift:250— MethodTooLong — generalTab runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SystemProcessPort.events macos/Sources/OperationFlow.swift:554— MethodTooLong — events runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: OperationFlow.start macos/Sources/OperationFlow.swift:244— MethodTooLong — start runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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· Edited copy of a member (11 corresponding lines) · ×4
Edited copy of a member (11 corresponding lines) macos/Sources/EngineCLI.swift:441— macos/Sources/EngineCLI.swift:441-451 | macos/Sources/UpdateCheck.swift:391-405 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) macos/Sources/PortsView.swift:133— macos/Sources/PortsView.swift:133-146 | macos/Sources/PortsView.swift:148-158 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) macos/Sources/BrewServices.swift:62— macos/Sources/BrewServices.swift:62-72 | macos/Sources/BrewServices.swift:74-84 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) windows/ViewModels/CleanupViewModel.cs:51— windows/ViewModels/CleanupViewModel.cs:51-62 | windows/ViewModels/OptimizeViewModel.cs:48-58 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×4
Edited copy of a member (8 corresponding lines) macos/Sources/SettingsView.swift:1336— macos/Sources/SettingsView.swift:1336-1343 | macos/Sources/SettingsView.swift:1397-1404 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) macos/Sources/TuneUpModel.swift:148— macos/Sources/TuneUpModel.swift:148-155 | macos/Sources/TuneUpModel.swift:157-164 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) macos/Sources/DB.swift:56— macos/Sources/DB.swift:56-63 | macos/Sources/DB.swift:96-103 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) macos/Sources/MCPTasks.swift:146— macos/Sources/MCPTasks.swift:146-153 | macos/Sources/MCPTasks.swift:182-194 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×4
Edited copy of a member (9 corresponding lines) macos/Sources/MCP.swift:1394— macos/Sources/MCP.swift:1394-1406 | macos/Sources/MCP.swift:1487-1495 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) macos/Sources/CameraMicSensor.swift:142— macos/Sources/CameraMicSensor.swift:142-153 | macos/Sources/CameraMicSensor.swift:155-163 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) macos/Sources/CameraMicSensor.swift:118— macos/Sources/CameraMicSensor.swift:118-128 | macos/Sources/CameraMicSensor.swift:130-138 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) macos/Sources/UpdateCheck.swift:181— macos/Sources/UpdateCheck.swift:181-190 | macos/Sources/ExternalSparkleUpdateSession.swift:194-202 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (5 lines × 3) macos/Sources/PopupView.swift:527— macos/Sources/PopupView.swift:527-531 | macos/Sources/StatusView.swift:690-694 | macos/Sources/StatusView.swift:827-832 — 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 `macos/Sources/PopupView.swift:527` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) macos/Sources/BrewServicesView.swift:69— macos/Sources/BrewServicesView.swift:69-73 | macos/Sources/PortsView.swift:92-96 | macos/Sources/SoftwareView.swift:90-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/BrewServicesView.swift:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) macos/Sources/CleanView.swift:441— macos/Sources/CleanView.swift:441-445 | macos/Sources/OptimizeView.swift:110-114 | macos/Sources/SweepView.swift:301-305 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/CleanView.swift:441` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) windows/ViewModels/InstallerViewModel.cs:296— windows/ViewModels/InstallerViewModel.cs:296-300 | windows/ViewModels/PurgeViewModel.cs:318-322 | windows/ViewModels/UninstallViewModel.cs:501-505 — before extracting anything, compare `windows/ViewModels/InstallerViewModel.cs` and `windows/ViewModels/PurgeViewModel.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 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. 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.
Stateful singleton: ShellViewModel windows/ViewModels/ShellViewModel.cs:7— `ShellViewModel` is a singleton (one shared instance) but mutates instance state outside any lock (SelectedRoute, CanGoBack; e.g. `SelectedRoute` at line 26).
Stateful singleton: NavigationService windows/Services/NavigationService.cs:6— `NavigationService` is a singleton (one shared instance) but mutates instance state outside any lock (_frame; e.g. `_frame` at line 31).
Stateful singleton: WindowsTrayIconService windows/Services/WindowsTrayIconService.cs:9— `WindowsTrayIconService` is a singleton (one shared instance) but mutates instance state outside any lock (_mainWindow, _windowHandle, _iconHandle, _isInitialized, _refreshTimer, _trayHudWindow; e.g. `_mainWindow` at line 77).
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×3
Edited copy of a member (5 corresponding lines) macos/Sources/ElectronVersionResolver.swift:22— macos/Sources/ElectronVersionResolver.swift:22-26 | macos/Sources/GitHubReleaseResolver.swift:29-34 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) windows/ViewModels/InstallerViewModel.cs:278— windows/ViewModels/InstallerViewModel.cs:278-282 | windows/ViewModels/PurgeViewModel.cs:300-304 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) macos/Sources/Notifications.swift:83— macos/Sources/Notifications.swift:83-91 | macos/Sources/Notifications.swift:97-101 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) macos/Sources/InstallerView.swift:400— macos/Sources/InstallerView.swift:400-402 | macos/Sources/UpdatesView.swift:508-510 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) macos/Sources/HistoryView.swift:702— macos/Sources/HistoryView.swift:702-704 | macos/Sources/SpikeView.swift:131-133 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) macos/Sources/DoctorView.swift:187— macos/Sources/DoctorView.swift:187-189 | macos/Sources/OptimizeView.swift:201-203 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) windows/ViewModels/InstallerViewModel.cs:179— windows/ViewModels/InstallerViewModel.cs:179-190 | windows/ViewModels/PurgeViewModel.cs:180-191 — before extracting anything, compare `windows/ViewModels/InstallerViewModel.cs` and `windows/ViewModels/PurgeViewModel.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `windows/ViewModels/InstallerViewModel.cs:179` 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) macos/Sources/DupesView.swift:194— macos/Sources/DupesView.swift:194-205 | macos/Sources/PhotosView.swift:196-207 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/PhotosView.swift` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:194` 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) windows/Services/BurrowConductorService.cs:20— windows/Services/BurrowConductorService.cs:20-31 | windows/Services/SystemMoleEngineProbe.cs:23-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 3) macos/Sources/DupesView.swift:324— macos/Sources/DupesView.swift:324-329 | macos/Sources/OrphansView.swift:284-289 | macos/Sources/PhotosView.swift:250-255 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/OrphansView.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:324` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) macos/Sources/CleanReviewView.swift:200— macos/Sources/CleanReviewView.swift:200-205 | macos/Sources/DupesView.swift:295-300 | macos/Sources/SoftwareView.swift:486-491 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/CleanReviewView.swift:200` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 3) macos/Sources/Components/PermissionRow.swift:66— macos/Sources/Components/PermissionRow.swift:66-71 | macos/Sources/DupesView.swift:339-344 | macos/Sources/OrphansView.swift:144-149 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/OrphansView.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/Components/PermissionRow.swift:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) macos/Sources/PopupView.swift:336— macos/Sources/PopupView.swift:336-359 | macos/Sources/PopupView.swift:364-391 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) windows/ViewModels/DashboardViewModel.cs:492— windows/ViewModels/DashboardViewModel.cs:492-515 | windows/ViewModels/HistoryViewModel.cs:128-163 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) macos/Sources/CleanReviewView.swift:167— macos/Sources/CleanReviewView.swift:167-186 | macos/Sources/DupesView.swift:264-283 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) macos/Sources/SettingsView.swift:937— macos/Sources/SettingsView.swift:937-956 | macos/Sources/SettingsView.swift:958-977 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) macos/Sources/MCP.swift:614— macos/Sources/MCP.swift:614-635 | macos/Sources/MCP.swift:699-720 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) macos/Sources/Components/ValueTile.swift:50— macos/Sources/Components/ValueTile.swift:50-71 | macos/Sources/Components/ValueTile.swift:73-95 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) windows/Services/InstallerCleanupService.cs:175— windows/Services/InstallerCleanupService.cs:175-191 | windows/Services/PurgeArtifactService.cs:226-240 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) macos/Sources/UpdateWorkflow.swift:579— macos/Sources/UpdateWorkflow.swift:579-593 | macos/Sources/UpdateWorkflow.swift:595-619 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) macos/Sources/ActivityView.swift:101— macos/Sources/ActivityView.swift:101-106 | macos/Sources/ConnectivityView.swift:258-263 | macos/Sources/StatusView.swift:119-124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) windows/ViewModels/InstallerViewModel.cs:295— windows/ViewModels/InstallerViewModel.cs:295-300 | windows/ViewModels/PurgeViewModel.cs:317-322 | windows/ViewModels/UninstallViewModel.cs:500-505 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×2
Edited copies of one member (3 members, 8+ corresponding lines) macos/Sources/MenuBarWidgets.swift:392— macos/Sources/MenuBarWidgets.swift:392-399 | macos/Sources/MenuBarWidgets.swift:409-416 | macos/Sources/MenuBarWidgets.swift:422-429 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) windows/ViewModels/InstallerViewModel.cs:285— windows/ViewModels/InstallerViewModel.cs:285-292 | windows/ViewModels/PurgeViewModel.cs:307-314 | windows/ViewModels/UninstallViewModel.cs:490-497 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (28 lines × 2) windows/Services/SystemMoleEngineProbe.cs:52— windows/Services/SystemMoleEngineProbe.cs:52-79 | windows/Tools/MoShim/Program.cs:98-125 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (28 lines × 2) windows/ViewModels/InstallerViewModel.cs:350— windows/ViewModels/InstallerViewModel.cs:350-377 | windows/ViewModels/PurgeViewModel.cs:381-408 — before extracting anything, compare `windows/ViewModels/InstallerViewModel.cs` and `windows/ViewModels/PurgeViewModel.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) windows/ViewModels/InstallerViewModel.cs:324— windows/ViewModels/InstallerViewModel.cs:324-341 | windows/ViewModels/PurgeViewModel.cs:355-372 — before extracting anything, compare `windows/ViewModels/InstallerViewModel.cs` and `windows/ViewModels/PurgeViewModel.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) macos/Sources/Tool.swift:30— macos/Sources/Tool.swift:30-47 | macos/Sources/Tool.swift:89-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) macos/Sources/CleanReviewView.swift:172— macos/Sources/CleanReviewView.swift:172-186 | macos/Sources/DupesView.swift:269-283 — 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 `macos/Sources/CleanReviewView.swift:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) windows/Pages/InstallerPage.xaml.cs:45— windows/Pages/InstallerPage.xaml.cs:45-59 | windows/Pages/PurgePage.xaml.cs:20-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) macos/Sources/CleanReviewView.swift:138— macos/Sources/CleanReviewView.swift:138-147 | macos/Sources/DupesView.swift:236-245 — 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 `macos/Sources/CleanReviewView.swift:138` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) macos/Sources/CleanView.swift:75— macos/Sources/CleanView.swift:75-84 | macos/Sources/SweepView.swift:120-129 — 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 `macos/Sources/CleanView.swift:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) macos/Sources/DB.swift:310— macos/Sources/DB.swift:310-317 | macos/Sources/DB.swift:334-341 | macos/Sources/DB.swift:376-383 — 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 `macos/Sources/DB.swift:310` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `macos/Sources/DB.swift:333` calls `sqlite3_bind_int64`, `Int64` and `macos/Sources/DB.swift:309` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) macos/Sources/DupesView.swift:134— macos/Sources/DupesView.swift:134-141 | macos/Sources/NetView.swift:95-102 | macos/Sources/PhotosView.swift:126-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) macos/Sources/CleanView.swift:335— macos/Sources/CleanView.swift:335-341 | macos/Sources/CleanView.swift:353-359 | macos/Sources/TuneUpView.swift:591-597 — 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 `macos/Sources/CleanView.swift:335` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 3) windows/ViewModels/InstallerViewModel.cs:286— windows/ViewModels/InstallerViewModel.cs:286-292 | windows/ViewModels/PurgeViewModel.cs:308-314 | windows/ViewModels/UninstallViewModel.cs:491-497 — before extracting anything, compare `windows/ViewModels/InstallerViewModel.cs` and `windows/ViewModels/PurgeViewModel.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 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. 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 (7 lines × 2) macos/Sources/Components/ValueTile.swift:52— macos/Sources/Components/ValueTile.swift:52-58 | macos/Sources/Components/ValueTile.swift:74-80 — 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 `macos/Sources/Components/ValueTile.swift:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `9` in one and `3` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `macos/Sources/Components/ValueTile.swift:51` calls `GlassCard` and `macos/Sources/Components/ValueTile.swift:73` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) macos/Sources/MCP.swift:1201— macos/Sources/MCP.swift:1201-1207 | macos/Sources/MCP.swift:1321-1327 — 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 `macos/Sources/MCP.swift:1201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 4) macos/Sources/CleanView.swift:334— macos/Sources/CleanView.swift:334-339 | macos/Sources/CleanView.swift:352-357 | macos/Sources/SweepView.swift:274-279 | macos/Sources/TuneUpView.swift:590-595 — 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 `macos/Sources/CleanView.swift:334` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) macos/Sources/DupesView.swift:133— macos/Sources/DupesView.swift:133-138 | macos/Sources/NetView.swift:94-99 | macos/Sources/OrphansView.swift:129-134 | macos/Sources/PhotosView.swift:125-130 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:133` 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 (13 lines × 2 locations) windows/typescript/electron/main.ts:255— windows/typescript/electron/main.ts:255 · windows/typescript/electron/main.ts:343 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 2 locations) windows/typescript/src/components/ToolPages.tsx:1173— windows/typescript/src/components/ToolPages.tsx:1173 · windows/typescript/src/components/ToolPages.tsx:1703 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2 locations) windows/typescript/src/App.tsx:156— windows/typescript/src/App.tsx:156 · windows/typescript/src/components/ToolPages.tsx:333 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) windows/typescript/src/components/ToolPages.tsx:1590— windows/typescript/src/components/ToolPages.tsx:1590 · windows/typescript/src/components/ToolPages.tsx:1598 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Stateful shared instance: TrayHudViewModel windows/ViewModels/TrayHudViewModel.cs:8— `TrayHudViewModel` is not registered, but the singleton `TrayHudWindow` creates it and keeps it in `ViewModel`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (SampleText, HealthScore, HealthLabel, CpuText, MemoryText, DiskText; e.g. `SampleText` at line 61).
main.registerIPC (cyclomatic 55) windows/typescript/electron/main.ts:180— main.registerIPC has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 1 of the 55 points is its own statement and the rest belongs to 14 function literals inside it that branch (lines 192, 238, 182, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ToolPages.CleanupScan (cyclomatic 47) windows/typescript/src/components/ToolPages.tsx:404— ToolPages.CleanupScan has cyclomatic complexity 47 (threshold 15). Of this number, 29 points are the body's own statements and 18 belong to 8 function items inside it that branch. 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.
ToolPages.DuplicatesPage (cyclomatic 46) windows/typescript/src/components/ToolPages.tsx:908— ToolPages.DuplicatesPage has cyclomatic complexity 46 (threshold 15). Of this number, 20 points are the body's own statements and 26 belong to 9 function items inside it that branch. 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.
store.isSnapshot (cyclomatic 42) windows/typescript/electron/services/store.ts:149— store.isSnapshot has cyclomatic complexity 42 (threshold 15). Of this number, 32 points are the body's own statements and 10 belong to 3 function literals inside it that branch. 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.
MonitorPage.Overview (cyclomatic 36) windows/typescript/src/components/MonitorPage.tsx:118— MonitorPage.Overview has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 4 function literals 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.
App.App (cyclomatic 35) windows/typescript/src/App.tsx:40— App.App has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 13 of the 35 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 90, 48, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CleanList.fromEngineOutput (cyclomatic 34) macos/Sources/CleanList.swift:61— CleanList.fromEngineOutput has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperationFlow.start (cyclomatic 34) macos/Sources/OperationFlow.swift:244— OperationFlow.start has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SoftwareModel.engineUninstall (cyclomatic 33) macos/Sources/SoftwareView.swift:1353— SoftwareModel.engineUninstall 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.
ToolPages.AnalyzePage (cyclomatic 31) windows/typescript/src/components/ToolPages.tsx:681— ToolPages.AnalyzePage has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 768, a function literal at line 710, drill, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
UpdatesModel.checkNow (cyclomatic 30) macos/Sources/UpdatesView.swift:747— UpdatesModel.checkNow has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AppDelegate.startServices (cyclomatic 29) macos/Sources/AppDelegate.swift:220— AppDelegate.startServices has cyclomatic complexity 29 (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.
RecycleBinDeletionService.DeleteAsync (cyclomatic 28) windows/Services/RecycleBinDeletionService.cs:33— RecycleBinDeletionService.DeleteAsync has cyclomatic complexity 28 (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.
BurrowStreamReport.reduce (cyclomatic 26) macos/Sources/BurrowStreamReport.swift:57— BurrowStreamReport.reduce has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UpdateFailurePolicy.classify (cyclomatic 25) macos/Sources/UpdateCheck.swift:77— UpdateFailurePolicy.classify has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElectronReplacementInstaller.stage (cyclomatic 25) macos/Sources/UpdateWorkflow.swift:1157— ElectronReplacementInstaller.stage has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToolPages.NetworkPage (cyclomatic 25) windows/typescript/src/components/ToolPages.tsx:1512— ToolPages.NetworkPage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (lines, a function literal at line 1648, a function literal at line 1526, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Metric.value (cyclomatic 24) macos/Sources/MetricsStore.swift:72— Metric.value has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ElectronReplacementInstaller.parseSemanticVersion (cyclomatic 24) macos/Sources/UpdateWorkflow.swift:1075— ElectronReplacementInstaller.parseSemanticVersion has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HelperService.execute (cyclomatic 23) macos/HelperSources/HelperService.swift:621— HelperService.execute has cyclomatic complexity 23 (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.
BurrowStreamReport.reduceEnvelope (cyclomatic 23) macos/Sources/BurrowStreamReport.swift:179— BurrowStreamReport.reduceEnvelope 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.
SnapshotPatcher.patch (cyclomatic 22) macos/Sources/MetricsCore.swift:47— SnapshotPatcher.patch 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.
ScanService.duplicates (cyclomatic 22) windows/typescript/electron/services/scanner.ts:510— ScanService.duplicates has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CleanList.parse (cyclomatic 21) macos/Sources/CleanList.swift:124— CleanList.parse 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.
CrashReporter.scrubForTransport (cyclomatic 21) macos/Sources/CrashReporter.swift:428— CrashReporter.scrubForTransport 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.
SystemProcessPort.events (cyclomatic 21) macos/Sources/OperationFlow.swift:554— SystemProcessPort.events has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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.
ElectronReplacementInstaller.semanticVersionComparison (cyclomatic 21) macos/Sources/UpdateWorkflow.swift:1035— ElectronReplacementInstaller.semanticVersionComparison 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.
UpdatesModel.check (cyclomatic 21) macos/Sources/UpdatesView.swift:868— UpdatesModel.check 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.
HelperReviewedPathPolicy.validate (cyclomatic 21) macos/Sources/PrivilegedHelper/HelperContract.swift:570— HelperReviewedPathPolicy.validate 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.
RootView.body (cyclomatic 20) macos/Sources/RootView.swift:131— RootView.body has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HelperInvokingUserResolver.resolve (cyclomatic 20) macos/Sources/PrivilegedHelper/HelperContract.swift:357— HelperInvokingUserResolver.resolve has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
HelperRequest.validate (cyclomatic 20) macos/Sources/PrivilegedHelper/HelperContract.swift:701— HelperRequest.validate has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TelemetryService.collect (cyclomatic 20) windows/typescript/electron/services/telemetry.ts:31— TelemetryService.collect has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 3 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.
PortEnumerator.connections (cyclomatic 19) macos/Sources/PortEnumerator.swift:28— PortEnumerator.connections has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ElectronUpdateDescriptor.parse (cyclomatic 19) macos/Sources/UpdateWorkflow.swift:249— ElectronUpdateDescriptor.parse has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ElectronReplacementInstaller.restoreVerifiedBackup (cyclomatic 19) macos/Sources/UpdateWorkflow.swift:835— ElectronReplacementInstaller.restoreVerifiedBackup has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
scanner.validateRoot (cyclomatic 19) windows/typescript/electron/services/scanner.ts:698— scanner.validateRoot has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
recycle.recycleReviewed (cyclomatic 19) windows/typescript/electron/services/recycle.ts:14— recycle.recycleReviewed has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LocalMcpServerService.EvaluateRequest (cyclomatic 18) windows/Services/LocalMcpServerService.cs:1400— LocalMcpServerService.EvaluateRequest has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: LocalMcpServerService.HandleRequestAsync (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CleanupSnapshot.capture (cyclomatic 18) macos/Sources/CleanupAuthorization.swift:246— CleanupSnapshot.capture has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HelperExecutableSnapshot.prepare (cyclomatic 18) macos/Sources/PrivilegedHelper/HelperCodeRequirement.swift:198— HelperExecutableSnapshot.prepare has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ToolPages.ScanControls (cyclomatic 18) windows/typescript/src/components/ToolPages.tsx:205— ToolPages.ScanControls has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ToolPages.ConnectivityPage (cyclomatic 18) windows/typescript/src/components/ToolPages.tsx:1701— ToolPages.ConnectivityPage has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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.
CleanupExecutor.moveToTrash (cyclomatic 17) macos/Sources/CleanupAuthorization.swift:344— CleanupExecutor.moveToTrash 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.
ToolCatalog.descendAnalyze (cyclomatic 17) macos/Sources/MCP.swift:1245— ToolCatalog.descendAnalyze has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ToolCatalog.dispatch (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
UninstallPreview.fromEngineEnvelope (cyclomatic 17) macos/Sources/UninstallPreview.swift:169— UninstallPreview.fromEngineEnvelope 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.
upstream_watch.do_releases (cyclomatic 17) .github/scripts/upstream_watch.py:163— upstream_watch.do_releases 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.
ToolPages.AppsPage (cyclomatic 17) windows/typescript/src/components/ToolPages.tsx:1169— ToolPages.AppsPage has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1200, a function literal at line 1268, refresh, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
WindowsPathSafetyPolicy.Validate (cyclomatic 16) windows/Services/WindowsPathSafetyPolicy.cs:70— WindowsPathSafetyPolicy.Validate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AnalyzeModel.scanWithProgress (cyclomatic 16) macos/Sources/AnalyzeView.swift:614— AnalyzeModel.scanWithProgress has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Connectivity.probeAll (cyclomatic 16) macos/Sources/Connectivity.swift:113— Connectivity.probeAll has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ToolCatalog.execute (cyclomatic 16) macos/Sources/MCP.swift:1045— ToolCatalog.execute has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ToolCatalog.dispatch (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ValidatedElevatedCommand.prepare (cyclomatic 16) macos/Sources/PrivilegedExecution.swift:181— ValidatedElevatedCommand.prepare has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UninstallGuard.identityProblem (cyclomatic 16) macos/Sources/UninstallGuard.swift:396— UninstallGuard.identityProblem has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UninstallPreview.classify (cyclomatic 16) macos/Sources/UninstallPreview.swift:138— UninstallPreview.classify has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UpdatesModel.performUpdate (cyclomatic 16) macos/Sources/UpdatesView.swift:1090— UpdatesModel.performUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mcp-conformance.run_checks (cyclomatic 16) macos/scripts/mcp-conformance.py:125— mcp-conformance.run_checks has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScanService.scan (cyclomatic 16) windows/typescript/electron/services/scanner.ts:67— ScanService.scan has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
ScanService.purge (cyclomatic 16) windows/typescript/electron/services/scanner.ts:449— ScanService.purge has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToolPages.DuplicatesPage (cognitive 65) windows/typescript/src/components/ToolPages.tsx:908— ToolPages.DuplicatesPage has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 14 (33 pts), boolean chains 17, if/else 4 (7 pts), loops 5 (7 pts), error handling 1 (nesting depth added 24). Of this number, 28 points are the body's own statements and 37 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperationFlow.start (cognitive 62) macos/Sources/OperationFlow.swift:244— OperationFlow.start has cognitive complexity 62 (threshold 15). Drivers by points: if/else 22 (44 pts), boolean chains 6, ternaries 2 (6 pts), match/switch 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolPages.CleanupScan (cognitive 62) windows/typescript/src/components/ToolPages.tsx:404— ToolPages.CleanupScan has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 16 (35 pts), boolean chains 15, if/else 7 (10 pts), error handling 1, loops 1 (nesting depth added 22). Of this number, 35 points are the body's own statements and 27 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CleanList.fromEngineOutput (cognitive 56) macos/Sources/CleanList.swift:61— CleanList.fromEngineOutput has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 13, ternaries 3 (9 pts), loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 23). Of this number, 51 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.registerIPC (cognitive 51) windows/typescript/electron/main.ts:180— main.registerIPC has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (26 pts), ternaries 9 (12 pts), boolean chains 9, error handling 2, loops 2 (nesting depth added 6). None of this is in the body itself: all 51 points belong to 14 function literals inside it that branch (lines 238, 360, 228, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
BurrowStreamReport.reduce (cognitive 46) macos/Sources/BurrowStreamReport.swift:57— BurrowStreamReport.reduce has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (37 pts), ternaries 1 (5 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 24). Of this number, 44 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PortEnumerator.connections (cognitive 46) macos/Sources/PortEnumerator.swift:28— PortEnumerator.connections has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SystemProcessPort.events (cognitive 41) macos/Sources/OperationFlow.swift:554— SystemProcessPort.events has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 3 (5 pts), error handling 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 20). Of this number, 38 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftwareModel.engineUninstall (cognitive 41) macos/Sources/SoftwareView.swift:1353— SoftwareModel.engineUninstall has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 7, ternaries 5 (7 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpdatesModel.checkNow (cognitive 41) macos/Sources/UpdatesView.swift:747— UpdatesModel.checkNow has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 6, loops 4, ternaries 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MonitorPage.Overview (cognitive 41) windows/typescript/src/components/MonitorPage.tsx:118— MonitorPage.Overview has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 24 (32 pts), boolean chains 9 (nesting depth added 8). Of this number, 36 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BurrowStreamReport.reduceEnvelope (cognitive 38) macos/Sources/BurrowStreamReport.swift:179— BurrowStreamReport.reduceEnvelope has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 6 (11 pts), loops 6 (9 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppDelegate.startServices (cognitive 35) macos/Sources/AppDelegate.swift:220— AppDelegate.startServices has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 15, 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.
ToolPages.NetworkPage (cognitive 35) windows/typescript/src/components/ToolPages.tsx:1512— ToolPages.NetworkPage has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 6 (9 pts), boolean chains 8, loops 1 (nesting depth added 10). Most of this is not in the body itself: 15 of the 35 points are its own statements and the rest belongs to 7 function items inside it that branch (lines, a function literal at line 1648, a function literal at line 1526, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ElectronReplacementInstaller.semanticVersionComparison (cognitive 34) macos/Sources/UpdateWorkflow.swift:1035— ElectronReplacementInstaller.semanticVersionComparison has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 6 (20 pts), if/else 3 (6 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElectronReplacementInstaller.parseSemanticVersion (cognitive 34) macos/Sources/UpdateWorkflow.swift:1075— ElectronReplacementInstaller.parseSemanticVersion has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 12, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElectronReplacementInstaller.stage (cognitive 34) macos/Sources/UpdateWorkflow.swift:1157— ElectronReplacementInstaller.stage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 5, error handling 4, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolPages.AnalyzePage (cognitive 34) windows/typescript/src/components/ToolPages.tsx:681— ToolPages.AnalyzePage has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (15 pts), boolean chains 13, if/else 5, error handling 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 768, a function literal at line 710, drill, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
App.App (cognitive 33) windows/typescript/src/App.tsx:40— App.App has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 14, ternaries 9 (11 pts), if/else 7 (8 pts) (nesting depth added 3). Most of this is not in the body itself: 12 of the 33 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 90, 48, 157, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
UpdatesModel.check (cognitive 32) macos/Sources/UpdatesView.swift:868— UpdatesModel.check has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 3 (9 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CleanList.parse (cognitive 30) macos/Sources/CleanList.swift:124— CleanList.parse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 9, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
upstream_watch.do_releases (cognitive 30) .github/scripts/upstream_watch.py:163— upstream_watch.do_releases has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 7, error handling 2 (5 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecycleBinDeletionService.DeleteAsync (cognitive 29) windows/Services/RecycleBinDeletionService.cs:33— RecycleBinDeletionService.DeleteAsync has cognitive complexity 29 (threshold 15). 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.
HelperService.execute (cognitive 29) macos/HelperSources/HelperService.swift:621— HelperService.execute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (21 pts), match/switch 2 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 7). 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.
AnalyzeModel.scanWithProgress (cognitive 28) macos/Sources/AnalyzeView.swift:614— AnalyzeModel.scanWithProgress has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4, ternaries 1 (4 pts), loops 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.
UpdateFailurePolicy.classify (cognitive 28) macos/Sources/UpdateCheck.swift:77— UpdateFailurePolicy.classify has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (12 pts), ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HelperReviewedPathPolicy.validate (cognitive 28) macos/Sources/PrivilegedHelper/HelperContract.swift:570— HelperReviewedPathPolicy.validate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 8, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
recycle.recycleReviewed (cognitive 28) windows/typescript/electron/services/recycle.ts:14— recycle.recycleReviewed has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 5 (8 pts), error handling 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CrashReporter.scrubForTransport (cognitive 26) macos/Sources/CrashReporter.swift:428— CrashReporter.scrubForTransport has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SnapshotPatcher.patch (cognitive 26) macos/Sources/MetricsCore.swift:47— SnapshotPatcher.patch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 11 (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.
ToolCatalog.descendAnalyze (cognitive 25) macos/Sources/MCP.swift:1245— ToolCatalog.descendAnalyze has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UninstallGuard.identityProblem (cognitive 25) macos/Sources/UninstallGuard.swift:396— UninstallGuard.identityProblem has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HelperRequest.validate (cognitive 25) macos/Sources/PrivilegedHelper/HelperContract.swift:701— HelperRequest.validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 10 (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.
ScanService.duplicates (cognitive 25) windows/typescript/electron/services/scanner.ts:510— ScanService.duplicates has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 5 (9 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ScanService.duplicates::walk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CleanupSnapshot.capture (cognitive 24) macos/Sources/CleanupAuthorization.swift:246— CleanupSnapshot.capture has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, 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.
ToolPages.AppsPage (cognitive 24) windows/typescript/src/components/ToolPages.tsx:1169— ToolPages.AppsPage has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9 (17 pts), boolean chains 5, error handling 2 (nesting depth added 8). Of this number, 12 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CleanupExecutor.moveToTrash (cognitive 23) macos/Sources/CleanupAuthorization.swift:344— CleanupExecutor.moveToTrash has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 8, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MoActions.decide (cognitive 23) macos/Sources/MoActions.swift:317— MoActions.decide has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SystemProcessPort.drain (cognitive 23) macos/Sources/OperationFlow.swift:830— SystemProcessPort.drain has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RootView.body (cognitive 23) macos/Sources/RootView.swift:131— RootView.body has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 9, boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
UpdatesModel.performUpdate (cognitive 22) macos/Sources/UpdatesView.swift:1090— UpdatesModel.performUpdate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScanService.duplicates::walk (cognitive 22) windows/typescript/electron/services/scanner.ts:513— ScanService.duplicates::walk has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ScanService.duplicates) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SettingsView.liveMenuBarValues (cognitive 21) macos/Sources/SettingsView.swift:1191— SettingsView.liveMenuBarValues has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 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.
ElectronUpdateDescriptor.parse (cognitive 21) macos/Sources/UpdateWorkflow.swift:249— ElectronUpdateDescriptor.parse has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (10 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ElectronReplacementInstaller.restoreVerifiedBackup (cognitive 21) macos/Sources/UpdateWorkflow.swift:835— ElectronReplacementInstaller.restoreVerifiedBackup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, error handling 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ScanService.purge (cognitive 21) windows/typescript/electron/services/scanner.ts:449— ScanService.purge has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnalyzeModel.scanStreaming (cognitive 20) macos/Sources/AnalyzeView.swift:551— AnalyzeModel.scanStreaming has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OptimizeView.body (cognitive 20) macos/Sources/OptimizeView.swift:26— OptimizeView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 8). 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.
StatusBarController.currentValues (cognitive 20) macos/Sources/StatusBarController.swift:165— StatusBarController.currentValues has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 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.
UninstallPreview.parse (cognitive 20) macos/Sources/UninstallPreview.swift:107— UninstallPreview.parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UninstallPreview.fromEngineEnvelope (cognitive 20) macos/Sources/UninstallPreview.swift:169— UninstallPreview.fromEngineEnvelope has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HelperExecutableSnapshot.prepare (cognitive 20) macos/Sources/PrivilegedHelper/HelperCodeRequirement.swift:198— HelperExecutableSnapshot.prepare has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AppDelegate.applyMenuBarVisibility (cognitive 19) macos/Sources/AppDelegate.swift:566— AppDelegate.applyMenuBarVisibility has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (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.
ValidatedElevatedCommand.prepare (cognitive 19) macos/Sources/PrivilegedExecution.swift:181— ValidatedElevatedCommand.prepare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 2, 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.
ToolCatalog.execute (cognitive 18) macos/Sources/MCP.swift:1045— ToolCatalog.execute has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (6 pts), match/switch 2 (5 pts), if/else 3 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PopupView.body (cognitive 18) macos/Sources/PopupView.swift:56— PopupView.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElectronReplacementInstaller.numericVersionComparison (cognitive 18) macos/Sources/UpdateWorkflow.swift:1122— ElectronReplacementInstaller.numericVersionComparison has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 5). Of this number, 11 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskReport.swift.parseTaskReport (cognitive 18) macos/Sources/TaskReport.swift:166— TaskReport.swift.parseTaskReport has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1, 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.
TelemetryService.collect (cognitive 18) windows/typescript/electron/services/telemetry.ts:31— TelemetryService.collect has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, ternaries 6, if/else 3, error handling 2. Of this number, 10 points are the body's own statements and 8 belong to 3 function items inside it that branch. 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.
ScanService.scan (cognitive 18) windows/typescript/electron/services/scanner.ts:67— ScanService.scan has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, ternaries 2, error handling 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
CleanView.body (cognitive 17) macos/Sources/CleanView.swift:65— CleanView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProcessInspectorView.securitySection (cognitive 17) macos/Sources/ProcessInspectorView.swift:140— ProcessInspectorView.securitySection has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UninstallGuard.abortReason (cognitive 17) macos/Sources/UninstallGuard.swift:309— UninstallGuard.abortReason has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpdatesView.appsList (cognitive 17) macos/Sources/UpdatesView.swift:258— UpdatesView.appsList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeeklyReport.markdown (cognitive 17) macos/Sources/WeeklyReport.swift:28— WeeklyReport.markdown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, loops 3 (6 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
mcp-conformance.run_checks (cognitive 17) macos/scripts/mcp-conformance.py:125— mcp-conformance.run_checks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LocalMcpServerService.EvaluateRequest (cognitive 16) windows/Services/LocalMcpServerService.cs:1400— LocalMcpServerService.EvaluateRequest has cognitive complexity 16 (threshold 15). 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.
Connectivity.probeAll (cognitive 16) macos/Sources/Connectivity.swift:113— Connectivity.probeAll has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, if/else 6, 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.
HelperAwareProcessPort.events (cognitive 16) macos/Sources/PrivilegedHelperClient.swift:453— HelperAwareProcessPort.events has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SoftwareModel.confirmCopy (cognitive 16) macos/Sources/SoftwareView.swift:1083— SoftwareModel.confirmCopy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 pts), boolean chains 2 (nesting depth added 2). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
AppIcon.resolve (cognitive 16) macos/Sources/StatusView.swift:930— AppIcon.resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), 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.
HelperInvokingUserResolver.resolve (cognitive 16) macos/Sources/PrivilegedHelper/HelperContract.swift:357— HelperInvokingUserResolver.resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 7, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScanService.revalidateCandidate (cognitive 16) windows/typescript/electron/services/scanner.ts:192— ScanService.revalidateCandidate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, error handling 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScanService.measure (cognitive 16) windows/typescript/electron/services/scanner.ts:336— ScanService.measure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling: CleanView.swift ↔ OptimizeView.swift macos/Sources/CleanView.swift:1— `macos/Sources/CleanView.swift` and `macos/Sources/OptimizeView.swift` change together 86% of the time (12 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `349d638f` feat(notifications): completion notices + opt-in smart reminders (at that commit the files were still `Sources/CleanView.swift` and `Sources/OptimizeView.swift`); `85f94253` actions(#51): one gated actions core — pure decide() gate, ticket min… (at that commit the files were still `Sources/CleanView.swift` and `Sources/OptimizeView.swift`); `d95738be` fix(fda): ad-hoc sign releases so Full Disk Access grants take effect (at that commit the files were still `Sources/CleanView.swift` and `Sources/OptimizeView.swift`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) macos/Sources/DB.swift:322— macos/Sources/DB.swift:322-341 | macos/Sources/DB.swift:352-383 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) macos/Sources/DupesView.swift:124— macos/Sources/DupesView.swift:124-141 | macos/Sources/DupesView.swift:165-173 | macos/Sources/NetView.swift:85-102 | macos/Sources/NetView.swift:122-130 | macos/Sources/OrphansView.swift:115-138 | macos/Sources/OrphansView.swift:175-183 | macos/Sources/PhotosView.swift:116-133 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) macos/Sources/CleanHub.swift:84— macos/Sources/CleanHub.swift:84-101 | macos/Sources/DupesView.swift:177-207 | macos/Sources/OrphansView.swift:187-210 | macos/Sources/PhotosView.swift:176-208 | macos/Sources/RestoreView.swift:26-67 | macos/Sources/TuneUpView.swift:512-574 — 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) macos/Sources/DupesView.swift:124— macos/Sources/DupesView.swift:124-141 | macos/Sources/NetView.swift:85-102 | macos/Sources/OrphansView.swift:115-138 | macos/Sources/PhotosView.swift:116-133 | macos/Sources/SweepView.swift:194-246 — 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· Edited copy of a member (54 corresponding lines) · ×1
Edited copy of a member (54 corresponding lines) macos/Sources/CleanReviewView.swift:110— macos/Sources/CleanReviewView.swift:110-165 | macos/Sources/DupesView.swift:209-262 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) macos/Sources/HistoryView.swift:652— macos/Sources/HistoryView.swift:652-698 | macos/Sources/SpikeView.swift:57-111 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) macos/Sources/SettingsView.swift:1191— macos/Sources/SettingsView.swift:1191-1213 | macos/Sources/StatusBarController.swift:165-196 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) macos/Sources/Components/MiniChart.swift:55— macos/Sources/Components/MiniChart.swift:55-80 | macos/Sources/Components/MiniChart.swift:137-164 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (66 corresponding lines) · ×1
Edited copy of a member (66 corresponding lines) windows/ViewModels/InstallerViewModel.cs:143— windows/ViewModels/InstallerViewModel.cs:143-208 | windows/ViewModels/PurgeViewModel.cs:144-209 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) macos/Sources/CleanView.swift:427— macos/Sources/CleanView.swift:427-455 | macos/Sources/SweepView.swift:285-315 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) windows/ViewModels/InstallerViewModel.cs:67— windows/ViewModels/InstallerViewModel.cs:67-134 | windows/ViewModels/PurgeViewModel.cs:67-135 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) windows/Services/JsonOperationHistoryService.cs:55— windows/Services/JsonOperationHistoryService.cs:55-104 | windows/Services/JsonSystemTelemetryHistoryService.cs:72-121 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) macos/Sources/HistoryView.swift:358— macos/Sources/HistoryView.swift:358-374 | macos/Sources/HistoryView.swift:706-722 | macos/Sources/HomeView.swift:59-77 | macos/Sources/SettingsView.swift:227-246 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) macos/Sources/SnapshotProducer.swift:543— macos/Sources/SnapshotProducer.swift:543-563 | macos/Sources/SnapshotProducer.swift:600-620 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) windows/Services/LocalMcpServerService.cs:651— windows/Services/LocalMcpServerService.cs:651-682 | windows/Services/LocalMcpServerService.cs:685-716 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) macos/Sources/MCPServer.swift:396— macos/Sources/MCPServer.swift:396-407 | macos/Sources/MCPServer.swift:409-419 | macos/Sources/MCPServer.swift:474-485 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) macos/Sources/DB.swift:270— macos/Sources/DB.swift:270-285 | macos/Sources/DB.swift:404-419 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) windows/Services/InstallerCleanupService.cs:231— windows/Services/InstallerCleanupService.cs:231-255 | windows/Services/PurgeArtifactService.cs:456-481 | windows/Services/WindowsInstalledApplicationService.cs:421-447 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) macos/Sources/DupesView.swift:452— macos/Sources/DupesView.swift:452-462 | macos/Sources/NetView.swift:207-216 | macos/Sources/OrphansView.swift:302-311 | macos/Sources/PhotosView.swift:336-345 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) windows/Services/JsonDeletionReceiptStore.cs:31— windows/Services/JsonDeletionReceiptStore.cs:31-48 | windows/Services/JsonOperationHistoryService.cs:31-50 | windows/Services/JsonSystemTelemetryHistoryService.cs:48-67 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) windows/Services/WindowsInstalledApplicationService.cs:627— windows/Services/WindowsInstalledApplicationService.cs:627-649 | windows/Services/WindowsPathSafetyPolicy.cs:227-244 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) windows/Services/LocalMcpServerService.cs:840— windows/Services/LocalMcpServerService.cs:840-858 | windows/Services/LocalMcpServerService.cs:866-884 | windows/Services/LocalMcpServerService.cs:892-910 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) macos/Sources/ActivityView.swift:19— macos/Sources/ActivityView.swift:19-31 | macos/Sources/HomeView.swift:36-49 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) macos/Sources/MCPServer.swift:169— macos/Sources/MCPServer.swift:169-175 | macos/Sources/MCPServer.swift:177-184 | macos/Sources/MCPServer.swift:322-329 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) macos/Sources/MoInteractive.swift:118— macos/Sources/MoInteractive.swift:118-120 | macos/Sources/SelectionSession.swift:81-81 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) windows/Pages/AnalyzePage.xaml.cs:16— windows/Pages/AnalyzePage.xaml.cs:16-21 | windows/Pages/CleanupPage.xaml.cs:14-19 | windows/Pages/InstallerPage.xaml.cs:14-19 | windows/Pages/OptimizePage.xaml.cs:14-19 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (35 lines × 2) windows/Services/JsonOperationHistoryService.cs:56— windows/Services/JsonOperationHistoryService.cs:56-90 | windows/Services/JsonSystemTelemetryHistoryService.cs:73-107 — 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 `windows/Services/JsonOperationHistoryService.cs: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 (43 lines × 3) macos/Sources/DupesView.swift:64— macos/Sources/DupesView.swift:64-106 | macos/Sources/OrphansView.swift:55-97 | macos/Sources/PhotosView.swift:56-98 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/OrphansView.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:64` 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 (13–14 lines × 2) windows/Services/JsonOperationHistoryService.cs:31— windows/Services/JsonOperationHistoryService.cs:31-44 | windows/Services/JsonSystemTelemetryHistoryService.cs:48-60 — 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 `windows/Services/JsonOperationHistoryService.cs:31` 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, `windows/Services/JsonSystemTelemetryHistoryService.cs:61` calls `PruneAsync`, `ConfigureAwait` and `windows/Services/JsonOperationHistoryService.cs:45` 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 (13 lines × 4) macos/Sources/AnalyzeView.swift:158— macos/Sources/AnalyzeView.swift:158-170 | macos/Sources/DupesView.swift:74-86 | macos/Sources/OrphansView.swift:65-77 | macos/Sources/PhotosView.swift:66-78 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/OrphansView.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 4) macos/Sources/DupesView.swift:29— macos/Sources/DupesView.swift:29-40 | macos/Sources/NetView.swift:27-38 | macos/Sources/OrphansView.swift:27-38 | macos/Sources/PhotosView.swift:28-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:29` 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 × 3) macos/Sources/DupesView.swift:149— macos/Sources/DupesView.swift:149-159 | macos/Sources/OrphansView.swift:159-169 | macos/Sources/PhotosView.swift:141-151 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/OrphansView.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:149` 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–11 lines × 3) macos/Sources/HistoryView.swift:365— macos/Sources/HistoryView.swift:365-374 | macos/Sources/HistoryView.swift:713-722 | macos/Sources/HomeView.swift:67-77 — 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 `macos/Sources/HistoryView.swift:365` 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–10 lines × 2) macos/Sources/MCP.swift:616— macos/Sources/MCP.swift:616-625 | macos/Sources/MCP.swift:701-708 — 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 (17 lines × 2) macos/Sources/SettingsView.swift:1194— macos/Sources/SettingsView.swift:1194-1210 | macos/Sources/StatusBarController.swift:168-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7–8 lines × 2) macos/Sources/ActivityView.swift:19— macos/Sources/ActivityView.swift:19-25 | macos/Sources/HomeView.swift:36-43 — 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 `macos/Sources/ActivityView.swift:19` 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 (1–8 lines × 6) macos/Sources/CleanHub.swift:89— macos/Sources/CleanHub.swift:89-89 | macos/Sources/DupesView.swift:182-189 | macos/Sources/OrphansView.swift:192-199 | macos/Sources/PhotosView.swift:178-181 | macos/Sources/RestoreView.swift:29-31 | macos/Sources/TuneUpView.swift:518-520 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/OrphansView.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `alignment` to `.firstTextBaseline` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `macos/Sources/DupesView.swift:180` calls `VStack`, `Text`, `NSLocalizedString` and `macos/Sources/PhotosView.swift:178` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (3–7 lines × 3) macos/Sources/PopupView.swift:445— macos/Sources/PopupView.swift:445-447 | macos/Sources/StatusView.swift:427-433 | macos/Sources/StatusView.swift:444-450 — 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 `macos/Sources/PopupView.swift:445` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `macos/Sources/PopupView.swift:447` calls `glyph` and `macos/Sources/StatusView.swift:433` 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 × 4) macos/Sources/AnalyzeView.swift:148— macos/Sources/AnalyzeView.swift:148-157 | macos/Sources/DupesView.swift:59-68 | macos/Sources/OrphansView.swift:50-59 | macos/Sources/PhotosView.swift:51-60 — before extracting anything, compare `macos/Sources/DupesView.swift` and `macos/Sources/OrphansView.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/AnalyzeView.swift:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `8` in one and `0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 4) macos/Sources/DupesView.swift:143— macos/Sources/DupesView.swift:143-147 | macos/Sources/NetView.swift:104-108 | macos/Sources/OrphansView.swift:153-157 | macos/Sources/PhotosView.swift:135-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:143` 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 (3–5 lines × 7) macos/Sources/DupesView.swift:127— macos/Sources/DupesView.swift:127-129 | macos/Sources/DupesView.swift:169-173 | macos/Sources/NetView.swift:88-90 | macos/Sources/NetView.swift:126-130 | macos/Sources/OrphansView.swift:118-120 | macos/Sources/OrphansView.swift:179-183 | macos/Sources/PhotosView.swift:119-121 — there are 7 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/DupesView.swift:169` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `macos/Sources/DupesView.swift:169` calls `font`, `serif`, `foregroundStyle` and `macos/Sources/DupesView.swift:127` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (4–5 lines × 3) macos/Sources/Components/ShortcutRecorder.swift:50— macos/Sources/Components/ShortcutRecorder.swift:50-54 | macos/Sources/SoftwareView.swift:516-520 | macos/Sources/SoftwareView.swift:1767-1770 — 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 `macos/Sources/Components/ShortcutRecorder.swift:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `macos/Sources/SoftwareView.swift:516` calls `buttonStyle` and `macos/Sources/SoftwareView.swift:1767` 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 (4–5 lines × 4) macos/Sources/ProcessInspectorView.swift:90— macos/Sources/ProcessInspectorView.swift:90-93 | macos/Sources/ProcessTreeView.swift:36-40 | macos/Sources/SettingsView.swift:1271-1275 | macos/Sources/StatusView.swift:657-663 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `macos/Sources/ProcessInspectorView.swift:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) macos/Sources/CleanView.swift:460— macos/Sources/CleanView.swift:460-470 | macos/Sources/SweepView.swift:317-327 — 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.
Low cohesion: AppUpdate (LCOM4 6) macos/Sources/UpdateCheck.swift:193— AppUpdate's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Coverage not measured — .NET and JavaScript/TypeScript suite — Coverage NOT MEASURED: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — windows/typescript/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
Duplicated block (23 lines × 2 locations) windows/typescript/src/components/ToolPages.tsx:601— windows/typescript/src/components/ToolPages.tsx:601 · windows/typescript/src/components/ToolPages.tsx:1122 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (16 lines × 2 locations) windows/typescript/src/components/ToolPages.tsx:1208— windows/typescript/src/components/ToolPages.tsx:1208 · windows/typescript/src/components/ToolPages.tsx:1429 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 3 locations) windows/typescript/src/components/ToolPages.tsx:579— windows/typescript/src/components/ToolPages.tsx:579 · windows/typescript/src/components/ToolPages.tsx:1282 · windows/typescript/src/components/ToolPages.tsx:1486 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 3 locations) windows/typescript/src/components/ToolPages.tsx:1102— windows/typescript/src/components/ToolPages.tsx:1102 · windows/typescript/src/components/ToolPages.tsx:1287 · windows/typescript/src/components/ToolPages.tsx:1491 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) windows/typescript/src/components/ToolPages.tsx:1254— windows/typescript/src/components/ToolPages.tsx:1254 · windows/typescript/src/components/ToolPages.tsx:1456 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 3 locations) windows/typescript/src/components/MonitorPage.tsx:426— windows/typescript/src/components/MonitorPage.tsx:426 · windows/typescript/src/components/MonitorPage.tsx:522 · windows/typescript/src/components/MonitorPage.tsx:579 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) windows/typescript/src/components/ToolPages.tsx:1393— windows/typescript/src/components/ToolPages.tsx:1393 · windows/typescript/src/components/ToolPages.tsx:1692 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) windows/typescript/src/components/ToolPages.tsx:530— windows/typescript/src/components/ToolPages.tsx:530 · windows/typescript/src/components/ToolPages.tsx:832 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 4 locations) windows/typescript/src/components/MonitorPage.tsx:428— windows/typescript/src/components/MonitorPage.tsx:428 · windows/typescript/src/components/MonitorPage.tsx:524 · windows/typescript/src/components/MonitorPage.tsx:581 · windows/typescript/src/components/SettingsPage.tsx:47 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication· Duplicated block with local edits (5 matched lines × 2 locations) · ×1
Duplicated block with local edits (5 matched lines × 2 locations) windows/typescript/electron/main.ts:228— windows/typescript/electron/main.ts:228 · windows/typescript/electron/services/scanner.ts:67 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function Overview (cyclomatic 31, cognitive 29) windows/typescript/src/components/MonitorPage.tsx:118— Overview has cyclomatic complexity 31 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function CleanupScan (cyclomatic 29, cognitive 27) windows/typescript/src/components/ToolPages.tsx:404— CleanupScan has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function isSnapshot (cyclomatic 27, cognitive 12) windows/typescript/electron/services/store.ts:149— isSnapshot has cyclomatic complexity 27 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function recycleReviewed (cyclomatic 20, cognitive 29) windows/typescript/electron/services/recycle.ts:14— recycleReviewed has cyclomatic complexity 20 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function DuplicatesPage (cyclomatic 20, cognitive 18) windows/typescript/src/components/ToolPages.tsx:908— DuplicatesPage has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function validateRoot (cyclomatic 19, cognitive 15) windows/typescript/electron/services/scanner.ts:698— validateRoot has cyclomatic complexity 19 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function ScanControls (cyclomatic 18, cognitive 15) windows/typescript/src/components/ToolPages.tsx:205— ScanControls has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function purge (cyclomatic 15, cognitive 20) windows/typescript/electron/services/scanner.ts:449— purge has cyclomatic complexity 15 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function scan (cyclomatic 15, cognitive 17) windows/typescript/electron/services/scanner.ts:67— scan has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function measure (cyclomatic 14, cognitive 16) windows/typescript/electron/services/scanner.ts:336— measure has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function collect (cyclomatic 14, cognitive 13) windows/typescript/electron/services/telemetry.ts:31— collect has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 13, cognitive 23) windows/typescript/electron/services/scanner.ts:513— (anonymous) has cyclomatic complexity 13 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function revalidateCandidate (cyclomatic 13, cognitive 16) windows/typescript/electron/services/scanner.ts:192— revalidateCandidate has cyclomatic complexity 13 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function App (cyclomatic 13, cognitive 12) windows/typescript/src/App.tsx:40— App has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function MigrationPage (cyclomatic 13, cognitive 12) windows/typescript/src/components/ToolPages.tsx:1807— MigrationPage has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function recycle (cyclomatic 13, cognitive 10) windows/typescript/src/components/ToolPages.tsx:370— recycle has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function ConnectivityPage (cyclomatic 13, cognitive 10) windows/typescript/src/components/ToolPages.tsx:1701— ConnectivityPage has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function duplicates (cyclomatic 12, cognitive 26) windows/typescript/electron/services/scanner.ts:510— duplicates has cyclomatic complexity 12 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function artifactCategory (cyclomatic 12, cognitive 11) windows/typescript/electron/services/scanner.ts:624— artifactCategory has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function assertUnprotected (cyclomatic 11, cognitive 11) windows/typescript/electron/services/scanner.ts:668— assertUnprotected has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function NetworkPage (cyclomatic 11, cognitive 10) windows/typescript/src/components/ToolPages.tsx:1512— NetworkPage has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· windows/typescript/src/components/ToolPages.tsx · ×1
windows/typescript/src/components/ToolPages.tsx: 1849 lines of code windows/typescript/src/components/ToolPages.tsx:1— windows/typescript/src/components/ToolPages.tsx has 1849 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· windows/typescript/src/components/MonitorPage.tsx · ×1
windows/typescript/src/components/MonitorPage.tsx: 745 lines of code windows/typescript/src/components/MonitorPage.tsx:1— windows/typescript/src/components/MonitorPage.tsx has 745 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· windows/typescript/electron/services/scanner.ts · ×1
windows/typescript/electron/services/scanner.ts: 727 lines of code windows/typescript/electron/services/scanner.ts:1— windows/typescript/electron/services/scanner.ts has 727 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· windows/typescript/electron/main.ts · ×1
windows/typescript/electron/main.ts: 543 lines of code windows/typescript/electron/main.ts:1— windows/typescript/electron/main.ts has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×1
NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Silent fallback default in catch windows/Services/DiskAnalyzerService.cs:119— `SafeEnumerateFiles` swallows every exception into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/DiskAnalyzerService.cs:131— `SafeEnumerateDirectories` swallows every exception into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/LocalMcpServerService.cs:165— `ApplyHttpSettingsAsync` swallows every exception and sets `_activeHttpEnabled = false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/PurgeArtifactService.cs:281— `ReadConfiguredSearchRoots` swallows `Exception` into `return Array.Empty<string>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/PurgeArtifactService.cs:445— `IsReparsePoint` swallows `Exception` into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/PurgeArtifactService.cs:632— `HasAnyFile` swallows `Exception` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/SystemMoleEngineProbe.cs:75— `FindOnPath` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/WindowsFileSystemInspector.cs:26— `Inspect` swallows `Exception` into `return FileSystemEntryInfo.Missing;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/WindowsInstalledApplicationService.cs:377— `TryMeasureDirectory` swallows every exception into `return 0;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/WindowsSystemTelemetryService.cs:231— `GetPrimaryIPv4Address` swallows every exception into `return "unavailable";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Services/WindowsSystemTelemetryService.cs:301— `TryReadProcessSample` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/ViewModels/AnalyzeViewModel.cs:259— `BuildBreadcrumbText` swallows every exception into `return "Home";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Tools/MoShim/Program.cs:121— `FindOnPath` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch macos/Sources/MCP.swift:796— `ids` (in `callDiff`) turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch macos/Sources/MoleWhitelist.swift:56— `patterns` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch macos/Sources/ProcessExport.swift:25— `json` turns every thrown error into `"[]"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch macos/Sources/StartupInventory.swift:90— `disabledLabels` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch macos/Sources/StartupInventory.swift:127— `run` turns every thrown error into `-1` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch macos/Sources/StartupInventory.swift:161— `scan` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch macos/Sources/StartupInventory.swift:238— `loginItemsDump` turns every thrown error into `""` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Duplicated predicate windows/Services/InstallerCleanupService.cs:259— `!safety.IsSafe || safety.CanonicalPath is null` appears character-identically in 2 files — windows/Services/InstallerCleanupService.cs, windows/Services/WindowsInstalledApplicationService.cs. 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 windows/Pages/AnalyzePage.xaml.cs:35— `!string.Equals(autoScan, "1", StringComparison.OrdinalIgnoreCase) && !string.Equals(autoScan, "true", StringComparison.OrdinalIgnoreCase)` appears character-identically in 3 files — windows/Pages/AnalyzePage.xaml.cs, windows/Pages/CleanupPage.xaml.cs, windows/Pages/InstallerPage.xaml.cs. 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 windows/ViewModels/InstallerViewModel.cs:63— `IsBusy && _operationCancellation is not null` appears character-identically in 3 files — windows/ViewModels/InstallerViewModel.cs, windows/ViewModels/PurgeViewModel.cs, windows/ViewModels/UninstallViewModel.cs. 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 windows/Pages/DashboardPage.xaml.cs:51— `sender is Button { Tag: string route } && !string.IsNullOrWhiteSpace(route)` appears character-identically in 3 files — windows/Pages/DashboardPage.xaml.cs, windows/Views/ShellPage.xaml.cs, windows/Views/TrayHudWindow.xaml.cs. 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 macos/Sources/DupesView.swift:103— `!BurrowEngine.isAvailable || model.folder == nil || model.scanning` appears character-identically in 3 files — macos/Sources/DupesView.swift, macos/Sources/OrphansView.swift, macos/Sources/PhotosView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate macos/Sources/PopupView.swift:469— `$0.connected && $0.batteryPercent != nil` appears character-identically in 2 files — macos/Sources/PopupView.swift, macos/Sources/StatusView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate macos/Sources/ElectronVersionResolver.swift:25— `OSUpdateGate.atLeast(l, i) && !OSUpdateGate.atLeast(i, l)` appears character-identically in 2 files — macos/Sources/ElectronVersionResolver.swift, macos/Sources/GitHubReleaseResolver.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate macos/Sources/MoActions.swift:72— `resolved != nil && resolved == EngineCLI.bundledExecutable()` appears character-identically in 2 files — macos/Sources/MoActions.swift, macos/Sources/SoftwareView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate macos/Sources/UpdateCheck.swift:394— `value.hasPrefix("v") || value.hasPrefix("V")` appears character-identically in 2 files — macos/Sources/UpdateCheck.swift, macos/Sources/UpdateWorkflow.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Silent fallback default on parse failure windows/Services/CleanPreviewParser.cs:85— `ParseSize` falls back to `0` when `double.TryParse(number, NumberStyles.Float, CultureInfo.InvariantCulture, out va…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure windows/Services/WindowsInstalledApplicationService.cs:358— `ReadInt` falls back to `0` when `int.TryParse(ReadString(values, key), out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure windows/Services/WindowsInstalledApplicationService.cs:363— `ReadLong` falls back to `0` when `long.TryParse(ReadString(values, key), out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure .github/scripts/upstream_watch.py:150— `existing_bodies` returns `''` when `json.JSONDecodeError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
No ADRs found windows/BurrowWin.csproj:3— 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/`. ADRs are expected here because `windows/BurrowWin.csproj` makes this repository a deployable product (line 3).
D21 · Naming Consistency· `augmentedPATH` spells `PATH` where 28 names in the project spell it `Path` · ×1
`augmentedPATH` spells `PATH` where 28 names in the project spell it `Path` macos/Sources/BurrowEngine.swift:105— 28 of 29 names in project macos spell the token `Path` (28 of 29; unit: names in project macos containing `Path`). Peers: Item.abbreviatedPath (macos/Sources/CleanReviewView.swift:361); CrashReporter.isProfilingPathSafe (macos/Sources/CrashReporter.swift:545); ExternalSparkleUpdateSession.init(appPath) (macos/Sources/ExternalSparkleUpdateSession.swift:25); MoInteractiveRunner.executablePath (macos/Sources/InstallerView.swift:52); MoInteractiveRunner.init(executablePath) (macos/Sources/InstallerView.swift:56). Rename to `augmentedPath`. [rule N6]
D21 · Naming Consistency· `logicalCpu` spells `Cpu` where 13 names in the project spell it `CPU` · ×1
`logicalCpu` spells `Cpu` where 13 names in the project spell it `CPU` macos/Sources/MoleStatus.swift:145— 13 of 14 names in project macos spell the token `CPU` (13 of 14; unit: names in project macos containing `CPU`). Peers: Anomaly.processCPUExceedsBaseline (macos/Sources/Anomaly.swift:43); Doctor.highCPU (macos/Sources/Doctor.swift:104); ProcessRow.peakCPU (macos/Sources/HistoryView.swift:47); HistorySnapshot.thermalCPU (macos/Sources/HistoryView.swift:92); MetricSparklines.drainCPU (macos/Sources/MetricsFeeds.swift:49). Rename to `logicalCPU`. [rule N6]
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion windows/BurrowWin.csproj:1— `BurrowWin` overshoots its size bounds (11574 LoC, 126 public types across 7 namespaces). 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.1/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
D28 · Secrets (history)· Rotate the exposed credentials · ×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.
No SAST .github/workflows/ci.yml:11— No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 12 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.
No dependency-update automation windows/BurrowWin.csproj:79— `windows/BurrowWin.csproj` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Unused private field 'async' windows/typescript/electron/services/scanner.ts:310— Nothing in its class reads or assigns this private field (for a constructor parameter property: it is stored and never read), and no string key or test reaches it by name. Remove it, or use it where it was meant to take effect.
Silent fallback default on unknown code windows/Services/MoleEngineService.cs:307— `GetKind` maps every unrecognised code to `MoleEngineKind.Executable`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
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.
nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
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 11 file(s) — `macos/Sources/CleanView.swift`, `macos/Sources/DB.swift`, `macos/Sources/LaunchDiagnostics.swift`, `macos/Sources/LoginItemsReader.swift`, `macos/Sources/MoInteractive.swift`, … (+6 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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.
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.
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.
Run 01a1dd09-0dec-704b-bebd-3f3af0e00a2b · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 65 · Warnings: 409 · Recommendations: 46 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 15-11-2026 @ 02:28 UTC.
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.