Public report of RyanZhangNTU/codex-pacer, published 16 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, 16 November 2026, 17:07 UTC · Survey ID cd_61cede3d685b4295875bbd48b3452570
RyanZhangNTU/codex-pacer
Measured 16 November 2026, 17:07 UTC, at code version 542ffb9
Code coverage is not measured: Suite not runnable in-image.
Test reliability is not measured: No test run produced results.
Boundary Type-Coupling is not measured: Bounded contexts not declared.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
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: 95,386 lines of product code in 9 projects, tests not counted · Estimated rebuild effort: about 2.1 person-years · Weakest lens: Production Readiness, 41.8
Findings by how serious they are
61 critical1242 serious92 minor
20 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
16 November 2026, 17:07 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 ▸
53of 53 dimensions measured by tools.
1383of 1395 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
53dimensions across 6 lenses, read from 95,386 lines of product code in 9 projects.
RyanZhangNTU/codex-pacer falls short of our standard for production because we found no logging, tracing or health checks in the code and no automated security scanning of the code, its secrets or its dependencies. It scores 49.3 out of 100 and is rated Weak, and seven of its 61 critical findings are security problems.
Production Readiness, at 41.8, is the weakest lens and counts most in the score. The best first step for the work it takes is removing the unread values, worth about 4.5 points. Adding a diagnostic log would lift Production Readiness itself, worth about 4.9 points. Raising Production Readiness to 70 would lift the score to about 55.7.
Four passwords or keys are open to anyone who can read the repository. Two weaknesses in the code could be used by an attacker, and fifty-one errors are caught and ignored, so failures can go unnoticed. Replacing each exposed password or key, fixing the weaknesses the scanner points to and handling or logging the ignored errors would close these risks. The place where the code runs text as code or as a command needs a direct call instead. The three data fields that are written but never read need removing.
The product code is 95,386 lines, about €310,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.
If Production Readiness rose from 41.8 to 70, the lowest score rated Strong, the score would rise from 49.3 to about 55.7.
Code composition: what the lines of code are
Business logic 19%Supporting code 10%Tests 71%
Rebuild cost: about €310,000 · Estimate
Cost to rebuild
€100,000 to €510,000, for 1,668 to 5,395 hours of work, about 2.1 person-years for 1 to 4 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.7 at a score of 49. 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: 95,386 lines of product code
Comment lines
The estimate prices 93,764 lines. Comment lines count towards the size of 95,386 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 3 WriteOnlyPrivateField finding(s) in Explicit Debt — start with CompactLayoutEditorView.cs, GuideWindow.cs, HarnessGuideFloat.cs.
Raises the score by about 4.5 points · Low effort · Explicit Debt
2
Resolve the 51 EmptyCatchBlock finding(s) in Explicit Debt — start with EngineClient.cs (5), WindowsUpdateService.cs (5), WindowsInstallationOperations.cs (4).
Raises the score by about 5.5 points · Medium effort · Explicit Debt
3
Write a diagnostic trail the user can hand back with a bug report: log through `os.Logger` (one per subsystem), which the unified log keeps and a sysdiagnose carries to you.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 4.9 points · Medium effort · Observability
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 €310,000 to build again, about 2.1 person-years of work. Its weakest lens is Production Readiness, at 41.8 (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 3 WriteOnlyPrivateField finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 4.5 points for low effort, because it clears the 3 Explicit Debt findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 311,580 lines over the last 90 days, which is about 1,263,630 lines a year. At that pace, the extra work comes to an estimated 185.4 to 1112.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
21 modules, with 10 dependencies between them. One loop runs through 4 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
2 pairs of types, where a type in (global) uses a type in CodexPacer.Windows.
The types involved
Program → CodexPacer.Windows.UninstallFailure
Program → CodexPacer.Windows.WindowsInstallationIdentity
Direction
(global) uses CodexPacer.Windows, so a change to CodexPacer.Windows can break (global), while a change to (global) can't break CodexPacer.Windows.
Position
Below the diagonal: (global) uses a module listed above it, which is the healthy direction.
18→21 repository uses native~PacerCorepart of a loop✕
Connections
277 pairs of types, where a type in repository uses a type in native~PacerCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
native~PacerMacSupport uses repository, so a change to repository can break native~PacerMacSupport, while a change to native~PacerMacSupport can't break repository.
Position
Below the diagonal: native~PacerMacSupport uses a module listed above it, which is the healthy direction.
19→21 native~PacerMacSupport uses native~PacerCorepart of a loop✕
Connections
46 pairs of types, where a type in native~PacerMacSupport uses a type in native~PacerCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
native~PacerMacSupport uses native~PacerCore, so a change to native~PacerCore can break native~PacerMacSupport, while a change to native~PacerMacSupport can't break native~PacerCore.
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.
125 pairs of types, where a type in native~PacerIsland uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
native~PacerIsland uses repository, so a change to repository can break native~PacerIsland, while a change to native~PacerIsland can't break repository.
Position
Below the diagonal: native~PacerIsland uses a module listed above it, which is the healthy direction.
native~PacerIsland uses native~PacerMacSupport, so a change to native~PacerMacSupport can break native~PacerIsland, while a change to native~PacerIsland can't break native~PacerMacSupport.
Position
Below the diagonal: native~PacerIsland uses a module listed above it, which is the healthy direction.
20→21 native~PacerIsland uses native~PacerCorepart of a loop✕
Connections
350 pairs of types, where a type in native~PacerIsland uses a type in native~PacerCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
native~PacerIsland uses native~PacerCore, so a change to native~PacerCore can break native~PacerIsland, while a change to native~PacerIsland can't break native~PacerCore.
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.
378 pairs of types, where a type in native~PacerCore uses a type in repository. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
native~PacerCore uses native~PacerMacSupport, so a change to native~PacerMacSupport can break native~PacerCore, while a change to native~PacerCore can't break native~PacerMacSupport.
Position
Below the diagonal: native~PacerCore uses a module listed above it, which is the healthy direction.
native~PacerCore uses native~PacerIsland, so a change to native~PacerIsland can break native~PacerCore, while a change to native~PacerCore can't break native~PacerIsland.
Position
Below the diagonal: native~PacerCore uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 45.1 · Weak · gated by D1, D2, R1, R7 ·
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
A07:2025 — Authentication Failures
5
High / Critical
A05:2025 — Injection
4
High / Critical
A03:2025 — Software Supply Chain Failures
4
Medium
Roadmap
Top priorities: Resolve the 51 EmptyCatchBlock finding(s) in Explicit Debt — start with EngineClient.cs (5), WindowsUpdateService.cs (5), WindowsInstallationOperations.cs (4); Write a diagnostic trail the user can hand back with a bug report: log through `os.Logger` (one per subsystem), which the unified log keeps and a sysdiagnose carries to you. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 WriteOnlyPrivateField finding(s) in Explicit Debt — start with CompactLayoutEditorView.cs, GuideWindow.cs, HarnessGuideFloat.cs.
Write a diagnostic trail the user can hand back with a bug report: log through `os.Logger` (one per subsystem), which the unified log keeps and a sysdiagnose carries to you. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
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.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
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 — 61
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 — 1242
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 — 92
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 20
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 53 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 — 53 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, 1383 of 1395 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.
D8 Code Coverage — 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. Coverage NOT MEASURED: the test suite could not be built/run in-image (commonly external-service dependencies — a database, a broker — we won't provision). To have it measured, make the suite runnable without them. For context only, test code is ≈ 63% of production LoC (58,238 test / 92,245 production) — a rough proxy, NOT a coverage measurement, so it is excluded from the score. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
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: the test run produced no results for any test tier, so no test ever ran and flakiness could not be exercised. The cause could not be attributed, so it is excluded from the score rather than read as an absence of tests.
D14 License Compliance — 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 repository declares a Swift Package.swift/Package.resolved, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its SwiftPM dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
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 (4 contributor(s) across 1060 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 3 hold 0.3% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
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/Desktop/Pacer.Windows.csproj' with message: Project file must include the .NET Framework assembly 'PresentationCore, PresentationFramework' in the reference list.
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 54 deducted marker(s) and the 2.0/KLoC density on this row were taken over this repository's .NET projects ALONE: .swift (59,645 lines, 64% 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
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 — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — 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. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
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 (92,245 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.
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. `native/Sources/PacerCore/AccountUsage.swift`, `native/Sources/PacerCore/Activity.swift`, `native/Sources/PacerCore/AgentProvider.swift`, `native/Sources/PacerCore/ClaudeActivityRecord.swift`, `native/Sources/PacerCore/ClaudeActivityTelemetry.swift`, … (+113 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.
AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: a native UI project (windows/Desktop/App.xaml). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
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.
X10 Duplicated predicate — 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. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
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. 76 further occurrence(s) are not listed individually; the score already reflects all 116.
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.
X25 Inert configuration knob — 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.
X26 Unsynchronised callback handoff — 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.
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. 20 further occurrence(s) are not listed individually; the score already reflects all 60.
X30 Support guard that admits what it rejects — 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.
X7 Silent fallback defaults — 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 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.
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.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
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 (go.mod, 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.
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.
372 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was EngineRuntime.receive at 294. A further 3 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 DesktopPreferences.IsValid.get at 72 — 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: windows/Desktop/DesktopPreferences.cs (DesktopPreferences.IsValid.get at 72), windows/Desktop/WindowsWslTerminal.cs (WindowsWslTerminal.Launch at 18). 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.
+ 365 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 8 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with EngineRuntime.receive (cyclomatic 294), ClaudeActivityState.consumeRecord (cyclomatic 252), DesktopWireProjection.consume (cyclomatic 184). — 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 8 together lifts Cyclomatic Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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.
+ 431 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 45 bodies over 60 down to 60 or less in Cognitive Complexity — start with EngineRuntime.receive (cognitive 423), DesktopWireProjection.consume (cognitive 345), ClaudeActivityState.consumeRecord (cognitive 339). — 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 45 together lifts Cognitive Complexity from 2.0 to about 4.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.3 / 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 21 MethodTooLong finding(s) in God Classes — start with PacerEngine.swift (4), ClaudeActivityRecord.swift (2), DesktopWireProjection.swift (2). — One of this dimension's main actionable groups (21 warning-level).
Resolve the 17 FileTooLong finding(s) in God Classes — start with PacerEngine.swift, IslandModel.swift, Activity.swift. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 11 TooManyMethods finding(s) in God Classes — start with SettingsPanel.cs, IslandModel.swift, IslandWindow.xaml.cs. — One of this dimension's main actionable groups (11 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.
58 duplicated block group(s) detected. 3.5 % of the production lines (3,200 of 92,245) are in a reported copy. A further 146 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 (4 corresponding lines) · ×22windows/Desktop/SettingsCodex.cs:212
Edited copy of a member (7 corresponding lines) · ×13windows/Desktop/QuotaHistoryChart.cs:183
Edited copy of a member (6 corresponding lines) · ×13native/Sources/PacerCore/ClaudeRemoteSetup.swift:141
Edited copy of a member (3 corresponding lines) · ×12native/Sources/PacerIsland/CompactQuotaViews.swift:622
+ 56 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 Edited copy of a member (4 corresponding lines) finding(s) in Code Duplication — start with ClaudeActivityMonitor.swift (2), ClaudeWebBridge.swift (2), SettingsCodex.cs. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 18 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with CompactComponentOptions.swift (3), GuideContent.cs (2), GuideWindow.cs (2). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 13 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with SettingsView.swift (2), QuotaHistoryChart.cs, WindowsProcessOwnership.swift. — One of this dimension's main actionable groups (13 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.
D10 · Test Quality9.8 / 10Stronggated by 21 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
Resolve the 19 No assertions finding(s) in Test Quality — start with CompactStripFigureTests.swift (5), WindowsActivityLogWatcherTests.swift (4), HelperLifecycleTests.swift (3). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 2 Skipped test finding(s) in Test Quality — start with WindowsDurableTests.swift (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
2 outdated direct SwiftPM dependencies, 0 pinning defect(s). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.
Outdated: sparkle · ×2
✓ On the Gold path — maintain.
Detailed fixes: d12_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 11 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 3 direct `PackageReference`(s), and 5 further package(s) were reached beyond them by closing the graph over the committed `packages.lock.json` — 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. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares a Swift Package.swift/Package.resolved, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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.
Top hotspots: windows/EngineSupport/PacerEngine.swift (76×294=22344); native/Sources/PacerCore/Activity.swift (46×157=7222); native/Sources/PacerCore/ClaudeActivityRecord.swift (22×252=5544) Repeated repair below the complexity floor: scripts/windows/test-claude-runtime.py (5 of 7 changes were fixes); native/Sources/PacerCore/IslandMotion.swift (3 of 4 changes were fixes); REDACTED (3 of 3 changes were fixes)
Resolve the 132 Hotspot finding(s) in Churn × Complexity Hotspots — start with PacerEngine.swift, Activity.swift, ClaudeActivityRecord.swift. — One of this dimension's main actionable groups (132 warning-level).
Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with test-claude-runtime.py, IslandMotion.swift, REDACTED. — One of this dimension's main actionable groups (3 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.
54 deducted debt markers + unmeasured dead symbols across 25483 LoC in the .NET projects (2.0/KLoC) → score 6.1. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .swift (64% of production source) was not read, and carries at least 0 uncounted task marker(s) in 0 file(s).
Resolve the 51 EmptyCatchBlock finding(s) in Explicit Debt — start with EngineClient.cs (5), WindowsUpdateService.cs (5), WindowsInstallationOperations.cs (4). — One of this dimension's main actionable groups (51 issue-level).
Resolve the 3 WriteOnlyPrivateField finding(s) in Explicit Debt — start with CompactLayoutEditorView.cs, GuideWindow.cs, HarnessGuideFloat.cs. — One of this dimension's main actionable groups (3 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.
1 of 1 documentation facets pass in full. 18 document(s) read across 3 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.
No ADRs foundwindows/Desktop/Pacer.Windows.csproj:4
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Pacer.Windows.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 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.
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.
32 % 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.
4 finding(s): 0 critical, 4 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 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (4). — One of this dimension's main actionable groups (4 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).
4 finding(s): 0 critical, 3 high, 0 medium, 1 low. semgrep hit a parse error in 57 file(s) — `native/Sources/CZstd/common/allocations.h` (line 26, line 33, line 45), `native/Sources/CZstd/common/compiler.h` (lines 145–146, line 221, line 274, …), `native/Sources/CZstd/common/mem.h` (line 84, line 85, line 86, …), `native/Sources/CZstd/common/portability_macros.h` (line 161), `native/Sources/CZstd/common/xxhash.h`, … (+52 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 32 of those file(s) — `windows/Desktop/AlternatingQuotaText.cs`, `windows/Desktop/AppWindowsUpdates.cs`, `windows/Desktop/ClaudeWebCookies.cs`, `windows/Desktop/CompactLayoutEditorView.cs`, `windows/Desktop/CompactWarningsView.cs`, … (+27 more) — 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 3 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
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).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 128 of the 170 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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 5 Change coupling finding(s) in Change Coupling — start with Activity.swift (2), IslandModel.swift, GuideContent.cs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with SettingsView.swift, RealtimeProbe.swift. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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 4 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 — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
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.
`HarnessGuideFloat` keeps one instance of itself in the static `current`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (key, Presented; e.g. `key` at line 160). — windows/Desktop/HarnessGuideFloat.cs:23
`NativeCompactBar` keeps one instance of itself in the static `SharedValue`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (previous, lastCached, previousClient, LastPending; e.g. `previous` at line 69). — windows/Desktop/NativeCompactBar.cs:37
`PacerPalette` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (modules, Accent, Light, Primary, Secondary, Tertiary; e.g. `modules` at line 92). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — windows/Desktop/PacerPalette.cs:12
`ProviderIcon` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Sources; e.g. `Sources` at line 30). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — windows/Desktop/ProviderIcon.cs:11
`SettingsWindow` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (openedHarnessConnectors, restartingHarnessApps, checkingHarnessApps, rememberedAboutTab; e.g. `openedHarnessConnectors` at line 367). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — windows/Desktop/SettingsAppearance.cs:11
`TaskProgressRing` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Memories; e.g. `Memories` at line 142). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — windows/Desktop/TaskProgressRing.cs:23
`TaskStatusIcon` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Faces; e.g. `Faces` at line 90). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — windows/Desktop/TaskStatusIcon.cs:20
What to do
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
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.
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.
~25.5k production LoC (1927 types) across 2 project(s) / 20 namespace(s) with no recognised architectural style or layering — at this size, deliberate module boundaries would help. No DDD/clean/vertical-slice/CQRS/transaction-script organisation was detected — code is likely organised ad hoc, which makes change and onboarding harder as it grows.
What to do
Introduce deliberate module boundaries — by feature (vertical slices) if your team prefers, or by layer (domain/application/infrastructure). Even splitting into a few cohesive projects with a clear dependency direction would help.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
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.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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 an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
What to do
Write a diagnostic trail the user can hand back with a bug report: log through `os.Logger` (one per subsystem), which the unified log keeps and a sysdiagnose carries to you. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
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 3 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/platforms.yml:9
`windows/Desktop/Pacer.Windows.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/Desktop/Pacer.Windows.csproj:23
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 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.
`new HttpClient(transport ?? handler) { Timeout = Timeout.InfiniteTimeSpan }` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. — windows/UpdateSupport/UpdateFeedClient.cs:39
What to do
Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
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.
`fs.unlinkSync` in `getOrStartRouter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/diagnostics/reproduce-codex-ipc-split.cjs:25
What to do
TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ 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.
0 typed · 6 plain JS — the untyped files are native/Sources/PacerCore/Resources/deepseek-progress.mjs, native/Sources/PacerCore/Resources/deepseek-session-fingerprint.js, native/Sources/PacerCore/Resources/deepseek-summary.js, native/Sources/PacerCore/Resources/workbuddy-account-credits.js, scripts/diagnostics/reproduce-codex-ipc-split.cjs, scripts/windows/check-deepseek-web-identity.mjs.
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
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.
scripts/diagnostics/reproduce-codex-ipc-split.cjs:80 · scripts/diagnostics/reproduce-codex-ipc-split.cjs:98 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both spans, 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. — scripts/diagnostics/reproduce-codex-ipc-split.cjs:80
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.
readGroups has cyclomatic complexity 24 and cognitive complexity 33; 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. — native/Sources/PacerCore/Resources/workbuddy-account-credits.js:73
respond 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. — native/Sources/PacerCore/Resources/deepseek-progress.mjs:28
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ 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.
Do you agree with this assessment?
R7 · Dead Code3.7 / 10Weak✓ 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.
Unreachable from the 4 application, 1 tooling and 0 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
no import path from any entry point (4 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — native/Sources/PacerCore/Resources/deepseek-progress.mjs
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
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.
~0.7 `!` suppressions per 1k syntax nodes — 212 suppression(s) across the 289390 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
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 — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 71 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — 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 — no test run produced results
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .c, .cpp, .py, .swift — the .NET project files present are an immaterial minority — so the dimension does not apply.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 1 candidate(s) found and not reported.
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Swift surface was not measured.
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
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 118 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (26 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 — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
IC1 Incompleteness & stubs — IC1 reached only 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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.
R4 Test Coverage — the JS/TS workspace (4 production file(s)) has no JavaScript/TypeScript test, but it is 0.46% of this repository's production source and the other 99.54% carries 58,238 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — X1 reached only 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 — X25 reached only 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X26 Unsynchronised callback handoff — X26 reached only 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X27 Collection changed while being enumerated — X27 reached only 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 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 — X30 reached only 27% of this repository's production lines — swift (60,997 lines), python (5,765 lines), c (2,292 lines), javascript (429 lines), cpp (420 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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.
EmptyCatchBlock windows/Desktop/AccentPalette.cs:41— 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/Desktop/App.xaml.cs:164— 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/Desktop/App.xaml.cs:333— 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/Desktop/App.xaml.cs:516— 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/Desktop/BackdropController.cs:77— 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/Desktop/BackdropSystemSource.cs:21— 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/Desktop/BackdropSystemSource.cs:42— 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/Desktop/BackdropSystemSource.cs:44— 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/Desktop/ClaudeConnectionCoordinator.cs:115— 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/Desktop/DeepSeekConnectionCoordinator.cs:95— 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/Desktop/EngineClient.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/Desktop/EngineClient.cs:361— 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/Desktop/EngineClient.cs:375— 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/Desktop/EngineClient.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/Desktop/EngineClient.cs:381— 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/Desktop/EngineCrashLog.cs:61— 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/Desktop/EngineCrashLog.cs:130— 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/Desktop/FileQuarantine.cs:16— 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/Desktop/FileQuarantine.cs:17— 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/Desktop/HarnessGuideFloat.cs:234— 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/Desktop/IslandWindow.xaml.cs:714— 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/Desktop/IslandWindow.xaml.cs:996— 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/Desktop/IslandWindow.xaml.cs:1036— 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/Desktop/PreferencesStore.cs:79— 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/Desktop/PreferencesStore.cs:154— 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.
WriteOnlyPrivateField windows/Desktop/CompactLayoutEditorView.cs:39— private bool attached — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField windows/Desktop/GuideWindow.cs:16— private GuideCatalog catalog — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField windows/Desktop/HarnessGuideFloat.cs:28— private System.Windows.Threading.DispatcherTimer? poll — assigned 2 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
Hotspot: windows/EngineSupport/PacerEngine.swift windows/EngineSupport/PacerEngine.swift:610— windows/EngineSupport/PacerEngine.swift changed 76 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 294 in EngineRuntime.receive at line 610. 11 of those changes were fix/bug commits, and the other 65 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/EngineSupport/PacerEngine.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: native/Sources/PacerCore/Activity.swift native/Sources/PacerCore/Activity.swift:1037— native/Sources/PacerCore/Activity.swift changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 157 in SessionActivity.consumeLive at line 1037. 9 of those changes were fix/bug commits, and the other 37 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/Activity.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: native/Sources/PacerCore/ClaudeActivityRecord.swift native/Sources/PacerCore/ClaudeActivityRecord.swift:381— native/Sources/PacerCore/ClaudeActivityRecord.swift changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 252 in ClaudeActivityState.consumeRecord at line 381. 3 of those changes were fix/bug commits, and the other 19 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/ClaudeActivityRecord.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: windows/Desktop/App.xaml.cs windows/Desktop/App.xaml.cs:45— windows/Desktop/App.xaml.cs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 172 in App.OnStartup at line 45. 1 of those changes was a fix/bug commit, and the other 27 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/App.xaml.cs`: 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: native/Sources/PacerIsland/IslandModel.swift native/Sources/PacerIsland/IslandModel.swift:1266— native/Sources/PacerIsland/IslandModel.swift changed 126 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in IslandModel.configureClaudeRemote at line 1266. 16 of those changes were fix/bug commits, and the other 110 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerIsland/IslandModel.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: native/Sources/PacerCore/DesktopWireProjection.swift native/Sources/PacerCore/DesktopWireProjection.swift:562— native/Sources/PacerCore/DesktopWireProjection.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 184 in DesktopWireProjection.consume at line 562. 3 of those changes were fix/bug commits, and the other 9 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/DesktopWireProjection.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: native/Sources/PacerCore/RealtimeActivityMonitor.swift native/Sources/PacerCore/RealtimeActivityMonitor.swift:501— native/Sources/PacerCore/RealtimeActivityMonitor.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in RealtimeActivityMonitor.receiveDesktop at line 501. 3 of those changes were fix/bug commits, and the other 21 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/RealtimeActivityMonitor.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: native/Sources/PacerCore/NativeDesktopSession.swift native/Sources/PacerCore/NativeDesktopSession.swift:295— native/Sources/PacerCore/NativeDesktopSession.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in NativeDesktopSession.receive at line 295. 2 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/NativeDesktopSession.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: native/Sources/PacerIsland/SettingsView.swift native/Sources/PacerIsland/SettingsView.swift:285— native/Sources/PacerIsland/SettingsView.swift changed 92 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in SettingsView.paneContent at line 285. 6 of those changes were fix/bug commits, and the other 86 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerIsland/SettingsView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: native/Sources/PacerCore/CompactBarPresentation.swift native/Sources/PacerCore/CompactBarPresentation.swift:208— native/Sources/PacerCore/CompactBarPresentation.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 145 in CompactBarPresentation.project at line 208. 3 of those changes were fix/bug commits, and the other 9 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/CompactBarPresentation.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: native/Sources/PacerCore/RuntimeEventState.swift native/Sources/PacerCore/RuntimeEventState.swift:84— native/Sources/PacerCore/RuntimeEventState.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 125 in RuntimeEventState.consume at line 84. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/RuntimeEventState.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: native/Sources/PacerCore/Resources/claude_activity.py native/Sources/PacerCore/Resources/claude_activity.py:93— native/Sources/PacerCore/Resources/claude_activity.py changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in claude_activity.transcript_record at line 93. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/Resources/claude_activity.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.
Hotspot: REDACTED REDACTED:174— REDACTED changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 116 in claude_hook.hook at line 174. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- REDACTED`: 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: native/Sources/PacerIsland/PanelController.swift native/Sources/PacerIsland/PanelController.swift:140— native/Sources/PacerIsland/PanelController.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in PanelController.layout at line 140. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerIsland/PanelController.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: native/Sources/PacerIsland/PacerMain.swift native/Sources/PacerIsland/PacerMain.swift:12— native/Sources/PacerIsland/PacerMain.swift changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in PacerMain.main at line 12. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerIsland/PacerMain.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: windows/Desktop/SettingsHarness.cs windows/Desktop/SettingsHarness.cs:151— windows/Desktop/SettingsHarness.cs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in SettingsWindow.RefreshHarnessProgressGuide at line 151. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/SettingsHarness.cs`: 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: windows/Desktop/GuideContent.cs windows/Desktop/GuideContent.cs:445— windows/Desktop/GuideContent.cs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in GuideContent.Module at line 445. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/GuideContent.cs`: 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: windows/Desktop/SettingsCollapsed.cs windows/Desktop/SettingsCollapsed.cs:396— windows/Desktop/SettingsCollapsed.cs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in SettingsWindow.RefreshCollapsed at line 396. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/SettingsCollapsed.cs`: 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: windows/Desktop/SettingsWindow.cs windows/Desktop/SettingsWindow.cs:490— windows/Desktop/SettingsWindow.cs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in SettingsWindow.RefreshValues at line 490. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/SettingsWindow.cs`: 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: windows/Desktop/SettingsPalette.cs windows/Desktop/SettingsPalette.cs:11— windows/Desktop/SettingsPalette.cs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in SettingsPalette.Apply at line 11. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/SettingsPalette.cs`: 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: windows/Desktop/IslandWindow.xaml.cs windows/Desktop/IslandWindow.xaml.cs:472— windows/Desktop/IslandWindow.xaml.cs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in IslandWindow.Relayout at line 472. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/IslandWindow.xaml.cs`: 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: windows/Desktop/IslandCompactBar.cs windows/Desktop/IslandCompactBar.cs:71— windows/Desktop/IslandCompactBar.cs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in IslandWindow.UpdateCompactBar at line 71. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/IslandCompactBar.cs`: 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: windows/Desktop/TaskProgressRing.cs windows/Desktop/TaskProgressRing.cs:133— windows/Desktop/TaskProgressRing.cs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in TaskProgressRing.Apply at line 133. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- windows/Desktop/TaskProgressRing.cs`: 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: native/Sources/PacerCore/HarnessProgressGuide.swift native/Sources/PacerCore/HarnessProgressGuide.swift:74— native/Sources/PacerCore/HarnessProgressGuide.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in HarnessProgressGuide.init at line 74. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/HarnessProgressGuide.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: native/Sources/PacerCore/LocalHarnessProgressSetup.swift native/Sources/PacerCore/LocalHarnessProgressSetup.swift:134— native/Sources/PacerCore/LocalHarnessProgressSetup.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in LocalHarnessProgressSetup.apply at line 134. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/LocalHarnessProgressSetup.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.
+ 107 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×22
Edited copy of a member (4 corresponding lines) windows/Desktop/SettingsCodex.cs:212— windows/Desktop/SettingsCodex.cs:212-215 | windows/Desktop/SettingsCodex.cs:217-227 — 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) native/Sources/PacerCore/ClaudeActivityMonitor.swift:279— native/Sources/PacerCore/ClaudeActivityMonitor.swift:279-285 | native/Sources/PacerCore/ClaudeActivityMonitor.swift:290-293 — 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) native/Sources/PacerCore/RuntimeDiagnostics.swift:56— native/Sources/PacerCore/RuntimeDiagnostics.swift:56-60 | native/Sources/PacerMacSupport/MacRuntimeDiagnostics.swift:11-14 — 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) native/Sources/PacerMacSupport/MacClaudeLiveSessionRegistry.swift:6— native/Sources/PacerMacSupport/MacClaudeLiveSessionRegistry.swift:6-10 | native/Sources/PacerMacSupport/MacClaudeLiveSessionRegistry.swift:11-14 — 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) windows/EngineSupport/WindowsDeepSeekApplication.swift:48— windows/EngineSupport/WindowsDeepSeekApplication.swift:48-51 | windows/EngineSupport/WindowsProviderInstallation.swift:34-37 — 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) native/Sources/PacerCore/DeepSeekHome.swift:47— native/Sources/PacerCore/DeepSeekHome.swift:47-51 | native/Sources/PacerCore/CodexApplicationResolver.swift:7-10 — 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) native/Sources/PacerCore/CompactComponentOptions.swift:122— native/Sources/PacerCore/CompactComponentOptions.swift:122-125 | native/Sources/PacerCore/ExpandedPanelLayout.swift:160-163 — 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) native/Sources/PacerMacSupport/MacHelperProcess.swift:7— native/Sources/PacerMacSupport/MacHelperProcess.swift:7-10 | windows/EngineSupport/WindowsHelperProcess.swift:5-8 — 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) windows/EngineSupport/ClaudeWebBridge.swift:81— windows/EngineSupport/ClaudeWebBridge.swift:81-84 | windows/EngineSupport/DeepSeekWebBridge.swift:101-104 — 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) native/Sources/PacerMacSupport/MacChildProcess.swift:34— native/Sources/PacerMacSupport/MacChildProcess.swift:34-37 | windows/EngineSupport/WindowsChildProcess.swift:6-9 — 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) native/Sources/PacerCore/ClaudeCloudProject.swift:167— native/Sources/PacerCore/ClaudeCloudProject.swift:167-170 | native/Sources/PacerCore/ClaudeQuotaClient.swift:100-106 — 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) native/Sources/PacerCore/ClaudeActivityRecord.swift:223— native/Sources/PacerCore/ClaudeActivityRecord.swift:223-226 | native/Sources/PacerCore/LogDateParser.swift:9-12 — 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) native/Sources/PacerMacSupport/MacApplicationCatalog.swift:31— native/Sources/PacerMacSupport/MacApplicationCatalog.swift:31-34 | native/Sources/PacerMacSupport/MacDeepSeekApplication.swift:17-20 — 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) windows/Desktop/App.xaml.cs:418— windows/Desktop/App.xaml.cs:418-421 | windows/Desktop/WindowsStartupRegistration.cs:197-200 — 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) native/Sources/PacerMacSupport/MacClaudeQuotaClient.swift:61— native/Sources/PacerMacSupport/MacClaudeQuotaClient.swift:61-65 | native/Sources/PacerMacSupport/MacClaudeWebClients.swift:63-66 — 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) windows/EngineSupport/ClaudeWebBridge.swift:51— windows/EngineSupport/ClaudeWebBridge.swift:51-54 | windows/EngineSupport/DeepSeekWebBridge.swift:71-74 — 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) native/Sources/PacerCore/HarnessActivity.swift:131— native/Sources/PacerCore/HarnessActivity.swift:131-134 | native/Sources/PacerMacSupport/MacClaudeHookInstaller.swift:14-17 — 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) windows/EngineSupport/WindowsHTTPStream.swift:131— windows/EngineSupport/WindowsHTTPStream.swift:131-134 | windows/EngineSupport/WindowsTelemetryTransport.swift:15-18 — 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) native/Sources/PacerIsland/ClaudeWebLogin.swift:116— native/Sources/PacerIsland/ClaudeWebLogin.swift:116-119 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:118-121 — 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) windows/Desktop/GuideContent.cs:121— windows/Desktop/GuideContent.cs:121-124 | windows/Desktop/UpdateRecoveryView.cs:172-175 — 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) windows/EngineSupport/WindowsActivityLogWatcher.swift:15— windows/EngineSupport/WindowsActivityLogWatcher.swift:15-18 | windows/EngineSupport/WindowsWSLRegistrationWatch.swift:24-27 — 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) native/Sources/PacerCore/ClaudeActivityMonitor.swift:294— native/Sources/PacerCore/ClaudeActivityMonitor.swift:294-298 | native/Sources/PacerCore/RealtimeActivityMonitor.swift:708-711 — 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.
MethodTooLong: EngineRuntime.receive windows/EngineSupport/PacerEngine.swift:610— MethodTooLong — receive runs 413 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 313 over it, 4.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: App.OnStartup windows/Desktop/App.xaml.cs:45— MethodTooLong — OnStartup runs 256 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 156 over it, 2.56× 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: ClaudeActivityState.consumeRecord native/Sources/PacerCore/ClaudeActivityRecord.swift:381— MethodTooLong — consumeRecord runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× 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: CompactBarPresentation.project native/Sources/PacerCore/CompactBarPresentation.swift:208— MethodTooLong — project runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DesktopWireProjection.consume native/Sources/PacerCore/DesktopWireProjection.swift:562— MethodTooLong — consume runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× 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: LocalActivityReader.read native/Sources/PacerCore/LocalActivityReader.swift:38— MethodTooLong — read runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SessionActivity.consumeLive native/Sources/PacerCore/Activity.swift:1037— MethodTooLong — consumeLive runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EngineRuntime.publish windows/EngineSupport/PacerEngine.swift:2751— MethodTooLong — publish runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× 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: RuntimeEventState.consume native/Sources/PacerCore/RuntimeEventState.swift:84— MethodTooLong — consume runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: EngineRuntime.configure windows/EngineSupport/PacerEngine.swift:1098— MethodTooLong — configure runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: DeepSeekActivityState.consume native/Sources/PacerCore/DeepSeekActivityState.swift:143— MethodTooLong — consume runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.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: SettingsWindow.BuildCompactInspector windows/Desktop/SettingsCollapsed.cs:158— MethodTooLong — BuildCompactInspector runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ClaudeActivityReader.read native/Sources/PacerCore/ClaudeActivityReader.swift:48— MethodTooLong — read runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PacerEngine.run windows/EngineSupport/PacerEngine.swift:8— MethodTooLong — run runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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: SessionActivity.consume native/Sources/PacerCore/Activity.swift:695— MethodTooLong — consume runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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: ClaudeActivityRecord.transcript native/Sources/PacerCore/ClaudeActivityRecord.swift:53— MethodTooLong — transcript runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NativeDesktopSession.receive native/Sources/PacerCore/NativeDesktopSession.swift:295— MethodTooLong — receive runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DesktopWireProjection.projectedValue native/Sources/PacerCore/DesktopWireProjection.swift:393— MethodTooLong — projectedValue runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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: TaskStatusIconNSView.apply native/Sources/PacerIsland/TaskStatusIconView.swift:414— MethodTooLong — apply runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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: ClaudeQuotaClient.fetchQuota native/Sources/PacerCore/ClaudeQuotaClient.swift:239— MethodTooLong — fetchQuota runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PanelController.layout native/Sources/PacerIsland/PanelController.swift:140— MethodTooLong — layout 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.
No assertions: testPercentagesKeepWholeNumbersOverTheirSign native/Tests/PacerCoreTests/CompactStripFigureTests.swift:11— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCreditsShowOneDecimalUpToThreeDigitsAndMoveTheMagnitudeUnder native/Tests/PacerCoreTests/CompactStripFigureTests.swift:17— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMoneyRoundsDownAndCarriesItsSymbolAfterTheMagnitude native/Tests/PacerCoreTests/CompactStripFigureTests.swift:32— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAMinusSignLeavesNoRoomForADecimal native/Tests/PacerCoreTests/CompactStripFigureTests.swift:43— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testRatesPadThreeDigitsAndPutTheirMagnitudeBesideTheUnit native/Tests/PacerCoreTests/CompactStripFigureTests.swift:49— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testEveryCaseKeepsItsOriginalJSONStringAndRejectsUnknownStrings native/Tests/PacerCoreTests/PresentationEnumCodableTests.swift:26— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testLocalAndRemoteSetupAgreeOnEveryConflictRow native/Tests/PacerMacSupportTests/ClaudeTelemetryConflictTests.swift:90— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testRemoteHelperExitsInsteadOfSpinningWhenOutputReaderDisappears native/Tests/PacerMacSupportTests/HelperLifecycleTests.swift:28— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDesktopHelperExitsInsteadOfSpinningWhenOutputReaderDisappears native/Tests/PacerMacSupportTests/HelperLifecycleTests.swift:31— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testRemoteHelperOutputFailureAlsoExitsWithExistingHealthySocket native/Tests/PacerMacSupportTests/HelperLifecycleTests.swift:49— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMonitorDeliversFinalEndingBeforeSocketEOF native/Tests/PacerMacSupportTests/NativeDesktopSocketTests.swift:169— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testRemoteControlMonitorDiscoversRoutingAndDeliversCompletionBeforeEOF native/Tests/PacerMacSupportTests/NativeDesktopSocketTests.swift:176— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testLargeSnapshotOnAnotherHostCannotBreakRemoteControlCompletion native/Tests/PacerMacSupportTests/NativeDesktopSocketTests.swift:402— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testStdinDiscoveryObservesQuietActiveTaskAndExplicitEndingWithoutItemReplay native/Tests/PacerMacSupportTests/RealtimeTransportTests.swift:166— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testFolderWatchSeesOwnEntriesAndFileWatchSeesAppendsWithoutPolling windows/Tests/EngineTests/WindowsActivityLogWatcherTests.swift:24— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testExpansionFlushesPendingChangesAndStopCancelsLaterDelivery windows/Tests/EngineTests/WindowsActivityLogWatcherTests.swift:67— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testReplacingSourcesDropsOldNotificationsAndIdleHasNoCallbacks windows/Tests/EngineTests/WindowsActivityLogWatcherTests.swift:90— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testNonexistentDirectoryIsNotRetainedAndRepeatedCloseReleasesHandles windows/Tests/EngineTests/WindowsActivityLogWatcherTests.swift:104— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testOneQuietClaudeAppendDrainsAcrossReadBudgetsWithoutAnotherNotification windows/Tests/EngineTests/WindowsLiveSourceTests.swift:201— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Duplicated block (5 lines × 2) windows/Desktop/ClaudeConnectionCoordinator.cs:19— windows/Desktop/ClaudeConnectionCoordinator.cs:19-23 | windows/Desktop/DeepSeekConnectionCoordinator.cs:18-22 — 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) windows/Desktop/QuotaDial.cs:481— windows/Desktop/QuotaDial.cs:481-485 | windows/Desktop/QuotaDial.cs:498-502 — 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/Desktop/QuotaDial.cs:481` 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) windows/Desktop/GuideContent.cs:634— windows/Desktop/GuideContent.cs:634-638 | windows/Desktop/SettingsPanel.cs:364-368 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note 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 × 2) windows/Desktop/GuideWindow.cs:33— windows/Desktop/GuideWindow.cs:33-38 | REDACTED:38-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note 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 × 2) native/Sources/PacerIsland/MainWindowKit.swift:367— native/Sources/PacerIsland/MainWindowKit.swift:367-371 | native/Sources/PacerIsland/SettingsWhatsNewPane.swift:71-75 — 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 `native/Sources/PacerIsland/MainWindowKit.swift:367` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `native/Sources/PacerIsland/SettingsWhatsNewPane.swift:70` calls `VStack` and `native/Sources/PacerIsland/MainWindowKit.swift:366` 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) windows/Desktop/GuideWindow.cs:102— windows/Desktop/GuideWindow.cs:102-107 | REDACTED:166-170 — 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) native/Sources/PacerIsland/ClaudeWebLogin.swift:264— native/Sources/PacerIsland/ClaudeWebLogin.swift:264-268 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:256-260 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 (5 lines × 2) native/Sources/PacerIsland/MainWindowKit.swift:10— native/Sources/PacerIsland/MainWindowKit.swift:10-14 | native/Sources/PacerIsland/SettingsLibraryTile.swift:7-11 — 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) windows/Desktop/ActivityBadge.cs:312— windows/Desktop/ActivityBadge.cs:312-316 | windows/Desktop/TaskProgressRing.cs:407-411 — 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/Desktop/ActivityBadge.cs:312` 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) windows/Desktop/GuideContent.cs:110— windows/Desktop/GuideContent.cs:110-114 | windows/Desktop/GuideContent.cs: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. Read the line range as the matched WINDOW rather than a finished unit: at `windows/Desktop/GuideContent.cs:110` 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) native/Sources/PacerCore/ClaudeRemoteAutoSetup.swift:27— native/Sources/PacerCore/ClaudeRemoteAutoSetup.swift:27-31 | native/Sources/PacerCore/CodexRemoteProgressSetup.swift:82-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) native/Sources/PacerCore/CompactComponentOptions.swift:68— native/Sources/PacerCore/CompactComponentOptions.swift:68-72 | native/Sources/PacerCore/ExpandedPanelLayout.swift:257-261 — 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 `native/Sources/PacerCore/CompactComponentOptions.swift:68` 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) native/Sources/PacerCore/CompactComponentOptions.swift:115— native/Sources/PacerCore/CompactComponentOptions.swift:115-119 | native/Sources/PacerCore/ExpandedPanelLayout.swift:305-309 — 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, `native/Sources/PacerCore/ExpandedPanelLayout.swift:301` calls `encode`, `filter` and `native/Sources/PacerCore/CompactComponentOptions.swift:111` 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 (5 lines × 2) native/Sources/PacerCore/CompactComponentOptions.swift:128— native/Sources/PacerCore/CompactComponentOptions.swift:128-132 | native/Sources/PacerCore/ExpandedPanelLayout.swift:318-322 — 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) native/Sources/PacerIsland/SettingsHelpPane.swift:67— native/Sources/PacerIsland/SettingsHelpPane.swift:67-71 | native/Sources/PacerIsland/WelcomeView.swift:503-507 — 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 (5 lines × 2) native/Sources/PacerMacSupport/MacClaudeApplication.swift:15— native/Sources/PacerMacSupport/MacClaudeApplication.swift:15-19 | native/Sources/PacerMacSupport/MacDeepSeekApplication.swift:12-16 — 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) windows/EngineSupport/ClaudeWebBridge.swift:85— windows/EngineSupport/ClaudeWebBridge.swift:85-89 | windows/EngineSupport/DeepSeekWebBridge.swift:105-109 — 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) windows/EngineSupport/WindowsSSHResume.swift:30— windows/EngineSupport/WindowsSSHResume.swift:30-34 | windows/EngineSupport/WindowsWSLResume.swift:20-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
FileTooLong: EngineSupport/PacerEngine.swift windows/EngineSupport/PacerEngine.swift— FileTooLong — 2572 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2072 over it, 5.14× 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: PacerIsland/IslandModel.swift native/Sources/PacerIsland/IslandModel.swift— FileTooLong — 2088 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: IslandModel (25-2770). The bar is 500 significant lines; this is 1588 over it, 4.18× 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: PacerCore/Activity.swift native/Sources/PacerCore/Activity.swift— FileTooLong — 987 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: SessionActivity (31-1292). The bar is 500 significant lines; this is 487 over it, 1.97× 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: PacerIsland/TaskStatusIconView.swift native/Sources/PacerIsland/TaskStatusIconView.swift— FileTooLong — 814 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: TaskStatusIconNSView (39-1109). The bar is 500 significant lines; this is 314 over it, 1.63× 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: Desktop/IslandWindow.xaml.cs windows/Desktop/IslandWindow.xaml.cs— FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 302 over it, 1.60× 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: Desktop/GuideContent.cs windows/Desktop/GuideContent.cs— FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 271 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: PacerCore/WorkBuddyHarness.swift native/Sources/PacerCore/WorkBuddyHarness.swift— FileTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 202 over it, 1.40× 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: Resources/claude_activity.py native/Sources/PacerCore/Resources/claude_activity.py— FileTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 150 over it, 1.30× 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: PacerCore/RealtimeActivityMonitor.swift native/Sources/PacerCore/RealtimeActivityMonitor.swift— FileTooLong — 646 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 146 over it, 1.29× 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: PacerCore/DesktopWireProjection.swift native/Sources/PacerCore/DesktopWireProjection.swift— FileTooLong — 628 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: DesktopWireProjection (95-799). The bar is 500 significant lines; this is 128 over it, 1.26× 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: PacerIsland/SettingsView.swift native/Sources/PacerIsland/SettingsView.swift— FileTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: SettingsView (6-705). The bar is 500 significant lines; this is 86 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: PacerCore/ClaudeActivityRecord.swift native/Sources/PacerCore/ClaudeActivityRecord.swift— FileTooLong — 583 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: ClaudeActivityState (230-831). 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: PacerIsland/SettingsExpandedPanelPane.swift native/Sources/PacerIsland/SettingsExpandedPanelPane.swift— FileTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded), about 62% of them inside a single declaration: SettingsExpandedPanelPane (16-483). The bar is 500 significant lines; this is 29 over it, 1.06× 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: Resources/claude_remote_setup.py native/Sources/PacerCore/Resources/claude_remote_setup.py— FileTooLong — 523 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 23 over it, 1.05× 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: Desktop/SettingsHarness.cs windows/Desktop/SettingsHarness.cs— FileTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 18 over it, 1.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: PacerIsland/WelcomeView.swift native/Sources/PacerIsland/WelcomeView.swift— FileTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 14 over it, 1.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: PacerIsland/PacerMain.swift native/Sources/PacerIsland/PacerMain.swift— FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 11 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×13
Edited copy of a member (7 corresponding lines) windows/Desktop/QuotaHistoryChart.cs:183— windows/Desktop/QuotaHistoryChart.cs:183-195 | windows/Desktop/QuotaHistoryView.cs:195-201 — 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/EngineSupport/WindowsProcessOwnership.swift:16— windows/EngineSupport/WindowsProcessOwnership.swift:16-23 | windows/EngineSupport/WindowsProcessOwnership.swift:31-37 — 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) native/Sources/PacerMacSupport/MacDurableProgressMailbox.swift:57— native/Sources/PacerMacSupport/MacDurableProgressMailbox.swift:57-63 | windows/EngineSupport/WindowsDurableProgress.swift:31-39 — 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) native/Sources/PacerCore/ClaudeRemoteSetup.swift:154— native/Sources/PacerCore/ClaudeRemoteSetup.swift:154-160 | native/Sources/PacerCore/CodexRemoteProgressSetup.swift:69-75 — 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) native/Sources/PacerIsland/TaskStatusIconView.swift:1017— native/Sources/PacerIsland/TaskStatusIconView.swift:1017-1025 | native/Sources/PacerIsland/TaskStatusIconView.swift:1026-1032 — 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/EngineSupport/ClaudeWebBridge.swift:71— windows/EngineSupport/ClaudeWebBridge.swift:71-77 | windows/EngineSupport/DeepSeekWebBridge.swift:94-100 — 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/Desktop/ClaudeConnectionCoordinator.cs:118— windows/Desktop/ClaudeConnectionCoordinator.cs:118-124 | windows/Desktop/DeepSeekConnectionCoordinator.cs:98-104 — 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) native/Sources/PacerIsland/DeepSeekDashboardView.swift:498— native/Sources/PacerIsland/DeepSeekDashboardView.swift:498-504 | native/Sources/PacerIsland/QuotaDashboardView.swift:416-422 — 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) native/Sources/PacerIsland/SettingsView.swift:562— native/Sources/PacerIsland/SettingsView.swift:562-568 | native/Sources/PacerIsland/SettingsView.swift:569-575 — 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) native/Sources/PacerIsland/SettingsView.swift:755— native/Sources/PacerIsland/SettingsView.swift:755-762 | native/Sources/PacerIsland/WhatsNewView.swift:218-224 — 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) native/Sources/PacerIsland/ClassicQuotaDashboardView.swift:56— native/Sources/PacerIsland/ClassicQuotaDashboardView.swift:56-62 | native/Sources/PacerIsland/QuotaDashboardView.swift:122-128 — 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) native/Sources/PacerIsland/IslandModel.swift:431— native/Sources/PacerIsland/IslandModel.swift:431-437 | native/Sources/PacerIsland/IslandModel.swift:943-951 — 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) native/Sources/PacerCore/DeepSeekWebScripts.swift:9— native/Sources/PacerCore/DeepSeekWebScripts.swift:9-15 | native/Sources/PacerCore/HarnessAccountCredits.swift:298-304 — 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.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×13
Edited copy of a member (6 corresponding lines) native/Sources/PacerCore/ClaudeRemoteSetup.swift:141— native/Sources/PacerCore/ClaudeRemoteSetup.swift:141-146 | native/Sources/PacerCore/CodexRemoteProgressSetup.swift:34-39 — 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/Desktop/QuotaDial.cs:213— windows/Desktop/QuotaDial.cs:213-218 | windows/Desktop/QuotaDial.cs:312-317 — 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/Desktop/TaskProgressRing.cs:267— windows/Desktop/TaskProgressRing.cs:267-273 | windows/Desktop/TaskStatusIcon.cs:250-255 — 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) native/Sources/PacerCore/DeepSeekSessionLog.swift:79— native/Sources/PacerCore/DeepSeekSessionLog.swift:79-85 | native/Sources/PacerCore/DeepSeekSessionLog.swift:205-210 — 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) native/Sources/PacerCore/ClaudeQuotaCoordinator.swift:54— native/Sources/PacerCore/ClaudeQuotaCoordinator.swift:54-59 | native/Sources/PacerCore/CodexQuotaCoordinator.swift:94-99 — 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) native/Sources/PacerCore/CompactIslandLayout.swift:232— native/Sources/PacerCore/CompactIslandLayout.swift:232-238 | native/Sources/PacerCore/ExpandedPanelLayout.swift:146-151 — 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/Desktop/CompactChoices.cs:89— windows/Desktop/CompactChoices.cs:89-94 | windows/Desktop/PanelChoices.cs:35-40 — 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) native/Sources/PacerMacSupport/MacFileSystem.swift:20— native/Sources/PacerMacSupport/MacFileSystem.swift:20-25 | windows/EngineSupport/WindowsFiles.swift:65-70 — 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/EngineSupport/WindowsCodexProgressPaths.swift:11— windows/EngineSupport/WindowsCodexProgressPaths.swift:11-16 | windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:44-50 — 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) native/Sources/PacerCore/ClaudeActivityMonitor.swift:165— native/Sources/PacerCore/ClaudeActivityMonitor.swift:165-170 | native/Sources/PacerCore/DeepSeekActivityMonitor.swift:57-62 — 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/Desktop/IslandWindow.xaml.cs:1070— windows/Desktop/IslandWindow.xaml.cs:1070-1075 | windows/Desktop/TaskStatusIcon.cs:311-316 — 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) native/Sources/PacerCore/Activity.swift:412— native/Sources/PacerCore/Activity.swift:412-418 | native/Sources/PacerCore/Activity.swift:419-424 — 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) native/Sources/PacerIsland/MainWindowKit.swift:167— native/Sources/PacerIsland/MainWindowKit.swift:167-173 | native/Sources/PacerIsland/SettingsExpandedPanelPane.swift:754-759 — 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.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×12
Edited copy of a member (3 corresponding lines) native/Sources/PacerIsland/CompactQuotaViews.swift:622— native/Sources/PacerIsland/CompactQuotaViews.swift:622-624 | native/Sources/PacerIsland/DeepSeekDashboardView.swift:133-135 — 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) native/Sources/PacerCore/CompactBarPresentation.swift:74— native/Sources/PacerCore/CompactBarPresentation.swift:74-76 | native/Sources/PacerCore/ExpandedPanelPresentation.swift:130-132 — 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) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:109— native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:109-111 | native/Sources/PacerCore/ProviderQuotaRefreshPolicy.swift:10-12 — 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) native/Sources/PacerCore/CompactIslandLayout.swift:144— native/Sources/PacerCore/CompactIslandLayout.swift:144-146 | native/Sources/PacerCore/DeepSeekBalanceHistory.swift:105-107 — 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) native/Sources/PacerIsland/ClaudeWebLogin.swift:295— native/Sources/PacerIsland/ClaudeWebLogin.swift:295-298 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:280-282 — 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) native/Sources/PacerCore/ClaudeRemoteAutoSetup.swift:21— native/Sources/PacerCore/ClaudeRemoteAutoSetup.swift:21-23 | native/Sources/PacerCore/CodexRemoteProgressSetup.swift:77-79 — 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) native/Sources/PacerCore/CompactComponentOptions.swift:167— native/Sources/PacerCore/CompactComponentOptions.swift:167-169 | native/Sources/PacerCore/Localization.swift:19-21 — 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) native/Sources/PacerMacSupport/MacFileSystem.swift:17— native/Sources/PacerMacSupport/MacFileSystem.swift:17-19 | windows/EngineSupport/WindowsFiles.swift:62-64 — 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) native/Sources/PacerIsland/StatusSymbols.swift:30— native/Sources/PacerIsland/StatusSymbols.swift:30-32 | windows/EngineSupport/EnginePresentation.swift:80-82 — 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) native/Sources/PacerIsland/ActivityBadge.swift:9— native/Sources/PacerIsland/ActivityBadge.swift:9-11 | native/Sources/PacerIsland/PacerDesign.swift:85-87 — 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) native/Sources/PacerIsland/ActivityBadge.swift:9— native/Sources/PacerIsland/ActivityBadge.swift:9-11 | native/Sources/PacerIsland/PacerDesign.swift:143-145 — 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) native/Sources/PacerCore/CompactComponentOptions.swift:134— native/Sources/PacerCore/CompactComponentOptions.swift:134-136 | native/Sources/PacerCore/ExpandedPanelLayout.swift:170-172 — 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.
TooManyMethods: SettingsWindow windows/Desktop/SettingsPanel.cs— TooManyMethods — 4474 significant lines (blank, comment-only and punctuation-only lines excluded), 294 methods, declared across 23 files: Desktop/SettingsPanel.cs (31), Desktop/SettingsWindow.cs (31), Desktop/SettingsHarness.cs (29), Desktop/SettingsSidebar.cs (22), +19 more file(s). The bar is 30 methods; this is 264 over it, 9.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IslandModel native/Sources/PacerIsland/IslandModel.swift:24— TooManyMethods — 229 methods, declared across 3 files: PacerIsland/IslandModel.swift (192), PacerIsland/IslandModel+DeepSeek.swift (29), PacerIsland/IslandModel+Presentation.swift (8). The bar is 30 methods; this is 199 over it, 7.63× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IslandWindow windows/Desktop/IslandWindow.xaml.cs— TooManyMethods — 1642 significant lines (blank, comment-only and punctuation-only lines excluded), 163 methods, declared across 9 files: Desktop/IslandWindow.xaml.cs (84), Desktop/IslandPanelSections.cs (17), Desktop/IslandMove.cs (12), Desktop/IslandAccessibility.cs (10), +5 more file(s). The bar is 30 methods; this is 133 over it, 5.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: EngineRuntime windows/EngineSupport/PacerEngine.swift:209— TooManyMethods — 132 methods. The bar is 30 methods; this is 102 over it, 4.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GuideContent windows/Desktop/GuideContent.cs— TooManyMethods — 752 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 30 methods; this is 35 over it, 2.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: SessionActivity native/Sources/PacerCore/Activity.swift:31— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.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: TaskStatusIconNSView native/Sources/PacerIsland/TaskStatusIconView.swift:39— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: RealtimeActivityMonitor native/Sources/PacerCore/RealtimeActivityMonitor.swift:5— TooManyMethods — 40 methods, declared across 2 files: PacerCore/RealtimeActivityMonitor.swift (36), PacerMacSupport/MacCollectorDependencies.swift (4). The bar is 30 methods; this is 10 over it, 1.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClaudeActivityMonitor native/Sources/PacerCore/ClaudeActivityMonitor.swift:5— TooManyMethods — 34 methods, declared across 3 files: PacerCore/ClaudeActivityMonitor.swift (32), PacerMacSupport/MacCollectorDependencies.swift (1), EngineSupport/WindowsActivityDependencies.swift (1). The bar is 30 methods; this is 4 over it, 1.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClaudeHookInstaller native/Sources/PacerCore/ClaudeHookInstaller.swift:17— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClaudeCloudProjectMonitor native/Sources/PacerCore/ClaudeCloudProjectMonitor.swift:10— TooManyMethods — 32 methods, declared across 2 files: PacerCore/ClaudeCloudProjectMonitor.swift (31), EngineSupport/WindowsClaudeHTTP.swift (1). The bar is 30 methods; this is 2 over it, 1.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×9
Edited copy of a member (8 corresponding lines) native/Sources/PacerMacSupport/MacClaudeHookInstaller.swift:68— native/Sources/PacerMacSupport/MacClaudeHookInstaller.swift:68-75 | windows/InstallerSupport/WindowsClaudeHookCleanup.swift:8-15 — 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) native/Sources/PacerIsland/ClaudeWebLogin.swift:252— native/Sources/PacerIsland/ClaudeWebLogin.swift:252-262 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:248-255 — 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) native/Sources/PacerCore/ClaudeDesktopRecords.swift:169— native/Sources/PacerCore/ClaudeDesktopRecords.swift:169-176 | native/Sources/PacerCore/FileSignatureCache.swift:22-29 — 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) native/Sources/PacerIsland/MainWindowKit.swift:350— native/Sources/PacerIsland/MainWindowKit.swift:350-357 | native/Sources/PacerIsland/SettingsLibraryTile.swift:149-157 — 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) windows/InstallerSupport/WindowsClaudeHookCleanup.swift:16— windows/InstallerSupport/WindowsClaudeHookCleanup.swift:16-24 | windows/InstallerSupport/WindowsClaudeHookRuntime.swift:97-104 — 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) native/Sources/PacerIsland/IslandModel.swift:2356— native/Sources/PacerIsland/IslandModel.swift:2356-2363 | windows/EngineSupport/PacerEngine.swift:1289-1297 — 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) windows/Desktop/EstimatePaint.cs:25— windows/Desktop/EstimatePaint.cs:25-32 | windows/Desktop/EstimatePaint.cs:35-49 — 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) windows/Desktop/FileQuarantine.cs:12— windows/Desktop/FileQuarantine.cs:12-19 | windows/Desktop/WindowsInstallationIdentity.cs:81-89 — 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) windows/Desktop/WindowsInstallationIdentity.cs:81— windows/Desktop/WindowsInstallationIdentity.cs:81-89 | windows/Desktop/FileQuarantine.cs:12-19 — 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 (5 corresponding lines) · ×9
Edited copy of a member (5 corresponding lines) native/Sources/PacerCore/CodexProgressEvidence.swift:92— native/Sources/PacerCore/CodexProgressEvidence.swift:92-96 | native/Sources/PacerCore/WorkBuddyTranscript.swift:314-319 — 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) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:112— native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:112-116 | native/Sources/PacerCore/ProviderQuotaRefreshPolicy.swift:13-17 — 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/EngineSupport/DeepSeekBalanceHistoryStore.swift:21— windows/EngineSupport/DeepSeekBalanceHistoryStore.swift:21-25 | windows/EngineSupport/WindowsClaudeRemoteDigestStore.swift:44-49 — 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) native/Sources/PacerCore/ApplicationLifecycleCoordinator.swift:115— native/Sources/PacerCore/ApplicationLifecycleCoordinator.swift:115-119 | native/Sources/PacerCore/ApplicationLifecycleCoordinator.swift:126-130 — 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) native/Sources/PacerCore/ClaudeObservedRequestMeter.swift:30— native/Sources/PacerCore/ClaudeObservedRequestMeter.swift:30-34 | native/Sources/PacerCore/ClaudeObservedRequestMeter.swift:35-40 — 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) native/Sources/PacerCore/CompactIslandLayout.swift:139— native/Sources/PacerCore/CompactIslandLayout.swift:139-143 | native/Sources/PacerCore/DeepSeekBalanceHistory.swift:100-104 — 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/Desktop/ClaudeConnectionCoordinator.cs:167— windows/Desktop/ClaudeConnectionCoordinator.cs:167-171 | windows/Desktop/DeepSeekConnectionCoordinator.cs:136-140 — 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) native/Sources/PacerCore/ClaudeActivityMonitor.swift:253— native/Sources/PacerCore/ClaudeActivityMonitor.swift:253-257 | native/Sources/PacerCore/RealtimeActivityMonitor.swift:65-69 — 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/Desktop/GuideContent.cs:583— windows/Desktop/GuideContent.cs:583-587 | windows/Desktop/SettingsWindow.cs:205-224 — 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.
ClassTooLong: IslandModel native/Sources/PacerIsland/IslandModel.swift:24— ClassTooLong — 2071 significant lines (blank, comment-only and punctuation-only lines excluded), 229 methods. The bar is 400 significant lines; this is 1671 over it, 5.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SessionActivity native/Sources/PacerCore/Activity.swift:31— ClassTooLong — 967 significant lines (blank, comment-only and punctuation-only lines excluded), 65 methods. The bar is 400 significant lines; this is 567 over it, 2.42× 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: TaskStatusIconNSView native/Sources/PacerIsland/TaskStatusIconView.swift:39— ClassTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 399 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DesktopWireProjection native/Sources/PacerCore/DesktopWireProjection.swift:95— ClassTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 155 over it, 1.39× 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: SettingsView native/Sources/PacerIsland/SettingsView.swift:6— ClassTooLong — 532 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 132 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: App windows/Desktop/App.xaml.cs— ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods, declared across 3 files: Desktop/App.xaml.cs (12), Desktop/AppWindowsUpdates.cs (7), Desktop/AppGuidePages.cs (3). The bar is 400 significant lines; this is 103 over it, 1.26× 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: ClaudeActivityState native/Sources/PacerCore/ClaudeActivityRecord.swift:230— ClassTooLong — 426 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 26 over it, 1.07× 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: DesktopFrameDecoder native/Sources/PacerCore/DesktopFrameDecoder.swift:5— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 8 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (7 lines × 2) windows/Desktop/CompactChoices.cs:76— windows/Desktop/CompactChoices.cs:76-82 | windows/Desktop/PanelChoices.cs:21-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `windows/Desktop/CompactChoices.cs:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `windows/Desktop/PanelChoices.cs:28` calls `JsonArray`, `Select`, `Create` and `windows/Desktop/CompactChoices.cs:83` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) windows/Desktop/GuidePages.cs:59— windows/Desktop/GuidePages.cs:59-65 | windows/Desktop/SettingsPagePolicy.cs:31-38 — 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/Desktop/GuidePages.cs:59` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) native/Sources/PacerIsland/IslandModel.swift:1828— native/Sources/PacerIsland/IslandModel.swift:1828-1834 | windows/EngineSupport/PacerEngine.swift:3044-3050 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `native/Sources/PacerIsland/IslandModel.swift:1828` 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 (7 lines × 2) windows/EngineSupport/ClaudeWebBridge.swift:57— windows/EngineSupport/ClaudeWebBridge.swift:57-63 | windows/EngineSupport/DeepSeekWebBridge.swift:80-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `windows/EngineSupport/ClaudeWebBridge.swift:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `timeout` to `UInt64 = 20_000_000_000` in one and `UInt64 = UInt64(ProviderQuotaRefreshPolicy.replyTimeout * 1_000_000_000)` 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 (7 lines × 2) native/Sources/PacerCore/JSONFieldView.swift:81— native/Sources/PacerCore/JSONFieldView.swift:81-87 | native/Sources/PacerCore/JSONFieldView.swift:103-109 — 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 `native/Sources/PacerCore/JSONFieldView.swift:81` 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 (7 lines × 2) native/Sources/PacerIsland/ActivityBadge.swift:571— native/Sources/PacerIsland/ActivityBadge.swift:571-577 | native/Sources/PacerIsland/CompactQuotaViews.swift:181-187 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) windows/Desktop/WindowsConversationApplication.cs:95— windows/Desktop/WindowsConversationApplication.cs:95-101 | windows/Desktop/WindowsConversationApplication.cs:114-120 — 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/Desktop/WindowsConversationApplication.cs:95` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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 (7 lines × 2) windows/EngineSupport/Resources/WSL/bootstrap.py:5— windows/EngineSupport/Resources/WSL/bootstrap.py:5-11 | windows/EngineSupport/Resources/WSL/setup.py:9-15 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) windows/Desktop/WindowsSshTerminal.cs:19— windows/Desktop/WindowsSshTerminal.cs:19-24 | windows/Desktop/WindowsWslTerminal.cs:19-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) native/Sources/PacerIsland/ClaudeWebLogin.swift:185— native/Sources/PacerIsland/ClaudeWebLogin.swift:185-190 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:174-179 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 (6 lines × 2) native/Sources/PacerIsland/ClaudeWebLogin.swift:241— native/Sources/PacerIsland/ClaudeWebLogin.swift:241-246 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:241-246 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `native/Sources/PacerIsland/ClaudeWebLogin.swift:248` calls `cookiesDidChange`, `checkSession` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift:248` 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) native/Sources/PacerIsland/ClaudeWebLogin.swift:147— native/Sources/PacerIsland/ClaudeWebLogin.swift:147-152 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:138-143 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 `native/Sources/PacerIsland/ClaudeWebLogin.swift:147` 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) native/Sources/PacerIsland/SettingsSupportPane.swift:65— native/Sources/PacerIsland/SettingsSupportPane.swift:65-70 | native/Sources/PacerIsland/UpdateSettingsView.swift:58-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `5` in one and `2` 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 after the matched lines, `native/Sources/PacerIsland/UpdateSettingsView.swift:64` calls `Button`, `text`, `buttonStyle` and `native/Sources/PacerIsland/SettingsSupportPane.swift:71` 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) native/Sources/PacerMacSupport/MacDurableProgressSetup.swift:41— native/Sources/PacerMacSupport/MacDurableProgressSetup.swift:41-46 | windows/EngineSupport/WindowsDurableProgress.swift:80-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) native/Sources/PacerCore/Resources/claude_remote_setup.py:607— native/Sources/PacerCore/Resources/claude_remote_setup.py:607-612 | native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:262-267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×6
Edited copy of a member (9 corresponding lines) native/Sources/PacerCore/ClaudeRemoteSetup.swift:122— native/Sources/PacerCore/ClaudeRemoteSetup.swift:122-136 | native/Sources/PacerCore/CodexRemoteProgressSetup.swift:23-31 — 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) native/Sources/PacerIsland/DeepSeekWebBalance.swift:164— native/Sources/PacerIsland/DeepSeekWebBalance.swift:164-172 | native/Sources/PacerIsland/HarnessAccountConnection.swift:315-323 — 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) windows/Desktop/QuotaDial.cs:420— windows/Desktop/QuotaDial.cs:420-428 | windows/Desktop/QuotaDial.cs:430-438 — 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) native/Sources/PacerCore/CodexExecutableResolver.swift:38— native/Sources/PacerCore/CodexExecutableResolver.swift:38-46 | windows/EngineSupport/WindowsCodexExecutableDiscovery.swift:28-36 — 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) native/Sources/PacerMacSupport/NativeDesktopCollector.swift:173— native/Sources/PacerMacSupport/NativeDesktopCollector.swift:173-181 | windows/EngineSupport/WindowsDesktopTransport.swift:94-105 — 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) windows/EngineSupport/WindowsClaudeRemoteDigestStore.swift:19— windows/EngineSupport/WindowsClaudeRemoteDigestStore.swift:19-27 | windows/EngineSupport/WindowsStorageRecovery.swift:39-47 — 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.
AX2 · Stateful singletons· Process-global static state · ×5
Process-global static state: PacerPalette windows/Desktop/PacerPalette.cs:12— `PacerPalette` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (modules, Accent, Light, Primary, Secondary, Tertiary; e.g. `modules` at line 92). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: ProviderIcon windows/Desktop/ProviderIcon.cs:11— `ProviderIcon` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Sources; e.g. `Sources` at line 30). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: SettingsWindow windows/Desktop/SettingsAppearance.cs:11— `SettingsWindow` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (openedHarnessConnectors, restartingHarnessApps, checkingHarnessApps, rememberedAboutTab; e.g. `openedHarnessConnectors` at line 367). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: TaskProgressRing windows/Desktop/TaskProgressRing.cs:23— `TaskProgressRing` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Memories; e.g. `Memories` at line 142). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: TaskStatusIcon windows/Desktop/TaskStatusIcon.cs:20— `TaskStatusIcon` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (Faces; e.g. `Faces` at line 90). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Change coupling: Activity.swift ↔ SessionLogProbe.swift native/Sources/PacerCore/Activity.swift:1— `native/Sources/PacerCore/Activity.swift` and `native/Sources/PacerCore/SessionLogProbe.swift` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 9 shared commits counted here, the most recent 3 are `20b2bc0b` Keep task model metadata tied to its turn; `33d0c63a` Show model and reasoning effort on task rows; `04646202` Stabilize first-output timing and use age-based throughput colors — run `git show` on any of them.
Change coupling: Activity.swift ↔ DesktopWireProjection.swift native/Sources/PacerCore/Activity.swift:1— `native/Sources/PacerCore/Activity.swift` and `native/Sources/PacerCore/DesktopWireProjection.swift` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 7 shared commits counted here, the most recent 3 are `20b2bc0b` Keep task model metadata tied to its turn; `33d0c63a` Show model and reasoning effort on task rows; `86543957` Keep ended child tasks ended across Desktop replays — run `git show` on any of them.
Change coupling: IslandModel.swift ↔ TaskRowView.swift native/Sources/PacerIsland/IslandModel.swift:1— `native/Sources/PacerIsland/IslandModel.swift` and `native/Sources/PacerIsland/TaskRowView.swift` change together 62% of the time (13 of the 21 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 13 shared commits counted here, the most recent 3 are `14021a91` Build the expanded panel's blocks and its settings page on the Mac; `75b74e73` Show Claude's self-reported progress ring on the Mac; `3a90afd6` refactor: share activity state and task presentation — run `git show` on any of them.
Change coupling: GuideContent.cs ↔ SettingsOverview.cs windows/Desktop/GuideContent.cs:1— `windows/Desktop/GuideContent.cs` and `windows/Desktop/SettingsOverview.cs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 5 shared commits counted here, the most recent 3 are `d338bb34` Show where to get Pacer when an update check or download fails; `9ba5f5f3` Guide the WorkBuddy progress ring through its one manual step on Windows; `6866deeb` Port the Mac's live Collapsed Bar preview and remaining page details — run `git show` on any of them.
Change coupling: SessionLogProbe.swift ↔ PacerMain.swift native/Sources/PacerCore/SessionLogProbe.swift:1— `native/Sources/PacerCore/SessionLogProbe.swift` and `native/Sources/PacerIsland/PacerMain.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `fd999bb2` Fix subagent task grouping and retain displayed throughput; `e35d3d91` feat: update local and SSH tasks through persistent subscriptions (at that commit the file was still `native/Sources/PacerCore/RemoteProbe.swift`); `07ff3813` feat: add opt-in runtime event subscription experiment (at that commit the file was still `native/Sources/PacerCore/RemoteProbe.swift`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) windows/Desktop/GuideContent.cs:978— windows/Desktop/GuideContent.cs:978-987 | windows/Desktop/SettingsCardKit.cs:112-127 — 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) native/Sources/PacerCore/ClaudeQuotaClient.swift:42— native/Sources/PacerCore/ClaudeQuotaClient.swift:42-51 | native/Sources/PacerCore/ClaudeQuotaClient.swift:53-63 — 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) windows/Desktop/GuideContent.cs:110— windows/Desktop/GuideContent.cs:110-119 | windows/Desktop/SettingsConnections.cs:184-193 — 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) windows/Desktop/ActivityBadge.cs:287— windows/Desktop/ActivityBadge.cs:287-296 | windows/Desktop/ActivityBadge.cs:309-318 — 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) native/Sources/PacerCore/WorkBuddyHarness.swift:873— native/Sources/PacerCore/WorkBuddyHarness.swift:873-883 | windows/EngineSupport/PacerEngine.swift:1794-1803 — 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 (1 corresponding lines) · ×5
Edited copy of a member (1 corresponding lines) native/Sources/PacerIsland/PacerDesign.swift:32— native/Sources/PacerIsland/PacerDesign.swift:32-32 | native/Sources/PacerIsland/QuotaCycleChart.swift:14-16 — 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.
Edited copy of a member (1 corresponding lines) windows/Desktop/AccentPalette.cs:71— windows/Desktop/AccentPalette.cs:71-71 | windows/Desktop/SettingsPalette.cs:148-148 — 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.
Edited copy of a member (1 corresponding lines) native/Sources/PacerCore/ClaudeActivityReader.swift:259— native/Sources/PacerCore/ClaudeActivityReader.swift:259-259 | native/Sources/PacerCore/DeepSeekSessionReader.swift:146-148 — 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.
Edited copy of a member (1 corresponding lines) windows/Desktop/ComposedBadgeOrbit.cs:41— windows/Desktop/ComposedBadgeOrbit.cs:41-41 | windows/Desktop/NativeCompositionBackdrop.cs:29-29 — 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.
Edited copy of a member (1 corresponding lines) windows/EngineSupport/WindowsDesktopTransport.swift:117— windows/EngineSupport/WindowsDesktopTransport.swift:117-117 | windows/EngineSupport/WindowsHTTPStream.swift:138-138 — 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 copy of a member (11 corresponding lines) · ×4
Edited copy of a member (11 corresponding lines) windows/InstallerSupport/WindowsClaudeHookCommands.swift:21— windows/InstallerSupport/WindowsClaudeHookCommands.swift:21-32 | windows/InstallerSupport/WindowsClaudeHookCommands.swift:33-43 — 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) native/Sources/PacerMacSupport/MacCollectorDependencies.swift:37— native/Sources/PacerMacSupport/MacCollectorDependencies.swift:37-48 | native/Sources/PacerMacSupport/MacCollectorDependencies.swift:49-59 — 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/Desktop/PreferencesStore.cs:35— windows/Desktop/PreferencesStore.cs:35-52 | windows/Desktop/WindowsInstallationIdentity.cs:91-101 — 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/Desktop/WindowsInstallationIdentity.cs:91— windows/Desktop/WindowsInstallationIdentity.cs:91-101 | windows/Desktop/PreferencesStore.cs:35-52 — 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 (12 corresponding lines) · ×4
Edited copy of a member (12 corresponding lines) native/Sources/PacerCore/Resources/claude_remote_setup.py:607— native/Sources/PacerCore/Resources/claude_remote_setup.py:607-618 | native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:262-273 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) native/Sources/PacerIsland/MainWindowKit.swift:334— native/Sources/PacerIsland/MainWindowKit.swift:334-345 | native/Sources/PacerIsland/SettingsExpandedPanelPane.swift:614-627 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) windows/EngineSupport/PacerEngine.swift:1373— windows/EngineSupport/PacerEngine.swift:1373-1385 | windows/EngineSupport/PacerEngine.swift:1387-1398 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) windows/Desktop/CompactChoices.cs:75— windows/Desktop/CompactChoices.cs:75-86 | windows/Desktop/PanelChoices.cs:20-32 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) windows/Desktop/ClaudeConnectionCoordinator.cs:73— windows/Desktop/ClaudeConnectionCoordinator.cs:73-81 | windows/Desktop/DeepSeekConnectionCoordinator.cs:59-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) native/Sources/PacerIsland/IslandModel+DeepSeek.swift:298— native/Sources/PacerIsland/IslandModel+DeepSeek.swift:298-306 | native/Sources/PacerIsland/IslandModel+DeepSeek.swift:392-400 — 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 `native/Sources/PacerIsland/IslandModel+DeepSeek.swift:298` 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. 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 (9 lines × 2) native/Sources/PacerIsland/ClaudeWebLogin.swift:207— native/Sources/PacerIsland/ClaudeWebLogin.swift:207-215 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:208-216 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 `native/Sources/PacerIsland/ClaudeWebLogin.swift:207` 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) native/Sources/PacerIsland/CompactIslandHeader.swift:67— native/Sources/PacerIsland/CompactIslandHeader.swift:67-75 | native/Sources/PacerIsland/CompactIslandHeader.swift:121-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `native/Sources/PacerIsland/CompactIslandHeader.swift:67` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Repeated repair: scripts/windows/test-claude-runtime.py scripts/windows/test-claude-runtime.py:66— scripts/windows/test-claude-runtime.py changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is test-claude-runtime.select_slow_form at line 66), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix Codex progress lifecycle and Windows maintenance”; “fix(windows): forward Claude renderers through their shell”; “fix(windows): tier Claude launchers without MSYS switches”; “fix(windows): retain long-path safety in Claude runtime cleanup”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- scripts/windows/test-claude-runtime.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.
Repeated repair: native/Sources/PacerCore/IslandMotion.swift native/Sources/PacerCore/IslandMotion.swift:56— native/Sources/PacerCore/IslandMotion.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is IslandMotion.sample at line 56), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: restore Mac geometry imports and isolate Windows hashing”; “Add Custom screen positions and fix Claude next-step box endings for 3.2.0”; “fix: smooth island transitions and prevent duplicate instances”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- native/Sources/PacerCore/IslandMotion.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: REDACTED REDACTED:131— REDACTED changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is windows_claude_bootstrap.private_open at line 131), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(windows): bound Claude file ownership to token privileges”; “fix(windows): forward Claude renderers through their shell”; “fix(windows): request metadata access for Claude helper writes”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 15:52:52 +08:00' --until='2026-11-16 15:52:52 +08:00' --full-history --no-merges -- REDACTED`: 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· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) native/Sources/PacerIsland/ClaudeWebLogin.swift:366— native/Sources/PacerIsland/ClaudeWebLogin.swift:366-388 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:283-297 — 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) windows/Desktop/ClaudeConnectionCoordinator.cs:72— windows/Desktop/ClaudeConnectionCoordinator.cs:72-86 | windows/Desktop/DeepSeekConnectionCoordinator.cs:58-73 — 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) windows/Desktop/ClaudeConnectionCoordinator.cs:88— windows/Desktop/ClaudeConnectionCoordinator.cs:88-103 | windows/Desktop/DeepSeekConnectionCoordinator.cs:75-89 — 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, 5+ corresponding lines) · ×3
Edited copies of one member (3 members, 5+ corresponding lines) windows/Desktop/DeepSeekSoloView.cs:101— windows/Desktop/DeepSeekSoloView.cs:101-105 | windows/Desktop/SettingsAppearance.cs:42-46 | windows/Desktop/SingleQuotaView.cs:75-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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, 5+ corresponding lines) windows/Desktop/DeepSeekWebSession.cs:26— windows/Desktop/DeepSeekWebSession.cs:26-30 | windows/Desktop/DeepSeekWebSession.cs:32-36 | windows/Desktop/WorkBuddyAccountCredits.cs:144-148 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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, 5+ corresponding lines) native/Sources/PacerIsland/IslandModel.swift:376— native/Sources/PacerIsland/IslandModel.swift:376-380 | native/Sources/PacerIsland/IslandModel.swift:1474-1478 | native/Sources/PacerIsland/SettingsView.swift:556-561 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 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.
Stateful shared instance: HarnessGuideFloat windows/Desktop/HarnessGuideFloat.cs:23— `HarnessGuideFloat` keeps one instance of itself in the static `current`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (key, Presented; e.g. `key` at line 160).
Stateful shared instance: NativeCompactBar windows/Desktop/NativeCompactBar.cs:37— `NativeCompactBar` keeps one instance of itself in the static `SharedValue`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (previous, lastCached, previousClient, LastPending; e.g. `previous` at line 69).
Change-coupling hub: SettingsView.swift → CompactLayoutEditor.swift, IslandView.swift, PanelController.swift, WhatsNewView.swift native/Sources/PacerIsland/SettingsView.swift— `native/Sources/PacerIsland/SettingsView.swift` changes together with 4 other files — `native/Sources/PacerIsland/CompactLayoutEditor.swift`, `native/Sources/PacerIsland/IslandView.swift`, `native/Sources/PacerIsland/PanelController.swift`, `native/Sources/PacerIsland/WhatsNewView.swift` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: RealtimeProbe.swift → DesktopWireProjection.swift, WhatsNew.swift, WhatsNewView.swift native/Sources/PacerCore/RealtimeProbe.swift— `native/Sources/PacerCore/RealtimeProbe.swift` changes together with 3 other files — `native/Sources/PacerCore/DesktopWireProjection.swift`, `native/Sources/PacerCore/WhatsNew.swift`, `native/Sources/PacerIsland/WhatsNewView.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) native/Sources/PacerIsland/CompactQuotaViews.swift:602— native/Sources/PacerIsland/CompactQuotaViews.swift:602-621 | native/Sources/PacerIsland/DeepSeekDashboardView.swift:109-132 — 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) windows/Desktop/WindowsSshTerminal.cs:15— windows/Desktop/WindowsSshTerminal.cs:15-34 | windows/Desktop/WindowsWslTerminal.cs:14-33 — 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 (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) native/Sources/PacerCore/CompactComponentOptions.swift:93— native/Sources/PacerCore/CompactComponentOptions.swift:93-112 | native/Sources/PacerCore/ExpandedPanelLayout.swift:285-302 — 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.
Edited copy of a member (18 corresponding lines) native/Sources/PacerIsland/MainWindowKit.swift:185— native/Sources/PacerIsland/MainWindowKit.swift:185-202 | native/Sources/PacerIsland/WelcomeView.swift:406-425 — 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 (4 members, 3+ corresponding lines) · ×2
Edited copies of one member (4 members, 3+ corresponding lines) native/Sources/PacerCore/RealtimeActivityMonitor.swift:112— native/Sources/PacerCore/RealtimeActivityMonitor.swift:112-114 | native/Sources/PacerCore/RealtimeActivityMonitor.swift:115-119 | native/Sources/PacerCore/RealtimeActivityMonitor.swift:120-125 | native/Sources/PacerCore/RealtimeActivityMonitor.swift:126-132 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 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.
Edited copies of one member (4 members, 3+ corresponding lines) native/Sources/PacerCore/CodexClient.swift:361— native/Sources/PacerCore/CodexClient.swift:361-364 | windows/EngineSupport/WindowsClaudeRemoteDigestStore.swift:28-30 | windows/InstallerSupport/WindowsClaudeHookCommands.swift:18-20 | windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:53-55 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 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, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) native/Sources/PacerIsland/HarnessGuideFloat.swift:128— native/Sources/PacerIsland/HarnessGuideFloat.swift:128-135 | native/Sources/PacerIsland/PanelController.swift:424-430 | native/Sources/PacerIsland/PanelController.swift:460-465 — 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) native/Sources/PacerCore/ClaudeQuotaClient.swift:223— native/Sources/PacerCore/ClaudeQuotaClient.swift:223-229 | native/Sources/PacerCore/ClaudeWebQuotaClient.swift:123-128 | native/Sources/PacerCore/CodexClient.swift:110-117 — 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.
Duplicated block (12–14 lines × 2) native/Sources/PacerIsland/ClaudeWebLogin.swift:226— native/Sources/PacerIsland/ClaudeWebLogin.swift:226-239 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:228-239 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 `native/Sources/PacerIsland/ClaudeWebLogin.swift:226` 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–14 lines × 2) native/Sources/PacerIsland/ClaudeWebLogin.swift:280— native/Sources/PacerIsland/ClaudeWebLogin.swift:280-293 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:268-279 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 (13 lines × 2) windows/Desktop/IslandWindow.xaml.cs:995— windows/Desktop/IslandWindow.xaml.cs:995-1007 | windows/Desktop/IslandWindow.xaml.cs:1035-1047 — 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/Desktop/IslandWindow.xaml.cs:995` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) native/Sources/PacerCore/Resources/claude_remote_setup.py:76— native/Sources/PacerCore/Resources/claude_remote_setup.py:76-88 | native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:57-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) native/Sources/PacerCore/ClaudeActivityMonitor.swift:321— native/Sources/PacerCore/ClaudeActivityMonitor.swift:321-330 | native/Sources/PacerCore/DeepSeekActivityMonitor.swift:133-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) native/Sources/PacerCore/Resources/codex_progress_mcp.py:171— native/Sources/PacerCore/Resources/codex_progress_mcp.py:171-180 | windows/InstallerSupport/Resources/pacer-codex-progress.py:171-180 — before extracting anything, compare `native/Sources/PacerCore/Resources/codex_progress_mcp.py` and `windows/InstallerSupport/Resources/pacer-codex-progress.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) windows/Desktop/WindowsInstanceActivation.cs:101— windows/Desktop/WindowsInstanceActivation.cs:101-111 | windows/Desktop/WindowsInstanceActivation.cs:128-135 — 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/Desktop/WindowsInstanceActivation.cs:101` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) native/Sources/PacerCore/Resources/codex_progress_mcp.py:121— native/Sources/PacerCore/Resources/codex_progress_mcp.py:121-128 | windows/InstallerSupport/Resources/pacer-codex-progress.py:121-128 — before extracting anything, compare `native/Sources/PacerCore/Resources/codex_progress_mcp.py` and `windows/InstallerSupport/Resources/pacer-codex-progress.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 × 3) windows/Desktop/CompactLayoutEditorView.cs:295— windows/Desktop/CompactLayoutEditorView.cs:295-299 | windows/Desktop/GuideArt.cs:53-59 | windows/Desktop/SettingsAppearance.cs:247-251 — 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 `windows/Desktop/GuideArt.cs:53` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `windows/Desktop/GuideArt.cs:59` calls `Add`, `GeometryDrawing`, `RadialGradientBrush` and `windows/Desktop/CompactLayoutEditorView.cs:299` 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 × 3) native/Sources/PacerIsland/SettingsCollapsedBarPane.swift:51— native/Sources/PacerIsland/SettingsCollapsedBarPane.swift:51-55 | native/Sources/PacerIsland/SettingsExpandedPanelPane.swift:307-311 | native/Sources/PacerIsland/SettingsExpandedPanelPane.swift:514-518 — 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 `native/Sources/PacerIsland/SettingsCollapsedBarPane.swift:51` 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 (16 lines × 2) native/Sources/PacerCore/Resources/claude_remote_setup.py:57— native/Sources/PacerCore/Resources/claude_remote_setup.py:57-72 | native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:38-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) native/Sources/PacerCore/Resources/claude_remote_setup.py:117— native/Sources/PacerCore/Resources/claude_remote_setup.py:117-132 | native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:73-88 — 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.
Appears unstructured (no recognised architecture) — ~25.5k production LoC (1927 types) across 2 project(s) / 20 namespace(s) with no recognised architectural style or layering — at this size, deliberate module boundaries would help. No DDD/clean/vertical-slice/CQRS/transaction-script organisation was detected — code is likely organised ad hoc, which makes change and onboarding harder as it grows.
EngineRuntime.receive (cyclomatic 294) windows/EngineSupport/PacerEngine.swift:610— EngineRuntime.receive has cyclomatic complexity 294 (threshold 15). Of this number, 293 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClaudeActivityState.consumeRecord (cyclomatic 252) native/Sources/PacerCore/ClaudeActivityRecord.swift:381— ClaudeActivityState.consumeRecord has cyclomatic complexity 252 (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.
DesktopWireProjection.consume (cyclomatic 184) native/Sources/PacerCore/DesktopWireProjection.swift:562— DesktopWireProjection.consume has cyclomatic complexity 184 (threshold 15). Of this number, 182 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.
App.OnStartup (cyclomatic 172) windows/Desktop/App.xaml.cs:45— App.OnStartup has cyclomatic complexity 172 (threshold 15). Of this number, 136 points are the body's own statements and 36 belong to 13 function literals 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.
SessionActivity.consumeLive (cyclomatic 157) native/Sources/PacerCore/Activity.swift:1037— SessionActivity.consumeLive has cyclomatic complexity 157 (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.
DesktopWireProjection.projectedValue (cyclomatic 142) native/Sources/PacerCore/DesktopWireProjection.swift:393— DesktopWireProjection.projectedValue has cyclomatic complexity 142 (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.
ClaudeActivityRecord.transcript (cyclomatic 135) native/Sources/PacerCore/ClaudeActivityRecord.swift:53— ClaudeActivityRecord.transcript has cyclomatic complexity 135 (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.
RuntimeEventState.consume (cyclomatic 125) native/Sources/PacerCore/RuntimeEventState.swift:84— RuntimeEventState.consume has cyclomatic complexity 125 (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.
claude_hook.hook (cyclomatic 116) REDACTED:174— claude_hook.hook has cyclomatic complexity 116 (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.
NativeDesktopSession.receive (cyclomatic 111) native/Sources/PacerCore/NativeDesktopSession.swift:295— NativeDesktopSession.receive has cyclomatic complexity 111 (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.
CompactBarPresentation.project (cyclomatic 108) native/Sources/PacerCore/CompactBarPresentation.swift:208— CompactBarPresentation.project has cyclomatic complexity 108 (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 shape REPEATS in the file: one other method here (CompactBarPresentation.project::entry) 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.
DeepSeekActivityState.consume (cyclomatic 106) native/Sources/PacerCore/DeepSeekActivityState.swift:143— DeepSeekActivityState.consume has cyclomatic complexity 106 (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.
EngineRuntime.configure (cyclomatic 102) windows/EngineSupport/PacerEngine.swift:1098— EngineRuntime.configure has cyclomatic complexity 102 (threshold 15). Of this number, 100 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.
SessionActivity.consume (cyclomatic 99) native/Sources/PacerCore/Activity.swift:695— SessionActivity.consume has cyclomatic complexity 99 (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.
LocalActivityReader.read (cyclomatic 99) native/Sources/PacerCore/LocalActivityReader.swift:38— LocalActivityReader.read has cyclomatic complexity 99 (threshold 15). Of this number, 92 points are the body's own statements and 7 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.
claude_activity.transcript_record (cyclomatic 90) native/Sources/PacerCore/Resources/claude_activity.py:93— claude_activity.transcript_record has cyclomatic complexity 90 (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.
SettingsPalette.Apply (cyclomatic 89) windows/Desktop/SettingsPalette.cs:11— SettingsPalette.Apply has cyclomatic complexity 89 (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.
EngineRuntime.publish (cyclomatic 89) windows/EngineSupport/PacerEngine.swift:2751— EngineRuntime.publish has cyclomatic complexity 89 (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.
ClaudeActivityReader.read (cyclomatic 88) native/Sources/PacerCore/ClaudeActivityReader.swift:48— ClaudeActivityReader.read has cyclomatic complexity 88 (threshold 15). Of this number, 83 points are the body's own statements and 5 belong to 3 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.
LocalHarnessProgressSetup.apply (cyclomatic 82) native/Sources/PacerCore/LocalHarnessProgressSetup.swift:134— LocalHarnessProgressSetup.apply has cyclomatic complexity 82 (threshold 15). Of this number, 65 points are the body's own statements and 17 belong to 3 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.
RealtimeActivityMonitor.receiveDesktop (cyclomatic 79) native/Sources/PacerCore/RealtimeActivityMonitor.swift:501— RealtimeActivityMonitor.receiveDesktop has cyclomatic complexity 79 (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.
PacerEngine.run (cyclomatic 77) windows/EngineSupport/PacerEngine.swift:8— PacerEngine.run has cyclomatic complexity 77 (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.
HarnessProgressGuide.init (cyclomatic 75) native/Sources/PacerCore/HarnessProgressGuide.swift:74— HarnessProgressGuide.init has cyclomatic complexity 75 (threshold 15). Of this number, 73 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TaskProgressRing.Apply (cyclomatic 73) windows/Desktop/TaskProgressRing.cs:133— TaskProgressRing.Apply has cyclomatic complexity 73 (threshold 15). Of this number, 72 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.
TaskStatusIconNSView.apply (cyclomatic 68) native/Sources/PacerIsland/TaskStatusIconView.swift:414— TaskStatusIconNSView.apply has cyclomatic complexity 68 (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.
ActivityBadge.Update (cyclomatic 67) windows/Desktop/ActivityBadge.cs:151— ActivityBadge.Update has cyclomatic complexity 67 (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.
SettingsWindow.RefreshCollapsed (cyclomatic 67) windows/Desktop/SettingsCollapsed.cs:396— SettingsWindow.RefreshCollapsed has cyclomatic complexity 67 (threshold 15). Of this number, 66 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.
WorkBuddyTranscript.consume (cyclomatic 65) native/Sources/PacerCore/WorkBuddyTranscript.swift:198— WorkBuddyTranscript.consume has cyclomatic complexity 65 (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.
SettingsWindow.RefreshDeepSeek (cyclomatic 62) windows/Desktop/SettingsDeepSeek.cs:192— SettingsWindow.RefreshDeepSeek has cyclomatic complexity 62 (threshold 15). Of this number, 60 points are the body's own statements and 2 belong to 2 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.
ClaudeQuotaClient.fetchQuota (cyclomatic 62) native/Sources/PacerCore/ClaudeQuotaClient.swift:239— ClaudeQuotaClient.fetchQuota has cyclomatic complexity 62 (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.
SettingsWindow.RefreshConnections (cyclomatic 60) windows/Desktop/SettingsConnections.cs:98— SettingsWindow.RefreshConnections has cyclomatic complexity 60 (threshold 15). Of this number, 59 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
SettingsWindow.RefreshHarnessProgressGuide (cyclomatic 60) windows/Desktop/SettingsHarness.cs:151— SettingsWindow.RefreshHarnessProgressGuide has cyclomatic complexity 60 (threshold 15). Of this number, 49 points are the body's own statements and 11 belong 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.
WindowsActivityNavigation.resolve (cyclomatic 60) windows/EngineSupport/WindowsActivityNavigation.swift:19— WindowsActivityNavigation.resolve has cyclomatic complexity 60 (threshold 15). Of this number, 58 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
PanelController.layout (cyclomatic 60) native/Sources/PacerIsland/PanelController.swift:140— PanelController.layout has cyclomatic complexity 60 (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.
claude_remote_setup.install (cyclomatic 56) native/Sources/PacerCore/Resources/claude_remote_setup.py:471— claude_remote_setup.install has cyclomatic complexity 56 (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.
DesktopFrameDecoder.field (cyclomatic 55) native/Sources/PacerCore/DesktopFrameDecoder.swift:57— DesktopFrameDecoder.field has cyclomatic complexity 55 (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.
RealtimeActivityMonitor.reconcile (cyclomatic 54) native/Sources/PacerCore/RealtimeActivityMonitor.swift:297— RealtimeActivityMonitor.reconcile has cyclomatic complexity 54 (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.
claude_activity.otlp_records (cyclomatic 53) native/Sources/PacerCore/Resources/claude_activity.py:283— claude_activity.otlp_records has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IslandWindow.UpdateCompactBar (cyclomatic 51) windows/Desktop/IslandCompactBar.cs:71— IslandWindow.UpdateCompactBar has cyclomatic complexity 51 (threshold 15). Of this number, 41 points are the body's own statements and 10 belong to 2 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.
DeepSeekSessionLog.parse (cyclomatic 50) native/Sources/PacerCore/DeepSeekSessionLog.swift:89— DeepSeekSessionLog.parse has cyclomatic complexity 50 (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.
ClaudeActivityTelemetry.request (cyclomatic 48) native/Sources/PacerCore/ClaudeActivityTelemetry.swift:277— ClaudeActivityTelemetry.request has cyclomatic complexity 48 (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.
claude_activity.main (cyclomatic 48) native/Sources/PacerCore/Resources/claude_activity.py:621— claude_activity.main has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WindowsConversationApplication.TryDestination (cyclomatic 45) windows/Desktop/WindowsConversationApplication.cs:158— WindowsConversationApplication.TryDestination has cyclomatic complexity 45 (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.
ClaudeCloudProjectState.applyThread (cyclomatic 45) native/Sources/PacerCore/ClaudeCloudProjectState.swift:259— ClaudeCloudProjectState.applyThread has cyclomatic complexity 45 (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.
ConnectionPagePresentation.init (cyclomatic 45) native/Sources/PacerCore/ConnectionPagePresentation.swift:27— ConnectionPagePresentation.init has cyclomatic complexity 45 (threshold 15). Of this number, 32 points are the body's own statements and 13 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.
SettingsWindow.RefreshUpdates (cyclomatic 44) windows/Desktop/SettingsUpdates.cs:74— SettingsWindow.RefreshUpdates has cyclomatic complexity 44 (threshold 15). Of this number, 43 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.
SessionActivity.mergeDisplayMetadata (cyclomatic 44) native/Sources/PacerCore/Activity.swift:320— SessionActivity.mergeDisplayMetadata has cyclomatic complexity 44 (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.
WorkBuddyMonitor.project (cyclomatic 44) native/Sources/PacerCore/WorkBuddyHarness.swift:666— WorkBuddyMonitor.project has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SettingsWindow.CommitSourceAsync (cyclomatic 43) windows/Desktop/SettingsCodex.cs:280— SettingsWindow.CommitSourceAsync has cyclomatic complexity 43 (threshold 15). Of this number, 42 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.
SettingsWindow.RefreshReminders (cyclomatic 43) windows/Desktop/SettingsReminders.cs:264— SettingsWindow.RefreshReminders has cyclomatic complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong 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.
EngineRuntime.collect (cyclomatic 42) windows/EngineSupport/PacerEngine.swift:2492— EngineRuntime.collect has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TaskStatusIcon.ApplyFace (cyclomatic 41) windows/Desktop/TaskStatusIcon.cs:86— TaskStatusIcon.ApplyFace has cyclomatic complexity 41 (threshold 15). Of this number, 40 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.
WindowsHTTPProxy.forHTTPS (cyclomatic 41) windows/EngineSupport/WindowsHTTPStream.swift:170— WindowsHTTPProxy.forHTTPS has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkBuddyMonitor.refresh (cyclomatic 41) native/Sources/PacerCore/WorkBuddyHarness.swift:559— WorkBuddyMonitor.refresh has cyclomatic complexity 41 (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.
GuideContent.Module (cyclomatic 40) windows/Desktop/GuideContent.cs:445— GuideContent.Module has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 7 of the 40 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 473, 458, 460). 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.
EngineShellProjection.reply (cyclomatic 40) windows/EngineSupport/EngineShellProjection.swift:27— EngineShellProjection.reply has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
SessionActivity.consumeCodexReport (cyclomatic 40) native/Sources/PacerCore/Activity.swift:667— SessionActivity.consumeCodexReport has cyclomatic complexity 40 (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.
ClaudeWebQuotaClient.fetchQuota (cyclomatic 40) native/Sources/PacerCore/ClaudeWebQuotaClient.swift:136— ClaudeWebQuotaClient.fetchQuota has cyclomatic complexity 40 (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.
LocalActivityReader.latestTurnAnchor (cyclomatic 40) native/Sources/PacerCore/LocalActivityReader.swift:258— LocalActivityReader.latestTurnAnchor has cyclomatic complexity 40 (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.
TaskStatusIconNSView.applyFace (cyclomatic 39) native/Sources/PacerIsland/TaskStatusIconView.swift:558— TaskStatusIconNSView.applyFace has cyclomatic complexity 39 (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.
PreferencesCodec.Decode (cyclomatic 38) windows/Desktop/PreferencesCodec.cs:30— PreferencesCodec.Decode has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SettingsWindow.RefreshClaude (cyclomatic 38) windows/Desktop/SettingsClaude.cs:70— SettingsWindow.RefreshClaude has cyclomatic complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
EngineClient.Receive (cyclomatic 37) windows/Desktop/EngineClient.cs:256— EngineClient.Receive has cyclomatic complexity 37 (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.
SettingsWindow.RefreshCodex (cyclomatic 37) windows/Desktop/SettingsCodex.cs:172— SettingsWindow.RefreshCodex has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeepSeekProgressSetup.apply (cyclomatic 37) native/Sources/PacerCore/DeepSeekProgressSetup.swift:43— DeepSeekProgressSetup.apply has cyclomatic complexity 37 (threshold 15). Of this number, 35 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.
JSONFieldView.protobufIntegerText (cyclomatic 37) native/Sources/PacerCore/JSONFieldView.swift:159— JSONFieldView.protobufIntegerText has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TaskStatusIconNSView.updateLoops (cyclomatic 37) native/Sources/PacerIsland/TaskStatusIconView.swift:803— TaskStatusIconNSView.updateLoops has cyclomatic complexity 37 (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.
SettingsWindow.RefreshDeepSeekConnection (cyclomatic 36) windows/Desktop/SettingsDeepSeekConnection.cs:209— SettingsWindow.RefreshDeepSeekConnection has cyclomatic complexity 36 (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.
SettingsWindow.PanelBlockButton (cyclomatic 36) windows/Desktop/SettingsPanel.cs:589— SettingsWindow.PanelBlockButton has cyclomatic complexity 36 (threshold 15). Of this number, 18 points are the body's own statements and 18 belong to 5 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.
EngineRuntime.projectCollected (cyclomatic 36) windows/EngineSupport/PacerEngine.swift:2621— EngineRuntime.projectCollected has cyclomatic complexity 36 (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.
IslandWindow.RenderPanel (cyclomatic 35) windows/Desktop/IslandPanelSections.cs:152— IslandWindow.RenderPanel has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EngineRuntime.connectionPresentation (cyclomatic 35) windows/EngineSupport/PacerEngine.swift:2396— EngineRuntime.connectionPresentation has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClaudeCloudProjectMonitor.pollOnce (cyclomatic 35) native/Sources/PacerCore/ClaudeCloudProjectMonitor.swift:132— ClaudeCloudProjectMonitor.pollOnce has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ClaudeHookInstaller.setPlugin (cyclomatic 35) native/Sources/PacerCore/ClaudeHookInstaller.swift:273— ClaudeHookInstaller.setPlugin has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompletionInbox.observe (cyclomatic 35) native/Sources/PacerCore/CompletionInbox.swift:262— CompletionInbox.observe has cyclomatic complexity 35 (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.
DesktopFrameDecoder.sanitizedPatch (cyclomatic 35) native/Sources/PacerCore/DesktopFrameDecoder.swift:214— DesktopFrameDecoder.sanitizedPatch has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
claude_activity.sanitized (cyclomatic 35) native/Sources/PacerCore/Resources/claude_activity.py:193— claude_activity.sanitized has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SettingsWindow.BuildDeepSeekConnection (cyclomatic 34) windows/Desktop/SettingsDeepSeekConnection.cs:44— SettingsWindow.BuildDeepSeekConnection has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 50, 78, 99, …). 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.
SettingsWindow.RefreshExpandedPanel (cyclomatic 34) windows/Desktop/SettingsPanel.cs:399— SettingsWindow.RefreshExpandedPanel 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.
CodexLogAttention.consume (cyclomatic 34) native/Sources/PacerCore/CodexLogAttention.swift:21— CodexLogAttention.consume has cyclomatic complexity 34 (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.
HarnessActivityStore.accept (cyclomatic 34) native/Sources/PacerCore/HarnessActivityStore.swift:89— HarnessActivityStore.accept 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.
Tailer.read (cyclomatic 34) native/Sources/PacerCore/Resources/claude_activity.py:488— Tailer.read 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.
claude_remote_setup.set_plugin (cyclomatic 34) native/Sources/PacerCore/Resources/claude_remote_setup.py:376— claude_remote_setup.set_plugin 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.
AlternatingQuotaText.Update (cyclomatic 33) windows/Desktop/AlternatingQuotaText.cs:76— AlternatingQuotaText.Update 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.
HarnessAccountCard.Build (cyclomatic 33) windows/Desktop/HarnessAccountCard.cs:16— HarnessAccountCard.Build has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to 2 function literals 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.
TaskProgressRing.UpdateSpin (cyclomatic 33) windows/Desktop/TaskProgressRing.cs:355— TaskProgressRing.UpdateSpin 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.
SessionActivity.consumeResponse (cyclomatic 33) native/Sources/PacerCore/Activity.swift:983— SessionActivity.consumeResponse 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.
Cursor.string (cyclomatic 33) native/Sources/PacerCore/DesktopFrameDecoder.swift:422— Cursor.string has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 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.
ZstdFrameDecoder.decode (cyclomatic 33) native/Sources/PacerCore/ZstdFrameDecoder.swift:28— ZstdFrameDecoder.decode 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.
SettingsWindow.RefreshClaudeConnection (cyclomatic 32) windows/Desktop/SettingsClaudeConnection.cs:65— SettingsWindow.RefreshClaudeConnection has cyclomatic complexity 32 (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.
UpdateCatalog.Parse (cyclomatic 32) windows/UpdateSupport/UpdateCatalog.cs:93— UpdateCatalog.Parse has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WindowsWSLServices.discover (cyclomatic 32) windows/EngineSupport/WindowsWSL.swift:211— WindowsWSLServices.discover has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IslandModel.configureClaudeRemote (cyclomatic 32) native/Sources/PacerIsland/IslandModel.swift:1266— IslandModel.configureClaudeRemote has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NativeDesktopCollector.run (cyclomatic 32) native/Sources/PacerMacSupport/NativeDesktopCollector.swift:186— NativeDesktopCollector.run has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
codex_remote_progress_setup.install (cyclomatic 32) native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:178— codex_remote_progress_setup.install has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodexQuotaCoordinator.read (cyclomatic 31) native/Sources/PacerCore/CodexQuotaCoordinator.swift:145— CodexQuotaCoordinator.read has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActivityBadge.UpdateEstimate (cyclomatic 30) windows/Desktop/ActivityBadge.cs:236— ActivityBadge.UpdateEstimate has cyclomatic complexity 30 (threshold 15). Of this number, 29 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.
SettingsWindow.RefreshHarnessPage (cyclomatic 30) windows/Desktop/SettingsHarness.cs:666— SettingsWindow.RefreshHarnessPage has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SettingsWindow.CommitProviderHome (cyclomatic 30) windows/Desktop/SettingsProviderHome.cs:108— SettingsWindow.CommitProviderHome has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
WindowsInstallationOperations.UninstallAsync (cyclomatic 30) windows/Desktop/WindowsInstallationOperations.cs:230— WindowsInstallationOperations.UninstallAsync has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
EngineRuntime.receiveWSLDiscovery (cyclomatic 30) windows/EngineSupport/PacerEngine.swift:2120— EngineRuntime.receiveWSLDiscovery has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClaudeActivityTelemetry.requestBody (cyclomatic 30) native/Sources/PacerCore/ClaudeActivityTelemetry.swift:105— ClaudeActivityTelemetry.requestBody has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to one function item 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.
ConnectionSummary.init (cyclomatic 30) native/Sources/PacerCore/ConnectionPresentation.swift:155— ConnectionSummary.init has cyclomatic complexity 30 (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.
DeepSeekSessionLog.progressResult (cyclomatic 30) native/Sources/PacerCore/DeepSeekSessionLog.swift:216— DeepSeekSessionLog.progressResult has cyclomatic complexity 30 (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.
DesktopFrameDecoder.object (cyclomatic 30) native/Sources/PacerCore/DesktopFrameDecoder.swift:138— DesktopFrameDecoder.object 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.
NativeDesktopSession.observeDurableHistory (cyclomatic 30) native/Sources/PacerCore/NativeDesktopSession.swift:143— NativeDesktopSession.observeDurableHistory 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.
RemoteControlCatalogAuthorization.init (cyclomatic 30) native/Sources/PacerCore/RemoteControlCatalogAuthorization.swift:10— RemoteControlCatalogAuthorization.init has cyclomatic complexity 30 (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.
readGroups (cyclomatic 30) native/Sources/PacerCore/Resources/workbuddy-account-credits.js:73— readGroups has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 32 function literals 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.
PreferencesCodec.Normalize (cyclomatic 29) windows/Desktop/PreferencesCodec.cs:151— PreferencesCodec.Normalize has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong 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.
SettingsWindow.RefreshValues (cyclomatic 29) windows/Desktop/SettingsWindow.cs:490— SettingsWindow.RefreshValues has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WindowsClaudeRuntimeStore.ensure (cyclomatic 29) windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:117— WindowsClaudeRuntimeStore.ensure has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodexProgressSetup.apply (cyclomatic 29) native/Sources/PacerCore/CodexProgressReporter.swift:196— CodexProgressSetup.apply has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Program.Main (cyclomatic 28) windows/Maintenance/Program.cs:5— Program.Main has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EngineGuidePages.project (cyclomatic 28) windows/EngineSupport/EngineGuidePages.swift:40— EngineGuidePages.project has cyclomatic complexity 28 (threshold 15). Of this number, 20 points are the body's own statements and 8 belong to one function item inside it that branches. 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.
EngineSnapshotEmission.equal (cyclomatic 28) windows/EngineSupport/EngineSnapshotEmission.swift:34— EngineSnapshotEmission.equal has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompactBarContext.init (cyclomatic 28) native/Sources/PacerCore/CompactBarContext.swift:101— CompactBarContext.init has cyclomatic complexity 28 (threshold 15). Of this number, 26 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.
DeepSeekDialPresentation.init (cyclomatic 28) native/Sources/PacerCore/DeepSeekDialPresentation.swift:22— DeepSeekDialPresentation.init 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.
DeepSeekProgressSetup.update (cyclomatic 28) native/Sources/PacerCore/DeepSeekProgressSetup.swift:152— DeepSeekProgressSetup.update has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HostApplicationTrackingState.prepare (cyclomatic 28) native/Sources/PacerCore/HostApplicationTrackingState.swift:84— HostApplicationTrackingState.prepare has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IslandModel.performLifecycle (cyclomatic 28) native/Sources/PacerIsland/IslandModel.swift:2683— IslandModel.performLifecycle has cyclomatic complexity 28 (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.
TaskGlyphArt.svg (cyclomatic 28) native/Sources/PacerIsland/TaskGlyphArt.swift:128— TaskGlyphArt.svg has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 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.
SettingsWindow.RefreshSidebar (cyclomatic 27) windows/Desktop/SettingsSidebar.cs:326— SettingsWindow.RefreshSidebar has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WindowsConversationApplication.OpenAsync (cyclomatic 27) windows/Desktop/WindowsConversationApplication.cs:134— WindowsConversationApplication.OpenAsync has cyclomatic complexity 27 (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.
ClaudeQuotaCoordinator.read (cyclomatic 27) native/Sources/PacerCore/ClaudeQuotaCoordinator.swift:109— ClaudeQuotaCoordinator.read has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodexClient.setDurableProgressPlugin (cyclomatic 27) native/Sources/PacerCore/CodexClient.swift:252— CodexClient.setDurableProgressPlugin has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IslandWindow.FillQuota (cyclomatic 26) windows/Desktop/IslandPanelSections.cs:288— IslandWindow.FillQuota has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 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.
PreferencesCodec.Encode (cyclomatic 26) windows/Desktop/PreferencesCodec.cs:178— PreferencesCodec.Encode has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PreferencesStore.Save (cyclomatic 26) windows/Desktop/PreferencesStore.cs:97— PreferencesStore.Save has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
MotionBridge.swift.pacerLayoutFrame (cyclomatic 26) windows/Bridge/MotionBridge.swift:132— MotionBridge.swift.pacerLayoutFrame has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
main.swift.top-level code (cyclomatic 26) windows/InstallerHooks/main.swift:4— main.swift.top-level code has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SessionActivity.observeCodexGoal (cyclomatic 26) native/Sources/PacerCore/Activity.swift:620— SessionActivity.observeCodexGoal has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeAgentNotification.init (cyclomatic 26) native/Sources/PacerCore/ClaudeAgentNotification.swift:9— ClaudeAgentNotification.init has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to one function item 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.
CodexRolloutMetadata.read (cyclomatic 26) native/Sources/PacerCore/CodexSessionOrigin.swift:83— CodexRolloutMetadata.read has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeepSeekBalanceCoordinator.refreshIfDue (cyclomatic 26) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:122— DeepSeekBalanceCoordinator.refreshIfDue has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Cursor.number (cyclomatic 26) native/Sources/PacerCore/DesktopFrameDecoder.swift:399— Cursor.number has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DesktopValue.patch (cyclomatic 26) native/Sources/PacerCore/DesktopWireProjection.swift:38— DesktopValue.patch has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cursor.skipString (cyclomatic 26) native/Sources/PacerCore/JSONFieldView.swift:295— Cursor.skipString has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PacerMain.main (cyclomatic 26) native/Sources/PacerIsland/PacerMain.swift:12— PacerMain.main has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EngineClient.StartAsync (cyclomatic 25) windows/Desktop/EngineClient.cs:60— EngineClient.StartAsync has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HighContrastScope.Discover (cyclomatic 25) windows/Desktop/HighContrastScope.cs:39— HighContrastScope.Discover has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong 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.
SettingsWindow.RefreshHistory (cyclomatic 25) windows/Desktop/SettingsOverview.cs:433— SettingsWindow.RefreshHistory has cyclomatic complexity 25 (threshold 15). Of this number, 24 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.
SettingsWindow.SettingsWindow.ctor (cyclomatic 25) windows/Desktop/SettingsWindow.cs:73— SettingsWindow.SettingsWindow.ctor has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 153, 166, 152, …). 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.
WindowsClaudeRuntimeStore.collect (cyclomatic 25) windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:224— WindowsClaudeRuntimeStore.collect 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.
ClaudeDesktopCredentialStore.decodeCache (cyclomatic 25) native/Sources/PacerCore/ClaudeDesktopCredentialStore.swift:27— ClaudeDesktopCredentialStore.decodeCache has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeSSHDiscovery.configurations (cyclomatic 25) native/Sources/PacerCore/ClaudeSSHDiscovery.swift:67— ClaudeSSHDiscovery.configurations has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CodexClientError.errorDescription (cyclomatic 25) native/Sources/PacerCore/CodexClient.swift:16— CodexClientError.errorDescription has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
RemoteControlCatalog.refresh (cyclomatic 25) native/Sources/PacerCore/RemoteControlCatalog.swift:121— RemoteControlCatalog.refresh has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TaskProgressRing.make (cyclomatic 25) native/Sources/PacerCore/SelfReportedProgress.swift:76— TaskProgressRing.make has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WorkBuddyRunLog.time (cyclomatic 25) native/Sources/PacerCore/WorkBuddyRunLog.swift:174— WorkBuddyRunLog.time has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
codex_progress_mcp.record_receipt (cyclomatic 25) native/Sources/PacerCore/Resources/codex_progress_mcp.py:56— codex_progress_mcp.record_receipt 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.
pacer-codex-progress.record_receipt (cyclomatic 25) windows/InstallerSupport/Resources/pacer-codex-progress.py:56— pacer-codex-progress.record_receipt 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.
GuideWindow.GuideWindow.ctor (cyclomatic 24) windows/Desktop/GuideWindow.cs:31— GuideWindow.GuideWindow.ctor has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 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.
SessionActivity.recoverCodexEnding (cyclomatic 24) native/Sources/PacerCore/Activity.swift:946— SessionActivity.recoverCodexEnding has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeLiveSessionRegistry.holders (cyclomatic 24) native/Sources/PacerCore/ClaudeLiveSessionRegistry.swift:30— ClaudeLiveSessionRegistry.holders has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CodexClient.fetchQuota (cyclomatic 24) native/Sources/PacerCore/CodexClient.swift:134— CodexClient.fetchQuota 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.
RealtimeActivityMonitor.readControlDirectory (cyclomatic 24) native/Sources/PacerCore/RealtimeActivityMonitor.swift:214— RealtimeActivityMonitor.readControlDirectory has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WorkBuddySessionStore.rows (cyclomatic 24) native/Sources/PacerCore/WorkBuddyHarness.swift:211— WorkBuddySessionStore.rows 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.
IslandModel.syncLocalHarnessProgress (cyclomatic 24) native/Sources/PacerIsland/IslandModel.swift:642— IslandModel.syncLocalHarnessProgress 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.
IslandModel.refreshDeepSeekBalance (cyclomatic 24) native/Sources/PacerIsland/IslandModel+DeepSeek.swift:283— IslandModel.refreshDeepSeekBalance has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
App.ShowGuideCoreAsync (cyclomatic 23) windows/Desktop/AppGuidePages.cs:28— App.ShowGuideCoreAsync has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong 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.
WindowsInstanceActivation.Receive (cyclomatic 23) windows/Desktop/WindowsInstanceActivation.cs:66— WindowsInstanceActivation.Receive has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 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.
EngineRuntime.maintenanceRefresh (cyclomatic 23) windows/EngineSupport/PacerEngine.swift:1741— EngineRuntime.maintenanceRefresh has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
EngineRuntime.performLifecycle (cyclomatic 23) windows/EngineSupport/PacerEngine.swift:1805— EngineRuntime.performLifecycle has cyclomatic complexity 23 (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.
ActivitySourceMerger.merge (cyclomatic 23) native/Sources/PacerCore/ActivitySourceMerger.swift:4— ActivitySourceMerger.merge 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.
ClaudeWebQuotaClient.request (cyclomatic 23) native/Sources/PacerCore/ClaudeWebQuotaClient.swift:204— ClaudeWebQuotaClient.request has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
TaskProgressReporter.response (cyclomatic 23) native/Sources/PacerCore/CodexProgressReporter.swift:80— TaskProgressReporter.response 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.
CompactWarningPresentation.items (cyclomatic 23) native/Sources/PacerCore/CompactWarningPresentation.swift:46— CompactWarningPresentation.items has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DesktopFrameDecoder.array (cyclomatic 23) native/Sources/PacerCore/DesktopFrameDecoder.swift:183— DesktopFrameDecoder.array 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.
HarnessCreditsPresentation.init (cyclomatic 23) native/Sources/PacerCore/HarnessCreditsPresentation.swift:54— HarnessCreditsPresentation.init has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 belong to 3 function items inside it that branch. 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.
RemoteActivityTarget.configuration (cyclomatic 23) native/Sources/PacerCore/RemoteActivityTarget.swift:62— RemoteActivityTarget.configuration 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.
WorkBuddySessionStore.usage (cyclomatic 23) native/Sources/PacerCore/WorkBuddyHarness.swift:409— WorkBuddySessionStore.usage 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.
ActivityBadge.body (cyclomatic 23) native/Sources/PacerIsland/ActivityBadge.swift:75— ActivityBadge.body 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.
QuotaRingsView.rebuild (cyclomatic 23) native/Sources/PacerIsland/CompactQuotaViews.swift:358— QuotaRingsView.rebuild 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.
MacDurableProgressSetup.reconcile (cyclomatic 23) native/Sources/PacerMacSupport/MacDurableProgressSetup.swift:20— MacDurableProgressSetup.reconcile 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.
DeepSeekQuotaCell.DeepSeekQuotaCell.ctor (cyclomatic 22) windows/Desktop/DeepSeekQuotaCell.cs:16— DeepSeekQuotaCell.DeepSeekQuotaCell.ctor has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong 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.
DeepSeekBudgetDetails.DeepSeekBudgetDetails.ctor (cyclomatic 22) windows/Desktop/DeepSeekSoloView.cs:279— DeepSeekBudgetDetails.DeepSeekBudgetDetails.ctor 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.
IslandPlacementGeometry.Arrange (cyclomatic 22) windows/Desktop/IslandPlacementGeometry.cs:49— IslandPlacementGeometry.Arrange 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.
IslandWindow.Relayout (cyclomatic 22) windows/Desktop/IslandWindow.xaml.cs:472— IslandWindow.Relayout 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.
SettingsWindow.UpdateSourceStatus (cyclomatic 22) windows/Desktop/SettingsCodex.cs:254— SettingsWindow.UpdateSourceStatus has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SettingsWindow.CommitDeepSeekBudget (cyclomatic 22) windows/Desktop/SettingsDeepSeek.cs:168— SettingsWindow.CommitDeepSeekBudget has cyclomatic complexity 22 (threshold 15). Of this number, 21 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.
SettingsWindow.AttentionItems (cyclomatic 22) windows/Desktop/SettingsOverview.cs:56— SettingsWindow.AttentionItems 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.
SettingsWindow.RefreshBanner (cyclomatic 22) windows/Desktop/SettingsOverview.cs:245— SettingsWindow.RefreshBanner 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.
TaskStatusIcon.RebuildGlyph (cyclomatic 22) windows/Desktop/TaskStatusIcon.cs:142— TaskStatusIcon.RebuildGlyph 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.
WindowsStartupRegistration.SetCore (cyclomatic 22) windows/Desktop/WindowsStartupRegistration.cs:133— WindowsStartupRegistration.SetCore 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.
UpdateHandoff.Apply (cyclomatic 22) windows/UpdateSupport/UpdateHandoff.cs:72— UpdateHandoff.Apply has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
DeepSeekBalanceHistoryStore.decode (cyclomatic 22) windows/EngineSupport/DeepSeekBalanceHistoryStore.swift:26— DeepSeekBalanceHistoryStore.decode has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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.
WindowsDurableProgressSetup.apply (cyclomatic 22) windows/EngineSupport/WindowsDurableProgress.swift:74— WindowsDurableProgressSetup.apply has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
SessionActivity.mergeCodexRequestEvidence (cyclomatic 22) native/Sources/PacerCore/Activity.swift:598— SessionActivity.mergeCodexRequestEvidence has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityNavigationTarget.resolve (cyclomatic 22) native/Sources/PacerCore/ActivityNavigationTarget.swift:4— ActivityNavigationTarget.resolve 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.
ActivityTaskRowPresentation.init (cyclomatic 22) native/Sources/PacerCore/ActivityTaskPresentation.swift:195— ActivityTaskRowPresentation.init has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClaudeCloudProjectState.sessionsToRead (cyclomatic 22) native/Sources/PacerCore/ClaudeCloudProjectState.swift:133— ClaudeCloudProjectState.sessionsToRead 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.
CodexClient.setProgressReporter (cyclomatic 22) native/Sources/PacerCore/CodexClient.swift:221— CodexClient.setProgressReporter 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.
DeepSeekBalanceCoordinator.configure (cyclomatic 22) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:72— DeepSeekBalanceCoordinator.configure 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.
DesktopRouteHints.changed (cyclomatic 22) native/Sources/PacerCore/DesktopRouteHints.swift:20— DesktopRouteHints.changed has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModelDisplay.name (cyclomatic 22) native/Sources/PacerCore/ModelDisplay.swift:25— ModelDisplay.name 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.
Reading.init (cyclomatic 22) native/Sources/PacerCore/QuotaDashboardPresentation.swift:189— Reading.init has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ResponsePerformanceMeter.observeRuntime (cyclomatic 22) native/Sources/PacerCore/ResponsePerformance.swift:110— ResponsePerformanceMeter.observeRuntime has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SessionIndex.entries (cyclomatic 22) native/Sources/PacerCore/SessionIndex.swift:12— SessionIndex.entries 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.
WorkBuddySessionStore.automationRuns (cyclomatic 22) native/Sources/PacerCore/WorkBuddyHarness.swift:272— WorkBuddySessionStore.automationRuns 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.
Turn.observeResponse (cyclomatic 22) native/Sources/PacerCore/WorkBuddyTranscript.swift:52— Turn.observeResponse 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.
IslandModel.configureCodexRemoteProgress (cyclomatic 22) native/Sources/PacerIsland/IslandModel.swift:546— IslandModel.configureCodexRemoteProgress has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PanelController.init (cyclomatic 22) native/Sources/PacerIsland/PanelController.swift:41— PanelController.init has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WhatsNewItemRow.body (cyclomatic 22) native/Sources/PacerIsland/WhatsNewView.swift:131— WhatsNewItemRow.body has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MacDurableCatalog.observe (cyclomatic 22) native/Sources/PacerMacSupport/MacDurableCatalog.swift:12— MacDurableCatalog.observe 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.
AlternatingQuotaText.Step (cyclomatic 21) windows/Desktop/AlternatingQuotaText.cs:174— AlternatingQuotaText.Step 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.
ClaudeWebCookies.ReadAsync (cyclomatic 21) windows/Desktop/ClaudeWebCookies.cs:24— ClaudeWebCookies.ReadAsync has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 30, 36). 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.
IslandWindow.OpenConversationTaskAsync (cyclomatic 21) windows/Desktop/IslandWindow.xaml.cs:1015— IslandWindow.OpenConversationTaskAsync 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.
ProviderLoginWindow.ObserveAsync (cyclomatic 21) windows/Desktop/ProviderLoginWindow.cs:191— ProviderLoginWindow.ObserveAsync has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ReleaseNotesMarkdown.Parse (cyclomatic 21) windows/Desktop/ReleaseNotesMarkdown.cs:18— ReleaseNotesMarkdown.Parse has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
SettingsWindow.BuildCompactInspector (cyclomatic 21) windows/Desktop/SettingsCollapsed.cs:158— SettingsWindow.BuildCompactInspector has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 173, 256, 271, …). 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.
SettingsWindow.BuildDeepSeek (cyclomatic 21) windows/Desktop/SettingsDeepSeek.cs:51— SettingsWindow.BuildDeepSeek has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 106, 79, 74, …). 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.
SettingsWindow.RunDeepSeekConnection (cyclomatic 21) windows/Desktop/SettingsDeepSeekConnection.cs:175— SettingsWindow.RunDeepSeekConnection 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.
SettingsWindow.RefreshHarnessCredits (cyclomatic 21) windows/Desktop/SettingsHarness.cs:487— SettingsWindow.RefreshHarnessCredits has cyclomatic complexity 21 (threshold 15). 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, 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.
SettingsWindow.RefreshOverview (cyclomatic 21) windows/Desktop/SettingsOverview.cs:137— SettingsWindow.RefreshOverview has cyclomatic complexity 21 (threshold 15). 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: 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.
SettingsWindow.RebuildPane (cyclomatic 21) windows/Desktop/SettingsWindow.cs:432— SettingsWindow.RebuildPane has cyclomatic complexity 21 (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.
WindowsDesktopTransport.init (cyclomatic 21) windows/EngineSupport/WindowsDesktopTransport.swift:14— WindowsDesktopTransport.init has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WindowsProcessHost.nearest (cyclomatic 21) windows/EngineSupport/WindowsProcessHost.swift:12— WindowsProcessHost.nearest 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.
ActivityNavigationOperation.descendants (cyclomatic 21) native/Sources/PacerCore/ActivityNavigationState.swift:38— ActivityNavigationOperation.descendants has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TaskSymbol.symbol (cyclomatic 21) native/Sources/PacerCore/ActivityTaskPresentation.swift:6— TaskSymbol.symbol has cyclomatic complexity 21 (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.
ClaudeDesktopRecords.desktopSessionID (cyclomatic 21) native/Sources/PacerCore/ClaudeDesktopRecords.swift:79— ClaudeDesktopRecords.desktopSessionID has cyclomatic complexity 21 (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.
DeepSeekBalanceCoordinator.finish (cyclomatic 21) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:236— DeepSeekBalanceCoordinator.finish 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.
DurableHistoryPoll.read (cyclomatic 21) native/Sources/PacerCore/DurableCatalogReader.swift:141— DurableHistoryPoll.read 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.
HarnessAccountCredits.reading (cyclomatic 21) native/Sources/PacerCore/HarnessAccountCredits.swift:55— HarnessAccountCredits.reading has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RealtimeActivityMonitor.startAsync (cyclomatic 21) native/Sources/PacerCore/RealtimeActivityMonitor.swift:140— RealtimeActivityMonitor.startAsync 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.
RemoteControlCatalog.readTargets (cyclomatic 21) native/Sources/PacerCore/RemoteControlCatalog.swift:216— RemoteControlCatalog.readTargets has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tailer.discover (cyclomatic 21) native/Sources/PacerCore/Resources/claude_activity.py:423— Tailer.discover 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.
EngineClient.RequestAsync (cyclomatic 20) windows/Desktop/EngineClient.cs:147— EngineClient.RequestAsync 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.
IslandWindow.ApplyPreferences (cyclomatic 20) windows/Desktop/IslandWindow.xaml.cs:299— IslandWindow.ApplyPreferences has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SettingsWindow.RefreshSurfaceStatus (cyclomatic 20) windows/Desktop/SettingsAppearance.cs:196— SettingsWindow.RefreshSurfaceStatus 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.
SettingsWindow.RefreshModules (cyclomatic 20) windows/Desktop/SettingsModules.cs:48— SettingsWindow.RefreshModules 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.
SettingsWindow.BuildPanelInspector (cyclomatic 20) windows/Desktop/SettingsPanel.cs:176— SettingsWindow.BuildPanelInspector has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 4 function literals 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.
SettingsWindow.InspectProviderHome (cyclomatic 20) windows/Desktop/SettingsProviderHome.cs:90— SettingsWindow.InspectProviderHome has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SettingsWindow.CommitReminderAmount (cyclomatic 20) windows/Desktop/SettingsReminders.cs:237— SettingsWindow.CommitReminderAmount has cyclomatic complexity 20 (threshold 15). Of this number, 19 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.
WindowsUpdateService.CheckCore (cyclomatic 20) windows/Desktop/WindowsUpdateService.cs:113— WindowsUpdateService.CheckCore 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.
EngineRuntime.navigationIsCurrent (cyclomatic 20) windows/EngineSupport/PacerEngine.swift:3177— EngineRuntime.navigationIsCurrent has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityNavigationRegistry.update (cyclomatic 20) native/Sources/PacerCore/ActivityNavigationRegistry.swift:36— ActivityNavigationRegistry.update has cyclomatic complexity 20 (threshold 15). Of this number, 18 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.
AttentionPolicy.activityNotices (cyclomatic 20) native/Sources/PacerCore/Attention.swift:81— AttentionPolicy.activityNotices 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.
ClaudeActivityState.consume (cyclomatic 20) native/Sources/PacerCore/ClaudeActivityRecord.swift:345— ClaudeActivityState.consume 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.
ClaudeSSHRouteRules.parse (cyclomatic 20) native/Sources/PacerCore/ClaudeSSHRouteRules.swift:5— ClaudeSSHRouteRules.parse 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.
ConnectionSource.sources (cyclomatic 20) native/Sources/PacerCore/ConnectionPresentation.swift:34— ConnectionSource.sources 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.
SSHHost.hosts (cyclomatic 20) native/Sources/PacerCore/ConnectionPresentation.swift:105— SSHHost.hosts 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.
ExpandedPanelPresentation.sections (cyclomatic 20) native/Sources/PacerCore/ExpandedPanelPresentation.swift:30— ExpandedPanelPresentation.sections 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.
IslandGeometry.arrange (cyclomatic 20) native/Sources/PacerCore/IslandGeometry.swift:150— IslandGeometry.arrange 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.
IslandModel.canOpen (cyclomatic 20) native/Sources/PacerIsland/IslandModel.swift:1129— IslandModel.canOpen has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IslandModel.startClaudeActivity (cyclomatic 20) native/Sources/PacerIsland/IslandModel.swift:2053— IslandModel.startClaudeActivity has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IslandModel.syncClaudeCloudMonitor (cyclomatic 20) native/Sources/PacerIsland/IslandModel.swift:2082— IslandModel.syncClaudeCloudMonitor 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.
claude_activity.otlp_request_header (cyclomatic 20) native/Sources/PacerCore/Resources/claude_activity.py:357— claude_activity.otlp_request_header 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.
claude_hook.statusline (cyclomatic 20) REDACTED:141— claude_hook.statusline 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.
CompactLayoutEditorView.Update (cyclomatic 19) windows/Desktop/CompactLayoutEditorView.cs:82— CompactLayoutEditorView.Update 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.
DeepSeekSoloView.DeepSeekSoloView.ctor (cyclomatic 19) windows/Desktop/DeepSeekSoloView.cs:26— DeepSeekSoloView.DeepSeekSoloView.ctor has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong 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.
GuideContent.ModuleHelp (cyclomatic 19) windows/Desktop/GuideContent.cs:809— GuideContent.ModuleHelp has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
IslandScreenMemory.Load (cyclomatic 19) windows/Desktop/IslandScreenMemory.cs:75— IslandScreenMemory.Load has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IslandWindow.IslandWindow.ctor (cyclomatic 19) windows/Desktop/IslandWindow.xaml.cs:86— IslandWindow.IslandWindow.ctor has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 136, 144, 134, …). 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.
IslandWindow.Render (cyclomatic 19) windows/Desktop/IslandWindow.xaml.cs:774— IslandWindow.Render has cyclomatic complexity 19 (threshold 15). Of this number, 18 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.
IslandWindow.OpenFromWindowAsync (cyclomatic 19) windows/Desktop/IslandWindow.xaml.cs:977— IslandWindow.OpenFromWindowAsync has cyclomatic complexity 19 (threshold 15). Of this number, 18 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.
NotificationSession.Receive (cyclomatic 19) windows/Desktop/NotificationSession.cs:95— NotificationSession.Receive has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 100). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
SettingsWindow.RefreshDisplayChoices (cyclomatic 19) windows/Desktop/SettingsAppearance.cs:152— SettingsWindow.RefreshDisplayChoices has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong 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.
SettingsWindow.BuildClaude (cyclomatic 19) windows/Desktop/SettingsClaude.cs:26— SettingsWindow.BuildClaude has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 52, 39, 31). 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.
WindowsClaudeCloudStream.read (cyclomatic 19) windows/EngineSupport/WindowsClaudeCloudStream.swift:76— WindowsClaudeCloudStream.read has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
WindowsClaudeRemoteCoordinator.finished (cyclomatic 19) windows/EngineSupport/WindowsClaudeRemoteSetup.swift:153— WindowsClaudeRemoteCoordinator.finished 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.
SessionActivity.setClaudeNavigation (cyclomatic 19) native/Sources/PacerCore/Activity.swift:537— SessionActivity.setClaudeNavigation 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.
ActivityLogWatcher.update (cyclomatic 19) native/Sources/PacerCore/ActivityLogWatcher.swift:43— ActivityLogWatcher.update 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.
ClaudeHookInstaller.migrated (cyclomatic 19) native/Sources/PacerCore/ClaudeHookInstaller.swift:180— ClaudeHookInstaller.migrated 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.
ClaudeQuotaDecoder.buckets (cyclomatic 19) native/Sources/PacerCore/ClaudeQuotaClient.swift:65— ClaudeQuotaDecoder.buckets has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, 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.
ClaudeQuotaCredentialCache.decode (cyclomatic 19) native/Sources/PacerCore/ClaudeQuotaCredentialCache.swift:12— ClaudeQuotaCredentialCache.decode 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.
DesktopFrameDecoder.turns (cyclomatic 19) native/Sources/PacerCore/DesktopFrameDecoder.swift:303— DesktopFrameDecoder.turns 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.
HarnessCreditsNoticePolicy.notices (cyclomatic 19) native/Sources/PacerCore/HarnessCreditsNoticePolicy.swift:23— HarnessCreditsNoticePolicy.notices 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.
WorkBuddyRunLog.read (cyclomatic 19) native/Sources/PacerCore/WorkBuddyRunLog.swift:52— WorkBuddyRunLog.read 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.
ClaudeConversationOpener.open (cyclomatic 19) native/Sources/PacerIsland/ClaudeConversationOpener.swift:24— ClaudeConversationOpener.open 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.
SettingsView.paneContent (cyclomatic 19) native/Sources/PacerIsland/SettingsView.swift:285— SettingsView.paneContent 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.
SettingsView.commit (cyclomatic 19) native/Sources/PacerIsland/SettingsView.swift:656— SettingsView.commit has cyclomatic complexity 19 (threshold 15). Of this number, 17 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.
deepseek-progress.respond (cyclomatic 19) native/Sources/PacerCore/Resources/deepseek-progress.mjs:28— deepseek-progress.respond has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
App.StartWindowsUpdaterAsync (cyclomatic 18) windows/Desktop/AppWindowsUpdates.cs:92— App.StartWindowsUpdaterAsync 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.
CompactWarningsView.Update (cyclomatic 18) windows/Desktop/CompactWarningsView.cs:76— CompactWarningsView.Update has cyclomatic complexity 18 (threshold 15). 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, 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.
FullscreenOcclusionObserver.Refresh (cyclomatic 18) windows/Desktop/FullscreenOcclusionObserver.cs:55— FullscreenOcclusionObserver.Refresh has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
NotificationActions.HandleReferenceAsync (cyclomatic 18) windows/Desktop/NotificationActions.cs:16— NotificationActions.HandleReferenceAsync 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.
QuotaCell.QuotaCell.ctor (cyclomatic 18) windows/Desktop/QuotaDial.cs:329— QuotaCell.QuotaCell.ctor 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.
SettingsWindow.SourceField (cyclomatic 18) windows/Desktop/SettingsCodex.cs:122— SettingsWindow.SourceField has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 133, 130, 129). 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.
WindowsSshTerminal.Launch (cyclomatic 18) windows/Desktop/WindowsSshTerminal.cs:14— WindowsSshTerminal.Launch has cyclomatic complexity 18 (threshold 15). 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, 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.
EngineRuntime.notificationSource (cyclomatic 18) windows/EngineSupport/PacerEngine.swift:3108— EngineRuntime.notificationSource 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.
WindowsDesktopCollector.start (cyclomatic 18) windows/EngineSupport/WindowsDesktopCollector.swift:40— WindowsDesktopCollector.start 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.
WindowsDesktopCollector.receive (cyclomatic 18) windows/EngineSupport/WindowsDesktopCollector.swift:113— WindowsDesktopCollector.receive 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.
WindowsHTTPClient.data (cyclomatic 18) windows/EngineSupport/WindowsHTTPClient.swift:35— WindowsHTTPClient.data 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.
ActivityNavigationOperation.complete (cyclomatic 18) native/Sources/PacerCore/ActivityNavigationState.swift:64— ActivityNavigationOperation.complete 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.
ClaudeActivityMonitor.readLocal (cyclomatic 18) native/Sources/PacerCore/ClaudeActivityMonitor.swift:179— ClaudeActivityMonitor.readLocal 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.
ClaudeDesktopRecords.desktopMetadata (cyclomatic 18) native/Sources/PacerCore/ClaudeDesktopRecords.swift:130— ClaudeDesktopRecords.desktopMetadata 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.
ClaudeObservedRequestMeter.settled (cyclomatic 18) native/Sources/PacerCore/ClaudeObservedRequestMeter.swift:72— ClaudeObservedRequestMeter.settled 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.
CodexOriginLookup.lookup (cyclomatic 18) native/Sources/PacerCore/CodexSessionOrigin.swift:135— CodexOriginLookup.lookup 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.
CompletionInbox.retainingCloudEnding (cyclomatic 18) native/Sources/PacerCore/CompletionInbox.swift:172— CompletionInbox.retainingCloudEnding 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.
DeepSeekConnectionPresentation.init (cyclomatic 18) native/Sources/PacerCore/DeepSeekConnectionPresentation.swift:21— DeepSeekConnectionPresentation.init 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.
DeepSeekSessionReader.readFrames (cyclomatic 18) native/Sources/PacerCore/DeepSeekSessionReader.swift:79— DeepSeekSessionReader.readFrames 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.
DesktopFrameDecoder.parse (cyclomatic 18) native/Sources/PacerCore/DesktopFrameDecoder.swift:112— DesktopFrameDecoder.parse 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.
RemoteControlActivityTarget.configured (cyclomatic 18) native/Sources/PacerCore/RemoteControlActivityTarget.swift:39— RemoteControlActivityTarget.configured has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AppDelegate.applicationDidFinishLaunching (cyclomatic 18) native/Sources/PacerIsland/PacerMain.swift:267— AppDelegate.applicationDidFinishLaunching 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.
LibraryRoundButton.roundButton (cyclomatic 18) native/Sources/PacerIsland/SettingsLibraryTile.swift:110— LibraryRoundButton.roundButton 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.
ProgressGuideBody.stepRow (cyclomatic 18) native/Sources/PacerIsland/SettingsProgressGuide.swift:166— ProgressGuideBody.stepRow 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.
WheelView.viewDidMoveToWindow (cyclomatic 18) native/Sources/PacerIsland/TaskPagerView.swift:135— WheelView.viewDidMoveToWindow 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.
MacDurableExecutor.find (cyclomatic 18) native/Sources/PacerMacSupport/MacDurableExecutor.swift:36— MacDurableExecutor.find 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.
codex_progress_mcp.respond (cyclomatic 18) native/Sources/PacerCore/Resources/codex_progress_mcp.py:131— codex_progress_mcp.respond 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.
pacer-codex-progress.respond (cyclomatic 18) windows/InstallerSupport/Resources/pacer-codex-progress.py:131— pacer-codex-progress.respond 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.
EngineClient.ReadAsync (cyclomatic 17) windows/Desktop/EngineClient.cs:191— EngineClient.ReadAsync 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.
GuideContent.WelcomeStep (cyclomatic 17) windows/Desktop/GuideContent.cs:264— GuideContent.WelcomeStep has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 307, 313, 315, …). 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.
IslandWindow.UpdateDecoration (cyclomatic 17) windows/Desktop/IslandSurface.cs:89— IslandWindow.UpdateDecoration has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ReleaseNotesMarkdown.Spans (cyclomatic 17) windows/Desktop/ReleaseNotesMarkdown.cs:49— ReleaseNotesMarkdown.Spans 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.
SettingsWindow.ApplySearch (cyclomatic 17) windows/Desktop/SettingsSidebar.cs:173— SettingsWindow.ApplySearch 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.
WindowsConversationApplication.Register (cyclomatic 17) windows/Desktop/WindowsConversationApplication.cs:30— WindowsConversationApplication.Register has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 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.
WindowsMaintenanceSignal.StopAsync (cyclomatic 17) windows/Desktop/WindowsMaintenanceSignal.cs:26— WindowsMaintenanceSignal.StopAsync has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
HarnessAccountReply.FromPage (cyclomatic 17) windows/Desktop/WorkBuddyAccountCredits.cs:23— HarnessAccountReply.FromPage has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
EngineRuntime.notificationProjection (cyclomatic 17) windows/EngineSupport/PacerEngine.swift:3145— EngineRuntime.notificationProjection has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WindowsDurableCatalog.observe (cyclomatic 17) windows/EngineSupport/WindowsDurableCatalog.swift:22— WindowsDurableCatalog.observe 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.
WindowsHTTPClient.run (cyclomatic 17) windows/EngineSupport/WindowsHTTPClient.swift:88— WindowsHTTPClient.run has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WindowsProviderInstallation.detect (cyclomatic 17) windows/EngineSupport/WindowsProviderInstallation.swift:43— WindowsProviderInstallation.detect has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityApplicationState.reconcile (cyclomatic 17) native/Sources/PacerCore/ActivityApplicationState.swift:239— ActivityApplicationState.reconcile has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeCloudServices.reference (cyclomatic 17) windows/EngineSupport/ClaudeWebReferenceServices.swift:38— ClaudeCloudServices.reference has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClaudeHookInstaller.reconcileEnvironment (cyclomatic 17) native/Sources/PacerCore/ClaudeHookInstaller.swift:397— ClaudeHookInstaller.reconcileEnvironment has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeRemoteSetup.status (cyclomatic 17) native/Sources/PacerCore/ClaudeRemoteSetup.swift:162— ClaudeRemoteSetup.status has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
CodexActivityInput.requests (cyclomatic 17) native/Sources/PacerCore/CodexActivityInput.swift:28— CodexActivityInput.requests has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CompletionInbox.persistentDigestFields (cyclomatic 17) native/Sources/PacerCore/CompletionInbox.swift:99— CompletionInbox.persistentDigestFields has cyclomatic complexity 17 (threshold 15). Of this number, 13 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.
DeepSeekBalanceHistory.record (cyclomatic 17) native/Sources/PacerCore/DeepSeekBalanceHistory.swift:42— DeepSeekBalanceHistory.record has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeepSeekProgressSetup.find (cyclomatic 17) native/Sources/PacerCore/DeepSeekProgressSetup.swift:131— DeepSeekProgressSetup.find has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DeepSeekSessionLog.response (cyclomatic 17) native/Sources/PacerCore/DeepSeekSessionLog.swift:166— DeepSeekSessionLog.response 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.
DesktopWireProjection.snapshot (cyclomatic 17) native/Sources/PacerCore/DesktopWireProjection.swift:320— DesktopWireProjection.snapshot 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.
ExpandedPanelPresentation.project (cyclomatic 17) native/Sources/PacerCore/ExpandedPanelPresentation.swift:180— ExpandedPanelPresentation.project 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.
LocalHarnessProgressSetup.inspect (cyclomatic 17) native/Sources/PacerCore/LocalHarnessProgressSetup.swift:261— LocalHarnessProgressSetup.inspect 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.
DeepSeekWebLogin.checkSession (cyclomatic 17) native/Sources/PacerIsland/DeepSeekWebBalance.swift:194— DeepSeekWebLogin.checkSession has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HarnessGuideFloat.update (cyclomatic 17) native/Sources/PacerIsland/HarnessGuideFloat.swift:80— HarnessGuideFloat.update 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.
IslandModel.ensureClaudeHooks (cyclomatic 17) native/Sources/PacerIsland/IslandModel.swift:404— IslandModel.ensureClaudeHooks 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.
IslandModel.discoverClaudeRemoteTargets (cyclomatic 17) native/Sources/PacerIsland/IslandModel.swift:1347— IslandModel.discoverClaudeRemoteTargets has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IslandModel.refreshCodexQuota (cyclomatic 17) native/Sources/PacerIsland/IslandModel.swift:1877— IslandModel.refreshCodexQuota has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IslandModel.refreshActivity (cyclomatic 17) native/Sources/PacerIsland/IslandModel.swift:2212— IslandModel.refreshActivity has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
QuotaCycleChart.chart (cyclomatic 17) native/Sources/PacerIsland/QuotaCycleChart.swift:45— QuotaCycleChart.chart has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
claude_remote_setup.reconcile_environment (cyclomatic 17) native/Sources/PacerCore/Resources/claude_remote_setup.py:311— claude_remote_setup.reconcile_environment 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.
DeepSeekBalanceStatusView.DeepSeekBalanceStatusView.ctor (cyclomatic 16) windows/Desktop/DeepSeekBalanceStatusView.cs:12— DeepSeekBalanceStatusView.DeepSeekBalanceStatusView.ctor has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 2 function literals 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.
GuideContent.Releases (cyclomatic 16) windows/Desktop/GuideContent.cs:516— GuideContent.Releases 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.
IslandWindow.ApplyPresentationLayout (cyclomatic 16) windows/Desktop/IslandWindow.xaml.cs:598— IslandWindow.ApplyPresentationLayout 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.
IslandWindow.ApplyMotion (cyclomatic 16) windows/Desktop/IslandWindow.xaml.cs:653— IslandWindow.ApplyMotion 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.
NotificationSession.SetEnabledAsync (cyclomatic 16) windows/Desktop/NotificationSession.cs:54— NotificationSession.SetEnabledAsync 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.
ProviderLoginWindow.FinishAsync (cyclomatic 16) windows/Desktop/ProviderLoginWindow.cs:228— ProviderLoginWindow.FinishAsync 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.
QuotaConnectionView.QuotaConnectionView.ctor (cyclomatic 16) windows/Desktop/QuotaConnectionView.cs:12— QuotaConnectionView.QuotaConnectionView.ctor has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong 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.
QuotaHistoryView.Update (cyclomatic 16) windows/Desktop/QuotaHistoryView.cs:85— QuotaHistoryView.Update 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.
WindowsStartupRegistration.Read (cyclomatic 16) windows/Desktop/WindowsStartupRegistration.cs:102— WindowsStartupRegistration.Read 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.
UpdateFiles.Check (cyclomatic 16) windows/UpdateSupport/UpdateFiles.cs:15— UpdateFiles.Check 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.
WindowsDesktopSourceGate.permit (cyclomatic 16) windows/EngineSupport/WindowsDesktopCollector.swift:351— WindowsDesktopSourceGate.permit 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.
WindowsHTTPStream.open (cyclomatic 16) windows/EngineSupport/WindowsHTTPStream.swift:53— WindowsHTTPStream.open 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.
WindowsClaudeHookCommands.owned (cyclomatic 16) windows/InstallerSupport/WindowsClaudeHookCommands.swift:92— WindowsClaudeHookCommands.owned has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ActivityTaskPresentation.header (cyclomatic 16) native/Sources/PacerCore/ActivityTaskPresentation.swift:341— ActivityTaskPresentation.header has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item 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.
ClaudeActivityTelemetry.project (cyclomatic 16) native/Sources/PacerCore/ClaudeActivityTelemetry.swift:188— ClaudeActivityTelemetry.project 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.
ClaudeCloudProjectState.applyPlainQuestion (cyclomatic 16) native/Sources/PacerCore/ClaudeCloudProjectState.swift:335— ClaudeCloudProjectState.applyPlainQuestion has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeHookInstaller.install (cyclomatic 16) native/Sources/PacerCore/ClaudeHookInstaller.swift:96— ClaudeHookInstaller.install 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.
ClaudeQuotaServices.reference (cyclomatic 16) windows/EngineSupport/ClaudeWebReferenceServices.swift:8— ClaudeQuotaServices.reference 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.
CompactBarPresentation.project::entry (cyclomatic 16) native/Sources/PacerCore/CompactBarPresentation.swift:320— CompactBarPresentation.project::entry has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (CompactBarPresentation.project) 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.
DeepSeekActivityMonitor.read (cyclomatic 16) native/Sources/PacerCore/DeepSeekActivityMonitor.swift:75— DeepSeekActivityMonitor.read 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.
Cursor.skip (cyclomatic 16) native/Sources/PacerCore/DesktopFrameDecoder.swift:465— Cursor.skip 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.
DesktopWireProjection.items (cyclomatic 16) native/Sources/PacerCore/DesktopWireProjection.swift:230— DesktopWireProjection.items 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.
DurableActivityCatalog.page (cyclomatic 16) native/Sources/PacerCore/DurableActivityCatalog.swift:33— DurableActivityCatalog.page 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.
DurableTurnHistory.receiptPage (cyclomatic 16) native/Sources/PacerCore/DurableTurnHistory.swift:94— DurableTurnHistory.receiptPage has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
QuotaAccountPresentation.init (cyclomatic 16) native/Sources/PacerCore/QuotaHistoryPresentation.swift:67— QuotaAccountPresentation.init 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.
RealtimeActivityMonitor.receive (cyclomatic 16) native/Sources/PacerCore/RealtimeActivityMonitor.swift:668— RealtimeActivityMonitor.receive 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.
ResponsePerformanceMeter.observeRequest (cyclomatic 16) native/Sources/PacerCore/ResponsePerformance.swift:137— ResponsePerformanceMeter.observeRequest has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WorkBuddyHarness.progressConnection (cyclomatic 16) native/Sources/PacerCore/WorkBuddyHarness.swift:59— WorkBuddyHarness.progressConnection has cyclomatic complexity 16 (threshold 15). Of this number, 14 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.
WorkBuddySessionStore.dailyCredits (cyclomatic 16) native/Sources/PacerCore/WorkBuddyHarness.swift:372— WorkBuddySessionStore.dailyCredits 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.
ActivityOrbitView.applyProgress (cyclomatic 16) native/Sources/PacerIsland/ActivityBadge.swift:501— ActivityOrbitView.applyProgress 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.
ClaudeWebSessionStore.session (cyclomatic 16) native/Sources/PacerIsland/ClaudeWebLogin.swift:26— ClaudeWebSessionStore.session has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CompactIslandComponent.stripContent (cyclomatic 16) native/Sources/PacerIsland/CompactIslandHeader.swift:323— CompactIslandComponent.stripContent 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.
IslandModel.trackHostApplications (cyclomatic 16) native/Sources/PacerIsland/IslandModel.swift:1823— IslandModel.trackHostApplications 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.
IslandModel.refreshClaudeQuota (cyclomatic 16) native/Sources/PacerIsland/IslandModel.swift:1985— IslandModel.refreshClaudeQuota 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.
SettingsView.providerPane (cyclomatic 16) native/Sources/PacerIsland/SettingsView.swift:356— SettingsView.providerPane 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.
TaskStatusIconNSView.layout (cyclomatic 16) native/Sources/PacerIsland/TaskStatusIconView.swift:259— TaskStatusIconNSView.layout 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.
MacDurableExecutor.arguments (cyclomatic 16) native/Sources/PacerMacSupport/MacDurableExecutor.swift:83— MacDurableExecutor.arguments has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Tailer.drain (cyclomatic 16) native/Sources/PacerCore/Resources/claude_activity.py:454— Tailer.drain 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.
EngineRuntime.receive (cognitive 423) windows/EngineSupport/PacerEngine.swift:610— EngineRuntime.receive has cognitive complexity 423 (threshold 15). Drivers by points: if/else 121 (247 pts), boolean chains 132, ternaries 10 (27 pts), error handling 5 (9 pts), loops 2 (7 pts), match/switch 1 (nesting depth added 152). Of this number, 422 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopWireProjection.consume (cognitive 345) native/Sources/PacerCore/DesktopWireProjection.swift:562— DesktopWireProjection.consume has cognitive complexity 345 (threshold 15). Drivers by points: if/else 63 (194 pts), boolean chains 113, ternaries 5 (24 pts), loops 4 (14 pts) (nesting depth added 160). Of this number, 343 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ClaudeActivityState.consumeRecord (cognitive 339) native/Sources/PacerCore/ClaudeActivityRecord.swift:381— ClaudeActivityState.consumeRecord has cognitive complexity 339 (threshold 15). Drivers by points: if/else 100 (170 pts), boolean chains 131, ternaries 15 (34 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 91). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopWireProjection.projectedValue (cognitive 278) native/Sources/PacerCore/DesktopWireProjection.swift:393— DesktopWireProjection.projectedValue has cognitive complexity 278 (threshold 15). Drivers by points: if/else 69 (184 pts), boolean chains 60, ternaries 11 (30 pts), loops 1 (4 pts) (nesting depth added 137). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SessionActivity.consumeLive (cognitive 236) native/Sources/PacerCore/Activity.swift:1037— SessionActivity.consumeLive has cognitive complexity 236 (threshold 15). Drivers by points: if/else 73 (134 pts), boolean chains 70, ternaries 12 (30 pts), loops 1 (2 pts) (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeEventState.consume (cognitive 229) native/Sources/PacerCore/RuntimeEventState.swift:84— RuntimeEventState.consume has cognitive complexity 229 (threshold 15). Drivers by points: if/else 58 (136 pts), boolean chains 55, loops 9 (26 pts), ternaries 4 (12 pts) (nesting depth added 103). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalActivityReader.read (cognitive 208) native/Sources/PacerCore/LocalActivityReader.swift:38— LocalActivityReader.read has cognitive complexity 208 (threshold 15). Drivers by points: if/else 51 (141 pts), boolean chains 30, loops 13 (26 pts), ternaries 5 (9 pts), error handling 1 (2 pts) (nesting depth added 108). Of this number, 201 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ClaudeActivityReader.read (cognitive 199) native/Sources/PacerCore/ClaudeActivityReader.swift:48— ClaudeActivityReader.read has cognitive complexity 199 (threshold 15). Drivers by points: if/else 44 (126 pts), boolean chains 29, loops 10 (25 pts), ternaries 7 (17 pts), error handling 1 (2 pts) (nesting depth added 108). Of this number, 194 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
App.OnStartup (cognitive 191) windows/Desktop/App.xaml.cs:45— App.OnStartup has cognitive complexity 191 (threshold 15). Of this number, 149 points are the body's own statements and 42 belong to 13 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.
ClaudeActivityRecord.transcript (cognitive 169) native/Sources/PacerCore/ClaudeActivityRecord.swift:53— ClaudeActivityRecord.transcript has cognitive complexity 169 (threshold 15). Drivers by points: boolean chains 83, if/else 42 (64 pts), ternaries 7 (15 pts), loops 4 (7 pts) (nesting depth added 33). 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.
NativeDesktopSession.receive (cognitive 166) native/Sources/PacerCore/NativeDesktopSession.swift:295— NativeDesktopSession.receive has cognitive complexity 166 (threshold 15). Drivers by points: if/else 49 (97 pts), boolean chains 58, loops 2 (5 pts), ternaries 1 (3 pts), match/switch 1 (2 pts), error handling 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekActivityState.consume (cognitive 161) native/Sources/PacerCore/DeepSeekActivityState.swift:143— DeepSeekActivityState.consume has cognitive complexity 161 (threshold 15). Drivers by points: if/else 47 (98 pts), boolean chains 36, ternaries 8 (22 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 67). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
claude_hook.hook (cognitive 150) REDACTED:174— claude_hook.hook has cognitive complexity 150 (threshold 15). Drivers by points: if/else 62 (83 pts), boolean chains 35, ternaries 15 (29 pts), error handling 1 (2 pts), loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalHarnessProgressSetup.apply (cognitive 140) native/Sources/PacerCore/LocalHarnessProgressSetup.swift:134— LocalHarnessProgressSetup.apply has cognitive complexity 140 (threshold 15). Drivers by points: if/else 38 (84 pts), boolean chains 35, ternaries 6 (16 pts), loops 2 (4 pts), error handling 1 (nesting depth added 58). Of this number, 111 points are the body's own statements and 29 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
claude_activity.main (cognitive 138) native/Sources/PacerCore/Resources/claude_activity.py:621— claude_activity.main has cognitive complexity 138 (threshold 15). Drivers by points: if/else 32 (107 pts), error handling 5 (15 pts), loops 5 (10 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 92). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
EngineRuntime.configure (cognitive 132) windows/EngineSupport/PacerEngine.swift:1098— EngineRuntime.configure has cognitive complexity 132 (threshold 15). Drivers by points: if/else 64 (88 pts), boolean chains 25, loops 7 (10 pts), ternaries 6 (9 pts) (nesting depth added 30). Of this number, 130 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.
CompactBarPresentation.project (cognitive 129) native/Sources/PacerCore/CompactBarPresentation.swift:208— CompactBarPresentation.project has cognitive complexity 129 (threshold 15). Drivers by points: ternaries 40 (65 pts), boolean chains 53, if/else 36 (52 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent 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 (CompactBarPresentation.project::entry) 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.
claude_activity.otlp_records (cognitive 127) native/Sources/PacerCore/Resources/claude_activity.py:283— claude_activity.otlp_records has cognitive complexity 127 (threshold 15). Drivers by points: if/else 26 (85 pts), loops 6 (15 pts), boolean chains 14, ternaries 3 (12 pts), error handling 1 (nesting depth added 77). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionActivity.consume (cognitive 126) native/Sources/PacerCore/Activity.swift:695— SessionActivity.consume has cognitive complexity 126 (threshold 15). Drivers by points: if/else 39 (67 pts), boolean chains 56, ternaries 1 (2 pts), match/switch 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsPalette.Apply (cognitive 124) windows/Desktop/SettingsPalette.cs:11— SettingsPalette.Apply has cognitive complexity 124 (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, 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.
claude_activity.transcript_record (cognitive 120) native/Sources/PacerCore/Resources/claude_activity.py:93— claude_activity.transcript_record has cognitive complexity 120 (threshold 15). Drivers by points: if/else 36 (51 pts), boolean chains 31, ternaries 17 (31 pts), loops 4 (7 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineRuntime.publish (cognitive 115) windows/EngineSupport/PacerEngine.swift:2751— EngineRuntime.publish has cognitive complexity 115 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 39, ternaries 16 (19 pts), loops 2 (4 pts) (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.
RealtimeActivityMonitor.receiveDesktop (cognitive 115) native/Sources/PacerCore/RealtimeActivityMonitor.swift:501— RealtimeActivityMonitor.receiveDesktop has cognitive complexity 115 (threshold 15). Drivers by points: if/else 28 (52 pts), boolean chains 43, ternaries 7 (18 pts), loops 1 (2 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PacerEngine.run (cognitive 107) windows/EngineSupport/PacerEngine.swift:8— PacerEngine.run has cognitive complexity 107 (threshold 15). Drivers by points: if/else 31 (54 pts), boolean chains 26, ternaries 14, error handling 4 (8 pts), loops 2 (5 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeQuotaClient.fetchQuota (cognitive 102) native/Sources/PacerCore/ClaudeQuotaClient.swift:239— ClaudeQuotaClient.fetchQuota has cognitive complexity 102 (threshold 15). Drivers by points: if/else 21 (54 pts), boolean chains 32, error handling 4 (8 pts), match/switch 1 (4 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskStatusIconNSView.apply (cognitive 90) native/Sources/PacerIsland/TaskStatusIconView.swift:414— TaskStatusIconNSView.apply has cognitive complexity 90 (threshold 15). Drivers by points: if/else 28 (39 pts), boolean chains 35, ternaries 9 (16 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.RefreshCollapsed (cognitive 87) windows/Desktop/SettingsCollapsed.cs:396— SettingsWindow.RefreshCollapsed has cognitive complexity 87 (threshold 15). Of this number, 86 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.
TaskProgressRing.Apply (cognitive 86) windows/Desktop/TaskProgressRing.cs:133— TaskProgressRing.Apply has cognitive complexity 86 (threshold 15). Of this number, 84 points are the body's own statements and 2 belong 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.
WorkBuddyTranscript.consume (cognitive 86) native/Sources/PacerCore/WorkBuddyTranscript.swift:198— WorkBuddyTranscript.consume has cognitive complexity 86 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 35, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityBadge.Update (cognitive 79) windows/Desktop/ActivityBadge.cs:151— ActivityBadge.Update has cognitive complexity 79 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
NativeDesktopCollector.run (cognitive 79) native/Sources/PacerMacSupport/NativeDesktopCollector.swift:186— NativeDesktopCollector.run has cognitive complexity 79 (threshold 15). Drivers by points: if/else 22 (63 pts), loops 4 (11 pts), boolean chains 4, error handling 1 (nesting depth added 48). Of this number, 72 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.
ZstdFrameDecoder.decode (cognitive 77) native/Sources/PacerCore/ZstdFrameDecoder.swift:28— ZstdFrameDecoder.decode has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (64 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HarnessProgressGuide.init (cognitive 76) native/Sources/PacerCore/HarnessProgressGuide.swift:74— HarnessProgressGuide.init has cognitive complexity 76 (threshold 15). Drivers by points: ternaries 18 (40 pts), match/switch 10 (16 pts), if/else 11 (14 pts), boolean chains 6 (nesting depth added 31). Of this number, 74 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.
IslandWindow.RenderPanel (cognitive 75) windows/Desktop/IslandPanelSections.cs:152— IslandWindow.RenderPanel has cognitive complexity 75 (threshold 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.
DeepSeekProgressSetup.apply (cognitive 75) native/Sources/PacerCore/DeepSeekProgressSetup.swift:43— DeepSeekProgressSetup.apply has cognitive complexity 75 (threshold 15). Drivers by points: if/else 22 (52 pts), ternaries 5 (12 pts), boolean chains 8, loops 1 (2 pts), error handling 1 (nesting depth added 38). Of this number, 73 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PanelController.layout (cognitive 75) native/Sources/PacerIsland/PanelController.swift:140— PanelController.layout has cognitive complexity 75 (threshold 15). Drivers by points: if/else 27 (31 pts), ternaries 14 (23 pts), boolean chains 21 (nesting depth added 13). 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.
Tailer.read (cognitive 72) native/Sources/PacerCore/Resources/claude_activity.py:488— Tailer.read has cognitive complexity 72 (threshold 15). Drivers by points: if/else 22 (51 pts), boolean chains 8, error handling 2 (6 pts), ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopValue.patch (cognitive 71) native/Sources/PacerCore/DesktopWireProjection.swift:38— DesktopValue.patch has cognitive complexity 71 (threshold 15). Drivers by points: if/else 26 (58 pts), ternaries 2 (9 pts), boolean chains 3, match/switch 1 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DesktopFrameDecoder.field (cognitive 70) native/Sources/PacerCore/DesktopFrameDecoder.swift:57— DesktopFrameDecoder.field has cognitive complexity 70 (threshold 15). Drivers by points: ternaries 19 (39 pts), if/else 15 (28 pts), match/switch 2 (3 pts) (nesting depth added 34). 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.
LocalActivityReader.latestTurnAnchor (cognitive 69) native/Sources/PacerCore/LocalActivityReader.swift:258— LocalActivityReader.latestTurnAnchor has cognitive complexity 69 (threshold 15). Drivers by points: if/else 9 (35 pts), boolean chains 25, loops 2 (4 pts), ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WindowsActivityNavigation.resolve (cognitive 67) windows/EngineSupport/WindowsActivityNavigation.swift:19— WindowsActivityNavigation.resolve has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 36, if/else 21 (29 pts), ternaries 2 (nesting depth added 8). Of this number, 65 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
CodexQuotaCoordinator.read (cognitive 67) native/Sources/PacerCore/CodexQuotaCoordinator.swift:145— CodexQuotaCoordinator.read has cognitive complexity 67 (threshold 15). Drivers by points: if/else 26 (56 pts), ternaries 3 (7 pts), boolean chains 3, error handling 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
claude_remote_setup.install (cognitive 66) native/Sources/PacerCore/Resources/claude_remote_setup.py:471— claude_remote_setup.install has cognitive complexity 66 (threshold 15). Drivers by points: if/else 30 (37 pts), boolean chains 24, error handling 3 (4 pts), loops 1 (nesting depth added 8). 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.
EngineRuntime.projectCollected (cognitive 62) windows/EngineSupport/PacerEngine.swift:2621— EngineRuntime.projectCollected has cognitive complexity 62 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 15, ternaries 5 (13 pts), loops 3 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RealtimeActivityMonitor.reconcile (cognitive 62) native/Sources/PacerCore/RealtimeActivityMonitor.swift:297— RealtimeActivityMonitor.reconcile has cognitive complexity 62 (threshold 15). Drivers by points: boolean chains 25, if/else 18 (23 pts), ternaries 7 (8 pts), loops 5 (6 pts) (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.
SettingsWindow.RefreshUpdates (cognitive 59) windows/Desktop/SettingsUpdates.cs:74— SettingsWindow.RefreshUpdates has cognitive complexity 59 (threshold 15). Of this number, 55 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EngineRuntime.connectionPresentation (cognitive 59) windows/EngineSupport/PacerEngine.swift:2396— EngineRuntime.connectionPresentation has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (29 pts), loops 6 (12 pts), boolean chains 10, ternaries 4 (8 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineRuntime.collect (cognitive 59) windows/EngineSupport/PacerEngine.swift:2492— EngineRuntime.collect has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 19, loops 3 (7 pts), ternaries 3 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeWebQuotaClient.fetchQuota (cognitive 59) native/Sources/PacerCore/ClaudeWebQuotaClient.swift:136— ClaudeWebQuotaClient.fetchQuota has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 19, ternaries 1 (3 pts), error handling 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekSessionLog.parse (cognitive 59) native/Sources/PacerCore/DeepSeekSessionLog.swift:89— DeepSeekSessionLog.parse has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (26 pts), ternaries 10 (19 pts), boolean chains 13, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkBuddyMonitor.project (cognitive 59) native/Sources/PacerCore/WorkBuddyHarness.swift:666— WorkBuddyMonitor.project has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 19, ternaries 5 (8 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.RefreshHarnessProgressGuide (cognitive 58) windows/Desktop/SettingsHarness.cs:151— SettingsWindow.RefreshHarnessProgressGuide has cognitive complexity 58 (threshold 15). Of this number, 51 points are the body's own statements and 7 belong 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.
PreferencesCodec.Decode (cognitive 57) windows/Desktop/PreferencesCodec.cs:30— PreferencesCodec.Decode has cognitive complexity 57 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ClaudeHookInstaller.setPlugin (cognitive 57) native/Sources/PacerCore/ClaudeHookInstaller.swift:273— ClaudeHookInstaller.setPlugin has cognitive complexity 57 (threshold 15). Drivers by points: if/else 23 (42 pts), boolean chains 15 (nesting depth added 19). Of this number, 55 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.
claude_remote_setup.set_plugin (cognitive 57) native/Sources/PacerCore/Resources/claude_remote_setup.py:376— claude_remote_setup.set_plugin has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (43 pts), boolean chains 12, loops 1, ternaries 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.string (cognitive 56) native/Sources/PacerCore/DesktopFrameDecoder.swift:422— Cursor.string has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 4 (13 pts), boolean chains 9, match/switch 2 (4 pts), ternaries 2 (nesting depth added 25). Of this number, 52 points are the body's own statements and 4 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.
HarnessAccountCard.Build (cognitive 55) windows/Desktop/HarnessAccountCard.cs:16— HarnessAccountCard.Build has cognitive complexity 55 (threshold 15). Of this number, 49 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ClaudeActivityTelemetry.request (cognitive 55) native/Sources/PacerCore/ClaudeActivityTelemetry.swift:277— ClaudeActivityTelemetry.request has cognitive complexity 55 (threshold 15). Drivers by points: boolean chains 29, if/else 17 (25 pts), loops 1 (nesting depth added 8). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WorkBuddyMonitor.refresh (cognitive 55) native/Sources/PacerCore/WorkBuddyHarness.swift:559— WorkBuddyMonitor.refresh has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 18, ternaries 3 (6 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeQuotaCoordinator.read (cognitive 53) native/Sources/PacerCore/ClaudeQuotaCoordinator.swift:109— ClaudeQuotaCoordinator.read has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (44 pts), ternaries 3 (6 pts), boolean chains 2, error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.RefreshDeepSeekConnection (cognitive 52) windows/Desktop/SettingsDeepSeekConnection.cs:209— SettingsWindow.RefreshDeepSeekConnection has cognitive complexity 52 (threshold 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.
ClaudeCloudProjectState.applyThread (cognitive 52) native/Sources/PacerCore/ClaudeCloudProjectState.swift:259— ClaudeCloudProjectState.applyThread has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 23, ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopFrameDecoder.object (cognitive 52) native/Sources/PacerCore/DesktopFrameDecoder.swift:138— DesktopFrameDecoder.object has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 13, ternaries 3 (8 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowsDesktopCollector.receive (cognitive 50) windows/EngineSupport/WindowsDesktopCollector.swift:113— WindowsDesktopCollector.receive has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (41 pts), ternaries 1 (5 pts), boolean chains 3, error handling 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WindowsHTTPProxy.forHTTPS (cognitive 50) windows/EngineSupport/WindowsHTTPStream.swift:170— WindowsHTTPProxy.forHTTPS has cognitive complexity 50 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 17, ternaries 1 (2 pts), loops 1 (nesting depth added 10). Of this number, 47 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexProgressSetup.apply (cognitive 50) native/Sources/PacerCore/CodexProgressReporter.swift:196— CodexProgressSetup.apply has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 11, ternaries 2 (5 pts), error handling 2 (3 pts), loops 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionActivity.mergeDisplayMetadata (cognitive 49) native/Sources/PacerCore/Activity.swift:320— SessionActivity.mergeDisplayMetadata has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 23 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SessionActivity.consumeResponse (cognitive 49) native/Sources/PacerCore/Activity.swift:983— SessionActivity.consumeResponse has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 11, ternaries 1 (3 pts), match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SettingsWindow.RefreshExpandedPanel (cognitive 48) windows/Desktop/SettingsPanel.cs:399— SettingsWindow.RefreshExpandedPanel has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
JSONFieldView.protobufIntegerText (cognitive 48) native/Sources/PacerCore/JSONFieldView.swift:159— JSONFieldView.protobufIntegerText has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 14, loops 3 (5 pts), ternaries 3 (4 pts) (nesting depth added 9). 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.
Cursor.skipString (cognitive 48) native/Sources/PacerCore/JSONFieldView.swift:295— Cursor.skipString has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 7, loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
TaskStatusIconNSView.applyFace (cognitive 48) native/Sources/PacerIsland/TaskStatusIconView.swift:558— TaskStatusIconNSView.applyFace has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 17, ternaries 10 (16 pts), if/else 13 (15 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacDurableCatalog.observe (cognitive 48) native/Sources/PacerMacSupport/MacDurableCatalog.swift:12— MacDurableCatalog.observe has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (29 pts), error handling 3 (8 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekBudgetDetails.DeepSeekBudgetDetails.ctor (cognitive 47) windows/Desktop/DeepSeekSoloView.cs:279— DeepSeekBudgetDetails.DeepSeekBudgetDetails.ctor has cognitive complexity 47 (threshold 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.
HighContrastScope.Discover (cognitive 47) windows/Desktop/HighContrastScope.cs:39— HighContrastScope.Discover has cognitive complexity 47 (threshold 15). Of this number, 40 points are the body's own statements and 7 belong 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.
SettingsWindow.RefreshConnections (cognitive 47) windows/Desktop/SettingsConnections.cs:98— SettingsWindow.RefreshConnections has cognitive complexity 47 (threshold 15). Of this number, 45 points are the body's own statements and 2 belong 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.
TaskGlyphArt.svg (cognitive 47) native/Sources/PacerIsland/TaskGlyphArt.swift:128— TaskGlyphArt.svg has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 3 (10 pts), loops 4 (6 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 22). Of this number, 44 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.
TaskStatusIconNSView.updateLoops (cognitive 47) native/Sources/PacerIsland/TaskStatusIconView.swift:803— TaskStatusIconNSView.updateLoops has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 18, if/else 10 (16 pts), ternaries 6 (8 pts), loops 2 (5 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.
IslandWindow.UpdateCompactBar (cognitive 46) windows/Desktop/IslandCompactBar.cs:71— IslandWindow.UpdateCompactBar has cognitive complexity 46 (threshold 15). Of this number, 40 points are the body's own statements and 6 belong to 2 function items inside it that branch. 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.
EngineClient.Receive (cognitive 45) windows/Desktop/EngineClient.cs:256— EngineClient.Receive has cognitive complexity 45 (threshold 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.
SessionIndex.entries (cognitive 45) native/Sources/PacerCore/SessionIndex.swift:12— SessionIndex.entries has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (29 pts), ternaries 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PacerMain.main (cognitive 45) native/Sources/PacerIsland/PacerMain.swift:12— PacerMain.main has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 4 (14 pts), ternaries 3 (5 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.RefreshDeepSeek (cognitive 44) windows/Desktop/SettingsDeepSeek.cs:192— SettingsWindow.RefreshDeepSeek has cognitive complexity 44 (threshold 15). Of this number, 42 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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.
WindowsConversationApplication.TryDestination (cognitive 44) windows/Desktop/WindowsConversationApplication.cs:158— WindowsConversationApplication.TryDestination has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SessionActivity.consumeCodexReport (cognitive 44) native/Sources/PacerCore/Activity.swift:667— SessionActivity.consumeCodexReport has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 27, if/else 9 (12 pts), ternaries 3 (5 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
claude_activity.sanitized (cognitive 44) native/Sources/PacerCore/Resources/claude_activity.py:193— claude_activity.sanitized has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 14, loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskStatusIcon.ApplyFace (cognitive 43) windows/Desktop/TaskStatusIcon.cs:86— TaskStatusIcon.ApplyFace has cognitive complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 belong 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.
ClaudeCloudProjectMonitor.pollOnce (cognitive 43) native/Sources/PacerCore/ClaudeCloudProjectMonitor.swift:132— ClaudeCloudProjectMonitor.pollOnce has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 14, error handling 4 (5 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.
CompletionInbox.observe (cognitive 43) native/Sources/PacerCore/CompletionInbox.swift:262— CompletionInbox.observe has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 21, if/else 13 (21 pts), loops 1 (nesting depth added 8). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SSHHost.hosts (cognitive 43) native/Sources/PacerCore/ConnectionPresentation.swift:105— SSHHost.hosts has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 10 (30 pts), if/else 4 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopFrameDecoder.sanitizedPatch (cognitive 43) native/Sources/PacerCore/DesktopFrameDecoder.swift:214— DesktopFrameDecoder.sanitizedPatch has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 10 (18 pts), if/else 16 (17 pts), boolean chains 8 (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.
NativeDesktopSession.observeDurableHistory (cognitive 43) native/Sources/PacerCore/NativeDesktopSession.swift:143— NativeDesktopSession.observeDurableHistory has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 16, ternaries 1 (2 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.
MacDurableProgressSetup.reconcile (cognitive 43) native/Sources/PacerMacSupport/MacDurableProgressSetup.swift:20— MacDurableProgressSetup.reconcile has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 5 (13 pts), ternaries 3 (6 pts), error handling 3 (5 pts), boolean chains 2 (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.
codex_remote_progress_setup.install (cognitive 43) native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:178— codex_remote_progress_setup.install has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 6, error handling 2 (3 pts), loops 3, ternaries 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.RefreshHistory (cognitive 42) windows/Desktop/SettingsOverview.cs:433— SettingsWindow.RefreshHistory has cognitive complexity 42 (threshold 15). Of this number, 41 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.
WindowsDurableCatalog.observe (cognitive 42) windows/EngineSupport/WindowsDurableCatalog.swift:22— WindowsDurableCatalog.observe has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (28 pts), error handling 3 (8 pts), ternaries 1 (3 pts), boolean chains 2, loops 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.
GuideContent.Module (cognitive 41) windows/Desktop/GuideContent.cs:445— GuideContent.Module has cognitive complexity 41 (threshold 15). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 473, 460, 458). 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.
EngineShellProjection.reply (cognitive 41) windows/EngineSupport/EngineShellProjection.swift:27— EngineShellProjection.reply has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 27, if/else 8 (13 pts), match/switch 1 (nesting depth added 5). Of this number, 39 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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.
WindowsDurableProgressSetup.apply (cognitive 41) windows/EngineSupport/WindowsDurableProgress.swift:74— WindowsDurableProgressSetup.apply has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (11 pts), error handling 3 (7 pts), boolean chains 5 (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.
main.swift.top-level code (cognitive 41) windows/InstallerHooks/main.swift:4— main.swift.top-level code has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 5 (11 pts), boolean chains 9, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConnectionPagePresentation.init (cognitive 41) native/Sources/PacerCore/ConnectionPagePresentation.swift:27— ConnectionPagePresentation.init has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 18 (25 pts), boolean chains 7, if/else 5 (6 pts), match/switch 2, loops 1 (nesting depth added 8). Of this number, 24 points are the body's own statements and 17 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.
HarnessActivityStore.accept (cognitive 41) native/Sources/PacerCore/HarnessActivityStore.swift:89— HarnessActivityStore.accept has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 12, loops 1 (2 pts), match/switch 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreferencesCodec.Encode (cognitive 40) windows/Desktop/PreferencesCodec.cs:178— PreferencesCodec.Encode has cognitive complexity 40 (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, 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.
WindowsWSLServices.discover (cognitive 40) windows/EngineSupport/WindowsWSL.swift:211— WindowsWSLServices.discover has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 10, loops 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowsClaudeRuntimeStore.collect (cognitive 40) windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:224— WindowsClaudeRuntimeStore.collect has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 6, loops 4 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tailer.discover (cognitive 40) native/Sources/PacerCore/Resources/claude_activity.py:423— Tailer.discover has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 7 (11 pts), boolean chains 2 (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.
SettingsWindow.RefreshReminders (cognitive 39) windows/Desktop/SettingsReminders.cs:264— SettingsWindow.RefreshReminders has cognitive complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong 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.
CodexClient.fetchQuota (cognitive 39) native/Sources/PacerCore/CodexClient.swift:134— CodexClient.fetchQuota has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 8, error handling 3 (5 pts), match/switch 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandModel.configureClaudeRemote (cognitive 39) native/Sources/PacerIsland/IslandModel.swift:1266— IslandModel.configureClaudeRemote has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 20, if/else 11 (16 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 6). 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.
readGroups (cognitive 39) native/Sources/PacerCore/Resources/workbuddy-account-credits.js:73— readGroups has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 6 (8 pts), boolean chains 7, loops 4, other 4 (nesting depth added 9). Of this number, 33 points are the body's own statements and 6 belong to 32 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.
CompactLayoutEditorView.Update (cognitive 38) windows/Desktop/CompactLayoutEditorView.cs:82— CompactLayoutEditorView.Update has cognitive complexity 38 (threshold 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.
SettingsWindow.RefreshSidebar (cognitive 38) windows/Desktop/SettingsSidebar.cs:326— SettingsWindow.RefreshSidebar has cognitive complexity 38 (threshold 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.
DeepSeekProgressSetup.update (cognitive 38) native/Sources/PacerCore/DeepSeekProgressSetup.swift:152— DeepSeekProgressSetup.update has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 13, ternaries 4 (10 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TaskProgressRing.UpdateSpin (cognitive 37) windows/Desktop/TaskProgressRing.cs:355— TaskProgressRing.UpdateSpin has cognitive complexity 37 (threshold 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.
EngineSnapshotEmission.equal (cognitive 37) windows/EngineSupport/EngineSnapshotEmission.swift:34— EngineSnapshotEmission.equal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 13, ternaries 2 (4 pts), loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowsClaudeRuntimeStore.ensure (cognitive 37) windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:117— WindowsClaudeRuntimeStore.ensure has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 11, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexClient.setDurableProgressPlugin (cognitive 37) native/Sources/PacerCore/CodexClient.swift:252— CodexClient.setDurableProgressPlugin has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 8, loops 1 (nesting depth added 11). Of this number, 36 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopFrameDecoder.turns (cognitive 37) native/Sources/PacerCore/DesktopFrameDecoder.swift:303— DesktopFrameDecoder.turns has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HostApplicationTrackingState.prepare (cognitive 37) native/Sources/PacerCore/HostApplicationTrackingState.swift:84— HostApplicationTrackingState.prepare has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 11, loops 3 (4 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.
WorkBuddySessionStore.automationRuns (cognitive 37) native/Sources/PacerCore/WorkBuddyHarness.swift:272— WorkBuddySessionStore.automationRuns has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 9, ternaries 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuotaRingsView.rebuild (cognitive 37) native/Sources/PacerIsland/CompactQuotaViews.swift:358— QuotaRingsView.rebuild has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 9 (23 pts), if/else 4 (7 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.PanelBlockButton (cognitive 36) windows/Desktop/SettingsPanel.cs:589— SettingsWindow.PanelBlockButton has cognitive complexity 36 (threshold 15). Of this number, 20 points are the body's own statements and 16 belong to 5 function literals inside it that branch. 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.
SettingsWindow.RefreshValues (cognitive 36) windows/Desktop/SettingsWindow.cs:490— SettingsWindow.RefreshValues has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CodexLogAttention.consume (cognitive 36) native/Sources/PacerCore/CodexLogAttention.swift:21— CodexLogAttention.consume has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 21, if/else 12 (15 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CompactBarContext.init (cognitive 36) native/Sources/PacerCore/CompactBarContext.swift:101— CompactBarContext.init has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 14 (21 pts), boolean chains 8, if/else 7 (nesting depth added 7). Of this number, 34 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.
DesktopFrameDecoder.array (cognitive 36) native/Sources/PacerCore/DesktopFrameDecoder.swift:183— DesktopFrameDecoder.array has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 8 (10 pts), boolean chains 5, 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.
claude_hook.statusline (cognitive 36) REDACTED:141— claude_hook.statusline has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (18 pts), ternaries 2 (6 pts), boolean chains 5, loops 2 (5 pts), error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.RefreshCodex (cognitive 35) windows/Desktop/SettingsCodex.cs:172— SettingsWindow.RefreshCodex has cognitive complexity 35 (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, 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.
EngineRuntime.maintenanceRefresh (cognitive 35) windows/EngineSupport/PacerEngine.swift:1741— EngineRuntime.maintenanceRefresh has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (12 pts), boolean chains 8 (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.
EngineRuntime.receiveWSLDiscovery (cognitive 35) windows/EngineSupport/PacerEngine.swift:2120— EngineRuntime.receiveWSLDiscovery has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 11, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WorkBuddySessionStore.usage (cognitive 35) native/Sources/PacerCore/WorkBuddyHarness.swift:409— WorkBuddySessionStore.usage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 9, ternaries 2 (8 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.
ActivityBadge.UpdateEstimate (cognitive 34) windows/Desktop/ActivityBadge.cs:236— ActivityBadge.UpdateEstimate has cognitive complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong 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.
SettingsWindow.AttentionItems (cognitive 34) windows/Desktop/SettingsOverview.cs:56— SettingsWindow.AttentionItems has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
WindowsInstallationOperations.UninstallAsync (cognitive 34) windows/Desktop/WindowsInstallationOperations.cs:230— WindowsInstallationOperations.UninstallAsync has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ActivityNavigationTarget.resolve (cognitive 34) native/Sources/PacerCore/ActivityNavigationTarget.swift:4— ActivityNavigationTarget.resolve has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 10, ternaries 1 (3 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.
ClaudeActivityTelemetry.requestBody (cognitive 34) native/Sources/PacerCore/ClaudeActivityTelemetry.swift:105— ClaudeActivityTelemetry.requestBody has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 9, loops 3, error handling 1 (nesting depth added 5). 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, 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.
CompactWarningPresentation.items (cognitive 34) native/Sources/PacerCore/CompactWarningPresentation.swift:46— CompactWarningPresentation.items has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 3 (6 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 13). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.number (cognitive 34) native/Sources/PacerCore/DesktopFrameDecoder.swift:399— Cursor.number has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 11, loops 3 (6 pts), ternaries 1 (nesting depth added 8). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DurableHistoryPoll.read (cognitive 34) native/Sources/PacerCore/DurableCatalogReader.swift:141— DurableHistoryPoll.read has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 8, ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteControlCatalog.readTargets (cognitive 34) native/Sources/PacerCore/RemoteControlCatalog.swift:216— RemoteControlCatalog.readTargets has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 14). Of this number, 31 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsView.providerPane (cognitive 34) native/Sources/PacerIsland/SettingsView.swift:356— SettingsView.providerPane has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (27 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tailer.drain (cognitive 34) native/Sources/PacerCore/Resources/claude_activity.py:454— Tailer.drain has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), ternaries 1 (4 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SettingsWindow.CommitSourceAsync (cognitive 33) windows/Desktop/SettingsCodex.cs:280— SettingsWindow.CommitSourceAsync has cognitive complexity 33 (threshold 15). Of this number, 32 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.
TaskStatusIcon.RebuildGlyph (cognitive 33) windows/Desktop/TaskStatusIcon.cs:142— TaskStatusIcon.RebuildGlyph has cognitive complexity 33 (threshold 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.
EngineRuntime.notificationSource (cognitive 33) windows/EngineSupport/PacerEngine.swift:3108— EngineRuntime.notificationSource has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 3, ternaries 1 (3 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowsDesktopCollector.start (cognitive 33) windows/EngineSupport/WindowsDesktopCollector.swift:40— WindowsDesktopCollector.start has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 6, error handling 2 (3 pts), loops 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConnectionSource.sources (cognitive 33) native/Sources/PacerCore/ConnectionPresentation.swift:34— ConnectionSource.sources has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 9 (11 pts), loops 3 (4 pts), boolean chains 3 (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.
IslandModel.syncLocalHarnessProgress (cognitive 33) native/Sources/PacerIsland/IslandModel.swift:642— IslandModel.syncLocalHarnessProgress has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 12, ternaries 1 (3 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.
AlternatingQuotaText.Update (cognitive 32) windows/Desktop/AlternatingQuotaText.cs:76— AlternatingQuotaText.Update has cognitive complexity 32 (threshold 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.
UpdateCatalog.Parse (cognitive 32) windows/UpdateSupport/UpdateCatalog.cs:93— UpdateCatalog.Parse has cognitive complexity 32 (threshold 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.
ActivitySourceMerger.merge (cognitive 32) native/Sources/PacerCore/ActivitySourceMerger.swift:4— ActivitySourceMerger.merge has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 11, loops 1, ternaries 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.
ClaudeObservedRequestMeter.settled (cognitive 32) native/Sources/PacerCore/ClaudeObservedRequestMeter.swift:72— ClaudeObservedRequestMeter.settled has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 8, loops 2 (5 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.
CodexRolloutMetadata.read (cognitive 32) native/Sources/PacerCore/CodexSessionOrigin.swift:83— CodexRolloutMetadata.read has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 13, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopRouteHints.changed (cognitive 32) native/Sources/PacerCore/DesktopRouteHints.swift:20— DesktopRouteHints.changed has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 10, loops 1 (3 pts), error handling 1, ternaries 1 (nesting depth added 11). Of this number, 30 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.
WindowsProcessHost.nearest (cognitive 31) windows/EngineSupport/WindowsProcessHost.swift:12— WindowsProcessHost.nearest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 11, 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.
Turn.observeResponse (cognitive 31) native/Sources/PacerCore/WorkBuddyTranscript.swift:52— Turn.observeResponse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 11, ternaries 2 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codex_progress_mcp.record_receipt (cognitive 31) native/Sources/PacerCore/Resources/codex_progress_mcp.py:56— codex_progress_mcp.record_receipt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, error handling 4 (6 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.
pacer-codex-progress.record_receipt (cognitive 31) windows/InstallerSupport/Resources/pacer-codex-progress.py:56— pacer-codex-progress.record_receipt has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, error handling 4 (6 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.
AlternatingQuotaText.Step (cognitive 30) windows/Desktop/AlternatingQuotaText.cs:174— AlternatingQuotaText.Step has cognitive complexity 30 (threshold 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.
WindowsStartupRegistration.SetCore (cognitive 30) windows/Desktop/WindowsStartupRegistration.cs:133— WindowsStartupRegistration.SetCore has cognitive complexity 30 (threshold 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.
WindowsCodexProcess.init (cognitive 30) windows/EngineSupport/WindowsCodexProcess.swift:47— WindowsCodexProcess.init has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (9 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekSessionLog.progressResult (cognitive 30) native/Sources/PacerCore/DeepSeekSessionLog.swift:216— DeepSeekSessionLog.progressResult has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 25, if/else 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
HarnessCreditsNoticePolicy.notices (cognitive 30) native/Sources/PacerCore/HarnessCreditsNoticePolicy.swift:23— HarnessCreditsNoticePolicy.notices has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, ternaries 3 (6 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.
RemoteControlActivityTarget.configured (cognitive 30) native/Sources/PacerCore/RemoteControlActivityTarget.swift:39— RemoteControlActivityTarget.configured has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 2 (6 pts), error handling 1 (nesting depth added 13). Of this number, 27 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteControlCatalog.refresh (cognitive 30) native/Sources/PacerCore/RemoteControlCatalog.swift:121— RemoteControlCatalog.refresh has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 4, error handling 4, ternaries 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, 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.
DeepSeekSoloView.DeepSeekSoloView.ctor (cognitive 29) windows/Desktop/DeepSeekSoloView.cs:26— DeepSeekSoloView.DeepSeekSoloView.ctor has cognitive complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong 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.
EngineClient.RequestAsync (cognitive 29) windows/Desktop/EngineClient.cs:147— EngineClient.RequestAsync has cognitive complexity 29 (threshold 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.
GuideContent.Releases (cognitive 29) windows/Desktop/GuideContent.cs:516— GuideContent.Releases has cognitive complexity 29 (threshold 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.
ReleaseNotesMarkdown.Spans (cognitive 29) windows/Desktop/ReleaseNotesMarkdown.cs:49— ReleaseNotesMarkdown.Spans has cognitive complexity 29 (threshold 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.
WindowsClaudeCloudStream.read (cognitive 29) windows/EngineSupport/WindowsClaudeCloudStream.swift:76— WindowsClaudeCloudStream.read has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (8 pts), loops 3 (6 pts), error handling 1 (3 pts), ternaries 1 (nesting depth added 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeDesktopCredentialStore.decodeCache (cognitive 29) native/Sources/PacerCore/ClaudeDesktopCredentialStore.swift:27— ClaudeDesktopCredentialStore.decodeCache has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (13 pts), loops 1, ternaries 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DeepSeekBalanceCoordinator.finish (cognitive 29) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:236— DeepSeekBalanceCoordinator.finish has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, ternaries 2 (4 pts), match/switch 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.
DeepSeekDialPresentation.init (cognitive 29) native/Sources/PacerCore/DeepSeekDialPresentation.swift:22— DeepSeekDialPresentation.init has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 10 (14 pts), if/else 10, boolean chains 4, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ExpandedPanelPresentation.sections (cognitive 29) native/Sources/PacerCore/ExpandedPanelPresentation.swift:30— ExpandedPanelPresentation.sections has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), ternaries 2 (6 pts), loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteActivityTarget.configuration (cognitive 29) native/Sources/PacerCore/RemoteActivityTarget.swift:62— RemoteActivityTarget.configuration has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 12, error handling 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteControlCatalogAuthorization.init (cognitive 29) native/Sources/PacerCore/RemoteControlCatalogAuthorization.swift:10— RemoteControlCatalogAuthorization.init has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 21, if/else 7, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WorkBuddySessionStore.rows (cognitive 29) native/Sources/PacerCore/WorkBuddyHarness.swift:211— WorkBuddySessionStore.rows has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 5 (8 pts), boolean chains 6, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HighContrastScope.Update (cognitive 28) windows/Desktop/HighContrastScope.cs:82— HighContrastScope.Update has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SettingsWindow.RefreshHarnessCredits (cognitive 28) windows/Desktop/SettingsHarness.cs:487— SettingsWindow.RefreshHarnessCredits has cognitive complexity 28 (threshold 15). Of this number, 27 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.
ClaudeCloudProjectState.sessionsToRead (cognitive 28) native/Sources/PacerCore/ClaudeCloudProjectState.swift:133— ClaudeCloudProjectState.sessionsToRead has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 9, loops 3 (4 pts), ternaries 2 (4 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.
ClaudeSSHDiscovery.configurations (cognitive 28) native/Sources/PacerCore/ClaudeSSHDiscovery.swift:67— ClaudeSSHDiscovery.configurations has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 16, if/else 9 (11 pts), ternaries 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.
ConnectionSummary.init (cognitive 28) native/Sources/PacerCore/ConnectionPresentation.swift:155— ConnectionSummary.init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 3 (7 pts), ternaries 7, loops 5 (6 pts), boolean chains 1 (nesting depth added 8). 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.
DeepSeekBalanceCoordinator.configure (cognitive 28) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:72— DeepSeekBalanceCoordinator.configure has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 8, ternaries 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekSessionReader.readFrames (cognitive 28) native/Sources/PacerCore/DeepSeekSessionReader.swift:79— DeepSeekSessionReader.readFrames has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 3 (4 pts), error handling 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.
IslandPlacementGeometry.Arrange (cognitive 27) windows/Desktop/IslandPlacementGeometry.cs:49— IslandPlacementGeometry.Arrange has cognitive complexity 27 (threshold 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.
PreferencesCodec.Normalize (cognitive 27) windows/Desktop/PreferencesCodec.cs:151— PreferencesCodec.Normalize has cognitive complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
SettingsWindow.RefreshModules (cognitive 27) windows/Desktop/SettingsModules.cs:48— SettingsWindow.RefreshModules has cognitive complexity 27 (threshold 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.
WindowsClaudeRemoteCoordinator.finished (cognitive 27) windows/EngineSupport/WindowsClaudeRemoteSetup.swift:153— WindowsClaudeRemoteCoordinator.finished has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, ternaries 2 (6 pts), match/switch 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.
ActivityTaskRowPresentation.init (cognitive 27) native/Sources/PacerCore/ActivityTaskPresentation.swift:195— ActivityTaskRowPresentation.init has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (12 pts), if/else 6 (7 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ClaudeAgentNotification.init (cognitive 27) native/Sources/PacerCore/ClaudeAgentNotification.swift:9— ClaudeAgentNotification.init has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 13 (nesting depth added 2). Of this number, 21 points are the body's own statements and 6 belong 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.
DeepSeekBalanceCoordinator.refreshIfDue (cognitive 27) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:122— DeepSeekBalanceCoordinator.refreshIfDue has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (9 pts), ternaries 2 (3 pts), error handling 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.
ExpandedPanelPresentation.project (cognitive 27) native/Sources/PacerCore/ExpandedPanelPresentation.swift:180— ExpandedPanelPresentation.project has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 7, match/switch 1 (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.
ModelDisplay.name (cognitive 27) native/Sources/PacerCore/ModelDisplay.swift:25— ModelDisplay.name has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (8 pts), if/else 5 (7 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RealtimeActivityMonitor.startAsync (cognitive 27) native/Sources/PacerCore/RealtimeActivityMonitor.swift:140— RealtimeActivityMonitor.startAsync has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7, loops 2 (4 pts), ternaries 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.
WorkBuddyHarness.progressConnection (cognitive 27) native/Sources/PacerCore/WorkBuddyHarness.swift:59— WorkBuddyHarness.progressConnection has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (nesting depth added 12). Of this number, 25 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.
WorkBuddyRunLog.time (cognitive 27) native/Sources/PacerCore/WorkBuddyRunLog.swift:174— WorkBuddyRunLog.time has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 9, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
DeepSeekQuotaCell.DeepSeekQuotaCell.ctor (cognitive 26) windows/Desktop/DeepSeekQuotaCell.cs:16— DeepSeekQuotaCell.DeepSeekQuotaCell.ctor has cognitive complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong 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.
SettingsWindow.RefreshDisplayChoices (cognitive 26) windows/Desktop/SettingsAppearance.cs:152— SettingsWindow.RefreshDisplayChoices has cognitive complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong 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.
SessionActivity.observeCodexGoal (cognitive 26) native/Sources/PacerCore/Activity.swift:620— SessionActivity.observeCodexGoal has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 20, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityNavigationRegistry.update (cognitive 26) native/Sources/PacerCore/ActivityNavigationRegistry.swift:36— ActivityNavigationRegistry.update has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 9, if/else 3 (5 pts), loops 1 (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeActivityState.consume (cognitive 26) native/Sources/PacerCore/ClaudeActivityRecord.swift:345— ClaudeActivityState.consume has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeSSHRouteRules.parse (cognitive 26) native/Sources/PacerCore/ClaudeSSHRouteRules.swift:5— ClaudeSSHRouteRules.parse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 9, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskProgressReporter.response (cognitive 26) native/Sources/PacerCore/CodexProgressReporter.swift:80— TaskProgressReporter.response has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, ternaries 4 (8 pts), if/else 4 (6 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekSessionLog.response (cognitive 26) native/Sources/PacerCore/DeepSeekSessionLog.swift:166— DeepSeekSessionLog.response has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6, 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.
TaskProgressRing.make (cognitive 26) native/Sources/PacerCore/SelfReportedProgress.swift:76— TaskProgressRing.make has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), ternaries 2 (3 pts), match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WorkBuddyRunLog.read (cognitive 26) native/Sources/PacerCore/WorkBuddyRunLog.swift:52— WorkBuddyRunLog.read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandWindow.Relayout (cognitive 25) windows/Desktop/IslandWindow.xaml.cs:472— IslandWindow.Relayout has cognitive complexity 25 (threshold 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.
SettingsWindow.BuildCompactInspector (cognitive 25) windows/Desktop/SettingsCollapsed.cs:158— SettingsWindow.BuildCompactInspector has cognitive complexity 25 (threshold 15). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 173, 256, 271, …). 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.
SettingsWindow.BuildDeepSeekConnection (cognitive 25) windows/Desktop/SettingsDeepSeekConnection.cs:44— SettingsWindow.BuildDeepSeekConnection has cognitive complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 50, 78, 94, …). 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.
SettingsWindow.RefreshHarnessPage (cognitive 25) windows/Desktop/SettingsHarness.cs:666— SettingsWindow.RefreshHarnessPage has cognitive complexity 25 (threshold 15). 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.
SettingsWindow.RefreshBanner (cognitive 25) windows/Desktop/SettingsOverview.cs:245— SettingsWindow.RefreshBanner has cognitive complexity 25 (threshold 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.
UpdateFiles.Check (cognitive 25) windows/UpdateSupport/UpdateFiles.cs:15— UpdateFiles.Check has cognitive complexity 25 (threshold 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.
MotionBridge.swift.pacerLayoutFrame (cognitive 25) windows/Bridge/MotionBridge.swift:132— MotionBridge.swift.pacerLayoutFrame has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 17, if/else 4, ternaries 3, loops 1. Of this number, 24 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, 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.
AttentionPolicy.activityNotices (cognitive 25) native/Sources/PacerCore/Attention.swift:81— AttentionPolicy.activityNotices has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 8, ternaries 3 (4 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeHookInstaller.migrated (cognitive 25) native/Sources/PacerCore/ClaudeHookInstaller.swift:180— ClaudeHookInstaller.migrated has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeLiveSessionRegistry.holders (cognitive 25) native/Sources/PacerCore/ClaudeLiveSessionRegistry.swift:30— ClaudeLiveSessionRegistry.holders has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 19, if/else 3 (5 pts), loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CodexClient.setProgressReporter (cognitive 25) native/Sources/PacerCore/CodexClient.swift:221— CodexClient.setProgressReporter has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (11 pts), ternaries 1 (3 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.
LocalHarnessProgressSetup.inspect (cognitive 25) native/Sources/PacerCore/LocalHarnessProgressSetup.swift:261— LocalHarnessProgressSetup.inspect has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Reading.init (cognitive 25) native/Sources/PacerCore/QuotaDashboardPresentation.swift:189— Reading.init has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11, ternaries 8 (9 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RealtimeActivityMonitor.readControlDirectory (cognitive 25) native/Sources/PacerCore/RealtimeActivityMonitor.swift:214— RealtimeActivityMonitor.readControlDirectory has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EngineClient.ReadAsync (cognitive 24) windows/Desktop/EngineClient.cs:191— EngineClient.ReadAsync has cognitive complexity 24 (threshold 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.
ActivityLogWatcher.update (cognitive 24) native/Sources/PacerCore/ActivityLogWatcher.swift:43— ActivityLogWatcher.update has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, ternaries 2 (4 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.
ClaudeDesktopRecords.desktopMetadata (cognitive 24) native/Sources/PacerCore/ClaudeDesktopRecords.swift:130— ClaudeDesktopRecords.desktopMetadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 10, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompletionInbox.persistentDigestFields (cognitive 24) native/Sources/PacerCore/CompletionInbox.swift:99— CompletionInbox.persistentDigestFields has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 8, ternaries 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 6 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.
ResponsePerformanceMeter.observeRuntime (cognitive 24) native/Sources/PacerCore/ResponsePerformance.swift:110— ResponsePerformanceMeter.observeRuntime has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (12 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityBadge.body (cognitive 24) native/Sources/PacerIsland/ActivityBadge.swift:75— ActivityBadge.body has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (10 pts), ternaries 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HarnessGuideFloat.update (cognitive 24) native/Sources/PacerIsland/HarnessGuideFloat.swift:80— HarnessGuideFloat.update has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5 (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.
IslandModel.refreshDeepSeekBalance (cognitive 24) native/Sources/PacerIsland/IslandModel+DeepSeek.swift:283— IslandModel.refreshDeepSeekBalance has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 11, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WhatsNewItemRow.body (cognitive 24) native/Sources/PacerIsland/WhatsNewView.swift:131— WhatsNewItemRow.body has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 13 (16 pts), boolean chains 5, if/else 3 (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.
codex_progress_mcp.respond (cognitive 24) native/Sources/PacerCore/Resources/codex_progress_mcp.py:131— codex_progress_mcp.respond has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (10 pts), boolean chains 3 (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.
pacer-codex-progress.respond (cognitive 24) windows/InstallerSupport/Resources/pacer-codex-progress.py:131— pacer-codex-progress.respond has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (10 pts), boolean chains 3 (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.
App.ShowGuideCoreAsync (cognitive 23) windows/Desktop/AppGuidePages.cs:28— App.ShowGuideCoreAsync has cognitive complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong 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.
CompactWarningsView.Update (cognitive 23) windows/Desktop/CompactWarningsView.cs:76— CompactWarningsView.Update has cognitive complexity 23 (threshold 15). Of this number, 22 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.
GuideWindow.GuideWindow.ctor (cognitive 23) windows/Desktop/GuideWindow.cs:31— GuideWindow.GuideWindow.ctor has cognitive complexity 23 (threshold 15). Of this number, 18 points are the body's own statements and 5 belong to 4 function literals 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.
IslandWindow.OpenConversationTaskAsync (cognitive 23) windows/Desktop/IslandWindow.xaml.cs:1015— IslandWindow.OpenConversationTaskAsync has cognitive complexity 23 (threshold 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.
PreferencesStore.Save (cognitive 23) windows/Desktop/PreferencesStore.cs:97— PreferencesStore.Save has cognitive complexity 23 (threshold 15). 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.
QuotaConnectionView.QuotaConnectionView.ctor (cognitive 23) windows/Desktop/QuotaConnectionView.cs:12— QuotaConnectionView.QuotaConnectionView.ctor has cognitive complexity 23 (threshold 15). Of this number, 19 points are the body's own statements and 4 belong 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.
SettingsWindow.RunDeepSeekConnection (cognitive 23) windows/Desktop/SettingsDeepSeekConnection.cs:175— SettingsWindow.RunDeepSeekConnection has cognitive complexity 23 (threshold 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.
SettingsWindow.SettingsWindow.ctor (cognitive 23) windows/Desktop/SettingsWindow.cs:73— SettingsWindow.SettingsWindow.ctor has cognitive complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 153, 129, 152, …). 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.
Program.Main (cognitive 23) windows/Maintenance/Program.cs:5— Program.Main has cognitive complexity 23 (threshold 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.
SessionActivity.recoverCodexEnding (cognitive 23) native/Sources/PacerCore/Activity.swift:946— SessionActivity.recoverCodexEnding has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 20, if/else 2, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeDesktopRecords.desktopSessionID (cognitive 23) native/Sources/PacerCore/ClaudeDesktopRecords.swift:79— ClaudeDesktopRecords.desktopSessionID has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, ternaries 2 (3 pts), loops 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.
ClaudeWebQuotaClient.request (cognitive 23) native/Sources/PacerCore/ClaudeWebQuotaClient.swift:204— ClaudeWebQuotaClient.request has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DesktopWireProjection.snapshot (cognitive 23) native/Sources/PacerCore/DesktopWireProjection.swift:320— DesktopWireProjection.snapshot has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, match/switch 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkBuddyTranscript.read (cognitive 23) native/Sources/PacerCore/WorkBuddyTranscript.swift:132— WorkBuddyTranscript.read has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, 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.
HarnessAccountCard.body (cognitive 23) native/Sources/PacerIsland/HarnessAccountCard.swift:23— HarnessAccountCard.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandModel.configureCodexRemoteProgress (cognitive 23) native/Sources/PacerIsland/IslandModel.swift:546— IslandModel.configureCodexRemoteProgress has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (7 pts), error handling 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.
SettingsView.commit (cognitive 23) native/Sources/PacerIsland/SettingsView.swift:656— SettingsView.commit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6, match/switch 1 (nesting depth added 8). Of this number, 21 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
claude_activity.otlp_request_header (cognitive 23) native/Sources/PacerCore/Resources/claude_activity.py:357— claude_activity.otlp_request_header has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DeepSeekBalanceStatusView.DeepSeekBalanceStatusView.ctor (cognitive 22) windows/Desktop/DeepSeekBalanceStatusView.cs:12— DeepSeekBalanceStatusView.DeepSeekBalanceStatusView.ctor has cognitive complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 29, 28). 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.
EngineClient.StartAsync (cognitive 22) windows/Desktop/EngineClient.cs:60— EngineClient.StartAsync has cognitive complexity 22 (threshold 15). 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.
EstimatePaint.OnRender (cognitive 22) windows/Desktop/EstimatePaint.cs:91— EstimatePaint.OnRender has cognitive complexity 22 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IslandScreenMemory.Load (cognitive 22) windows/Desktop/IslandScreenMemory.cs:75— IslandScreenMemory.Load has cognitive complexity 22 (threshold 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.
IslandWindow.Render (cognitive 22) windows/Desktop/IslandWindow.xaml.cs:774— IslandWindow.Render has cognitive complexity 22 (threshold 15). Of this number, 21 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.
NotificationSession.Receive (cognitive 22) windows/Desktop/NotificationSession.cs:95— NotificationSession.Receive has cognitive complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 100). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
PreferencesSession.ChangeAsync (cognitive 22) windows/Desktop/PreferencesSession.cs:32— PreferencesSession.ChangeAsync has cognitive complexity 22 (threshold 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.
ReleaseNotesMarkdown.Parse (cognitive 22) windows/Desktop/ReleaseNotesMarkdown.cs:18— ReleaseNotesMarkdown.Parse has cognitive complexity 22 (threshold 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.
SettingsWindow.RefreshClaudeConnection (cognitive 22) windows/Desktop/SettingsClaudeConnection.cs:65— SettingsWindow.RefreshClaudeConnection has cognitive complexity 22 (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, 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.
SettingsWindow.UpdateSourceStatus (cognitive 22) windows/Desktop/SettingsCodex.cs:254— SettingsWindow.UpdateSourceStatus has cognitive complexity 22 (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.
WindowsInstallationOperations.RemoveOwnedRegistrations (cognitive 22) windows/Desktop/WindowsInstallationOperations.cs:307— WindowsInstallationOperations.RemoveOwnedRegistrations has cognitive complexity 22 (threshold 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.
UpdateFeedClient.Open (cognitive 22) windows/UpdateSupport/UpdateFeedClient.cs:115— UpdateFeedClient.Open has cognitive complexity 22 (threshold 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.
WindowsDesktopTransport.init (cognitive 22) windows/EngineSupport/WindowsDesktopTransport.swift:14— WindowsDesktopTransport.init has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 5, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SessionActivity.mergeCodexRequestEvidence (cognitive 22) native/Sources/PacerCore/Activity.swift:598— SessionActivity.mergeCodexRequestEvidence has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityNavigationOperation.descendants (cognitive 22) native/Sources/PacerCore/ActivityNavigationState.swift:38— ActivityNavigationOperation.descendants has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 4 (6 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.
ClaudeDesktopCredentialReader.read (cognitive 22) native/Sources/PacerCore/ClaudeDesktopCredentialStore.swift:97— ClaudeDesktopCredentialReader.read has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopFrameDecoder.parse (cognitive 22) native/Sources/PacerCore/DesktopFrameDecoder.swift:112— DesktopFrameDecoder.parse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (10 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppDelegate.applicationDidFinishLaunching (cognitive 22) native/Sources/PacerIsland/PacerMain.swift:267— AppDelegate.applicationDidFinishLaunching has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (2 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.
PanelController.init (cognitive 22) native/Sources/PacerIsland/PanelController.swift:41— PanelController.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, boolean chains 9. 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.
LegacyQuotaView.LegacyQuotaView.ctor (cognitive 21) windows/Desktop/LegacyQuotaView.cs:14— LegacyQuotaView.LegacyQuotaView.ctor has cognitive complexity 21 (threshold 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.
QuotaHistoryView.Update (cognitive 21) windows/Desktop/QuotaHistoryView.cs:85— QuotaHistoryView.Update has cognitive complexity 21 (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, 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.
SettingsWindow.CommitDeepSeekBudget (cognitive 21) windows/Desktop/SettingsDeepSeek.cs:168— SettingsWindow.CommitDeepSeekBudget has cognitive complexity 21 (threshold 15). 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.
SettingsWindow.BuildPanelInspector (cognitive 21) windows/Desktop/SettingsPanel.cs:176— SettingsWindow.BuildPanelInspector has cognitive complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 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.
SettingsWindow.ApplySearch (cognitive 21) windows/Desktop/SettingsSidebar.cs:173— SettingsWindow.ApplySearch has cognitive complexity 21 (threshold 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.
DeepSeekBalanceHistoryStore.decode (cognitive 21) windows/EngineSupport/DeepSeekBalanceHistoryStore.swift:26— DeepSeekBalanceHistoryStore.decode has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 19, if/else 1, ternaries 1. Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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.
EngineRuntime.navigationIsCurrent (cognitive 21) windows/EngineSupport/PacerEngine.swift:3177— EngineRuntime.navigationIsCurrent has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, if/else 5, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WindowsDesktopSourceGate.permit (cognitive 21) windows/EngineSupport/WindowsDesktopCollector.swift:351— WindowsDesktopSourceGate.permit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5 (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.
ActivityNavigationOperation.complete (cognitive 21) native/Sources/PacerCore/ActivityNavigationState.swift:64— ActivityNavigationOperation.complete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, loops 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.
ClaudeQuotaDecoder.buckets (cognitive 21) native/Sources/PacerCore/ClaudeQuotaClient.swift:65— ClaudeQuotaDecoder.buckets has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (9 pts), loops 2, ternaries 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeSSHDiscovery.configured (cognitive 21) native/Sources/PacerCore/ClaudeSSHDiscovery.swift:31— ClaudeSSHDiscovery.configured has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompactBarPresentation.project::entry (cognitive 21) native/Sources/PacerCore/CompactBarPresentation.swift:320— CompactBarPresentation.project::entry has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 5, if/else 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. This shape REPEATS in the file: one other method here (CompactBarPresentation.project) 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.
DeepSeekNoticePolicy.spendNotices (cognitive 21) native/Sources/PacerCore/DeepSeekNoticePolicy.swift:26— DeepSeekNoticePolicy.spendNotices has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 5, if/else 2 (3 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.
DemoScenario.deepseekUsage (cognitive 21) native/Sources/PacerCore/DemoScenario.swift:192— DemoScenario.deepseekUsage has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (7 pts), loops 3 (4 pts), boolean chains 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.
DesktopWireProjection.items (cognitive 21) native/Sources/PacerCore/DesktopWireProjection.swift:230— DesktopWireProjection.items has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5 (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.
RealtimeActivityMonitor.receive (cognitive 21) native/Sources/PacerCore/RealtimeActivityMonitor.swift:668— RealtimeActivityMonitor.receive has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassicQuotaDashboardView.rings (cognitive 21) native/Sources/PacerIsland/ClassicQuotaDashboardView.swift:22— ClassicQuotaDashboardView.rings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (7 pts), boolean chains 3 (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.
IslandModel.canOpen (cognitive 21) native/Sources/PacerIsland/IslandModel.swift:1129— IslandModel.canOpen has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IslandModel.syncClaudeCloudMonitor (cognitive 21) native/Sources/PacerIsland/IslandModel.swift:2082— IslandModel.syncClaudeCloudMonitor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10 (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.
HistoryPane.quotaCard (cognitive 21) native/Sources/PacerIsland/MainWindowPanes.swift:238— HistoryPane.quotaCard has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (21 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
claude_remote_setup.managed_telemetry (cognitive 21) native/Sources/PacerCore/Resources/claude_remote_setup.py:212— claude_remote_setup.managed_telemetry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), loops 3 (5 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.
FullscreenOcclusionObserver.Refresh (cognitive 20) windows/Desktop/FullscreenOcclusionObserver.cs:55— FullscreenOcclusionObserver.Refresh has cognitive complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, 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 literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ProviderLoginWindow.ObserveAsync (cognitive 20) windows/Desktop/ProviderLoginWindow.cs:191— ProviderLoginWindow.ObserveAsync has cognitive complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
SettingsWindow.RefreshOverview (cognitive 20) windows/Desktop/SettingsOverview.cs:137— SettingsWindow.RefreshOverview has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
SettingsWindow.CommitProviderHome (cognitive 20) windows/Desktop/SettingsProviderHome.cs:108— SettingsWindow.CommitProviderHome has cognitive complexity 20 (threshold 15). 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.
WindowsMaintenanceSignal.StopAsync (cognitive 20) windows/Desktop/WindowsMaintenanceSignal.cs:26— WindowsMaintenanceSignal.StopAsync has cognitive complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to 2 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.
UpdateFeedClient.DownloadAsync (cognitive 20) windows/UpdateSupport/UpdateFeedClient.cs:61— UpdateFeedClient.DownloadAsync has cognitive complexity 20 (threshold 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.
EngineGuidePages.project (cognitive 20) windows/EngineSupport/EngineGuidePages.swift:40— EngineGuidePages.project has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, ternaries 5, if/else 1, match/switch 1. Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
WindowsDesktopCollector.deliver (cognitive 20) windows/EngineSupport/WindowsDesktopCollector.swift:186— WindowsDesktopCollector.deliver has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowsHTTPStream.open (cognitive 20) windows/EngineSupport/WindowsHTTPStream.swift:53— WindowsHTTPStream.open has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 8, if/else 3 (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.
WindowsClaudeHookCommands.owned (cognitive 20) windows/InstallerSupport/WindowsClaudeHookCommands.swift:92— WindowsClaudeHookCommands.owned has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (8 pts), loops 3 (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.
WindowsClaudeRuntimeStore.references (cognitive 20) windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:201— WindowsClaudeRuntimeStore.references has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 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.
ClaudeCloudReplyStreams.connect (cognitive 20) native/Sources/PacerCore/ClaudeCloudReplyStreams.swift:70— ClaudeCloudReplyStreams.connect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeHookInstaller.reconcileEnvironment (cognitive 20) native/Sources/PacerCore/ClaudeHookInstaller.swift:397— ClaudeHookInstaller.reconcileEnvironment has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), loops 2 (3 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeTranscriptContext.resolve (cognitive 20) native/Sources/PacerCore/ClaudeTranscriptContext.swift:40— ClaudeTranscriptContext.resolve has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 4 (9 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CodexClientError.errorDescription (cognitive 20) native/Sources/PacerCore/CodexClient.swift:16— CodexClientError.errorDescription has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 5, if/else 3 (4 pts), match/switch 1 (nesting depth added 6). 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.
CodexOriginLookup.lookup (cognitive 20) native/Sources/PacerCore/CodexSessionOrigin.swift:135— CodexOriginLookup.lookup has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 6, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DeepSeekConnectionPresentation.init (cognitive 20) native/Sources/PacerCore/DeepSeekConnectionPresentation.swift:21— DeepSeekConnectionPresentation.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7, ternaries 6 (7 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeepSeekWallet.init (cognitive 20) native/Sources/PacerCore/DeepSeekWallet.swift:97— DeepSeekWallet.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong 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.
DurableActivityCatalog.page (cognitive 20) native/Sources/PacerCore/DurableActivityCatalog.swift:33— DurableActivityCatalog.page has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HarnessAccountCredits.reading (cognitive 20) native/Sources/PacerCore/HarnessAccountCredits.swift:55— HarnessAccountCredits.reading has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClassicQuotaDashboardRingView.body (cognitive 20) native/Sources/PacerIsland/ClassicQuotaDashboardView.swift:82— ClassicQuotaDashboardRingView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 4 (6 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.
CompactIslandComponent.stripContent (cognitive 20) native/Sources/PacerIsland/CompactIslandHeader.swift:323— CompactIslandComponent.stripContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (5 pts), boolean chains 2, 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.
ProgressGuideBody.stepRow (cognitive 20) native/Sources/PacerIsland/SettingsProgressGuide.swift:166— ProgressGuideBody.stepRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 5, boolean chains 4, match/switch 1 (2 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.
claude_remote_setup.reconcile_environment (cognitive 20) native/Sources/PacerCore/Resources/claude_remote_setup.py:311— claude_remote_setup.reconcile_environment has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, loops 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.
IslandWindow.FillQuota (cognitive 19) windows/Desktop/IslandPanelSections.cs:288— IslandWindow.FillQuota has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to 2 function literals 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.
IslandWindow.ApplyMotion (cognitive 19) windows/Desktop/IslandWindow.xaml.cs:653— IslandWindow.ApplyMotion has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
IslandWindow.OpenFromWindowAsync (cognitive 19) windows/Desktop/IslandWindow.xaml.cs:977— IslandWindow.OpenFromWindowAsync has cognitive complexity 19 (threshold 15). Of this number, 18 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.
NotificationSession.SetEnabledAsync (cognitive 19) windows/Desktop/NotificationSession.cs:54— NotificationSession.SetEnabledAsync has cognitive complexity 19 (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, 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.
SettingsWindow.RefreshClaude (cognitive 19) windows/Desktop/SettingsClaude.cs:70— SettingsWindow.RefreshClaude has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
SettingsWindow.SourceField (cognitive 19) windows/Desktop/SettingsCodex.cs:122— SettingsWindow.SourceField has cognitive complexity 19 (threshold 15). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 133, 129, 130). 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.
SettingsWindow.DrawPanelEditor (cognitive 19) windows/Desktop/SettingsPanel.cs:499— SettingsWindow.DrawPanelEditor has cognitive complexity 19 (threshold 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.
MotionBridge.swift.pacerMotionCanvas (cognitive 19) windows/Bridge/MotionBridge.swift:82— MotionBridge.swift.pacerMotionCanvas has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (6 pts), boolean chains 3, ternaries 3 (nesting depth added 6). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionActivity.setClaudeNavigation (cognitive 19) native/Sources/PacerCore/Activity.swift:537— SessionActivity.setClaudeNavigation has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ClaudeActivityMonitor.readLocal (cognitive 19) native/Sources/PacerCore/ClaudeActivityMonitor.swift:179— ClaudeActivityMonitor.readLocal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, 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.
CodexClient.receive (cognitive 19) native/Sources/PacerCore/CodexClient.swift:460— CodexClient.receive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekSessionReader.read (cognitive 19) native/Sources/PacerCore/DeepSeekSessionReader.swift:46— DeepSeekSessionReader.read has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandGeometry.arrange (cognitive 19) native/Sources/PacerCore/IslandGeometry.swift:150— IslandGeometry.arrange has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 10, boolean chains 7, if/else 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
QuotaHistoryPresentation.init (cognitive 19) native/Sources/PacerCore/QuotaHistoryPresentation.swift:19— QuotaHistoryPresentation.init has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 7, if/else 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.
QuotaAccountPresentation.init (cognitive 19) native/Sources/PacerCore/QuotaHistoryPresentation.swift:67— QuotaAccountPresentation.init has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 6, boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ClaudeConversationOpener.open (cognitive 19) native/Sources/PacerIsland/ClaudeConversationOpener.swift:24— ClaudeConversationOpener.open has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
IslandModel.trackHostApplications (cognitive 19) native/Sources/PacerIsland/IslandModel.swift:1823— IslandModel.trackHostApplications has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IslandModel.startClaudeActivity (cognitive 19) native/Sources/PacerIsland/IslandModel.swift:2053— IslandModel.startClaudeActivity has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 7, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TaskStatusIconNSView.makeGlyph (cognitive 19) native/Sources/PacerIsland/TaskStatusIconView.swift:692— TaskStatusIconNSView.makeGlyph has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 3 (5 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassicQuotaView.ClassicQuotaView.ctor (cognitive 18) windows/Desktop/ClassicQuotaView.cs:16— ClassicQuotaView.ClassicQuotaView.ctor has cognitive complexity 18 (threshold 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.
CompactLayoutEditorView.Chip (cognitive 18) windows/Desktop/CompactLayoutEditorView.cs:129— CompactLayoutEditorView.Chip has cognitive complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 138, 134, 159, …). 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.
QuotaDial.OnRender (cognitive 18) windows/Desktop/QuotaDial.cs:100— QuotaDial.OnRender has cognitive complexity 18 (threshold 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.
SettingsWindow.RefreshProviderQuotaRow (cognitive 18) windows/Desktop/SettingsCardKit.cs:157— SettingsWindow.RefreshProviderQuotaRow has cognitive complexity 18 (threshold 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.
WindowsUpdateService.CheckCore (cognitive 18) windows/Desktop/WindowsUpdateService.cs:113— WindowsUpdateService.CheckCore has cognitive complexity 18 (threshold 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.
EngineRuntime.trackActivityHosts (cognitive 18) windows/EngineSupport/PacerEngine.swift:3040— EngineRuntime.trackActivityHosts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (5 pts), error handling 1 (2 pts), boolean chains 1, 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.
ClaudeCloudServices.reference (cognitive 18) windows/EngineSupport/ClaudeWebReferenceServices.swift:38— ClaudeCloudServices.reference has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 5, if/else 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClaudeHookInstaller.uninstall (cognitive 18) native/Sources/PacerCore/ClaudeHookInstaller.swift:152— ClaudeHookInstaller.uninstall has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ClaudeQuotaServices.reference (cognitive 18) windows/EngineSupport/ClaudeWebReferenceServices.swift:8— ClaudeQuotaServices.reference has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 5, if/else 3 (4 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeQuotaCredentialCache.decode (cognitive 18) native/Sources/PacerCore/ClaudeQuotaCredentialCache.swift:12— ClaudeQuotaCredentialCache.decode has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 2, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CodexActivityInput.requests (cognitive 18) native/Sources/PacerCore/CodexActivityInput.swift:28— CodexActivityInput.requests has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CompletionInbox.retainingCloudEnding (cognitive 18) native/Sources/PacerCore/CompletionInbox.swift:172— CompletionInbox.retainingCloudEnding has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DeepSeekActivityMonitor.read (cognitive 18) native/Sources/PacerCore/DeepSeekActivityMonitor.swift:75— DeepSeekActivityMonitor.read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 1 (2 pts), 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.
DeepSeekBalanceHistory.record (cognitive 18) native/Sources/PacerCore/DeepSeekBalanceHistory.swift:42— DeepSeekBalanceHistory.record has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Cursor.skip (cognitive 18) native/Sources/PacerCore/DesktopFrameDecoder.swift:465— Cursor.skip has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DurableTurnHistory.receiptPage (cognitive 18) native/Sources/PacerCore/DurableTurnHistory.swift:94— DurableTurnHistory.receiptPage has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (7 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Cursor.skipValue (cognitive 18) native/Sources/PacerCore/JSONFieldView.swift:231— Cursor.skipValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuotaCycleHistory.record (cognitive 18) native/Sources/PacerCore/QuotaCycle.swift:65— QuotaCycleHistory.record has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkBuddySessionStore.dailyCredits (cognitive 18) native/Sources/PacerCore/WorkBuddyHarness.swift:372— WorkBuddySessionStore.dailyCredits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 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.
ActivityOrbitView.refreshEstimateLoops (cognitive 18) native/Sources/PacerIsland/ActivityBadge.swift:621— ActivityOrbitView.refreshEstimateLoops has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 1 (3 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
WarningMark.body (cognitive 18) native/Sources/PacerIsland/CompactQuotaViews.swift:454— WarningMark.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (7 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeepSeekBudgetDetails.body (cognitive 18) native/Sources/PacerIsland/DeepSeekDashboardView.swift:426— DeepSeekBudgetDetails.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuotaCycleChart.chart (cognitive 18) native/Sources/PacerIsland/QuotaCycleChart.swift:45— QuotaCycleChart.chart has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (5 pts), boolean chains 4, match/switch 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.
LibraryRoundButton.roundButton (cognitive 18) native/Sources/PacerIsland/SettingsLibraryTile.swift:110— LibraryRoundButton.roundButton has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 15, if/else 2, 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.
WheelView.viewDidMoveToWindow (cognitive 18) native/Sources/PacerIsland/TaskPagerView.swift:135— WheelView.viewDidMoveToWindow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TaskStatusIconNSView.layout (cognitive 18) native/Sources/PacerIsland/TaskStatusIconView.swift:259— TaskStatusIconNSView.layout has cognitive complexity 18 (threshold 15). Drivers by points: loops 7, ternaries 4 (6 pts), if/else 3 (4 pts), boolean chains 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.
App.Restart (cognitive 17) windows/Desktop/App.xaml.cs:423— App.Restart has cognitive complexity 17 (threshold 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.
GuideContent.WelcomeStep (cognitive 17) windows/Desktop/GuideContent.cs:264— GuideContent.WelcomeStep has cognitive complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 315, 306, 307, …). 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.
GuideContent.SettingsReleases (cognitive 17) windows/Desktop/GuideContent.cs:549— GuideContent.SettingsReleases has cognitive complexity 17 (threshold 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.
GuideContent.Support (cognitive 17) windows/Desktop/GuideContent.cs:858— GuideContent.Support has cognitive complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 3 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.
IslandWindow.ApplyPresentationLayout (cognitive 17) windows/Desktop/IslandWindow.xaml.cs:598— IslandWindow.ApplyPresentationLayout has cognitive complexity 17 (threshold 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.
QuotaDial.DrawCredits (cognitive 17) windows/Desktop/QuotaDial.cs:188— QuotaDial.DrawCredits has cognitive complexity 17 (threshold 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.
SettingsWindow.ServiceCard (cognitive 17) windows/Desktop/SettingsOverview.cs:322— SettingsWindow.ServiceCard has cognitive complexity 17 (threshold 15). Of this number, 16 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.
SettingsWindow.CommitReminderAmount (cognitive 17) windows/Desktop/SettingsReminders.cs:237— SettingsWindow.CommitReminderAmount has cognitive complexity 17 (threshold 15). Of this number, 16 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.
TaskRowState.StatusInk.get (cognitive 17) windows/Desktop/TaskRow.xaml.cs:133— TaskRowState.StatusInk.get has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EngineRuntime.configureCodexReporter (cognitive 17) windows/EngineSupport/PacerEngine.swift:1621— EngineRuntime.configureCodexReporter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EngineRuntime.receiveDesktop (cognitive 17) windows/EngineSupport/PacerEngine.swift:2240— EngineRuntime.receiveDesktop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
WindowsLocalProfileStorage.validate (cognitive 17) windows/EngineSupport/WindowsLocalProfileStorage.swift:15— WindowsLocalProfileStorage.validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 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.
WindowsClaudeHookRuntime.uninstall (cognitive 17) windows/InstallerSupport/WindowsClaudeHookRuntime.swift:65— WindowsClaudeHookRuntime.uninstall has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 5 (6 pts), boolean chains 2, loops 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.
WindowsLocalHarnessProgressCleanup.unregister (cognitive 17) windows/InstallerSupport/WindowsLocalHarnessProgressCleanup.swift:9— WindowsLocalHarnessProgressCleanup.unregister has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityApplicationState.reconcile (cognitive 17) native/Sources/PacerCore/ActivityApplicationState.swift:239— ActivityApplicationState.reconcile has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (5 pts), loops 2, ternaries 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ActivityTaskPresentation.header (cognitive 17) native/Sources/PacerCore/ActivityTaskPresentation.swift:341— ActivityTaskPresentation.header has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 4, if/else 3, loops 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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.
ClaudeHookInstaller.install (cognitive 17) native/Sources/PacerCore/ClaudeHookInstaller.swift:96— ClaudeHookInstaller.install has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClaudeTelemetryRules.claims (cognitive 17) native/Sources/PacerCore/ClaudeTelemetryCompatibility.swift:145— ClaudeTelemetryRules.claims has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandScreenMemory.load (cognitive 17) native/Sources/PacerCore/IslandScreenMemory.swift:106— IslandScreenMemory.load has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (5 pts), ternaries 2 (5 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.skipNumber (cognitive 17) native/Sources/PacerCore/JSONFieldView.swift:266— Cursor.skipNumber has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkBuddySessionStore.credits (cognitive 17) native/Sources/PacerCore/WorkBuddyHarness.swift:452— WorkBuddySessionStore.credits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityOrbitView.applyProgress (cognitive 17) native/Sources/PacerIsland/ActivityBadge.swift:501— ActivityOrbitView.applyProgress has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 3, if/else 3, loops 2 (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.
IslandRimShape.path (cognitive 17) native/Sources/PacerIsland/IslandAppearance.swift:173— IslandRimShape.path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandModel.refreshCodexQuota (cognitive 17) native/Sources/PacerIsland/IslandModel.swift:1877— IslandModel.refreshCodexQuota has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IslandModel.refreshActivity (cognitive 17) native/Sources/PacerIsland/IslandModel.swift:2212— IslandModel.refreshActivity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AppDelegate.openActivity (cognitive 17) native/Sources/PacerIsland/PacerMain.swift:419— AppDelegate.openActivity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 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.
QuotaDashboardRingView.body (cognitive 17) native/Sources/PacerIsland/QuotaDashboardView.swift:245— QuotaDashboardRingView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (5 pts), boolean chains 4 (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.
MacDurableExecutor.find (cognitive 17) native/Sources/PacerMacSupport/MacDurableExecutor.swift:36— MacDurableExecutor.find has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
claude_remote_setup.safe (cognitive 17) native/Sources/PacerCore/Resources/claude_remote_setup.py:56— claude_remote_setup.safe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
claude_remote_setup.merge_managed (cognitive 17) native/Sources/PacerCore/Resources/claude_remote_setup.py:175— claude_remote_setup.merge_managed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codex_remote_progress_setup.safe (cognitive 17) native/Sources/PacerCore/Resources/codex_remote_progress_setup.py:37— codex_remote_progress_setup.safe has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassicQuotaCell.ClassicQuotaCell.ctor (cognitive 16) windows/Desktop/ClassicQuotaCell.cs:16— ClassicQuotaCell.ClassicQuotaCell.ctor has cognitive complexity 16 (threshold 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.
IslandWindow.FinishMoveAsync (cognitive 16) windows/Desktop/IslandMove.cs:188— IslandWindow.FinishMoveAsync has cognitive complexity 16 (threshold 15). 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.
IslandWindow.IslandWindow.ctor (cognitive 16) windows/Desktop/IslandWindow.xaml.cs:86— IslandWindow.IslandWindow.ctor has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 144, 134, 136, …). 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.
PreferencesStore.Load (cognitive 16) windows/Desktop/PreferencesStore.cs:53— PreferencesStore.Load has cognitive complexity 16 (threshold 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.
QuotaDial.AccessibleName.get (cognitive 16) windows/Desktop/QuotaDial.cs:83— QuotaDial.AccessibleName.get has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
QuotaCell.QuotaCell.ctor (cognitive 16) windows/Desktop/QuotaDial.cs:329— QuotaCell.QuotaCell.ctor 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.
SettingsWindow.BuildDeepSeek (cognitive 16) windows/Desktop/SettingsDeepSeek.cs:51— SettingsWindow.BuildDeepSeek has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 106, 79, 74, …). 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.
SettingsWindow.BuildHarnessPage (cognitive 16) windows/Desktop/SettingsHarness.cs:51— SettingsWindow.BuildHarnessPage has cognitive complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 3 function literals inside it that branch. 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.
SettingsWindow.PaintLibraryTile (cognitive 16) windows/Desktop/SettingsLibraryTile.cs:58— SettingsWindow.PaintLibraryTile 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.
SettingsWindow.InspectProviderHome (cognitive 16) windows/Desktop/SettingsProviderHome.cs:90— SettingsWindow.InspectProviderHome has cognitive complexity 16 (threshold 15). 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.
SettingsWindow.CapturePreview (cognitive 16) windows/Desktop/SettingsWindow.cs:336— SettingsWindow.CapturePreview 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.
UpdateWindow.NotesView (cognitive 16) REDACTED:176— UpdateWindow.NotesView has cognitive complexity 16 (threshold 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.
WindowsConversationApplication.OpenAsync (cognitive 16) windows/Desktop/WindowsConversationApplication.cs:134— WindowsConversationApplication.OpenAsync has cognitive complexity 16 (threshold 15). 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.
WindowsInstanceActivation.Receive (cognitive 16) windows/Desktop/WindowsInstanceActivation.cs:66— WindowsInstanceActivation.Receive has cognitive complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 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.
EngineRuntime.scheduleLocalHarnessProgress (cognitive 16) windows/EngineSupport/PacerEngine.swift:1486— EngineRuntime.scheduleLocalHarnessProgress has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
EngineRuntime.notificationProjection (cognitive 16) windows/EngineSupport/PacerEngine.swift:3145— EngineRuntime.notificationProjection has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, boolean chains 4, if/else 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WindowsHTTPClient.data (cognitive 16) windows/EngineSupport/WindowsHTTPClient.swift:35— WindowsHTTPClient.data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WindowsHTTPClient.run (cognitive 16) windows/EngineSupport/WindowsHTTPClient.swift:88— WindowsHTTPClient.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (4 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowsProviderInstallation.detect (cognitive 16) windows/EngineSupport/WindowsProviderInstallation.swift:43— WindowsProviderInstallation.detect has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
WindowsWSLHelperLauncher.launch (cognitive 16) windows/EngineSupport/WindowsWSL.swift:276— WindowsWSLHelperLauncher.launch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, error handling 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.
SessionActivity.threadURL (cognitive 16) native/Sources/PacerCore/Activity.swift:55— SessionActivity.threadURL has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (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.
SessionActivity.applySubagentEvidence (cognitive 16) native/Sources/PacerCore/Activity.swift:235— SessionActivity.applySubagentEvidence has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (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.
TaskSymbol.symbol (cognitive 16) native/Sources/PacerCore/ActivityTaskPresentation.swift:6— TaskSymbol.symbol has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 4 (5 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeActivityTelemetry.project (cognitive 16) native/Sources/PacerCore/ClaudeActivityTelemetry.swift:188— ClaudeActivityTelemetry.project has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ClaudeCloudProjectMonitor.checkBinding (cognitive 16) native/Sources/PacerCore/ClaudeCloudProjectMonitor.swift:226— ClaudeCloudProjectMonitor.checkBinding has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ClaudeCloudStreamParser.consume (cognitive 16) native/Sources/PacerCore/ClaudeCloudReplyMeter.swift:21— ClaudeCloudStreamParser.consume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 1 (2 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClaudeRemoteSetup.status (cognitive 16) native/Sources/PacerCore/ClaudeRemoteSetup.swift:162— ClaudeRemoteSetup.status has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 6, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DeepSeekProgressSetup.find (cognitive 16) native/Sources/PacerCore/DeepSeekProgressSetup.swift:131— DeepSeekProgressSetup.find has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 2, ternaries 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.
DesktopWireProjection.refreshRequests (cognitive 16) native/Sources/PacerCore/DesktopWireProjection.swift:535— DesktopWireProjection.refreshRequests has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DurableCatalogReader.read (cognitive 16) native/Sources/PacerCore/DurableCatalogReader.swift:47— DurableCatalogReader.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 5, loops 2 (3 pts), 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.
HarnessCreditsPresentation.init (cognitive 16) native/Sources/PacerCore/HarnessCreditsPresentation.swift:54— HarnessCreditsPresentation.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 4, match/switch 3, boolean chains 2. Of this number, 9 points are the body's own statements and 7 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.
NativeDesktopSession.setDurableCatalog (cognitive 16) native/Sources/PacerCore/NativeDesktopSession.swift:199— NativeDesktopSession.setDurableCatalog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), boolean chains 1, ternaries 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.
ProcessOwnership.isDescendant (cognitive 16) native/Sources/PacerCore/ProcessOwnership.swift:19— ProcessOwnership.isDescendant has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
QuotaCycleChartPresentation.markers (cognitive 16) native/Sources/PacerCore/QuotaCycleChartPresentation.swift:74— QuotaCycleChartPresentation.markers has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 4, if/else 3 (4 pts), loops 3 (4 pts), ternaries 4 (nesting depth added 2). Of this number, 12 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body: 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.
WorkBuddySessionStore.automationSession (cognitive 16) native/Sources/PacerCore/WorkBuddyHarness.swift:336— WorkBuddySessionStore.automationSession has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 4 (5 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.
WorkBuddyRunLog.stage (cognitive 16) native/Sources/PacerCore/WorkBuddyRunLog.swift:147— WorkBuddyRunLog.stage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 6). 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.
AlternatingQuotaView.refreshAnimation (cognitive 16) native/Sources/PacerIsland/CompactQuotaViews.swift:202— AlternatingQuotaView.refreshAnimation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, ternaries 2 (3 pts), loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DeepSeekWebLogin.checkSession (cognitive 16) native/Sources/PacerIsland/DeepSeekWebBalance.swift:194— DeepSeekWebLogin.checkSession has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 4, error handling 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IslandModel.ensureClaudeHooks (cognitive 16) native/Sources/PacerIsland/IslandModel.swift:404— IslandModel.ensureClaudeHooks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IslandModel.discoverClaudeRemoteTargets (cognitive 16) native/Sources/PacerIsland/IslandModel.swift:1347— IslandModel.discoverClaudeRemoteTargets has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
IslandModel.refreshClaudeQuota (cognitive 16) native/Sources/PacerIsland/IslandModel.swift:1985— IslandModel.refreshClaudeQuota has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SettingsView.paneContent (cognitive 16) native/Sources/PacerIsland/SettingsView.swift:285— SettingsView.paneContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
UpdateBanner.body (cognitive 16) native/Sources/PacerIsland/UpdateSettingsView.swift:52— UpdateBanner.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (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.
MacClaudeRemoteSetupOperation.result (cognitive 16) native/Sources/PacerMacSupport/MacClaudeRemoteSetup.swift:61— MacClaudeRemoteSetupOperation.result has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, 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.
MacDurableExecutor.arguments (cognitive 16) native/Sources/PacerMacSupport/MacDurableExecutor.swift:83— MacDurableExecutor.arguments has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), loops 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MacDurableProgressMailbox.withLock (cognitive 16) native/Sources/PacerMacSupport/MacDurableProgressMailbox.swift:78— MacDurableProgressMailbox.withLock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tailer.resolve_owner (cognitive 16) native/Sources/PacerCore/Resources/claude_activity.py:555— Tailer.resolve_owner has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (6 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication· Near-duplicate member family (3 members, 5 shared lines) · ×1
Near-duplicate member family (3 members, 5 shared lines) windows/Desktop/CompactLayoutEditorView.cs:291— windows/Desktop/CompactLayoutEditorView.cs:291-300 | windows/Desktop/GuideArt.cs:52-62 | windows/Desktop/SettingsAppearance.cs:243-252 — These 3 members are variants of one another: a block of 5 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 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) native/Sources/PacerIsland/ActivityBadge.swift:323— native/Sources/PacerIsland/ActivityBadge.swift:323-333 | native/Sources/PacerIsland/ActivityBadge.swift:569-579 | native/Sources/PacerIsland/CompactQuotaViews.swift:179-190 | native/Sources/PacerIsland/CompactQuotaViews.swift:341-351 | native/Sources/PacerIsland/TaskStatusIconView.swift:313-323 — 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 (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) native/Sources/PacerCore/ClaudeQuotaCoordinator.swift:109— native/Sources/PacerCore/ClaudeQuotaCoordinator.swift:109-160 | native/Sources/PacerCore/CodexQuotaCoordinator.swift:145-214 — These two members are one piece of code written twice and then edited apart: 52 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) native/Sources/PacerIsland/IslandModel.swift:77— native/Sources/PacerIsland/IslandModel.swift:77-105 | windows/EngineSupport/PacerEngine.swift:345-370 — 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 (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) native/Sources/PacerIsland/ClaudeWebLogin.swift:127— native/Sources/PacerIsland/ClaudeWebLogin.swift:127-160 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:124-158 — These two members are one piece of code written twice and then edited apart: 34 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 (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) windows/EngineSupport/WindowsClaudeRemoteDigestStore.swift:74— windows/EngineSupport/WindowsClaudeRemoteDigestStore.swift:74-97 | windows/EngineSupport/WindowsClaudeRemoteDigestStore.swift:101-128 — 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 (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) windows/Desktop/IslandWindow.xaml.cs:978— windows/Desktop/IslandWindow.xaml.cs:978-1009 | windows/Desktop/IslandWindow.xaml.cs:1016-1050 — 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 copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) windows/Desktop/SettingsDeepSeek.cs:169— windows/Desktop/SettingsDeepSeek.cs:169-190 | windows/Desktop/SettingsReminders.cs:238-262 — 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 (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) native/Sources/PacerIsland/CompactIslandHeader.swift:52— native/Sources/PacerIsland/CompactIslandHeader.swift:52-75 | native/Sources/PacerIsland/CompactIslandHeader.swift:107-129 — 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 (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) windows/Desktop/DeepSeekBalanceStatusView.cs:13— windows/Desktop/DeepSeekBalanceStatusView.cs:13-39 | windows/Desktop/QuotaConnectionView.cs:13-45 — These two members are one piece of code written twice and then edited apart: 27 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 (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) windows/Desktop/SettingsCollapsed.cs:337— windows/Desktop/SettingsCollapsed.cs:337-353 | windows/Desktop/SettingsPanel.cs:299-315 — These two members are one piece of code written twice and then edited apart: 17 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 (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) windows/EngineSupport/ClaudeWebBridge.swift:55— windows/EngineSupport/ClaudeWebBridge.swift:55-70 | windows/EngineSupport/DeepSeekWebBridge.swift:78-93 — 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 copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) native/Sources/PacerIsland/ClaudeWebLogin.swift:220— native/Sources/PacerIsland/ClaudeWebLogin.swift:220-239 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:221-239 — 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· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) native/Sources/PacerIsland/MainWindowPanes.swift:303— native/Sources/PacerIsland/MainWindowPanes.swift:303-316 | native/Sources/PacerIsland/MainWindowPanes.swift:319-332 — These two members are one piece of code written twice and then edited apart: 14 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, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) native/Sources/PacerCore/ActivityTaskPresentation.swift:112— native/Sources/PacerCore/ActivityTaskPresentation.swift:112-118 | native/Sources/PacerCore/ActivityTaskPresentation.swift:121-127 | native/Sources/PacerCore/DeepSeekSoloPresentation.swift:183-189 | native/Sources/PacerCore/QuotaDashboardPresentation.swift:263-269 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) native/Sources/PacerMacSupport/NativeDesktopCollector.swift:36— native/Sources/PacerMacSupport/NativeDesktopCollector.swift:36-44 | native/Sources/PacerMacSupport/NativeDesktopCollector.swift:45-54 | native/Sources/PacerMacSupport/NativeDesktopCollector.swift:59-68 | native/Sources/PacerMacSupport/NativeDesktopCollector.swift:69-77 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 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, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) windows/Desktop/PreferencesCodec.cs:109— windows/Desktop/PreferencesCodec.cs:109-118 | windows/Desktop/PreferencesCodec.cs:122-131 | windows/Desktop/PreferencesCodec.cs:134-143 — These 3 members are one piece of code written 3 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 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) native/Sources/PacerIsland/IslandView.swift:219— native/Sources/PacerIsland/IslandView.swift:219-233 | native/Sources/PacerIsland/IslandView.swift:235-247 — 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) native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:148— native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:148-155 | native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:156-163 | native/Sources/PacerCore/DeepSeekBalanceCoordinator.swift:180-186 — 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 copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) native/Sources/PacerIsland/SettingsSupportPane.swift:106— native/Sources/PacerIsland/SettingsSupportPane.swift:106-116 | native/Sources/PacerIsland/SettingsSupportPane.swift:168-178 | native/Sources/PacerIsland/UpdateSettingsView.swift:300-312 — 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 copies of one member (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) native/Sources/PacerCore/ClaudeActivityRecord.swift:20— native/Sources/PacerCore/ClaudeActivityRecord.swift:20-24 | native/Sources/PacerCore/DeepSeekSessionLog.swift:68-72 | native/Sources/PacerCore/ModelDisplay.swift:16-20 | native/Sources/PacerIsland/ClaudeWebLogin.swift:63-68 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 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, 3+ corresponding lines) · ×1
Edited copies of one member (3 members, 3+ corresponding lines) native/Sources/PacerCore/CompletionDismissalStore.swift:83— native/Sources/PacerCore/CompletionDismissalStore.swift:83-85 | native/Sources/PacerCore/DeepSeekHistoryCredential.swift:47-49 | windows/EngineSupport/EngineNotificationRegistry.swift:25-27 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 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 (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) windows/Desktop/WindowsSshTerminal.cs:11— windows/Desktop/WindowsSshTerminal.cs:11-12 | windows/Desktop/WindowsWslTerminal.cs:11-12 — These two members are one piece of code written twice and then edited apart: 2 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, 2+ corresponding lines) · ×1
Edited copies of one member (4 members, 2+ corresponding lines) native/Sources/PacerMacSupport/MacClaudeQuotaClient.swift:61— native/Sources/PacerMacSupport/MacClaudeQuotaClient.swift:61-65 | native/Sources/PacerMacSupport/MacClaudeWebClients.swift:56-59 | windows/EngineSupport/WindowsURLSessionCloudStream.swift:80-83 | windows/EngineSupport/WindowsURLSessionRead.swift:50-51 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 2 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, 1+ corresponding lines) · ×1
Edited copies of one member (3 members, 1+ corresponding lines) native/Sources/PacerCore/ClaudeQuotaClient.swift:131— native/Sources/PacerCore/ClaudeQuotaClient.swift:131-131 | native/Sources/PacerCore/ClaudeSSHDiscovery.swift:115-117 | windows/InstallerSupport/WindowsClaudeRuntimeStore.swift:52-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 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 (11 lines × 2) native/Sources/PacerIsland/WelcomeView.swift:590— native/Sources/PacerIsland/WelcomeView.swift:590-600 | native/Sources/PacerIsland/WelcomeView.swift:667-677 — 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–8 lines × 2) windows/Desktop/ActivityBadge.cs:287— windows/Desktop/ActivityBadge.cs:287-293 | windows/Desktop/TaskProgressRing.cs:384-391 — 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/Desktop/ActivityBadge.cs:287` 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–8 lines × 2) native/Sources/PacerIsland/PacerMain.swift:406— native/Sources/PacerIsland/PacerMain.swift:406-413 | native/Sources/PacerIsland/PacerMain.swift:443-448 — 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 `native/Sources/PacerIsland/PacerMain.swift:406` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–7 lines × 2) native/Sources/PacerIsland/ClaudeWebLogin.swift:252— native/Sources/PacerIsland/ClaudeWebLogin.swift:252-258 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:248-253 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 `native/Sources/PacerIsland/ClaudeWebLogin.swift:252` 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.
Duplicated block (7–9 lines × 2) native/Sources/PacerIsland/ClaudeWebLogin.swift:270— native/Sources/PacerIsland/ClaudeWebLogin.swift:270-278 | native/Sources/PacerIsland/DeepSeekWebBalance.swift:261-267 — before extracting anything, compare `native/Sources/PacerIsland/ClaudeWebLogin.swift` and `native/Sources/PacerIsland/DeepSeekWebBalance.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 76 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 (5 lines × 5) native/Sources/PacerIsland/ActivityBadge.swift:323— native/Sources/PacerIsland/ActivityBadge.swift:323-328 | native/Sources/PacerIsland/ActivityBadge.swift:569-574 | native/Sources/PacerIsland/CompactQuotaViews.swift:179-184 | native/Sources/PacerIsland/CompactQuotaViews.swift:341-346 | native/Sources/PacerIsland/TaskStatusIconView.swift:313-317 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `native/Sources/PacerIsland/ActivityBadge.swift:323` 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.
Duplicated block (61 lines × 2) native/Sources/PacerCore/Resources/codex_progress_mcp.py:57— native/Sources/PacerCore/Resources/codex_progress_mcp.py:57-117 | windows/InstallerSupport/Resources/pacer-codex-progress.py:57-117 — before extracting anything, compare `native/Sources/PacerCore/Resources/codex_progress_mcp.py` and `windows/InstallerSupport/Resources/pacer-codex-progress.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (36 lines × 2) native/Sources/PacerCore/Resources/codex_progress_mcp.py:132— native/Sources/PacerCore/Resources/codex_progress_mcp.py:132-167 | windows/InstallerSupport/Resources/pacer-codex-progress.py:132-167 — before extracting anything, compare `native/Sources/PacerCore/Resources/codex_progress_mcp.py` and `windows/InstallerSupport/Resources/pacer-codex-progress.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (12 lines × 2) native/Sources/PacerCore/Resources/codex_progress_mcp.py:42— native/Sources/PacerCore/Resources/codex_progress_mcp.py:42-53 | windows/InstallerSupport/Resources/pacer-codex-progress.py:42-53 — before extracting anything, compare `native/Sources/PacerCore/Resources/codex_progress_mcp.py` and `windows/InstallerSupport/Resources/pacer-codex-progress.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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.
No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
Outbound HTTP without resilience windows/UpdateSupport/UpdateFeedClient.cs:39— `new HttpClient(transport ?? handler) { Timeout = Timeout.InfiniteTimeSpan }` builds an outbound HTTP client, and what is applied to it does not bound it. Its `Timeout` is set to `Timeout.InfiniteTimeSpan`, which removes HttpClient's own bound rather than setting one. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
Sync-over-async blocking scripts/diagnostics/reproduce-codex-ipc-split.cjs:25— `fs.unlinkSync` in `getOrStartRouter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
Type Safety — 0 typed · 6 plain JS — the untyped files are native/Sources/PacerCore/Resources/deepseek-progress.mjs, native/Sources/PacerCore/Resources/deepseek-session-fingerprint.js, native/Sources/PacerCore/Resources/deepseek-summary.js, native/Sources/PacerCore/Resources/workbuddy-account-credits.js, scripts/diagnostics/reproduce-codex-ipc-split.cjs, scripts/windows/check-deepseek-web-identity.mjs.
R10 · Code Duplication· Duplicated block with local edits (6 matched lines × 2 locations) · ×1
Duplicated block with local edits (6 matched lines × 2 locations) scripts/diagnostics/reproduce-codex-ipc-split.cjs:80— scripts/diagnostics/reproduce-codex-ipc-split.cjs:80 · scripts/diagnostics/reproduce-codex-ipc-split.cjs:98 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both spans, 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 readGroups (cyclomatic 24, cognitive 33) native/Sources/PacerCore/Resources/workbuddy-account-credits.js:73— readGroups has cyclomatic complexity 24 and cognitive complexity 33; 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 respond (cyclomatic 19, cognitive 15) native/Sources/PacerCore/Resources/deepseek-progress.mjs:28— respond 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.
Dead file (~71 LoC) native/Sources/PacerCore/Resources/deepseek-progress.mjs— no import path from any entry point (4 application, 1 tooling, 0 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Duplicated predicate windows/Desktop/SettingsClaude.cs:78— `!busy && !session.RequiresRestart && connected && snapshot != null` appears character-identically in 2 files — windows/Desktop/SettingsClaude.cs, windows/Desktop/SettingsDeepSeek.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/Desktop/WindowsSshTerminal.cs:17— `!char.IsAsciiLetterOrDigit(c) && c is not ('+' or '/' or '=')` appears character-identically in 2 files — windows/Desktop/WindowsSshTerminal.cs, windows/Desktop/WindowsWslTerminal.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/Desktop/SettingsHarness.cs:670— `!closed && !busy && !session.RequiresRestart` appears character-identically in 2 files — windows/Desktop/SettingsHarness.cs, windows/Desktop/SettingsOverview.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/Desktop/SettingsClaude.cs:76— `!providerConnectionClosed && !engine.IsConnectionClosed` appears character-identically in 2 files — windows/Desktop/SettingsClaude.cs, windows/Desktop/SettingsDeepSeek.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/Desktop/App.xaml.cs:223— `DeepSeekLoginWindow.Recoverable(error) || error is EngineCommandException` appears character-identically in 5 files — windows/Desktop/App.xaml.cs, windows/Desktop/SettingsClaude.cs, windows/Desktop/SettingsCodex.cs, windows/Desktop/SettingsDeepSeek.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/Desktop/SettingsCodex.cs:287— `Encoding.UTF8.GetByteCount(value) > 32768 || value.Any(char.IsControl)` appears character-identically in 2 files — windows/Desktop/SettingsCodex.cs, windows/Desktop/SettingsProviderHome.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/Desktop/CompactChoices.cs:92— `JsonNode.Parse(json) is JsonObject values && values.Count >= 0` appears character-identically in 2 files — windows/Desktop/CompactChoices.cs, windows/Desktop/PanelChoices.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/Desktop/ClaudeConnectionCoordinator.cs:148— `ProviderLoginWindow.Recoverable(error) || error is EngineCommandException` appears character-identically in 6 files — windows/Desktop/ClaudeConnectionCoordinator.cs, windows/Desktop/DeepSeekConnectionCoordinator.cs, windows/Desktop/SettingsClaudeConnection.cs, windows/Desktop/SettingsConnections.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/Desktop/DeepSeekBalanceStatusView.cs:24— `action.Kind == "settings" && settings != null` appears character-identically in 2 files — windows/Desktop/DeepSeekBalanceStatusView.cs, windows/Desktop/QuotaConnectionView.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/Desktop/GuideWindow.cs:83— `args.Key == Key.Escape && Keyboard.Modifiers == ModifierKeys.None` appears character-identically in 2 files — windows/Desktop/GuideWindow.cs, REDACTED. 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/Desktop/ClaudeConnectionCoordinator.cs:81— `cancelled.Remove(request.RequestID) || reads.ContainsKey(request.RequestID)` appears character-identically in 2 files — windows/Desktop/ClaudeConnectionCoordinator.cs, windows/Desktop/DeepSeekConnectionCoordinator.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/Desktop/ClaudeConnectionCoordinator.cs:123— `connecting.TryGetValue(context, out var current) && ReferenceEquals(current, task)` appears character-identically in 2 files — windows/Desktop/ClaudeConnectionCoordinator.cs, windows/Desktop/DeepSeekConnectionCoordinator.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/Desktop/SettingsOverview.cs:249— `downloading && inlineFraction is { } fraction` appears character-identically in 2 files — windows/Desktop/SettingsOverview.cs, windows/Desktop/SettingsUpdates.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 native/Sources/PacerCore/Resources/deepseek-session-fingerprint.js:5— `typeof token !== 'string' || token.length < 8` appears character-identically in 2 files — native/Sources/PacerCore/Resources/deepseek-session-fingerprint.js, native/Sources/PacerCore/Resources/deepseek-summary.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate windows/Desktop/IslandSurface.cs:29— `layout.Attached || layout.Dock == IslandEdge.Top` appears character-identically in 2 files — windows/Desktop/IslandSurface.cs, windows/Desktop/IslandWindow.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/Desktop/SettingsCardKit.cs:161— `providerConnectionClosed || engine?.IsConnectionClosed != false` appears character-identically in 3 files — windows/Desktop/SettingsCardKit.cs, windows/Desktop/SettingsHarness.cs, windows/Desktop/SettingsOverview.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 scripts/release/prepare-update.py:157— `args.notes is None or args.notes_zh is None` appears character-identically in 2 files — scripts/release/prepare-update.py, scripts/release/prepare-windows-update.py. 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 native/Sources/PacerCore/Resources/claude_remote_setup.py:69— `attrs.st_uid != os.getuid() or not expected` appears character-identically in 2 files — native/Sources/PacerCore/Resources/claude_remote_setup.py, native/Sources/PacerCore/Resources/codex_remote_progress_setup.py. 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 native/Sources/PacerCore/Resources/claude_remote_setup.py:83— `attrs.st_uid != os.getuid() or not stat.S_ISREG(attrs.st_mode)` appears character-identically in 2 files — native/Sources/PacerCore/Resources/claude_remote_setup.py, native/Sources/PacerCore/Resources/codex_remote_progress_setup.py. 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 native/Sources/PacerCore/Resources/claude_remote_setup.py:616— `len(raw) > LIMIT or not isinstance(payload, dict)` appears character-identically in 2 files — native/Sources/PacerCore/Resources/claude_remote_setup.py, native/Sources/PacerCore/Resources/codex_remote_progress_setup.py. 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 native/Sources/PacerCore/Resources/claude_remote_setup.py:609— `len(sys.argv) != 2 or len(sys.argv[1]) > 3 * LIMIT` appears character-identically in 2 files — native/Sources/PacerCore/Resources/claude_remote_setup.py, native/Sources/PacerCore/Resources/codex_remote_progress_setup.py. 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/EngineSupport/Resources/WSL/bootstrap.py:19— `not b"0" <= byte <= b"9" or len(digits) >= 7` appears character-identically in 2 files — windows/EngineSupport/Resources/WSL/bootstrap.py, windows/EngineSupport/Resources/WSL/setup.py. 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/Desktop/ClaudeConnectionCoordinator.cs:100— `reads.TryGetValue(request.RequestID, out var current) && ReferenceEquals(current, cancellation)` appears character-identically in 2 files — windows/Desktop/ClaudeConnectionCoordinator.cs, windows/Desktop/DeepSeekConnectionCoordinator.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/Desktop/IslandPanelSections.cs:294— `source.Provider == provider && source.Transport == "app-server"` appears character-identically in 2 files — windows/Desktop/IslandPanelSections.cs, windows/Desktop/SettingsOverview.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 native/Sources/PacerCore/ActivitySourceMerger.swift:36— `!$0.isInternalReview && !$0.isIgnoredCodexSession` appears character-identically in 2 files — native/Sources/PacerCore/ActivitySourceMerger.swift, native/Sources/PacerCore/LocalActivityReader.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 in catch windows/Desktop/DurableUsageEvidence.cs:31— `HasReceipts` 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/Desktop/GuidePages.cs:64— `Open` 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/Desktop/IslandMove.cs:213— `FinishMoveAsync` swallows `Exception` and sets `result = PreferencesApplyResult.EngineFailed;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Desktop/NotificationActions.cs:31— `HandleReferenceAsync` 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/Desktop/NotificationActions.cs:49— `HandleAsync` 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/Desktop/PreferencesSession.cs:40— `ChangeAsync` swallows `Exception` into `return PreferencesApplyResult.EngineFailed;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Desktop/PreferencesStore.cs:61— `Load` swallows `AbandonedMutexException` and sets `acquired = 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/Desktop/PreferencesStore.cs:108— `Save` swallows `AbandonedMutexException` and sets `acquired = 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/Desktop/PreferencesStore.cs:169— `Future` swallows `JsonException` 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/Desktop/ProviderWebSession.cs:46— `HasProfile` 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/Desktop/ProviderWebSession.cs:53— `Available` 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/Desktop/SettingsHarness.cs:429— `RetryHarnessProgressAsync` 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/Desktop/SettingsPagePolicy.cs:37— `Open` 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/Desktop/SettingsWindow.cs:563— `IsSystemDark` 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/Desktop/SupportShareSheet.cs:30— `Show` 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/Desktop/UpdateRecoveryView.cs:164— `DefaultOpen` 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/Desktop/WindowsConversationApplication.cs:60— `OpenProviderAsync` 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/Desktop/WindowsConversationApplication.cs:105— `RestartForGuideAsync` swallows `Exception` into `return RestartResult.Failed;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch windows/Desktop/WindowsNotificationCleanup.cs:42— `UninstallAsync` 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/Desktop/WindowsPlatformPolicy.cs:14— `NotificationsSupported` 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/Desktop/WindowsSettingsServices.cs:71— `ActivateExecutable` 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/Desktop/WindowsSettingsServices.cs:82— `Activate` 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/Desktop/WindowsSshTerminal.cs:33— `Launch` 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/Desktop/WindowsStartupRegistration.cs:178— `MigrateFrom` 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/Desktop/WindowsStartupRegistration.cs:193— `RemoveOwned` 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 on parse failure windows/Desktop/EngineCrashLog.cs:85— `SwiftStop` falls back to `""` when `match.Groups[1].Success` 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/Desktop/WindowsConversationApplication.cs:136— `OpenAsync` returns `false` when `Guid.TryParse(plan.Context, out _)` 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 native/Sources/PacerCore/Resources/claude_activity.py:52— `transcript` returns `[]` when `(ValueError, UnicodeError)` 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.
Silent fallback default on parse failure native/Sources/PacerCore/Resources/claude_activity.py:195— `sanitized` returns `[]` when `(ValueError, UnicodeError)` 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.
Silent fallback default on parse failure REDACTED:46— `read_object` returns `{}` when `(OSError, ValueError)` 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.
Silent fallback default on parse failure native/Sources/PacerCore/Resources/claude_remote_resume.py:27— `executable` returns `False` when `(OSError, ValueError)` 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.
Silent fallback default on parse failure native/Sources/PacerCore/Resources/claude_remote_resume.py:44— `versioned_executables` returns `[]` when `(OSError, ValueError)` 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/Desktop/Pacer.Windows.csproj:4— 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/Desktop/Pacer.Windows.csproj` makes this repository a deployable product (line 4).
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/platforms.yml:9— 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 3 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/Desktop/Pacer.Windows.csproj:23— `windows/Desktop/Pacer.Windows.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`.
Null-forgiving operator (`!`) suppressions override nullable warnings — ~0.7 `!` suppressions per 1k syntax nodes — 212 suppression(s) across the 289390 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Silent fallback default on unknown code windows/Desktop/QuotaDial.cs:280— `WalletInk` maps every unrecognised code to `PacerPalette.Primary`, 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.
Outdated: sparkle — `sparkle` is resolved at 2.10.0, but 2.10.1 is the newest release tagged on https://github.com/sparkle-project/Sparkle within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update sparkle` reaches this one with no change to Package.swift.
Outdated: swift-system — `swift-system` is resolved at 1.8.1, but 1.9.0 is the newest release tagged on https://github.com/apple/swift-system within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-system` reaches this one with no change to Package.swift.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing 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 118 file(s) — `native/Sources/PacerCore/AccountUsage.swift`, `native/Sources/PacerCore/Activity.swift`, `native/Sources/PacerCore/AgentProvider.swift`, `native/Sources/PacerCore/ClaudeActivityRecord.swift`, `native/Sources/PacerCore/ClaudeActivityTelemetry.swift`, … (+113 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 01a1e553-fd2d-7ff3-937c-c1f3d8463722 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 1 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 61 · Warnings: 1242 · Recommendations: 90 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 17:07 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.