Public report of PowerBeef/Vocello, published 17 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, 17 November 2026, 05:45 UTC · Survey ID cd_722855ba384e4ebcadc27e1c72964679
PowerBeef/Vocello
Measured 17 November 2026, 05:44 UTC, at code version f99b5c3
First survey, so nothing to compare with yet
CAI scoreAdequate
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 large codebase: 229,697 lines of product code in 13 projects, tests not counted · Estimated rebuild effort: about 2.5 person-years · Weakest lens: Code Health, 40.3
Findings by how serious they are
54 critical1247 serious82 minor
22 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
17 November 2026, 05:44 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 ▸
69of 69 dimensions measured by tools.
1365of 1383 findings point to an exact file and line, so you can open each one in the code. The other 18 concern the repository as a whole, such as missing documentation.
69dimensions across 8 lenses, read from 229,697 lines of product code in 13 projects.
PowerBeef/Vocello falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 55.3 out of 100 and is rated Adequate, and five of its 54 critical findings are security problems.
Code Health, at 40.3, is the weakest lens and counts most in the score. The best first step is adding type checking, worth about 6.2 points. Splitting the oversized files comes next, worth about 4.9 points. Raising Code Health to 70 would lift the score to about 64.9.
One automatic update takes new releases before a bad one can be spotted. One password or key is open to anyone who can read the repository, and twelve form fields can't be read by a screen reader. Setting a waiting period for automatic updates, replacing the exposed password or key and labelling the form fields would close these risks. Correcting the flagged pipeline settings would fix the two weaknesses in the build pipeline's configuration, and limiting each secret to its own step would deal with the secret exposed to more of the pipeline than needed. The 20 pages or frames without a title need a descriptive title.
The product code is 229,697 lines, about €360,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 Code Health rose from 40.3 to 70, the lowest score rated Strong, the score would rise from 55.3 to about 64.9.
Code composition: what the lines of code are
Product code 64%Tests 36%
Rebuild cost: about €360,000 · Estimate
Cost to rebuild
€120,000 to €600,000, for 2,001 to 6,348 hours of work, about 2.5 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 55. 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
Large: 229,697 lines of product code
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. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
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.
Raises the score by about 6.2 points · Medium effort · Type Safety
2
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 4.9 points · Medium effort · Large Files
3
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 3.8 points · Medium effort · Keyboard semantics
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 €360,000 to build again, about 2.5 person-years of work. Its weakest lens is Code Health, at 40.3 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
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. Of all the actions in this report, it raises the score most for the work it takes: about 6.2 points for medium effort. 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 7.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 460,789 lines over the last 90 days, which is about 1,868,755 lines a year. At that pace, the extra work comes to an estimated 110.9 to 665.2 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.
132 modules, with 116 dependencies between them. One loop runs through 15 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 92 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
2 pairs of types, where a type in ViewModels uses a type in iOSSupport.
The types involved
ViewModels.MacAppModel → iOSSupport.URL
ViewModels.ModelManagerViewModel → iOSSupport.URL
Direction
ViewModels uses iOSSupport, so a change to iOSSupport can break ViewModels, while a change to ViewModels can't break iOSSupport.
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.
17→36 ViewModels uses QwenVoiceCorepart of a loop✕
Connections
27 pairs of types, where a type in ViewModels uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
VocelloDesktopCore uses SharedSupport, so a change to SharedSupport can break VocelloDesktopCore, while a change to VocelloDesktopCore can't break SharedSupport.
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.
18→29 VocelloDesktopCore uses Servicespart of a loop✕
Connections
1 pair of types, where a type in VocelloDesktopCore uses a type in Services.
VocelloDesktopCore uses iOSSupport, so a change to iOSSupport can break VocelloDesktopCore, while a change to VocelloDesktopCore can't break iOSSupport.
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.
18→36 VocelloDesktopCore uses QwenVoiceCorepart of a loop✕
Connections
63 pairs of types, where a type in VocelloDesktopCore uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
VocelloDesktopCore uses QwenVoiceCore, so a change to QwenVoiceCore can break VocelloDesktopCore, while a change to VocelloDesktopCore can't break QwenVoiceCore.
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.
18→37 VocelloDesktopCore uses DesktopSharedpart of a loop✕
Connections
1 pair of types, where a type in VocelloDesktopCore uses a type in DesktopShared.
VocelloDesktopCore uses DesktopShared, so a change to DesktopShared can break VocelloDesktopCore, while a change to VocelloDesktopCore can't break DesktopShared.
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.
scripts uses scripts.analyze_prosody, so a change to scripts.analyze_prosody can break scripts, while a change to scripts can't break scripts.analyze_prosody.
Position
Below the diagonal: scripts uses a module listed above it, which is the healthy direction.
scripts uses scripts.benchmark_memory, so a change to scripts.benchmark_memory can break scripts, while a change to scripts can't break scripts.benchmark_memory.
Position
Below the diagonal: scripts uses a module listed above it, which is the healthy direction.
scripts uses scripts.build_cleanup, so a change to scripts.build_cleanup can break scripts, while a change to scripts can't break scripts.build_cleanup.
Position
Below the diagonal: scripts uses a module listed above it, which is the healthy direction.
scripts uses scripts.build_output_policy, so a change to scripts.build_output_policy can break scripts, while a change to scripts can't break scripts.build_output_policy.
Position
Below the diagonal: scripts uses a module listed above it, which is the healthy direction.
scripts uses scripts.lint_baseline, so a change to scripts.lint_baseline can break scripts, while a change to scripts can't break scripts.lint_baseline.
Position
Below the diagonal: scripts uses a module listed above it, which is the healthy direction.
scripts.auto_language_check uses scripts.ios_startup_reliability, so a change to scripts.ios_startup_reliability can break scripts.auto_language_check, while a change to scripts.auto_language_check can't break scripts.ios_startup_reliability.
Position
Below the diagonal: scripts.auto_language_check uses a module listed above it, which is the healthy direction.
scripts.hooks uses scripts.hooks.git_commands, so a change to scripts.hooks.git_commands can break scripts.hooks, while a change to scripts.hooks can't break scripts.hooks.git_commands.
Position
Below the diagonal: scripts.hooks uses a module listed above it, which is the healthy direction.
scripts.lib uses scripts.lib.build_artifact_retention, so a change to scripts.lib.build_artifact_retention can break scripts.lib, while a change to scripts.lib can't break scripts.lib.build_artifact_retention.
Position
Below the diagonal: scripts.lib uses a module listed above it, which is the healthy direction.
scripts.lib uses scripts.lib.contract_gate, so a change to scripts.lib.contract_gate can break scripts.lib, while a change to scripts.lib can't break scripts.lib.contract_gate.
Position
Below the diagonal: scripts.lib uses a module listed above it, which is the healthy direction.
scripts.lib uses scripts.lib.ios_platform_preflight, so a change to scripts.lib.ios_platform_preflight can break scripts.lib, while a change to scripts.lib can't break scripts.lib.ios_platform_preflight.
Position
Below the diagonal: scripts.lib uses a module listed above it, which is the healthy direction.
scripts.lib uses scripts.lib.ios_signing_identity, so a change to scripts.lib.ios_signing_identity can break scripts.lib, while a change to scripts.lib can't break scripts.lib.ios_signing_identity.
Position
Below the diagonal: scripts.lib uses a module listed above it, which is the healthy direction.
scripts.lib uses scripts.lib.vocello_cli_json, so a change to scripts.lib.vocello_cli_json can break scripts.lib, while a change to scripts.lib can't break scripts.lib.vocello_cli_json.
Position
Below the diagonal: scripts.lib uses a module listed above it, which is the healthy direction.
scripts.qc.models uses scripts.qc.store, so a change to scripts.qc.store can break scripts.qc.models, while a change to scripts.qc.models can't break scripts.qc.store.
Position
Below the diagonal: scripts.qc.models uses a module listed above it, which is the healthy direction.
VocelloCLI uses VocelloDesktopCore, so a change to VocelloDesktopCore can break VocelloCLI, while a change to VocelloCLI can't break VocelloDesktopCore.
Position
Below the diagonal: VocelloCLI uses a module listed above it, which is the healthy direction.
VocelloCLI uses Packages~VocelloQwen3Core~MLXAudioTTS, so a change to Packages~VocelloQwen3Core~MLXAudioTTS can break VocelloCLI, while a change to VocelloCLI can't break Packages~VocelloQwen3Core~MLXAudioTTS.
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.
24→36 VocelloCLI uses QwenVoiceCorepart of a loop✕
Connections
199 pairs of types, where a type in VocelloCLI uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Views uses Packages~VocelloQwen3Core~MLXAudioTTS, so a change to Packages~VocelloQwen3Core~MLXAudioTTS can break Views, while a change to Views can't break Packages~VocelloQwen3Core~MLXAudioTTS.
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.
116 pairs of types, where a type in Views uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
359 pairs of types, where a type in iOS uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SharedSupport uses iOSSupport, so a change to iOSSupport can break SharedSupport, while a change to SharedSupport can't break iOSSupport.
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.
28→36 SharedSupport uses QwenVoiceCorepart of a loop✕
Connections
166 pairs of types, where a type in SharedSupport uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
77 pairs of types, where a type in Services uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
34 pairs of types, where a type in Models uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
iOSSupport uses Models, so a change to Models can break iOSSupport, while a change to iOSSupport can't break Models.
Position
Below the diagonal: iOSSupport uses a module listed above it, which is the healthy direction.
31→36 iOSSupport uses QwenVoiceCorepart of a loop✕
Connections
144 pairs of types, where a type in iOSSupport uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Packages~VocelloQwen3Core~MLXAudioCore uses iOSSupport, so a change to iOSSupport can break Packages~VocelloQwen3Core~MLXAudioCore, while a change to Packages~VocelloQwen3Core~MLXAudioCore can't break iOSSupport.
Position
Below the diagonal: Packages~VocelloQwen3Core~MLXAudioCore uses a module listed above it, which is the healthy direction.
32→36 Packages~VocelloQwen3Core~MLXAudioCore uses QwenVoiceCorepart of a loop✕
Connections
14 pairs of types, where a type in Packages~VocelloQwen3Core~MLXAudioCore uses a type in QwenVoiceCore.
Packages~VocelloQwen3Core~MLXAudioCore uses QwenVoiceCore, so a change to QwenVoiceCore can break Packages~VocelloQwen3Core~MLXAudioCore, while a change to Packages~VocelloQwen3Core~MLXAudioCore can't break QwenVoiceCore.
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.
Packages~VocelloQwen3Core~MLXAudioCodecs uses Packages~VocelloQwen3Core~MLXAudioCore, so a change to Packages~VocelloQwen3Core~MLXAudioCore can break Packages~VocelloQwen3Core~MLXAudioCodecs, while a change to Packages~VocelloQwen3Core~MLXAudioCodecs can't break Packages~VocelloQwen3Core~MLXAudioCore.
Position
Below the diagonal: Packages~VocelloQwen3Core~MLXAudioCodecs uses a module listed above it, which is the healthy direction.
33→36 Packages~VocelloQwen3Core~MLXAudioCodecs uses QwenVoiceCorepart of a loop✕
Connections
2 pairs of types, where a type in Packages~VocelloQwen3Core~MLXAudioCodecs uses a type in QwenVoiceCore.
Packages~VocelloQwen3Core~MLXAudioCodecs uses QwenVoiceCore, so a change to QwenVoiceCore can break Packages~VocelloQwen3Core~MLXAudioCodecs, while a change to Packages~VocelloQwen3Core~MLXAudioCodecs can't break QwenVoiceCore.
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.
Packages~VocelloQwen3Core~MLXAudioTTS uses iOSSupport, so a change to iOSSupport can break Packages~VocelloQwen3Core~MLXAudioTTS, while a change to Packages~VocelloQwen3Core~MLXAudioTTS can't break iOSSupport.
Position
Below the diagonal: Packages~VocelloQwen3Core~MLXAudioTTS uses a module listed above it, which is the healthy direction.
Packages~VocelloQwen3Core~MLXAudioTTS uses Packages~VocelloQwen3Core~MLXAudioCore, so a change to Packages~VocelloQwen3Core~MLXAudioCore can break Packages~VocelloQwen3Core~MLXAudioTTS, while a change to Packages~VocelloQwen3Core~MLXAudioTTS can't break Packages~VocelloQwen3Core~MLXAudioCore.
Position
Below the diagonal: Packages~VocelloQwen3Core~MLXAudioTTS uses a module listed above it, which is the healthy direction.
Packages~VocelloQwen3Core~MLXAudioTTS uses Packages~VocelloQwen3Core~MLXAudioCodecs, so a change to Packages~VocelloQwen3Core~MLXAudioCodecs can break Packages~VocelloQwen3Core~MLXAudioTTS, while a change to Packages~VocelloQwen3Core~MLXAudioTTS can't break Packages~VocelloQwen3Core~MLXAudioCodecs.
Position
Below the diagonal: Packages~VocelloQwen3Core~MLXAudioTTS uses a module listed above it, which is the healthy direction.
34→36 Packages~VocelloQwen3Core~MLXAudioTTS uses QwenVoiceCorepart of a loop✕
Connections
64 pairs of types, where a type in Packages~VocelloQwen3Core~MLXAudioTTS uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Packages~VocelloQwen3Core~MLXAudioTTS uses QwenVoiceCore, so a change to QwenVoiceCore can break Packages~VocelloQwen3Core~MLXAudioTTS, while a change to Packages~VocelloQwen3Core~MLXAudioTTS can't break QwenVoiceCore.
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.
Packages~VocelloQwen3Core~VocelloQwen3Core uses iOSSupport, so a change to iOSSupport can break Packages~VocelloQwen3Core~VocelloQwen3Core, while a change to Packages~VocelloQwen3Core~VocelloQwen3Core can't break iOSSupport.
Position
Below the diagonal: Packages~VocelloQwen3Core~VocelloQwen3Core uses a module listed above it, which is the healthy direction.
Packages~VocelloQwen3Core~VocelloQwen3Core uses Packages~VocelloQwen3Core~MLXAudioCore, so a change to Packages~VocelloQwen3Core~MLXAudioCore can break Packages~VocelloQwen3Core~VocelloQwen3Core, while a change to Packages~VocelloQwen3Core~VocelloQwen3Core can't break Packages~VocelloQwen3Core~MLXAudioCore.
Position
Below the diagonal: Packages~VocelloQwen3Core~VocelloQwen3Core uses a module listed above it, which is the healthy direction.
Packages~VocelloQwen3Core~VocelloQwen3Core uses Packages~VocelloQwen3Core~MLXAudioTTS, so a change to Packages~VocelloQwen3Core~MLXAudioTTS can break Packages~VocelloQwen3Core~VocelloQwen3Core, while a change to Packages~VocelloQwen3Core~VocelloQwen3Core can't break Packages~VocelloQwen3Core~MLXAudioTTS.
Position
Below the diagonal: Packages~VocelloQwen3Core~VocelloQwen3Core uses a module listed above it, which is the healthy direction.
35→36 Packages~VocelloQwen3Core~VocelloQwen3Core uses QwenVoiceCorepart of a loop✕
Connections
40 pairs of types, where a type in Packages~VocelloQwen3Core~VocelloQwen3Core uses a type in QwenVoiceCore. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Packages~VocelloQwen3Core~VocelloQwen3Core uses QwenVoiceCore, so a change to QwenVoiceCore can break Packages~VocelloQwen3Core~VocelloQwen3Core, while a change to Packages~VocelloQwen3Core~VocelloQwen3Core can't break QwenVoiceCore.
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.
79 pairs of types, where a type in QwenVoiceCore uses a type in iOSSupport. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QwenVoiceCore uses Packages~VocelloQwen3Core~MLXAudioTTS, so a change to Packages~VocelloQwen3Core~MLXAudioTTS can break QwenVoiceCore, while a change to QwenVoiceCore can't break Packages~VocelloQwen3Core~MLXAudioTTS.
Position
Below the diagonal: QwenVoiceCore uses a module listed above it, which is the healthy direction.
52 pairs of types, where a type in QwenVoiceCore uses a type in Packages~VocelloQwen3Core~VocelloQwen3Core. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
QwenVoiceCore uses Packages~VocelloQwen3Core~VocelloQwen3Core, so a change to Packages~VocelloQwen3Core~VocelloQwen3Core can break QwenVoiceCore, while a change to QwenVoiceCore can't break Packages~VocelloQwen3Core~VocelloQwen3Core.
Position
Below the diagonal: QwenVoiceCore uses a module listed above it, which is the healthy direction.
Packages~VocelloQwen3Core~MLXAudioMark uses iOSSupport, so a change to iOSSupport can break Packages~VocelloQwen3Core~MLXAudioMark, while a change to Packages~VocelloQwen3Core~MLXAudioMark can't break iOSSupport.
Position
Below the diagonal: Packages~VocelloQwen3Core~MLXAudioMark uses a module listed above it, which is the healthy direction.
Packages~VocelloQwen3Core~MLXAudioMark uses QwenVoiceCore, so a change to QwenVoiceCore can break Packages~VocelloQwen3Core~MLXAudioMark, while a change to Packages~VocelloQwen3Core~MLXAudioMark can't break QwenVoiceCore.
Position
Below the diagonal: Packages~VocelloQwen3Core~MLXAudioMark uses a module listed above it, which is the healthy direction.
QwenVoiceBackendCore uses QwenVoiceCore, so a change to QwenVoiceCore can break QwenVoiceBackendCore, while a change to QwenVoiceBackendCore can't break QwenVoiceCore.
Position
Below the diagonal: QwenVoiceBackendCore uses a module listed above it, which is the healthy direction.
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
A05:2025 — Injection
8
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
A03:2025 — Software Supply Chain Failures
1
Medium
Roadmap
Top priorities: 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; Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
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.
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.
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 — 54
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 — 1247
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 — 82
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 22
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 69 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 — 69 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, 1365 of 1383 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 JavaScript/TypeScript half measured 93.5% (node:test via `npm ci --ignore-scripts` in website/, the 3 run(s) test reliability made); the Swift half could not be measured — the Swift suite in Packages/VocelloQwen3Core produced no coverage export. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a coverage step in CI (`xcrun llvm-cov`) shows coverage is measured in your own CI.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 2,091 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 165 test source file(s) (.py, .mjs) that it cannot: it reads the test types the .swift frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .swift, .py, and the swift executor ran against the .swift half and could not be re-run to completion inside our analyzer environment; the python executor ran against the .py half and did not finish re-running within its tier budget — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in website/ (24 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The remedy is our analyzer environment, not a runner nobody has built.
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 package.json, but the licence verdict published here was taken over its SwiftPM package dependencies. Nothing was read about its npm 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 (3 contributor(s) across 3261 commit(s) sampled, automation and bot accounts excluded). One of them holds 100% of the history; the other 2 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D21 Naming Consistency — not measured this run — 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.
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.
D27 Navigability — 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. Tracing effort is measured over resolved call sites, and all 543 sampled here came from .swift files. This repository's .py source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
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. `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Generation.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSCaches.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSCodePredictor.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSLoading.swift`, … (+122 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D44 Platform End-of-Life — not measured this run — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AC3 Page structure — 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. 2 further occurrence(s) are not listed individually; the score already reflects all 42.
AX1 Captive dependencies — 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 reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in Sources/iOS/IOSAppBootstrap.swift, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — 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 reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — 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 reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — 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. 84 further occurrence(s) are not listed individually; the score already reflects all 124.
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.
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.
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 reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
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 reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala, Kotlin, PHP and Go source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala, Kotlin, PHP or Go was found, and this repository's Objective-C is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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 — 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. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
X5 Nullable reference types — 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 reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, Kotlin source, and Rust source only, and no C# was loaded, no TypeScript was found, and this repository's C, Objectivec, Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality 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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
109 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was BenchCommand.run at 91. A further 5 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 VocelloPresentationText.generationFailureMessage at 24 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: Sources/SharedSupport/Services/VocelloPresentationText.swift (VocelloPresentationText.generationFailureMessage at 24), website/src/components/Icon.jsx (Icon.Icon at 21). 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.
+ 104 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with BenchCommand.run (cyclomatic 91), StreamingExecutionContext.run (cyclomatic 79), StreamingExecutionContext.makeAudioQCReport (cyclomatic 68). — 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 4 together lifts Cyclomatic Complexity from 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; 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.
+ 171 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 8 bodies over 60 down to 60 or less in Cognitive Complexity — start with BenchCommand.run (cognitive 166), StreamingExecutionContext.run (cognitive 143), NativeEngineRuntime.prepareGeneration (cognitive 123). — 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 Cognitive Complexity from 5.5 to about 6.5/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.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 44 MethodTooLong finding(s) in God Classes — start with GenerationOutputAdapter.swift (4), NativeEngineRuntime.swift (4), IOSLongFormProject.swift (2). — One of this dimension's main actionable groups (44 warning-level).
Resolve the 43 FileTooLong finding(s) in God Classes — start with GenerationOutputAdapter.swift, HuggingFaceDownloader.swift, IOSDeviceDiagnosticsRunner.swift. — One of this dimension's main actionable groups (43 warning-level).
Resolve the 29 ClassTooLong finding(s) in God Classes — start with IOSGenerationModeViews.swift (2), HuggingFaceDownloader.swift, MacInterfaceText.swift. — One of this dimension's main actionable groups (29 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.
254 duplicated block group(s) detected. 5.5 % of the production lines (12,726 of 229,697) are in a reported copy. A further 258 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 150 of the 512 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 158 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 25 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with check_ios_ui_perf.py (2), HistoryPresentation.swift, ModelUpdateLedger.swift. — One of this dimension's main actionable groups (25 warning-level).
Resolve the 18 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with features.py (2), TTSEngineStore.swift, IOSPlayerSheet.swift. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 18 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with check_ios_ui_benchmark.py (2), MacCustomVoiceScreen.swift, BenchCodecLoop.swift. — One of this dimension's main actionable groups (18 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.4 / 10Stronggated by 1 serious finding✓ 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.
13 production modules (npm+SwiftPM+Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 1 module(s) off the main sequence, with abstractness counted on 2 of the 13 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: QwenVoiceBackendCore
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 12 Low cohesion finding(s) in Cohesion (LCOM4) — start with AnyTTSEngineBackend.swift, AppModel.swift, IOSLongFormProductionServices.swift. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
Detailed fixes: d7_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.8 / 10Stronggated by 31 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.
9 skipped, 22 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 2091 tests. Measured on the .swift suite only — at least 165 test source file(s) (.py, .mjs) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: testACancelledWarmPrefetchReArmsIdleUnload · ×22Tests/VocelloCoreTests/ActiveGenerationCoordinatorTests.swift:836
Resolve the 22 No assertions finding(s) in Test Quality — start with Qwen3DecoderPartitionTests.swift (4), DatabaseServiceTests.swift (3), TTSEngineStoreTests.swift (3). — One of this dimension's main actionable groups (22 warning-level).
Resolve the 9 Skipped test finding(s) in Test Quality — start with ReferenceImportStorageTests.swift (3), CloneArtifactPublicationTests.swift, GenerationHistoryOutboxTests.swift. — One of this dimension's main actionable groups (9 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.
15 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: eventsource · ×13
✓ 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 17 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 16 of them read from the licence file the repository carries at the revision Package.resolved pins, and 1 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. 1 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's SwiftPM package dependencies and nothing else. The repository also declares package.json, 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: scripts/benchmark_history.py (79×310=24490); Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.swift (50×166=8300); scripts/publish_benchmark_history.py (52×139=7228) Repeated repair below the complexity floor: Sources/QwenVoiceCore/MLXTTSEngine.swift (25 of 47 changes were fixes); Sources/Views/History/MacHistoryScreen.swift (25 of 42 changes were fixes); Sources/SharedSupport/Services/VocelloPresentationText.swift (21 of 37 changes were fixes)
Resolve the 115 Hotspot finding(s) in Churn × Complexity Hotspots — start with benchmark_history.py, Qwen3TTS.swift, publish_benchmark_history.py. — One of this dimension's main actionable groups (115 warning-level).
Resolve the 42 Repeated repair finding(s) in Churn × Complexity Hotspots — start with MLXTTSEngine.swift, MacHistoryScreen.swift, VocelloPresentationText.swift. — One of this dimension's main actionable groups (42 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.
0 deducted task-comment markers across 229697 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
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. 78 document(s) read across 2 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality7.4 / 10Strong✓ 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.
3 of 7 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
ADR has no Context section · ×2docs/decisions/product-identity-compatibility.md:9detected by adr-integrity
ADR has no Decision and Consequences sectiondocs/decisions/ios-6gb-floor-feasibility.md:10detected by adr-integrity
What to do
Resolve the 2 ADR has no Context section finding(s) in ADR Quality — start with product-identity-compatibility.md, runtime-hardening-and-trust-boundary.md. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 ADR has no Decision and Consequences section finding(s) in ADR Quality — start with ios-6gb-floor-feasibility.md. — 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.
Resolve the 2 redundant comment finding(s) in Comment Value — start with sheets.jsx (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D26 · Project Cohesion3.3 / 10Weak✓ Tool-verified
What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.
1 of 3 build units (SwiftPM, Xcode, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionQwenVoice.xcodeproj/project.pbxproj:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with project.pbxproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
2 % 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: small — navigation cost is tolerated. Measured over the .swift source only — this repository's .py was not sampled for call sites, so this score covers part of the tree, not all of it.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
8 finding(s): 0 critical, 4 high, 4 medium, 0 low. semgrep hit a parse error in 16 file(s) — `Sources/VocelloDesktopCore/DesktopAppSettings.swift` (line 89), `Sources/iOSSupport/Services/IOSSavedOutputsDestination.swift` (line 198), `Tests/VocelloMacUITests/VocelloMacSmokeUITests.swift` (line 183, line 433, line 889, …), `Tests/VocelloiOSUITests/VocelloiOSPurchaseUITests.swift` (line 28), `scripts/benchmark_history.py`, … (+11 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 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 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 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 541 of the 624 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 IOSGenerationModeViews.swift, MacHistoryScreen.swift, GenerationHistoryRecovery.swift. — One of this dimension's main actionable groups (5 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.
No dependency in any ecosystem this repository declares is published as malicious.
✓ On the Gold path — maintain.
Detailed fixes: d43_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels5.2 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×3) — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:14, REDACTED:481, REDACTED:519
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×9) — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:61, design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:80, design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:487, …
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×3) — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:227, design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:292, design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:417
This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×3) — design_references/Vocello iOS/screens.jsx:291, design_references/Vocello iOS/screens.jsx:310, design_references/Vocello iOS/screens.jsx:317
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — design_references/Vocello iOS/sheets.jsx:255, REDACTED:352
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×20) — design_references/Vocello Design System/preview/app-icon.html:2, design_references/Vocello Design System/preview/brand-launch.html:2, design_references/Vocello Design System/preview/brand-mark.html:2, …
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×20) — design_references/Vocello Design System/preview/app-icon.html:2, design_references/Vocello Design System/preview/brand-launch.html:2, design_references/Vocello Design System/preview/brand-mark.html:2, …
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×2) — design_references/Vocello Design System/preview/components-buttons.html:83, design_references/Vocello Design System/preview/components-buttons.html:84
The repo's own CSS styles .vc-player-scrub with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler. — design_references/Vocello iOS/player.jsx:144
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×5) — design_references/Vocello iOS/screens.jsx:165, design_references/Vocello iOS/screens.jsx:291, design_references/Vocello iOS/screens.jsx:310, …
The repo's own CSS styles .vc-list-row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler. (×5) — design_references/Vocello iOS/screens.jsx:288, design_references/Vocello iOS/screens.jsx:295, design_references/Vocello iOS/screens.jsx:301, …
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.item.selected.lavender .rail, .item.selected.lavender .icon` sets color: #BFAADB on background-color: #BFAADB — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — design_references/Vocello Design System/preview/components-sidebar-row.html:32
`.item.selected.terra .rail, .item.selected.terra .icon` sets color: #DBA887 on background-color: #DBA887 — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — design_references/Vocello Design System/preview/components-sidebar-row.html:35
<select> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:14
<textarea> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator. (×3) — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:61, design_references/Vocello iOS/app.jsx:267, design_references/Vocello iOS/sheets.jsx:151
<input> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:80
`.vc-script` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — design_references/Vocello iOS/app.css:239
`.vc-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — design_references/Vocello iOS/app.css:565
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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 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 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.
`TTSEngine` declares 24 requirements: `supportDecision`, `start`, `stop`, `initialize`, `ping`, `loadModel`, `unloadModel`, `prepareAudio`, `ensureModelLoadedIfNeeded`, `prewarmModelIfNeeded`, `ensureCloneReferencePrimed`, `cancelClonePreparationIfNeeded`, `cancelProactiveModelWork`, `generate`, `listPreparedVoices`, `preparePreparedVoiceCandidate`, `commitPreparedVoiceCandidate`, `discardPreparedVoiceCandidate`, `enrollPreparedVoice`, `deletePreparedVoice`, `importReferenceAudio`, `exportGeneratedAudio`, `clearGenerationActivity`, `clearVisibleError`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — Sources/QwenVoiceCore/TTSEngine.swift:97
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
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.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model7.8 / 10Strong✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`Instant` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Sources/QwenVoiceCore/TimingExtensions.swift:4
What to do
Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.
Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.
Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether 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 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type 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.
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.
5 duplicated blocks under design_references/ have copies in at least two of the sibling directories Vocello Design System, Vocello iOS — 2 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:80
design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:232 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:306 — 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. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:232
design_references/Vocello iOS/screens.jsx:36 · design_references/Vocello iOS/screens.jsx:76 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello iOS/screens.jsx:36
design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:437 · design_references/Vocello Design System/ui_kits/mac-app/LibraryScreens.jsx:234 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:437
design_references/Vocello iOS/studio.jsx:79 · design_references/Vocello iOS/studio.jsx:105 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — design_references/Vocello iOS/studio.jsx:79
design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:191 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:276 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:337 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:191
design_references/Vocello iOS/icons.jsx:84 · design_references/Vocello iOS/icons.jsx:104 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello iOS/icons.jsx:84
REDACTED:403 · REDACTED:469 — the two spans are one implementation copied and then locally edited — 54 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. — REDACTED:403
design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:282 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:343 — 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. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:282
design_references/Vocello iOS/player.jsx:59 · REDACTED:393 — the two spans are one implementation copied and then locally edited — 67 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — design_references/Vocello iOS/player.jsx:59
design_references/Vocello iOS/screens.jsx:16 · design_references/Vocello iOS/screens.jsx:126 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello iOS/screens.jsx:16
design_references/Vocello iOS/screens.jsx:290 · design_references/Vocello iOS/screens.jsx:309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — design_references/Vocello iOS/screens.jsx:290
design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:207 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:296 — 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. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:207
design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:80 · design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:95 · design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:142 · design_references/Vocello iOS/icons.jsx:117 — the 4 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:80
design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:104 · design_references/Vocello iOS/icons.jsx:71 · design_references/Vocello iOS/icons.jsx:129 · design_references/Vocello iOS/icons.jsx:137 — the 4 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:104
design_references/Vocello iOS/app.jsx:319 · design_references/Vocello iOS/screens.jsx:218 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — design_references/Vocello iOS/app.jsx:319
design_references/Vocello iOS/icons.jsx:70 · design_references/Vocello iOS/icons.jsx:83 · design_references/Vocello iOS/icons.jsx:103 · design_references/Vocello iOS/icons.jsx:116 · +1 more site(s) not listed — all 5 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello iOS/icons.jsx:70
design_references/Vocello iOS/screens.jsx:28 · design_references/Vocello iOS/sheets.jsx:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello iOS/screens.jsx:28
design_references/Vocello iOS/icons.jsx:101 · design_references/Vocello iOS/icons.jsx:114 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — design_references/Vocello iOS/icons.jsx:101
design_references/Vocello iOS/player.jsx:48 · design_references/Vocello iOS/studio.jsx:231 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello iOS/player.jsx:48
design_references/Vocello iOS/screens.jsx:360 · design_references/Vocello iOS/sheets.jsx:296 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — design_references/Vocello iOS/screens.jsx:360
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.
Studio has cyclomatic complexity 32 and cognitive complexity 28; 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. — design_references/Vocello iOS/studio.jsx:6
VoiceCloningScreen has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:329
VoicePickerSheet has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — design_references/Vocello iOS/sheets.jsx:6
CustomVoiceScreen has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:160
App has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — design_references/Vocello iOS/app.jsx:12
ModelInstallSheet has cyclomatic complexity 11 and cognitive complexity 9; 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. — design_references/Vocello iOS/sheets.jsx:291
Do you agree with this assessment?
R3 · Large Files2.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
REDACTED has 530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:1
design_references/Vocello iOS/screens.jsx has 432 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — design_references/Vocello iOS/screens.jsx:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code6.8 / 10Adequate✓ 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 14 application, 0 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 (14 application, 0 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 — design_references/Vocello iOS/ios-frame.jsx
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 · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
Set: Content-Security-Policy, Permissions-Policy, Referrer-Policy, X-Content-Type-Options, X-Frame-Options. Missing: Strict-Transport-Security — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−0.5 on this card.) — website/vercel.json:1
What to do
Add Strict-Transport-Security beside the headers already set; Content-Security-Policy is the one that pays for itself first, then Strict-Transport-Security, then nosniff and a frame policy.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×40) — Sources/iOSSupport/Services/IOSExportPurchaseState.swift:124, Sources/iOSSupport/Services/IOSExportPurchaseState.swift:138, Sources/iOSSupport/Services/IOSExportPurchaseState.swift:156, …
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 20 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 60 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.
AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
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 — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — None of 3 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
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) — 127 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.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D8 Code Coverage — Coverage not measured — Swift suite
DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Swift source, so there is no service whose uptime a failing dependency could take down
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
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 (15 production file(s)) has no JavaScript/TypeScript test, but it is 2.77% of this repository's production source and the other 97.23% carries 130,980 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
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).
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 40% of this repository's production lines — swift (129,121 lines), c (78 lines), objectivec (15 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 40% of this repository's production lines — swift (129,121 lines), c (78 lines), objectivec (15 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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 3% of this repository's production lines — swift (129,121 lines), python (81,364 lines), c (78 lines), objectivec (15 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 — 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 — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — X21 reached only 40% of this repository's production lines — swift (129,121 lines), c (78 lines), objectivec (15 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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X29 Per-element action decided by a fixed element — X29 reached only 3% of this repository's production lines — swift (129,121 lines), python (81,364 lines), c (78 lines), objectivec (15 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 54 finding(s)
AC3 · Page structure· Document without a <title> · ×20
Document without a <title> design_references/Vocello Design System/preview/app-icon.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/brand-launch.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/brand-mark.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/color-brand.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/color-emotion.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/color-status.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/color-surfaces-dark.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/color-surfaces-light.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/components-buttons.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/components-card.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/components-chips.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/components-fields.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/components-sidebar-row.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/components-status.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/spacing-elevation.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/spacing-grid.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/spacing-radii.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/type-scale.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/type-specimens.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
Document without a <title> design_references/Vocello Design System/preview/type-wordmark.html:2— A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC2 · Forms & labels· <input> without a programmatic label · ×6
<input> without a programmatic label design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:80— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label design_references/Vocello iOS/screens.jsx:22— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label design_references/Vocello iOS/screens.jsx:132— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label design_references/Vocello iOS/sheets.jsx:41— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label REDACTED:481— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label REDACTED:519— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics· Clickable element isn't keyboard-operable · ×6
Clickable element isn't keyboard-operable design_references/Vocello iOS/player.jsx:144— The repo's own CSS styles .vc-player-scrub with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler.
Clickable element isn't keyboard-operable design_references/Vocello iOS/screens.jsx:288— The repo's own CSS styles .vc-list-row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler.
Clickable element isn't keyboard-operable design_references/Vocello iOS/screens.jsx:295— The repo's own CSS styles .vc-list-row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler.
Clickable element isn't keyboard-operable design_references/Vocello iOS/screens.jsx:301— The repo's own CSS styles .vc-list-row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler.
Clickable element isn't keyboard-operable design_references/Vocello iOS/screens.jsx:307— The repo's own CSS styles .vc-list-row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler.
Clickable element isn't keyboard-operable design_references/Vocello iOS/screens.jsx:314— The repo's own CSS styles .vc-list-row with `cursor: pointer`, so this <div> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels· <textarea> without a programmatic label · ×5
<textarea> without a programmatic label design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:61— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:487— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label design_references/Vocello iOS/app.jsx:267— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label design_references/Vocello iOS/sheets.jsx:151— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<textarea> without a programmatic label design_references/Vocello iOS/studio.jsx:43— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×5
Click handler on a non-interactive <div> design_references/Vocello iOS/screens.jsx:165— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> design_references/Vocello iOS/screens.jsx:291— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> design_references/Vocello iOS/screens.jsx:310— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> design_references/Vocello iOS/screens.jsx:317— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> design_references/Vocello iOS/sheets.jsx:77— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×3
Custom control with no accessible name on <div> design_references/Vocello iOS/screens.jsx:291— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <div> design_references/Vocello iOS/screens.jsx:310— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <div> design_references/Vocello iOS/screens.jsx:317— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels· <button> with no accessible text · ×2
<button> with no accessible text design_references/Vocello iOS/sheets.jsx:255— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text REDACTED:352— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels· <select> without a programmatic label · ×1
<select> without a programmatic label design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:14— This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
DM4 · Rich vs anemic domain model· Anemic domain model · ×1
Anemic domain model: Instant Sources/QwenVoiceCore/TimingExtensions.swift:4— `Instant` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
Hotspot: scripts/benchmark_history.py scripts/benchmark_history.py:3180— scripts/benchmark_history.py changed 79 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 310 in benchmark_history.validate_record at line 3180. 21 of those changes were fix/bug commits, and the other 58 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/benchmark_history.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: Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.swift Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.swift:2004— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.swift changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 166 in Qwen3TTSModel.generateVoiceDesign at line 2004. 16 of those changes were fix/bug commits, and the other 34 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.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: scripts/publish_benchmark_history.py scripts/publish_benchmark_history.py:3165— scripts/publish_benchmark_history.py changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 139 in publish_benchmark_history.language_command at line 3165. 14 of those changes were fix/bug commits, and the other 38 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/publish_benchmark_history.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: Sources/QwenVoiceCore/GenerationOutputAdapter.swift Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1730— Sources/QwenVoiceCore/GenerationOutputAdapter.swift changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in StreamingExecutionContext.run at line 1730. 24 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/QwenVoiceCore/GenerationOutputAdapter.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: scripts/check_macos_ui_bench.py scripts/check_macos_ui_bench.py:1474— scripts/check_macos_ui_bench.py changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in check_macos_ui_bench.main at line 1474. 6 of those changes were fix/bug commits, and the other 24 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/check_macos_ui_bench.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: Sources/VocelloCLI/BenchCommand.swift Sources/VocelloCLI/BenchCommand.swift:185— Sources/VocelloCLI/BenchCommand.swift changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 91 in BenchCommand.run at line 185. 11 of those changes were fix/bug commits, and the other 18 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/VocelloCLI/BenchCommand.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: Sources/QwenVoiceCore/NativeEngineRuntime.swift Sources/QwenVoiceCore/NativeEngineRuntime.swift:812— Sources/QwenVoiceCore/NativeEngineRuntime.swift changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in NativeEngineRuntime.prepareGeneration at line 812. 16 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/QwenVoiceCore/NativeEngineRuntime.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: scripts/build_output_policy.py scripts/build_output_policy.py:166— scripts/build_output_policy.py changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in build_output_policy._validate_policy_document at line 166. 4 of those changes were fix/bug commits, and the other 14 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/build_output_policy.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: scripts/ios_startup_reliability.py scripts/ios_startup_reliability.py:779— scripts/ios_startup_reliability.py changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in ios_startup_reliability.validate_result at line 779. 2 of those changes were fix/bug commits, and the other 16 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/ios_startup_reliability.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: scripts/development_workflow.py scripts/development_workflow.py:651— scripts/development_workflow.py changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in development_workflow.main at line 651. 9 of those changes were fix/bug commits, and the other 31 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/development_workflow.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: scripts/qwen3_core_contract.py scripts/qwen3_core_contract.py:853— scripts/qwen3_core_contract.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 161 in qwen3_core_contract.validate at line 853. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/qwen3_core_contract.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: scripts/check_ios_ui_benchmark.py scripts/check_ios_ui_benchmark.py:656— scripts/check_ios_ui_benchmark.py changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 85 in check_ios_ui_benchmark.main at line 656. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/check_ios_ui_benchmark.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: scripts/ios_control_audit.py scripts/ios_control_audit.py:685— scripts/ios_control_audit.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in ios_control_audit.compose at line 685. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/ios_control_audit.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: scripts/check_language_output.py scripts/check_language_output.py:131— scripts/check_language_output.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in check_language_output.validate_structured_verification at line 131. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/check_language_output.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: Sources/iOS/IOSGenerationModeViews.swift Sources/iOS/IOSGenerationModeViews.swift:741— Sources/iOS/IOSGenerationModeViews.swift changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in IOSVoiceDesignView.body at line 741. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/IOSGenerationModeViews.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: scripts/quality_promotion.py scripts/quality_promotion.py:105— scripts/quality_promotion.py changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in quality_promotion.validate_contract at line 105. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/quality_promotion.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: scripts/summarize_generation_telemetry.py scripts/summarize_generation_telemetry.py:2148— scripts/summarize_generation_telemetry.py changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in summarize_generation_telemetry.main at line 2148. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/summarize_generation_telemetry.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: scripts/hooks/git_commands.py scripts/hooks/git_commands.py:193— scripts/hooks/git_commands.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in git_commands.git_invocations at line 193. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/hooks/git_commands.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: Sources/iOS/Studio/IOSLongFormProject.swift Sources/iOS/Studio/IOSLongFormProject.swift:899— Sources/iOS/Studio/IOSLongFormProject.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in IOSLongFormProjectRunner.run at line 899. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/Studio/IOSLongFormProject.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: Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:184— Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in GenerationFailureDiagnosticLogger.errorMetadata at line 184. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.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: Sources/VocelloCLI/GenerateCommand.swift Sources/VocelloCLI/GenerateCommand.swift:423— Sources/VocelloCLI/GenerateCommand.swift changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GenerateCommand.run at line 423. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/VocelloCLI/GenerateCommand.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: Sources/VocelloCLI/ModelsCommand.swift Sources/VocelloCLI/ModelsCommand.swift:115— Sources/VocelloCLI/ModelsCommand.swift changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ModelsCommand.run at line 115. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/VocelloCLI/ModelsCommand.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: scripts/benchmark_memory.py scripts/benchmark_memory.py:664— scripts/benchmark_memory.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in benchmark_memory._validate_layer at line 664. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/benchmark_memory.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: scripts/voice_identity_language_reliability.py scripts/voice_identity_language_reliability.py:708— scripts/voice_identity_language_reliability.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in voice_identity_language_reliability.compose_device_results at line 708. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/voice_identity_language_reliability.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: scripts/roadmap.py scripts/roadmap.py:411— scripts/roadmap.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in roadmap.validate at line 411. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- scripts/roadmap.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.
MethodTooLong: StreamingExecutionContext.run Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1730— MethodTooLong — run runs 600 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 500 over it, 6.00× 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: NativeEngineRuntime.prepareGeneration Sources/QwenVoiceCore/NativeEngineRuntime.swift:812— MethodTooLong — prepareGeneration runs 438 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 338 over it, 4.38× 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: BenchCommand.run Sources/VocelloCLI/BenchCommand.swift:185— MethodTooLong — run runs 412 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 312 over it, 4.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StreamingExecutionContext.makeAudioQCReport Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3312— MethodTooLong — makeAudioQCReport runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IOSStartupReliabilityRunner.execute Sources/iOS/IOSStartupReliabilityRunner.swift:184— MethodTooLong — execute runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.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: IOSLongFormProjectRunner.run Sources/iOS/Studio/IOSLongFormProject.swift:899— MethodTooLong — run runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× 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: StreamingExecutionContext.writeEngineTelemetryRecord Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2773— MethodTooLong — writeEngineTelemetryRecord runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× 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: MLXTTSEngine.generate Sources/QwenVoiceCore/MLXTTSEngine.swift:1528— MethodTooLong — generate runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× 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: MacSavedVoiceSheet.body Sources/Views/Voices/MacSavedVoiceSheet.swift:161— MethodTooLong — body runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× 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: NativeAudioPreparationService.convertAudio Sources/QwenVoiceCore/AudioPreparation.swift:569— MethodTooLong — convertAudio runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× 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: BenchCodecReplay.run Sources/VocelloCLI/BenchCodecReplay.swift:62— MethodTooLong — run 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: MLXModelLoadCoordinator.loadModel Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:259— MethodTooLong — loadModel runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× 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: IOSLongFormProjectRunner.regenerateSegment Sources/iOS/Studio/IOSLongFormProject.swift:1207— MethodTooLong — regenerateSegment runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GenerationStreamingTelemetryV9Bridge.make Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Bridge.swift:343— MethodTooLong — make 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: BenchCodecLoop.run Sources/VocelloCLI/BenchCodecLoop.swift:70— MethodTooLong — run runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.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: GenerationRequestReceipt.init Sources/QwenVoiceCore/GenerationStartupDiagnostics.swift:81— MethodTooLong — init runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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: NativeTelemetrySampler.summarize Sources/QwenVoiceCore/NativeTelemetrySampler.swift:976— MethodTooLong — summarize runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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: HuggingFaceDownloader.runDownload Sources/QwenVoiceCore/HuggingFaceDownloader.swift:1714— MethodTooLong — runDownload runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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: BoundedLongFormAssembler.assemble Sources/QwenVoiceCore/LongFormAssembly.swift:220— MethodTooLong — assemble runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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: MCPTools.catalog Sources/VocelloCLI/Core/MCP/MCPTools.swift:179— MethodTooLong — catalog runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× 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: NativeEngineRuntime.recordGenerationPlanShadow Sources/QwenVoiceCore/NativeEngineRuntime.swift:2480— MethodTooLong — recordGenerationPlanShadow runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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: BenchCodecRoundTrip.run Sources/VocelloCLI/BenchCodecRoundTrip.swift:67— MethodTooLong — run runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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: IOSVoiceDesignView.body Sources/iOS/IOSGenerationModeViews.swift:741— MethodTooLong — body 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: GenerationOutputVerifier.evaluate Sources/SharedSupport/Services/GenerationOutputVerifier.swift:170— MethodTooLong — evaluate 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: LongFormPlanner.plan Sources/QwenVoiceCore/LongFormPlanning.swift:208— MethodTooLong — plan 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.
FileTooLong: QwenVoiceCore/GenerationOutputAdapter.swift Sources/QwenVoiceCore/GenerationOutputAdapter.swift— FileTooLong — 2690 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2190 over it, 5.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: QwenVoiceCore/HuggingFaceDownloader.swift Sources/QwenVoiceCore/HuggingFaceDownloader.swift— FileTooLong — 2436 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: HuggingFaceDownloader (19-3749). The bar is 500 significant lines; this is 1936 over it, 4.87× 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: iOS/IOSDeviceDiagnosticsRunner.swift Sources/iOS/IOSDeviceDiagnosticsRunner.swift— FileTooLong — 2222 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1722 over it, 4.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: QwenVoiceCore/MLXTTSEngine.swift Sources/QwenVoiceCore/MLXTTSEngine.swift— FileTooLong — 1862 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: MLXTTSEngine (107-2693). The bar is 500 significant lines; this is 1362 over it, 3.72× 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: QwenVoiceCore/NativeEngineRuntime.swift Sources/QwenVoiceCore/NativeEngineRuntime.swift— FileTooLong — 1843 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1343 over it, 3.69× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Services/MacInterfaceText.swift Sources/Services/MacInterfaceText.swift— FileTooLong — 1773 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: MacInterfaceText (10-2399). The bar is 500 significant lines; this is 1273 over it, 3.55× 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: iOS/IOSGenerationModeViews.swift Sources/iOS/IOSGenerationModeViews.swift— FileTooLong — 1661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1161 over it, 3.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: QwenVoiceCore/SemanticTypes.swift Sources/QwenVoiceCore/SemanticTypes.swift— FileTooLong — 1426 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 926 over it, 2.85× 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: ViewModels/AudioPlayerViewModel.swift Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift— FileTooLong — 1413 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: AudioPlayerViewModel (12-2179). The bar is 500 significant lines; this is 913 over it, 2.83× 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: VocelloCLI/BenchCommand.swift Sources/VocelloCLI/BenchCommand.swift— FileTooLong — 1279 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: BenchCommand (14-1820). The bar is 500 significant lines; this is 779 over it, 2.56× 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: QwenVoiceCore/GenerationTelemetryRecord.swift Sources/QwenVoiceCore/GenerationTelemetryRecord.swift— FileTooLong — 1264 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 764 over it, 2.53× 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: QwenVoiceCore/SharedModelComponentStore.swift Sources/QwenVoiceCore/SharedModelComponentStore.swift— FileTooLong — 1259 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 759 over it, 2.52× 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: ViewModels/ModelManagerViewModel.swift Sources/ViewModels/ModelManagerViewModel.swift— FileTooLong — 1203 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ModelManagerViewModel (9-1802). The bar is 500 significant lines; this is 703 over it, 2.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Services/VoiceClipTranscriber.swift Sources/SharedSupport/Services/VoiceClipTranscriber.swift— FileTooLong — 1148 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: VoiceClipTranscriber (16-1569). The bar is 500 significant lines; this is 648 over it, 2.30× 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: QwenVoiceCore/NativeTelemetrySampler.swift Sources/QwenVoiceCore/NativeTelemetrySampler.swift— FileTooLong — 1118 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 618 over it, 2.24× 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: iOS/IOSModelDownloadCoordinator.swift Sources/iOS/IOSModelDownloadCoordinator.swift— FileTooLong — 1081 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: IOSModelDownloadCoordinator (28-1476). The bar is 500 significant lines; this is 581 over it, 2.16× 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: QwenVoiceCore/MLXModelLoadCoordinator.swift Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift— FileTooLong — 1064 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 564 over it, 2.13× 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: Sheets/IOSBottomSheets.swift Sources/iOS/Sheets/IOSBottomSheets.swift— FileTooLong — 1059 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 559 over it, 2.12× 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: Studio/IOSLongFormProject.swift Sources/iOS/Studio/IOSLongFormProject.swift— FileTooLong — 1023 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 523 over it, 2.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: iOS/IOSRootNavigationModels.swift Sources/iOS/IOSRootNavigationModels.swift— FileTooLong — 1013 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 513 over it, 2.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: QwenVoiceCore/GenerationSemantics.swift Sources/QwenVoiceCore/GenerationSemantics.swift— FileTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: GenerationSemantics (4-1343). The bar is 500 significant lines; this is 441 over it, 1.88× 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: VocelloCLI/GenerateCommand.swift Sources/VocelloCLI/GenerateCommand.swift— FileTooLong — 934 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: GenerateCommand (9-1369). The bar is 500 significant lines; this is 434 over it, 1.87× 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: Database/GenerationHistoryOutbox.swift Sources/SharedSupport/Database/GenerationHistoryOutbox.swift— FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 387 over it, 1.77× 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: QwenVoiceCore/AudioPreparation.swift Sources/QwenVoiceCore/AudioPreparation.swift— FileTooLong — 800 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: NativeAudioPreparationService (201-1194). The bar is 500 significant lines; this is 300 over it, 1.60× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: QwenVoiceCore/NativeCloneSupport.swift Sources/QwenVoiceCore/NativeCloneSupport.swift— FileTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 299 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.
Repeated repair: Sources/QwenVoiceCore/MLXTTSEngine.swift Sources/QwenVoiceCore/MLXTTSEngine.swift:1528— Sources/QwenVoiceCore/MLXTTSEngine.swift changed 47 times in last 90 days and 25 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is MLXTTSEngine.generate at line 1528), 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(engine): a clone prime or a take that stop() cancelled publishes nothing on the stopped engine (RF-61)”; “fix(engine): a load or warm suspended across stop() publishes nothing on the stopped engine (RF-61)”; “fix(ios): proactive model work stops when the app stops being active (BG-01)”; “fix(voices): a closed review surface discards its candidate; Delete waits for long-form (F-01)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/QwenVoiceCore/MLXTTSEngine.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: Sources/Views/History/MacHistoryScreen.swift Sources/Views/History/MacHistoryScreen.swift:98— Sources/Views/History/MacHistoryScreen.swift changed 42 times in last 90 days and 25 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is MacHistoryDisplayEntry.entries at line 98), 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(history): Save As and the recovery export run one at a time and report a failure wherever the user is (RF-61)”; “fix(history): deleting the take the player holds dismisses the player (RF-61)”; “fix(history): a long-form project delete deletes nothing when the project changed since it was read (RF-61)”; “fix(history): Save As and the recovery export copy off the main thread (RF-61)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/Views/History/MacHistoryScreen.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: Sources/SharedSupport/Services/VocelloPresentationText.swift Sources/SharedSupport/Services/VocelloPresentationText.swift:516— Sources/SharedSupport/Services/VocelloPresentationText.swift changed 37 times in last 90 days and 21 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is VocelloPresentationText.enrollmentTranscriptionStatus at line 516), 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(player): the shared player's messages and the model download details read in the interface language (RF-61)”; “fix(history): deleting a long-form project deletes its segments, and the confirmation says how many (RF-61)”; “fix(history): Discard says what it could not set aside; Mac regeneration passes (F-16)”; “fix: Discard unblocks long-form History; damaged voice metadata stays gated (F-16, RF-13)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/SharedSupport/Services/VocelloPresentationText.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: Sources/iOS/History/HistoryScreen.swift Sources/iOS/History/HistoryScreen.swift:662— Sources/iOS/History/HistoryScreen.swift changed 31 times in last 90 days and 20 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is IOSHistoryLibrarySection.makeGroupedItems at line 662), 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(history): deleting the take the player holds dismisses the player (RF-61)”; “fix(history): a long-form project delete deletes nothing when the project changed since it was read (RF-61)”; “fix(history): deleting a long-form project deletes its segments, and the confirmation says how many (RF-61)”; “fix(history): a History over 500 entries updates its list once per search, filter or sort (RF-61)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/History/HistoryScreen.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: Sources/iOS/QVoiceiOSApp.swift Sources/iOS/QVoiceiOSApp.swift:56— Sources/iOS/QVoiceiOSApp.swift changed 22 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is QVoiceiOSApp.body 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(ios): proactive model work stops when the app stops being active (BG-01)”; “fix(ios): every player pauses for a call or a lost output; smoke records then plays (AUD-02)”; “fix(ios): startup is an owned retryable pass and opened files wait for onboarding (AUD-01)”; “fix(player): a pause holds the live preview; an operation's takes play in turn; cards adopt only their own file”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/QVoiceiOSApp.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: Sources/iOSSupport/Services/DatabaseService.swift Sources/iOSSupport/Services/DatabaseService.swift:432— Sources/iOSSupport/Services/DatabaseService.swift changed 18 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is DatabaseService.deleteLongFormProject at line 432), 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(history): a long-form project delete deletes nothing when the project changed since it was read (RF-61)”; “fix(history): deleting a long-form project deletes its segments, and the confirmation says how many (RF-61)”; “fix(privacy): History turns on SQLite secure delete (BKL-09)”; “fix(history): Discard says what it could not set aside; Mac regeneration passes (F-16)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOSSupport/Services/DatabaseService.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: Sources/iOS/IOSModelDownloadCoordinator.swift Sources/iOS/IOSModelDownloadCoordinator.swift:729— Sources/iOS/IOSModelDownloadCoordinator.swift changed 17 times in last 90 days and 12 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is IOSModelDownloadCoordinator.handleProgress at line 729), 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(models): a Retry checks space only for the bytes it still needs; stale staging goes (RF-19)”; “fix(models): two quick Install taps queue the second model instead of wedging both (RF-19)”; “fix(models): a failed install stays failed until Retry instead of restarting every launch (RF-19)”; “fix(models): a failed file shows Failed with Retry instead of a stuck Cancelling (RF-19)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/IOSModelDownloadCoordinator.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: Sources/SharedSupport/Services/GenerationHistoryRecovery.swift Sources/SharedSupport/Services/GenerationHistoryRecovery.swift:85— Sources/SharedSupport/Services/GenerationHistoryRecovery.swift changed 14 times in last 90 days and 12 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is GenerationHistoryRecovery.segmentCountDeletedWith at line 85), 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(history): a long-form project delete deletes nothing when the project changed since it was read (RF-61)”; “fix(history): deleting a long-form project deletes its segments, and the confirmation says how many (RF-61)”; “fix(history): Discard says what it could not set aside; Mac regeneration passes (F-16)”; “fix: Discard unblocks long-form History; damaged voice metadata stays gated (F-16, RF-13)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/SharedSupport/Services/GenerationHistoryRecovery.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: Sources/Services/MacLineBatchRequest.swift Sources/Services/MacLineBatchRequest.swift:47— Sources/Services/MacLineBatchRequest.swift changed 10 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is MacBatchDroppedTextFile.unicodeText at line 47), 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(batch): a dropped UTF-16 file without a byte order mark is refused, not read with NUL characters in it (RF-61)”; “fix(batch): a file dropped on the batch sheet is read whatever its case or Unicode encoding, or refused with a reason (RF-61)”; “fix(batch): a separator line in a Mac line batch is skipped, not a take that stops the batch”; “fix(batch): a line-batch retry keeps each line's own seed”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/Services/MacLineBatchRequest.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: Sources/iOS/App/AppModel.swift Sources/iOS/App/AppModel.swift:226— Sources/iOS/App/AppModel.swift changed 13 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is AppModel.activeStudioWork at line 226), 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(studio,mac,ios): a kept warm never undoes an unload; one mode-switch rule on both apps”; “fix(studio,mac,ios): keep Studio state with its take, guard mode switches, close engine-cancelled batches”; “fix(history,studio,mac): rebase moved History audio, refuse Stop while a take is saved, surface a failed engine start”; “fix(ios): a failed 0444 restore stops startup; drafts keep only the voice ID (PA-21)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/App/AppModel.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: Sources/iOS/Studio/StudioGenerationCoordinator.swift Sources/iOS/Studio/StudioGenerationCoordinator.swift:83— Sources/iOS/Studio/StudioGenerationCoordinator.swift changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is StudioGenerationCoordinator.backgroundInterruptionNoticeMessage at line 83), 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(studio,mac,ios): a take the engine stops for memory says so instead of vanishing (U23)”; “fix(studio,mac,ios): keep Studio state with its take, guard mode switches, close engine-cancelled batches”; “fix(history,studio,mac): rebase moved History audio, refuse Stop while a take is saved, surface a failed engine start”; “fix(ios): PA-15 honour accepted cancellation before the task is cancelled”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/Studio/StudioGenerationCoordinator.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: Sources/VocelloCLI/Support.swift Sources/VocelloCLI/Support.swift:16— Sources/VocelloCLI/Support.swift changed 10 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is CLIPaths.dataDirectory at line 16), 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(cli): the install preflight counts only planned bytes really held, and the ledger prunes without an id (RF-61)”; “fix(cli): model ids read in any letter case, --stream with --no-stream is refused, and a failed final rename keeps a project's joined output (RF-61)”; “fix(cli): a full volume is storage_full, and models install checks the free space before it downloads (RF-61)”; “fix(cli): unique default takes, options checked before boot, engine stops apart from Ctrl-C”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/VocelloCLI/Support.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: Sources/Services/MacLineBatchRunner.swift Sources/Services/MacLineBatchRunner.swift:60— Sources/Services/MacLineBatchRunner.swift changed 9 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 8 (its worst body is MacLineBatchRunner.start at line 60), 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(privacy): name takes and their exported copies without the script (BKL-09)”; “fix(batch): a line-batch retry keeps each line's own seed”; “fix(batch): a repeated line of a Mac line batch derives its own seed (P11-10)”; “fix(long-form,batch): retakes on a fresh seed, one script language, pinned seeds, Stop refused during save”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/Services/MacLineBatchRunner.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: Sources/iOSSupport/Models/GenerationDrafts.swift Sources/iOSSupport/Models/GenerationDrafts.swift:387— Sources/iOSSupport/Models/GenerationDrafts.swift changed 9 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 8 (its worst body is SavedVoiceCloneHydration.action at line 387), 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: make Clone conditioning an explicit reviewed input decision”; “Recover clone workflow improvements and fix reference ownership races”; “fix(delivery): one Studio delivery reading on both apps; the diction sentence stands alone”; “fix(studio,mac,ios): keep Studio state with its take, guard mode switches, close engine-cancelled batches”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOSSupport/Models/GenerationDrafts.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: Sources/iOSSupport/Services/IOSSavedOutputsDestination.swift Sources/iOSSupport/Services/IOSSavedOutputsDestination.swift:132— Sources/iOSSupport/Services/IOSSavedOutputsDestination.swift changed 9 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 9 (its worst body is IOSSavedOutputsDestination.exportIfConfigured at line 132), 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(ios,files): a bookmark refresh no longer drops a waiting Files copy”; “fix(files,engine): one staged copy for Save As, earlier export failures stay reported, cleanup throws pinned”; “fix(ios): report folder copies held for access, cancel a dismissed restore, stage the copy”; “fix(ios): a late copy result stays with its folder; audit the folder-failure dismiss (B4 review)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOSSupport/Services/IOSSavedOutputsDestination.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: Sources/SharedSupport/Database/GenerationHistoryPage.swift Sources/SharedSupport/Database/GenerationHistoryPage.swift:207— Sources/SharedSupport/Database/GenerationHistoryPage.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is GenerationHistoryPageQuery.fetch at line 207), 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(history): a page overtaken by a newer search waits for the read queued behind it (RF-61)”; “fix(history): the CLI keeps a History row whose receipt it cannot decode, and marks it (RF-61)”; “fix(history): a History over 500 entries updates its list once per search, filter or sort (RF-61)”; “fix(history,delivery): a Retry during a History read still reopens the store; the diction sentence closes any base”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/SharedSupport/Database/GenerationHistoryPage.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: Sources/Views/History/MacHistoryRecoveryBanner.swift Sources/Views/History/MacHistoryRecoveryBanner.swift:19— Sources/Views/History/MacHistoryRecoveryBanner.swift changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is MacHistoryRecoveryBanner.body at line 19), 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(mac): Saved Voices' empty and error states stay inside the window; a smoke scenario opens them (BKL-15)”; “fix(history): the Mac recovery notice no longer blanks the window; recovery journey passes (F-16)”; “fix: Discard unblocks long-form History; damaged voice metadata stays gated (F-16, RF-13)”; “fix(models,history): coordinate iPhone model removal with the engine; give damaged History records an exit”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/Views/History/MacHistoryRecoveryBanner.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: Sources/Views/History/MacHistoryFileActions.swift Sources/Views/History/MacHistoryFileActions.swift:49— Sources/Views/History/MacHistoryFileActions.swift changed 5 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 4 (its worst body is MacHistoryFileActions.exportPendingAudio at line 49), 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(history): Save As and the recovery export run one at a time and report a failure wherever the user is (RF-61)”; “fix(history): Save As and the recovery export copy off the main thread (RF-61)”; “fix(privacy): name takes and their exported copies without the script (BKL-09)”; “fix(macos): PA-26 batch B3 - retry, imports, save cancel, clips, shortcuts, waveform, output names”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/Views/History/MacHistoryFileActions.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: Sources/Services/AppStateRestorationPolicy.swift Sources/Services/AppStateRestorationPolicy.swift:64— Sources/Services/AppStateRestorationPolicy.swift changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is QwenVoiceApplicationDelegate.anotherCopyIsRunning at line 64), 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(app): the Mac app holds an engine lease while its model is loaded and reads the command line's (RF-61)”; “fix(ios,engine): saved-voice errors are path-free; sweeps keep undated files (B2 review)”; “fix(macos): PA-26 B3 review - deletion engine gate, per-process recordings, safe deinit”; “fix(macos): PA-26 batch B3 - retry, imports, save cancel, clips, shortcuts, waveform, output names”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/Services/AppStateRestorationPolicy.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: Sources/Services/MacEngineBootstrap.swift Sources/Services/MacEngineBootstrap.swift:26— Sources/Services/MacEngineBootstrap.swift changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is MacEngineBootstrap.makeEngineStore at line 26), 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(app): the Mac app holds an engine lease while its model is loaded and reads the command line's (RF-61)”; “fix(memory): the high-memory Mac unloads after idle and answers pressure (AUD-10)”; “fix(consent): close PA-17 review gaps across apps, CLI and device lanes”; “fix(core): enforce voice-cloning consent below the views (PA-17)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/Services/MacEngineBootstrap.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: Sources/QwenVoiceCore/ModelDownloadDiagnosticsStore.swift Sources/QwenVoiceCore/ModelDownloadDiagnosticsStore.swift:331— Sources/QwenVoiceCore/ModelDownloadDiagnosticsStore.swift changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ModelDownloadDiagnosticsStore.record at line 331), 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(privacy): persisted diagnostics keep typed failure summaries, not error text (AUD-08)”; “fix(core): exact reuse accounting and a last-resort stream after range retries”; “fix(core): retry short or failed byte ranges on their own”; “fix(ios): close model management delivery diagnostics”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/QwenVoiceCore/ModelDownloadDiagnosticsStore.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: Sources/iOS/Sheets/IOSVoicePreviewPlayer.swift Sources/iOS/Sheets/IOSVoicePreviewPlayer.swift:61— Sources/iOS/Sheets/IOSVoicePreviewPlayer.swift changed 7 times in last 90 days and 4 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 IOSVoicePreviewPlayer.play at line 61), 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(ios): PA-26 batch B4 - clone take, purchase refresh, save guards, saved outputs, private prints”; “fix(ios): a capped recording releases the session; no main-actor waits (PA-21)”; “fix(ios): switching voice-picker samples keeps one session claim (PA-21)”; “fix(ios): one owner for the audio session; previews pause shared playback (PA-21)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOS/Sheets/IOSVoicePreviewPlayer.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: Sources/VocelloCLI/Core/Contract/CLIRequestLedger.swift Sources/VocelloCLI/Core/Contract/CLIRequestLedger.swift:233— Sources/VocelloCLI/Core/Contract/CLIRequestLedger.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is CLIRequestLedger.pruneHoldingLedgerLock at line 233), 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(cli): the install preflight counts only planned bytes really held, and the ledger prunes without an id (RF-61)”; “fix(cli): the request ledger keeps digests instead of script text and prunes when a request is claimed (RF-61)”; “fix(cli): a store refusal never strands the stream drain; identity resolves defaults (RF-27)”; “fix(cli): idempotency compares the take; the ledger fails closed; run keeps every row (RF-27)”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/VocelloCLI/Core/Contract/CLIRequestLedger.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: Sources/SharedSupport/ViewModels/ReferenceClipRecordingStash.swift Sources/SharedSupport/ViewModels/ReferenceClipRecordingStash.swift:216— Sources/SharedSupport/ViewModels/ReferenceClipRecordingStash.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is ReferenceClipRecordingStash.removeLegacyRecordings at line 216), 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(voices): a closed review surface discards its candidate; Delete waits for long-form (F-01)”; “fix(ios,engine): PA-26 batch B2 - reference import, saved voices, temp files”; “fix(macos): PA-26 B3 review - deletion engine gate, per-process recordings, safe deinit”; “fix(macos): PA-26 batch B3 - retry, imports, save cancel, clips, shortcuts, waveform, output names”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/SharedSupport/ViewModels/ReferenceClipRecordingStash.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: Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:119— Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is IOSPullableDiagnosticsMirror.syncGenerationTelemetry at line 119), 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(privacy): persisted diagnostics keep typed failure summaries, not error text (AUD-08)”; “Fix iOS audit correlation and retain generation evidence”; “Record iPhone validation and fix playback and diagnostic boundaries”; “fix: diagnose iOS generation startup failures”. 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 22:46:44 -05:00' --until='2026-11-16 22:46:44 -05:00' --full-history --no-merges -- Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.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.
Swallowed exception (caught, then discarded) Sources/iOSSupport/Services/IOSExportPurchaseState.swift:124— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOSSupport/Services/IOSExportPurchaseState.swift:138— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOSSupport/Services/IOSExportPurchaseState.swift:156— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOSSupport/Services/IOSLeftoverAudioAnalysis.swift:142— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOSSupport/Services/IOSStorageProtectionPolicy.swift:116— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOSSupport/Services/RuntimeReleaseCoordinator.swift:49— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOSSupport/Models/Generation.swift:126— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2298— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2468— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOS/IOSStartupReliabilityRunner.swift:275— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOS/TTSEngineStore.swift:823— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:718— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:734— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/iOS/Settings/SettingsScreen.swift:735— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/VocelloDesktopCore/DesktopHistoryReader.swift:130— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/VocelloCLI/BatchCommand.swift:301— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/VocelloCLI/BenchCommand.swift:1071— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/VocelloCLI/Core/Contract/CLIPresenter.swift:295— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/VocelloCLI/Core/Contract/CLIRequestLedger.swift:203— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1648— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/SharedSupport/ViewModels/ReferenceClipRecorder.swift:295— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/SharedSupport/ViewModels/ReferenceClipRecordingStash.swift:155— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/SharedSupport/Services/GenerationHistoryRecovery.swift:108— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:331— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:597— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
ClassTooLong: HuggingFaceDownloader Sources/QwenVoiceCore/HuggingFaceDownloader.swift:19— ClassTooLong — 2428 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 2028 over it, 6.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: MacInterfaceText Sources/Services/MacInterfaceText.swift:10— ClassTooLong — 1771 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 1371 over it, 4.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.
ClassTooLong: MLXTTSEngine Sources/QwenVoiceCore/MLXTTSEngine.swift:106— ClassTooLong — 1710 significant lines (blank, comment-only and punctuation-only lines excluded), 112 methods. The bar is 400 significant lines; this is 1310 over it, 4.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StreamingExecutionContext Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1607— ClassTooLong — 1497 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 1097 over it, 3.74× 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: AudioPlayerViewModel Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:10— ClassTooLong — 1405 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods. The bar is 400 significant lines; this is 1005 over it, 3.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BenchCommand Sources/VocelloCLI/BenchCommand.swift:14— ClassTooLong — 1274 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 874 over it, 3.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ModelManagerViewModel Sources/ViewModels/ModelManagerViewModel.swift:7— ClassTooLong — 1162 significant lines (blank, comment-only and punctuation-only lines excluded), 89 methods. The bar is 400 significant lines; this is 762 over it, 2.91× 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: VoiceClipTranscriber Sources/SharedSupport/Services/VoiceClipTranscriber.swift:16— ClassTooLong — 1101 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 701 over it, 2.75× 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: IOSModelDownloadCoordinator Sources/iOS/IOSModelDownloadCoordinator.swift:27— ClassTooLong — 1067 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 667 over it, 2.67× 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: GenerateCommand Sources/VocelloCLI/GenerateCommand.swift:9— ClassTooLong — 896 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 496 over it, 2.24× 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: GenerationSemantics Sources/QwenVoiceCore/GenerationSemantics.swift:4— ClassTooLong — 876 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 476 over it, 2.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IOSStartupReliabilityRunner Sources/iOS/IOSStartupReliabilityRunner.swift:13— ClassTooLong — 755 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 355 over it, 1.89× 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: TTSEngineStore Sources/iOS/TTSEngineStore.swift:34— ClassTooLong — 743 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 400 significant lines; this is 343 over it, 1.86× 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: MacVoiceCloningScreen Sources/Views/Studio/MacVoiceCloningScreen.swift:27— ClassTooLong — 738 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 338 over it, 1.85× 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: NativeAudioPreparationService Sources/QwenVoiceCore/AudioPreparation.swift:201— ClassTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 250 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IOSVoiceCloningView Sources/iOS/IOSGenerationModeViews.swift:1447— ClassTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 239 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SharedModelComponentStore Sources/QwenVoiceCore/SharedModelComponentStore.swift:369— ClassTooLong — 636 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 236 over it, 1.59× 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: IOSVoiceDesignView Sources/iOS/IOSGenerationModeViews.swift:554— ClassTooLong — 631 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 231 over it, 1.58× 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: VocelloPresentationText Sources/SharedSupport/Services/VocelloPresentationText.swift:10— ClassTooLong — 603 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 203 over it, 1.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MacSavedVoiceSheet Sources/Views/Voices/MacSavedVoiceSheet.swift:14— ClassTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 114 over it, 1.29× 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: IOSLongFormProjectRunner Sources/iOS/Studio/IOSLongFormProject.swift:848— ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. 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: IOSHistoryLibrarySection Sources/iOS/History/HistoryScreen.swift:160— ClassTooLong — 476 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 76 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ModelDownloadDiagnosticsStore Sources/QwenVoiceCore/ModelDownloadDiagnosticsStore.swift:10— ClassTooLong — 452 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 52 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ModelsCommand Sources/VocelloCLI/ModelsCommand.swift:9— ClassTooLong — 451 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 51 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IOSModelInstallerViewModel Sources/iOS/IOSModelInstallerViewModel.swift:5— ClassTooLong — 428 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 28 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.
Duplicated block (6 lines × 2) Sources/Models/HistoryPresentation.swift:115— Sources/Models/HistoryPresentation.swift:115-124 | Sources/iOS/History/HistoryScreen.swift:152-157 — 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 `Sources/Models/HistoryPresentation.swift:115` 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 (6 lines × 2) Sources/QwenVoiceCore/ModelUpdateLedger.swift:332— Sources/QwenVoiceCore/ModelUpdateLedger.swift:332-337 | Sources/VocelloCLI/Core/Contract/CLIRequestLedger.swift:354-359 — 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 `Sources/QwenVoiceCore/ModelUpdateLedger.swift:332` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) Sources/QwenVoiceCore/NativeEngineRuntime.swift:789— Sources/QwenVoiceCore/NativeEngineRuntime.swift:789-794 | Sources/QwenVoiceCore/NativeEngineRuntime.swift:1118-1123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Sources/QwenVoiceCore/SpokenTextPlanning.swift:331— Sources/QwenVoiceCore/SpokenTextPlanning.swift:331-336 | Sources/QwenVoiceCore/SpokenTextPlanning.swift:337-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Sources/iOS/Sheets/IOSPlayerSheet.swift:901— Sources/iOS/Sheets/IOSPlayerSheet.swift:901-906 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:836-843 — 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) Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:1316— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/TTSModel.swift:182-187 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:1316-1321 — 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) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2355— Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2355-2360 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2390-2395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:774— Sources/QwenVoiceCore/PreparedVoiceRepository.swift:774-779 | Sources/SharedSupport/ViewModels/ReferenceClipRecordingStash.swift:84-89 — 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) Sources/Views/Primitives/MacVoicePrimitives.swift:85— Sources/Views/Primitives/MacVoicePrimitives.swift:85-90 | Sources/iOS/Overlays/IOSRecordingOverlay.swift:341-346 — 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) Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:234— Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:234-239 | Sources/QwenVoiceCore/ModelDownloadContracts.swift:224-229 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) Sources/ViewModels/GenerationPerformanceGateModel.swift:20— Sources/ViewModels/GenerationPerformanceGateModel.swift:20-25 | Sources/iOS/App/IOSGenerationPerformanceGateModel.swift:19-24 — 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) Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:23— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Generation.swift:19-24 | Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:23-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `minP` to `Float` in one and `Double` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:134— Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:134-139 | Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3436-3441 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) Sources/VocelloCLI/BenchCodecLoop.swift:264— Sources/VocelloCLI/BenchCodecLoop.swift:264-269 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:228-233 — before extracting anything, compare `Sources/VocelloCLI/BenchCodecLoop.swift` and `Sources/VocelloCLI/BenchCodecRoundTrip.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 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) Sources/QwenVoiceCore/AudioPreparation.swift:1174— Sources/QwenVoiceCore/AudioPreparation.swift:1174-1179 | Sources/QwenVoiceCore/DocumentIO.swift:223-228 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/QwenVoiceCore/AudioPreparation.swift:1174` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) scripts/check_ios_ui_perf.py:371— scripts/check_ios_ui_perf.py:371-380 | scripts/check_macos_ui_perf.py:450-455 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 `scripts/check_ios_ui_perf.py:371` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) scripts/ios_device_eligibility.py:91— scripts/ios_device_eligibility.py:91-96 | scripts/ios_storage_protection_policy.py:131-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) scripts/model_host_availability.py:346— scripts/model_host_availability.py:346-351 | scripts/verify_ios_release_artifacts.py:152-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) scripts/qc/features.py:521— scripts/qc/features.py:521-526 | scripts/qc/features.py:539-544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) scripts/qwen3_core_contract.py:1227— scripts/qwen3_core_contract.py:1227-1232 | scripts/qwen3_core_contract.py:1302-1307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/qwen3_core_contract.py:1226` calls `str`, `get`, `strip` and `scripts/qwen3_core_contract.py:1301` 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 (6 lines × 2) scripts/publish_benchmark_history.py:4936— scripts/publish_benchmark_history.py:4936-4941 | scripts/publish_benchmark_history.py:4957-4962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) scripts/auto_language_check.py:417— scripts/auto_language_check.py:417-422 | scripts/lib/jsonio.py:36-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `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) scripts/lib/trace_cpu.py:131— scripts/lib/trace_cpu.py:131-136 | scripts/lib/trace_intervals.py:288-293 — 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) scripts/ios_startup_reliability.py:164— scripts/ios_startup_reliability.py:164-169 | scripts/quality_promotion.py:321-326 — 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) scripts/check_ios_ui_perf.py:319— scripts/check_ios_ui_perf.py:319-324 | scripts/check_macos_ui_perf.py:397-402 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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.
No assertions: testACancelledWarmPrefetchReArmsIdleUnload Tests/VocelloCoreTests/ActiveGenerationCoordinatorTests.swift:836— 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: testNativeSignalWorker Tests/VocelloCoreTests/CLIExecutionTests.swift:116— 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: testReplacementWithDifferentAudioRejectsTheOldPrompt Tests/VocelloCoreTests/CloneArtifactPublicationTests.swift:37— 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: testReplacementWithSameAudioAndNewTranscriptRejectsTheOldPrompt Tests/VocelloCoreTests/CloneArtifactPublicationTests.swift:41— 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: testPopulatedV1UpgradesWithoutChangingRetainedHistory Tests/VocelloCoreTests/DatabaseServiceTests.swift:9— 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: testPopulatedV2UpgradesWithoutChangingRetainedHistory Tests/VocelloCoreTests/DatabaseServiceTests.swift:13— 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: testPopulatedV5UpgradesWithoutChangingLongFormHistory Tests/VocelloCoreTests/DatabaseServiceTests.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: testAMissingOutputsFolderIsNotAnError Tests/VocelloCoreTests/EngineStartupSweepTests.swift:70— 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: testDependencyInvalidationRemainsLocalToChangedPolicy Tests/VocelloCoreTests/GenerationPlanShadowMapperTests.swift:80— 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: testAnUnloadOrStopDuringASuspendedLoadSupersedesIt Tests/VocelloCoreTests/NativeEngineRuntimeSeamTests.swift:280— 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: testSnapshotUpdatesFireForTheStreamingEngine Tests/VocelloCoreTests/TTSEngineStoreTests.swift:758— 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: testACompletedWarmSurvivesATakeAndAnIdleUnload Tests/VocelloCoreTests/TTSEngineStoreTests.swift:973— 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: testNavigationWithoutAStudioIntentNeverWarms Tests/VocelloCoreTests/TTSEngineStoreTests.swift:1179— 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: testPolicyRefusesCloneGenerationAndEnrollmentWithoutRecordedConsent Tests/VocelloCoreTests/VoiceCloningConsentPolicyTests.swift:188— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, 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: testCLIRuntimeAdmitsCloneGenerationAndEnrollmentWithTheFlag Tests/VocelloCoreTests/VoiceCloningConsentPolicyTests.swift:472— 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: testTheCLIFirstChunkObserverEndsOnARefusedOrFailedStreamingTake Tests/VocelloCoreTests/VoiceCloningConsentPolicyTests.swift:494— 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: testCompiledPlanMatchesEagerPathWithoutProjection Packages/VocelloQwen3Core/Tests/Qwen3RuntimeTests/Qwen3CodePredictorCompiledTests.swift:253— 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: testCompiledPlanMatchesEagerPathWithProjection Packages/VocelloQwen3Core/Tests/Qwen3RuntimeTests/Qwen3CodePredictorCompiledTests.swift:257— 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: testFixedAndRandomizedPartitionsAreWaveformInvariant Packages/VocelloQwen3Core/Tests/Qwen3RuntimeTests/Qwen3DecoderPartitionTests.swift:112— 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: testResetIsolationRestoresDeterministicWaveform Packages/VocelloQwen3Core/Tests/Qwen3RuntimeTests/Qwen3DecoderPartitionTests.swift:163— 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: testTimingInstrumentationDoesNotChangeWaveform Packages/VocelloQwen3Core/Tests/Qwen3RuntimeTests/Qwen3DecoderPartitionTests.swift:174— 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: testDeferredMaterializationSurvivesAllocatorCacheClear Packages/VocelloQwen3Core/Tests/Qwen3RuntimeTests/Qwen3DecoderPartitionTests.swift:184— 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.
AC3 · Page structure· Page without a main landmark · ×20
Page without a main landmark design_references/Vocello Design System/preview/app-icon.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/brand-launch.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/brand-mark.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/color-brand.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/color-emotion.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/color-status.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/color-surfaces-dark.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/color-surfaces-light.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/components-buttons.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/components-card.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/components-chips.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/components-fields.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/components-sidebar-row.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/components-status.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/spacing-elevation.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/spacing-grid.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/spacing-radii.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/type-scale.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/type-specimens.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark design_references/Vocello Design System/preview/type-wordmark.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×18
Edited copy of a member (7 corresponding lines) Sources/iOS/TTSEngineStore.swift:1092— Sources/iOS/TTSEngineStore.swift:1092-1098 | Sources/iOS/TTSEngineStore.swift:1100-1106 — 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) Sources/iOS/Sheets/IOSPlayerSheet.swift:900— Sources/iOS/Sheets/IOSPlayerSheet.swift:900-906 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:835-843 — 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) Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:97— Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:97-103 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:933-941 — 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) Sources/iOS/IOSVoicesView.swift:261— Sources/iOS/IOSVoicesView.swift:261-269 | Sources/iOS/Sheets/IOSBottomSheets.swift:1370-1376 — 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) Sources/iOS/IOSGenerationModeViews.swift:31— Sources/iOS/IOSGenerationModeViews.swift:31-37 | Sources/iOS/Sheets/IOSBottomSheets.swift:1142-1148 — 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) Sources/Views/Studio/MacVoiceCloningScreen.swift:782— Sources/Views/Studio/MacVoiceCloningScreen.swift:782-788 | Sources/iOS/IOSGenerationModeViews.swift:2336-2342 — 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) Sources/iOSSupport/Services/IOSModelUpdateAutoStartPolicy.swift:24— Sources/iOSSupport/Services/IOSModelUpdateAutoStartPolicy.swift:24-34 | Sources/QwenVoiceCore/ModelUpdateDecisions.swift:49-55 — 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) Sources/Services/MacMetricKitReporter.swift:51— Sources/Services/MacMetricKitReporter.swift:51-58 | Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift:33-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) Sources/QwenVoiceCore/EmotionPreset.swift:140— Sources/QwenVoiceCore/EmotionPreset.swift:140-148 | Sources/QwenVoiceCore/GenerationSemantics.swift:534-540 — 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) Sources/Views/History/MacHistoryScreen.swift:951— Sources/Views/History/MacHistoryScreen.swift:951-957 | Sources/iOS/History/HistoryScreen.swift:502-508 — 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) Sources/QwenVoiceCore/AnyTTSEngineBackend.swift:360— Sources/QwenVoiceCore/AnyTTSEngineBackend.swift:360-366 | Sources/QwenVoiceCore/MLXTTSEngine.swift:2481-2491 — 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) scripts/build_cleanup.py:919— scripts/build_cleanup.py:919-925 | scripts/build_cleanup.py:994-1001 — 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) scripts/check_ios_ui_benchmark.py:98— scripts/check_ios_ui_benchmark.py:98-104 | scripts/check_macos_ui_bench.py:508-516 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) scripts/pcm_identity.py:74— scripts/pcm_identity.py:74-82 | scripts/quality_screen.py:485-491 — 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) scripts/qc/features.py:619— scripts/qc/features.py:619-625 | scripts/quality_screen.py:818-824 — 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) scripts/attribution_manifest.py:45— scripts/attribution_manifest.py:45-51 | scripts/localization_contract.py:203-209 — 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) scripts/check_language_hints.py:44— scripts/check_language_hints.py:44-50 | scripts/lib/rtf.py: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) scripts/qc/features.py:673— scripts/qc/features.py:673-679 | scripts/qc/language.py:200-208 — 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.
Duplicated block (7 lines × 2) Sources/Views/Studio/MacCustomVoiceScreen.swift:315— Sources/Views/Studio/MacCustomVoiceScreen.swift:315-321 | Sources/Views/Studio/MacVoiceDesignScreen.swift:370-376 — 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 `Sources/Views/Studio/MacCustomVoiceScreen.swift:315` 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) Sources/VocelloCLI/BenchCodecLoop.swift:152— Sources/VocelloCLI/BenchCodecLoop.swift:152-158 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:143-149 — before extracting anything, compare `Sources/VocelloCLI/BenchCodecLoop.swift` and `Sources/VocelloCLI/BenchCodecRoundTrip.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 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 (7 lines × 2) Sources/iOS/IOSStudioCanvas.swift:528— Sources/iOS/IOSStudioCanvas.swift:528-534 | Sources/iOS/Overlays/IOSRecordingOverlay.swift:118-125 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSStudioCanvas.swift:528` 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. 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) Sources/iOS/Settings/OpenSourceLicensesScreen.swift:153— Sources/iOS/Settings/OpenSourceLicensesScreen.swift:153-159 | Sources/iOS/Settings/OpenSourceLicensesScreen.swift:230-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/Settings/OpenSourceLicensesScreen.swift:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/iOS/Sheets/IOSPlayerSheet.swift:892— Sources/iOS/Sheets/IOSPlayerSheet.swift:892-898 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:827-833 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) Sources/QwenVoiceCore/MLXTTSEngine.swift:674— Sources/QwenVoiceCore/MLXTTSEngine.swift:674-680 | Sources/QwenVoiceCore/MLXTTSEngine.swift:707-713 — 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 `Sources/QwenVoiceCore/MLXTTSEngine.swift:674` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/Services/UIPerfFrameProbe.swift:323— Sources/Services/UIPerfFrameProbe.swift:323-329 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:310-316 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (7 lines × 2) Sources/SharedSupport/Theme/VocelloThemeTokens.swift:29— Sources/SharedSupport/Theme/VocelloThemeTokens.swift:29-35 | Sources/iOS/Theme/Theme.swift:51-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) Sources/ViewModels/MacAppModel.swift:69— Sources/ViewModels/MacAppModel.swift:69-75 | Sources/iOS/App/AppModel.swift:200-206 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) Sources/QwenVoiceCore/ActiveGenerationCoordinator.swift:127— Sources/QwenVoiceCore/ActiveGenerationCoordinator.swift:127-133 | Sources/QwenVoiceCore/MLXTTSEngine.swift:470-476 — 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) Sources/Views/Settings/MacSettingsRows.swift:211— Sources/Views/Settings/MacSettingsRows.swift:211-217 | Sources/iOS/IOSSettingsViews.swift:282-288 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) scripts/check_ios_ui_perf.py:596— scripts/check_ios_ui_perf.py:596-602 | scripts/check_macos_ui_perf.py:729-735 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 (7 lines × 2) scripts/publish_benchmark_history.py:4893— scripts/publish_benchmark_history.py:4893-4899 | scripts/publish_benchmark_history.py:4950-4956 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) scripts/quality_screen.py:667— scripts/quality_screen.py:667-673 | scripts/quality_screen.py:714-720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/quality_screen.py:721` calls `get` and `scripts/quality_screen.py:674` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) scripts/hooks/agent_guard.py:116— scripts/hooks/agent_guard.py:116-122 | scripts/hooks/agent_guard.py:204-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) scripts/build_cleanup.py:919— scripts/build_cleanup.py:919-925 | scripts/build_cleanup.py:995-1001 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) scripts/check_ios_ui_benchmark.py:81— scripts/check_ios_ui_benchmark.py:81-87 | scripts/check_macos_ui_bench.py:491-497 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) scripts/check_ios_ui_benchmark.py:610— scripts/check_ios_ui_benchmark.py:610-616 | scripts/check_macos_ui_bench.py:152-158 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also 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) Sources/Services/UIPerfHistorySeeder.swift:65— Sources/Services/UIPerfHistorySeeder.swift:65-73 | Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift:69-77 — before extracting anything, compare `Sources/Services/UIPerfHistorySeeder.swift` and `Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/UIPerfHistorySeeder.swift:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/VocelloCLI/BenchCodecLoop.swift:161— Sources/VocelloCLI/BenchCodecLoop.swift:161-169 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:151-159 — before extracting anything, compare `Sources/VocelloCLI/BenchCodecLoop.swift` and `Sources/VocelloCLI/BenchCodecRoundTrip.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 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 `Sources/VocelloCLI/BenchCodecLoop.swift:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/iOS/IOSGenerationInputControls.swift:641— Sources/iOS/IOSGenerationInputControls.swift:641-649 | Sources/iOS/Sheets/IOSBottomSheets.swift:1338-1346 — 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 `Sources/iOS/IOSGenerationInputControls.swift:641` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/iOS/IOSGenerationModeViews.swift:206— Sources/iOS/IOSGenerationModeViews.swift:206-214 | Sources/iOS/IOSGenerationModeViews.swift:741-749 — 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 `Sources/iOS/IOSGenerationModeViews.swift:206` 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 (9 lines × 2) Sources/iOS/IOSStudioCanvas.swift:404— Sources/iOS/IOSStudioCanvas.swift:404-412 | Sources/iOS/IOSStudioCanvas.swift:452-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSStudioCanvas.swift:404` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `8` 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.
Duplicated block (9 lines × 2) Sources/iOS/IOSStudioCanvas.swift:430— Sources/iOS/IOSStudioCanvas.swift:430-438 | Sources/iOS/IOSStudioCanvas.swift:542-550 — 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 `Sources/iOS/IOSStudioCanvas.swift:430` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/iOS/Sheets/IOSBottomSheets.swift:626— Sources/iOS/Sheets/IOSBottomSheets.swift:626-634 | Sources/iOS/Sheets/IOSBottomSheets.swift:927-935 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) Sources/iOS/Sheets/IOSBottomSheets.swift:686— Sources/iOS/Sheets/IOSBottomSheets.swift:686-694 | Sources/iOS/Sheets/IOSBottomSheets.swift:1018-1026 — 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 `Sources/iOS/Sheets/IOSBottomSheets.swift:686` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/Sheets/IOSBottomSheets.swift:695` calls `contentShape`, `Rectangle` and `Sources/iOS/Sheets/IOSBottomSheets.swift:1027` 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 (9 lines × 2) Sources/iOSSupport/Services/DatabaseService.swift:223— Sources/iOSSupport/Services/DatabaseService.swift:223-231 | Sources/iOSSupport/Services/DatabaseService.swift:248-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOSSupport/Services/DatabaseService.swift:223` 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 (9 lines × 2) Sources/Services/UIPerfFrameProbe.swift:313— Sources/Services/UIPerfFrameProbe.swift:313-321 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:300-308 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (9 lines × 2) Sources/Views/Theme/MacGlass.swift:84— Sources/Views/Theme/MacGlass.swift:84-92 | Sources/iOS/IOSShellPrimitives.swift:83-96 — 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 (9 lines × 2) scripts/check_ios_ui_benchmark.py:182— scripts/check_ios_ui_benchmark.py:182-190 | scripts/check_macos_ui_bench.py:581-589 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) scripts/check_ios_ui_benchmark.py:214— scripts/check_ios_ui_benchmark.py:214-222 | scripts/check_macos_ui_bench.py:613-621 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) scripts/check_ios_ui_benchmark.py:665— scripts/check_ios_ui_benchmark.py:665-673 | scripts/check_macos_ui_bench.py:1484-1494 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 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 `scripts/check_macos_ui_bench.py:1484` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) scripts/summarize_generation_telemetry.py:495— scripts/summarize_generation_telemetry.py:495-503 | scripts/summarize_generation_telemetry.py:883-891 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) scripts/required_step_ledger.py:366— scripts/required_step_ledger.py:366-374 | scripts/required_step_ledger.py:424-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) scripts/check_ios_ui_benchmark.py:286— scripts/check_ios_ui_benchmark.py:286-294 | scripts/check_macos_ui_bench.py:831-839 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) Sources/QwenVoiceCore/NativeEngineRuntime.swift:1783— Sources/QwenVoiceCore/NativeEngineRuntime.swift:1783-1787 | Sources/QwenVoiceCore/NativeEngineRuntime.swift:2201-2205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:46— Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:46-56 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:270-274 — 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 `Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:57` calls `disabled`, `opacity` and `Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:275` 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) Sources/QwenVoiceCore/IOSStartupReliabilityPlan.swift:141— Sources/QwenVoiceCore/IOSStartupReliabilityPlan.swift:141-145 | Sources/QwenVoiceCore/ProductionModelCatalog.swift:555-559 — 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) Sources/Services/UIPerfFrameProbe.swift:70— Sources/Services/UIPerfFrameProbe.swift:70-74 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:77-81 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (5 lines × 2) Sources/Views/Primitives/MacVoicePrimitives.swift:92— Sources/Views/Primitives/MacVoicePrimitives.swift:92-96 | Sources/iOS/Overlays/IOSRecordingOverlay.swift:349-353 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:47— Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:47-51 | Sources/QwenVoiceCore/ModelAssets.swift: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) Sources/QwenVoiceCore/AudioPublicationMarking.swift:157— Sources/QwenVoiceCore/AudioPublicationMarking.swift:157-161 | Sources/QwenVoiceCore/WAVProvenanceChunk.swift:70-74 — 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, `Sources/QwenVoiceCore/WAVProvenanceChunk.swift:69` calls `seek` and `Sources/QwenVoiceCore/AudioPublicationMarking.swift:156` 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) Sources/Services/MacEngineBootstrap.swift:74— Sources/Services/MacEngineBootstrap.swift:74-78 | Sources/iOS/IOSAppBootstrap.swift:106-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) scripts/auto_language_check.py:473— scripts/auto_language_check.py:473-477 | scripts/publish_benchmark_history.py:1005-1009 — 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) scripts/qwen3_core_contract.py:1327— scripts/qwen3_core_contract.py:1327-1331 | scripts/qwen3_core_contract.py:1344-1349 — 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 `scripts/qwen3_core_contract.py:1327` 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 (5 lines × 2) scripts/build_hybrid_model.py:60— scripts/build_hybrid_model.py:60-64 | scripts/qc/models.py:260-264 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) scripts/build_output_policy.py:657— scripts/build_output_policy.py:657-661 | scripts/lib/build_artifact_retention.py:46-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) scripts/check_ios_ui_perf.py:210— scripts/check_ios_ui_perf.py:210-214 | scripts/check_macos_ui_perf.py:187-191 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also 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) scripts/qc/acoustics.py:95— scripts/qc/acoustics.py:95-99 | scripts/qc/candidates.py:162-166 — 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) scripts/qc/features.py:106— scripts/qc/features.py:106-110 | scripts/qc/runners/_kit.py:226-230 — 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 `scripts/qc/features.py:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/qc/runners/_kit.py:225` calls `frombuffer`, `astype` and `scripts/qc/features.py:105` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) scripts/qc/features.py:120— scripts/qc/features.py:120-124 | scripts/qc/pitch.py:190-194 — 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 (5 lines × 2) scripts/summarize_generation_telemetry.py:2319— scripts/summarize_generation_telemetry.py:2319-2323 | scripts/summarize_generation_telemetry.py:2360-2364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×16
Edited copy of a member (4 corresponding lines) Sources/QwenVoiceCore/NativeTelemetryMetadata.swift:95— Sources/QwenVoiceCore/NativeTelemetryMetadata.swift:95-98 | Sources/QwenVoiceCore/NativeTelemetryMetadata.swift:180-184 — 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) Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:212— Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:212-217 | Sources/QwenVoiceCore/ProductionModelCatalog.swift:544-547 — 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) Sources/QwenVoiceCore/LongFormPlanning.swift:638— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSPromptAssembly.swift:535-542 | Sources/QwenVoiceCore/LongFormPlanning.swift:638-641 — 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) Sources/Views/Voices/MacRecordVoiceSheet.swift:89— Sources/Views/Voices/MacRecordVoiceSheet.swift:89-92 | Sources/iOS/Overlays/IOSRecordingOverlay.swift:225-228 — 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) Sources/QwenVoiceCore/AnyTTSEngineBackend.swift:345— Sources/QwenVoiceCore/AnyTTSEngineBackend.swift:345-348 | Sources/VocelloCLI/CLIRuntime.swift:188-191 — 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) Sources/Services/MacLineBatchRequest.swift:108— Sources/Services/MacLineBatchRequest.swift:108-111 | Sources/iOS/Studio/IOSLongFormProject.swift:256-259 — 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) Sources/Views/Studio/MacVoiceCloningScreen.swift:70— Sources/Views/Studio/MacVoiceCloningScreen.swift:70-73 | Sources/iOS/IOSGenerationModeViews.swift:1527-1530 — 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) Sources/iOS/IOSGenerationModeViews.swift:1977— Sources/iOS/IOSGenerationModeViews.swift:1977-1980 | Sources/iOS/IOSVoicesView.swift:236-239 — 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) Sources/QwenVoiceCore/IOSMemorySnapshot.swift:462— Sources/QwenVoiceCore/IOSMemorySnapshot.swift:462-465 | Sources/QwenVoiceCore/NativeTelemetrySampler.swift:1155-1158 — 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) Sources/QwenVoiceCore/IOSMemorySnapshot.swift:323— Sources/QwenVoiceCore/IOSMemorySnapshot.swift:323-326 | Sources/iOSSupport/Services/IOSDeviceDiagnosticsRecorder.swift:321-324 — 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) scripts/lib/playback_capture.py:130— scripts/lib/playback_capture.py:130-134 | scripts/lib/playback_capture.py:138-141 — 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) scripts/benchmark_memory.py:456— scripts/benchmark_memory.py:456-459 | scripts/lib/rtf.py:62-65 — 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) scripts/check_ios_ui_benchmark.py:91— scripts/check_ios_ui_benchmark.py:91-94 | scripts/check_macos_ui_bench.py:501-504 — 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) scripts/build_output_policy.py:1546— scripts/build_output_policy.py:1546-1558 | scripts/quality_promotion.py:307-310 — 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) scripts/localization_contract.py:411— scripts/localization_contract.py:411-418 | scripts/quality_screen.py:97-100 — 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) scripts/language_bench_evidence.py:506— scripts/language_bench_evidence.py:506-509 | scripts/lib/audio_qc.py:73-76 — 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.
TooManyMethods: MLXTTSEngine Sources/QwenVoiceCore/MLXTTSEngine.swift:106— TooManyMethods — 112 methods. The bar is 30 methods; this is 82 over it, 3.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ModelManagerViewModel Sources/ViewModels/ModelManagerViewModel.swift:7— TooManyMethods — 89 methods. The bar is 30 methods; this is 59 over it, 2.97× 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: AudioPlayerViewModel Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:10— TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× 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: HuggingFaceDownloader Sources/QwenVoiceCore/HuggingFaceDownloader.swift:19— TooManyMethods — 78 methods. The bar is 30 methods; this is 48 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TTSEngineStore Sources/iOS/TTSEngineStore.swift:34— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.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: NativeEngineRuntime Sources/QwenVoiceCore/NativeEngineRuntime.swift:399— 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: IOSModelDownloadCoordinator Sources/iOS/IOSModelDownloadCoordinator.swift:27— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MLXModelLoadCoordinator Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:34— TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NativePreparedCloneConditioningCache Sources/QwenVoiceCore/NativeCloneSupport.swift:200— TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: AnyTTSEngineBackend Sources/QwenVoiceCore/AnyTTSEngineBackend.swift:15— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DownloadStateRegistry Sources/QwenVoiceCore/HuggingFaceDownloader.swift:442— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: VocelloPresentationText Sources/SharedSupport/Services/VocelloPresentationText.swift:10— TooManyMethods — 37 methods, declared across 2 files: Services/VocelloPresentationText.swift (35), Commerce/IOSCommercePresentationText.swift (2). The bar is 30 methods; this is 7 over it, 1.23× 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: PreparedVoiceRepository Sources/QwenVoiceCore/PreparedVoiceRepository.swift:79— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SharedModelComponentStore Sources/QwenVoiceCore/SharedModelComponentStore.swift:369— 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: LongFormHistoryAcceptanceStore Sources/SharedSupport/Database/LongFormHistoryAcceptance.swift:79— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×15
Edited copy of a member (9 corresponding lines) Sources/QwenVoiceCore/AudioPreparation.swift:1171— Sources/QwenVoiceCore/AudioPreparation.swift:1171-1179 | Sources/QwenVoiceCore/DocumentIO.swift:219-228 — 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) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:729— Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:729-737 | Sources/VocelloCLI/Core/Contract/CLIEventStream.swift:109-118 — 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) Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:165— Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:165-173 | Sources/QwenVoiceCore/CodecRoundTripEvidence.swift:106-114 — 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) Sources/ViewModels/ModelManagerViewModel.swift:511— Sources/ViewModels/ModelManagerViewModel.swift:511-519 | Sources/Views/Settings/MacModelRow.swift:265-273 — 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) Sources/QwenVoiceCore/NativeTelemetrySampler.swift:18— Sources/QwenVoiceCore/NativeTelemetrySampler.swift:18-26 | Sources/iOS/TTSEngineStore.swift:178-186 — 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) Sources/iOS/App/AppModel.swift:310— Sources/iOS/App/AppModel.swift:310-318 | Sources/iOS/App/AppModel.swift:326-334 — 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) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1839— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1839-1847 | Sources/iOS/IOSStartupReliabilityRunner.swift:799-807 — 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) Sources/QwenVoiceCore/ModelDownloadContracts.swift:344— Sources/QwenVoiceCore/ModelDownloadContracts.swift:344-352 | Sources/QwenVoiceCore/ModelDownloadContracts.swift:354-366 — 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) Sources/Views/History/MacHistoryScreen.swift:905— Sources/Views/History/MacHistoryScreen.swift:905-914 | Sources/iOS/History/HistoryScreen.swift:652-660 — 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) Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:838— Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:838-846 | Sources/QwenVoiceCore/NativeEngineRuntime.swift:2012-2020 — 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) Sources/Views/History/MacHistoryScreen.swift:919— Sources/Views/History/MacHistoryScreen.swift:919-927 | Sources/iOS/History/HistoryScreen.swift:489-497 — 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) Sources/Views/Voices/MacSavedVoiceSheet.swift:151— Sources/Views/Voices/MacSavedVoiceSheet.swift:151-159 | Sources/iOS/IOSGenerationInputControls.swift:388-396 — 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) scripts/benchmark_history.py:4199— scripts/benchmark_history.py:4199-4207 | scripts/privacy_scan.py:72-81 — 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) scripts/qc.py:319— scripts/qc.py:319-327 | scripts/qc.py:331-340 — 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) scripts/audio_qc_calibration_takes.py:258— scripts/audio_qc_calibration_takes.py:258-266 | scripts/language_bench_evidence.py:149-160 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) Sources/QwenVoiceCore/MLXTTSEngine.swift:1730— Sources/QwenVoiceCore/MLXTTSEngine.swift:1730-1744 | Sources/QwenVoiceCore/MLXTTSEngine.swift:1760-1774 — 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 `Sources/QwenVoiceCore/MLXTTSEngine.swift:1730` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/QwenVoiceCore/SharedModelComponentStore.swift:626— Sources/QwenVoiceCore/SharedModelComponentStore.swift:626-640 | Sources/QwenVoiceCore/SharedModelComponentStore.swift:1158-1172 — 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 `Sources/QwenVoiceCore/SharedModelComponentStore.swift:626` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/VocelloCLI/BenchCodecLoop.swift:118— Sources/VocelloCLI/BenchCodecLoop.swift:118-132 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:114-128 — before extracting anything, compare `Sources/VocelloCLI/BenchCodecLoop.swift` and `Sources/VocelloCLI/BenchCodecRoundTrip.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 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 `Sources/VocelloCLI/BenchCodecLoop.swift:118` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/VocelloCLI/BenchCodecLoop.swift:134` calls `CLIError` and `Sources/VocelloCLI/BenchCodecRoundTrip.swift:130` 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 (15 lines × 2) Sources/VocelloCLI/BenchCodecLoop.swift:234— Sources/VocelloCLI/BenchCodecLoop.swift:234-248 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:210-224 — before extracting anything, compare `Sources/VocelloCLI/BenchCodecLoop.swift` and `Sources/VocelloCLI/BenchCodecRoundTrip.swift` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 87 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 `Sources/VocelloCLI/BenchCodecLoop.swift:234` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/VocelloCLI/BenchCodecReplay.swift:159— Sources/VocelloCLI/BenchCodecReplay.swift:159-173 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:127-141 — 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 `Sources/VocelloCLI/BenchCodecReplay.swift:159` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/iOS/IOSGenerationModeViews.swift:472— Sources/iOS/IOSGenerationModeViews.swift:472-486 | Sources/iOS/IOSGenerationModeViews.swift:2165-2179 — 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 `Sources/iOS/IOSGenerationModeViews.swift:472` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15 lines × 2) Sources/iOS/IOSShellPrimitives.swift:228— Sources/iOS/IOSShellPrimitives.swift:228-242 | Sources/iOS/IOSShellPrimitives.swift:288-302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) Sources/iOS/TTSEngineStore.swift:211— Sources/iOS/TTSEngineStore.swift:211-225 | Sources/iOS/TTSEngineStore.swift:803-817 — 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 `Sources/iOS/TTSEngineStore.swift:211` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/Views/Shell/MacInlinePlayerCard.swift:49— Sources/Views/Shell/MacInlinePlayerCard.swift:49-63 | Sources/Views/Studio/MacStudioPlayerCard.swift:90-104 — 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 `Sources/Views/Shell/MacInlinePlayerCard.swift:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/Services/AppPerformanceSignposts.swift:18— Sources/Services/AppPerformanceSignposts.swift:18-32 | Sources/iOSSupport/Services/AppPerformanceSignposts.swift:18-32 — 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 (15 lines × 2) Sources/Views/Theme/MacGlass.swift:99— Sources/Views/Theme/MacGlass.swift:99-113 | Sources/iOS/Theme/ThemeModifiers.swift:63-77 — 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 (15 lines × 2) scripts/bench_delivery_prosody.py:168— scripts/bench_delivery_prosody.py:168-182 | scripts/bench_delivery_prosody.py:220-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) scripts/check_ios_ui_perf.py:154— scripts/check_ios_ui_perf.py:154-168 | scripts/check_macos_ui_perf.py:165-179 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 `scripts/check_ios_ui_perf.py:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) scripts/check_ios_ui_perf.py:340— scripts/check_ios_ui_perf.py:340-354 | scripts/check_macos_ui_perf.py:479-493 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `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 first that the copies are not typed on the same thing: the declarations holding them bind `thresholds` to `dict | None` in one and `dict` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×13
Edited copy of a member (11 corresponding lines) Sources/QwenVoiceCore/SemanticTypes.swift:875— Packages/VocelloQwen3Core/Sources/MLXAudioCore/Generation/GenerationTypes.swift:93-103 | Sources/QwenVoiceCore/SemanticTypes.swift:875-892 — 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) Sources/QwenVoiceCore/ProductionModelCatalog.swift:129— Sources/QwenVoiceCore/ProductionModelCatalog.swift:129-149 | Sources/SharedSupport/Database/GenerationHistoryOutbox.swift:74-84 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) Sources/QwenVoiceCore/MLXTTSEngine.swift:2780— Sources/QwenVoiceCore/MLXTTSEngine.swift:2780-2793 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2564-2574 — 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) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:1530— Sources/QwenVoiceCore/HuggingFaceDownloader.swift:1530-1543 | Sources/QwenVoiceCore/ModelAssets.swift:493-503 — 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) Sources/Models/TTSContract.swift:292— Sources/Models/TTSContract.swift:292-306 | Sources/iOSSupport/Models/TTSContract.swift: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) Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:207— Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:207-218 | Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:441-451 — 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) Sources/iOSSupport/Services/DatabaseService.swift:358— Sources/iOSSupport/Services/DatabaseService.swift:358-368 | Sources/iOSSupport/Services/DatabaseService.swift:472-482 — 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) Sources/QwenVoiceCore/ToolchainNeutralUnsafeAccess.swift:37— Sources/QwenVoiceCore/ToolchainNeutralUnsafeAccess.swift:37-47 | Sources/QwenVoiceCore/ToolchainNeutralUnsafeAccess.swift:50-60 — 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) Sources/iOSSupport/Services/IOSAudioSessionPolicy.swift:150— Sources/iOSSupport/Services/IOSAudioSessionPolicy.swift:150-160 | Sources/iOSSupport/Services/IOSAudioSessionPolicy.swift:167-180 — 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) Sources/QwenVoiceCore/Qwen3TTSRuntimeProfile.swift:253— Sources/QwenVoiceCore/Qwen3TTSRuntimeProfile.swift:253-263 | Sources/QwenVoiceCore/Qwen3TTSRuntimeProfile.swift:265-275 — 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) Sources/iOSSupport/Services/DatabaseService.swift:183— Sources/iOSSupport/Services/DatabaseService.swift:183-194 | Sources/iOSSupport/Services/DatabaseService.swift:200-210 — 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) Sources/Views/History/MacHistoryScreen.swift:687— Sources/Views/History/MacHistoryScreen.swift:687-697 | Sources/iOS/History/HistoryScreen.swift:572-582 — 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) scripts/ci/coverage_report.py:72— scripts/ci/coverage_report.py:72-82 | scripts/ci/summarize_test_failures.py:76-90 — 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.
Low cohesion: AnyTTSEngineBackend (LCOM4 13) Sources/QwenVoiceCore/AnyTTSEngineBackend.swift:15— AnyTTSEngineBackend's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AppModel (LCOM4 10) Sources/iOS/App/AppModel.swift:58— AppModel's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: IOSLongFormProductionServices (LCOM4 6) Sources/SharedSupport/Services/IOSLongFormProductionServices.swift:10— IOSLongFormProductionServices's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: IOSStudioLongFormPlatformHooks (LCOM4 6) Sources/iOS/Studio/IOSStudioLongFormPlatformHooks.swift:8— IOSStudioLongFormPlatformHooks's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MLXTTSEngine (LCOM4 5) Sources/QwenVoiceCore/MLXTTSEngine.swift:106— MLXTTSEngine's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: String (LCOM4 5) Sources/QwenVoiceCore/GenerationSemantics.swift:1345— String's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ModelManagerViewModel (LCOM4 5) Sources/ViewModels/ModelManagerViewModel.swift:7— ModelManagerViewModel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: HeadlessLongFormServices (LCOM4 5) Sources/VocelloDesktopCore/DesktopLongFormProject.swift:313— HeadlessLongFormServices's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: MacStudioLongFormPlatformHooks (LCOM4 4) Sources/Services/MacStudioLongFormPlatformHooks.swift:9— MacStudioLongFormPlatformHooks's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CLIProcessSupervisor (LCOM4 4) Sources/VocelloCLI/CLIProcessSupervisor.swift:9— CLIProcessSupervisor's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: IOSBackgroundGenerationController (LCOM4 4) Sources/iOS/IOSBackgroundGenerationController.swift:10— IOSBackgroundGenerationController's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: IOSStoreKitClient (LCOM4 4) Sources/iOS/Commerce/IOSStoreKitClient.swift:9— IOSStoreKitClient's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×11
Edited copy of a member (13 corresponding lines) Sources/QwenVoiceCore/GenerationSemantics.swift:7— Sources/QwenVoiceCore/GenerationSemantics.swift:7-19 | Sources/VocelloCLI/Core/Generation/CLILongFormProject.swift:138-154 — 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.
Edited copy of a member (13 corresponding lines) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:773— Sources/QwenVoiceCore/PreparedVoiceRepository.swift:773-785 | Sources/SharedSupport/ViewModels/ReferenceClipRecordingStash.swift:83-98 — 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.
Edited copy of a member (13 corresponding lines) Sources/Views/Studio/MacVoiceCloningScreen.swift:768— Sources/Views/Studio/MacVoiceCloningScreen.swift:768-780 | Sources/iOS/IOSGenerationModeViews.swift:2297-2310 — 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.
Edited copy of a member (13 corresponding lines) Sources/QwenVoiceCore/LongFormPlanning.swift:648— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSPromptAssembly.swift:40-52 | Sources/QwenVoiceCore/LongFormPlanning.swift:648-660 — 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.
Edited copy of a member (13 corresponding lines) Sources/iOS/IOSGenerationSetupCards.swift:15— Sources/iOS/IOSGenerationSetupCards.swift:15-27 | Sources/iOS/IOSGenerationSetupCards.swift:43-55 — 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.
Edited copy of a member (13 corresponding lines) Sources/QwenVoiceCore/NativeCloneSupport.swift:626— Sources/QwenVoiceCore/NativeCloneSupport.swift:626-638 | Sources/QwenVoiceCore/NativeCloneSupport.swift:785-800 — 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.
Edited copy of a member (13 corresponding lines) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:314— Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:314-326 | Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Bridge.swift:204-216 — 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.
Edited copy of a member (13 corresponding lines) Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:112— Packages/VocelloQwen3Core/Sources/VocelloQwen3Core/Contracts.swift:300-312 | Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:112-124 — 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.
Edited copy of a member (13 corresponding lines) Sources/Views/Theme/MacGlass.swift:59— Sources/Views/Theme/MacGlass.swift:59-71 | Sources/iOS/Theme/ThemeModifiers.swift:24-39 — 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.
Edited copy of a member (13 corresponding lines) scripts/entitlement_contract.py:90— scripts/entitlement_contract.py:90-102 | scripts/swift_dependency_updates.py:105-120 — 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.
Edited copy of a member (13 corresponding lines) scripts/build_cleanup.py:277— scripts/build_cleanup.py:277-289 | scripts/build_cleanup.py:801-814 — 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 copy of a member (10 corresponding lines) · ×10
Edited copy of a member (10 corresponding lines) Sources/Models/HistoryPresentation.swift:111— Sources/Models/HistoryPresentation.swift:111-124 | Sources/iOS/History/HistoryScreen.swift:148-157 — 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) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:673— Sources/QwenVoiceCore/PreparedVoiceRepository.swift:673-682 | Sources/QwenVoiceCore/PreparedVoiceRepository.swift:832-845 — 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) Sources/QwenVoiceApp.swift:269— Sources/QwenVoiceApp.swift:269-280 | Sources/iOS/QVoiceiOSApp.swift:523-532 — 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) Sources/Services/UIPerfFrameProbe.swift:302— Sources/Services/UIPerfFrameProbe.swift:302-311 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:287-298 — 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) Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:344— Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:344-354 | Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:356-365 — 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) Sources/QwenVoiceCore/SharedModelComponentStore.swift:1746— Sources/QwenVoiceCore/SharedModelComponentStore.swift:1746-1758 | Sources/QwenVoiceCore/SharedModelComponentStore.swift:1760-1769 — 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) Sources/iOS/IOSModelDownloadCoordinator.swift:1068— Sources/iOS/IOSModelDownloadCoordinator.swift:1068-1078 | Sources/iOS/IOSModelDownloadCoordinator.swift:1352-1361 — 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) Sources/Views/Studio/MacCustomVoiceScreen.swift:112— Sources/Views/Studio/MacCustomVoiceScreen.swift:112-121 | Sources/Views/Studio/MacVoiceDesignScreen.swift:69-78 — 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) Sources/iOS/Settings/SettingsScreen.swift:556— Sources/iOS/Settings/SettingsScreen.swift:556-565 | Sources/iOS/Settings/VoiceModelsScreen.swift:35-44 — 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) scripts/auto_language_check.py:473— scripts/auto_language_check.py:473-482 | scripts/publish_benchmark_history.py:1004-1014 — 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 (12 corresponding lines) · ×10
Edited copy of a member (12 corresponding lines) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:159— Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:159-171 | Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1686-1697 — 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) Sources/VocelloCLI/Core/Contract/CLIEnvelope.swift:64— Packages/VocelloQwen3Core/Sources/VocelloQwen3Core/Contracts.swift:460-471 | Sources/VocelloCLI/Core/Contract/CLIEnvelope.swift:64-78 — 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) Sources/QwenVoiceCore/SemanticTypes.swift:1055— Sources/QwenVoiceCore/SemanticTypes.swift:1055-1074 | Sources/Services/MacInterfaceText.swift:2349-2360 — 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) Sources/QwenVoiceCore/LongFormPlanning.swift:999— Sources/QwenVoiceCore/LongFormPlanning.swift:999-1010 | Sources/QwenVoiceCore/LongFormPlanning.swift:1012-1026 — 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) Sources/QwenVoiceCore/NativeMemoryPolicyResolver.swift:218— Sources/QwenVoiceCore/NativeMemoryPolicyResolver.swift:218-231 | Sources/QwenVoiceCore/NativeMemoryPolicyResolver.swift:365-376 — 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) Sources/Views/Studio/MacStudioCanvas.swift:599— Sources/Views/Studio/MacStudioCanvas.swift:599-611 | Sources/SharedSupport/Views/VocelloSetupChipPill.swift:93-104 — 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) Sources/Views/Studio/MacVoiceCloningScreen.swift:148— Sources/Views/Studio/MacVoiceCloningScreen.swift:148-159 | Sources/iOS/IOSGenerationModeViews.swift:1620-1631 — 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) scripts/lib/audio_qc_observations.py:261— scripts/lib/audio_qc_observations.py:261-274 | scripts/qc/features.py:486-497 — 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) scripts/qc/phones.py:574— scripts/qc/phones.py:574-585 | scripts/qc/phones.py:589-601 — 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) scripts/qc.py:284— scripts/qc.py:284-295 | scripts/qc.py:344-355 — 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 (12 lines × 2) Sources/Models/TTSContract.swift:308— Sources/Models/TTSContract.swift:308-319 | Sources/QwenVoiceCore/ContractBackedModelRegistry.swift:384-395 — 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 (12 lines × 2) Sources/QwenVoiceCore/ProductionModelCatalog.swift:187— Sources/QwenVoiceCore/ProductionModelCatalog.swift:187-198 | Sources/QwenVoiceCore/ProductionModelCatalog.swift:242-253 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) Sources/Services/UIPerfFrameProbe.swift:331— Sources/Services/UIPerfFrameProbe.swift:331-342 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:318-329 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (12 lines × 2) Sources/Views/Shell/MacInlinePlayerCard.swift:78— Sources/Views/Shell/MacInlinePlayerCard.swift:78-89 | Sources/Views/Studio/MacStudioPlayerCard.swift:156-167 — 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 `Sources/Views/Shell/MacInlinePlayerCard.swift:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/Views/Shell/MacInlinePlayerCard.swift:186— Sources/Views/Shell/MacInlinePlayerCard.swift:186-197 | Sources/Views/Studio/MacStudioPlayerCard.swift:323-334 — 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 `Sources/Views/Shell/MacInlinePlayerCard.swift:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/VocelloCLI/BenchCodecLoop.swift:70— Sources/VocelloCLI/BenchCodecLoop.swift:70-81 | Sources/VocelloCLI/BenchCodecReplay.swift:62-73 — 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 `Sources/VocelloCLI/BenchCodecLoop.swift:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/iOS/IOSGenerationModeViews.swift:413— Sources/iOS/IOSGenerationModeViews.swift:413-424 | Sources/iOS/IOSGenerationModeViews.swift:1305-1316 — 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 `Sources/iOS/IOSGenerationModeViews.swift:413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/iOS/Studio/IOSLongFormProject.swift:1001— Sources/iOS/Studio/IOSLongFormProject.swift:1001-1012 | Sources/iOS/Studio/IOSLongFormProject.swift:1270-1281 — 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 `Sources/iOS/Studio/IOSLongFormProject.swift:1001` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/SharedSupport/Database/GenerationMigrations.swift:9— Sources/SharedSupport/Database/GenerationMigrations.swift:9-20 | Sources/SharedSupport/Database/GenerationMigrations.swift:43-54 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) scripts/build_cleanup.py:396— scripts/build_cleanup.py:396-407 | scripts/build_cleanup.py:422-433 — 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 `scripts/build_cleanup.py:396` 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 (11 lines × 2) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1480— Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1480-1490 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1549-1559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) Sources/QwenVoiceCore/NativeEngineRuntime.swift:1046— Sources/QwenVoiceCore/NativeEngineRuntime.swift:1046-1056 | Sources/QwenVoiceCore/NativeEngineRuntime.swift:1092-1102 — 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 `Sources/QwenVoiceCore/NativeEngineRuntime.swift:1046` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Sources/Services/MacMetricKitReporter.swift:200— Sources/Services/MacMetricKitReporter.swift:200-210 | Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift:167-177 — before extracting anything, compare `Sources/Services/MacMetricKitReporter.swift` and `Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/MacMetricKitReporter.swift:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Sources/Services/UIPerfHistorySeeder.swift:25— Sources/Services/UIPerfHistorySeeder.swift:25-35 | Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift:29-39 — before extracting anything, compare `Sources/Services/UIPerfHistorySeeder.swift` and `Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 (11 lines × 2) Sources/iOS/App/RootView.swift:219— Sources/iOS/App/RootView.swift:219-229 | Sources/iOS/IOSVoicesView.swift:165-175 — 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 `Sources/iOS/App/RootView.swift:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:168— Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:168-178 | Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:218-228 — 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 `Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:168` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:689— Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:689-699 | Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:331-341 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) Sources/Services/UIPerfFrameProbe.swift:32— Sources/Services/UIPerfFrameProbe.swift:32-42 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:39-49 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (11 lines × 2) scripts/check_ios_model_management.py:139— scripts/check_ios_model_management.py:139-149 | scripts/check_ios_model_management.py:193-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) scripts/check_language_hints.py:178— scripts/check_language_hints.py:178-188 | scripts/check_language_output.py:432-442 — 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 (18 corresponding lines) · ×9
Edited copy of a member (18 corresponding lines) Sources/iOSSupport/Services/DatabaseService.swift:222— Sources/iOSSupport/Services/DatabaseService.swift:222-239 | Sources/iOSSupport/Services/DatabaseService.swift:247-270 — 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) Sources/iOS/IOSVoicesView.swift:241— Sources/iOS/IOSVoicesView.swift:241-259 | Sources/iOS/Sheets/IOSBottomSheets.swift:1351-1368 — 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) Sources/iOSSupport/Services/IOSModelDeliverySupport.swift:338— Sources/iOSSupport/Services/IOSModelDeliverySupport.swift:338-355 | Sources/iOSSupport/Services/IOSModelDeliverySupport.swift:357-379 — 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) Sources/iOSSupport/Services/IOSModelDownloadCancellationSequence.swift:52— Sources/iOSSupport/Services/IOSModelDownloadCancellationSequence.swift:52-69 | Sources/iOSSupport/Services/IOSModelDownloadCancellationSequence.swift:83-104 — 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) Sources/QwenVoiceCore/UnsafeSpeechGenerationModel.swift:239— Packages/VocelloQwen3Core/Sources/VocelloQwen3Core/LoadedModel.swift:515-535 | Sources/QwenVoiceCore/UnsafeSpeechGenerationModel.swift:239-256 — 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) Sources/Views/Studio/MacVoiceCloningScreen.swift:122— Sources/Views/Studio/MacVoiceCloningScreen.swift:122-139 | Sources/iOS/IOSGenerationModeViews.swift:1576-1593 — 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) Sources/Views/Studio/MacCustomVoiceScreen.swift:202— Sources/Views/Studio/MacCustomVoiceScreen.swift:202-222 | Sources/Views/Studio/MacVoiceDesignScreen.swift:267-284 — 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) Sources/QwenVoiceCore/ProductionModelCatalog.swift:312— Sources/QwenVoiceCore/ProductionModelCatalog.swift:312-333 | Sources/QwenVoiceCore/ProductionModelCatalog.swift:374-391 — 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) scripts/check_ios_ui_benchmark.py:70— scripts/check_ios_ui_benchmark.py:70-87 | scripts/check_macos_ui_bench.py:476-497 — 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 copy of a member (6 corresponding lines) · ×9
Edited copy of a member (6 corresponding lines) Sources/QwenVoiceCore/GenerationSemantics.swift:723— Sources/QwenVoiceCore/GenerationSemantics.swift:723-728 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1612-1617 — 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) Sources/QwenVoiceCore/IOSStartupReliabilityPlan.swift:123— Sources/QwenVoiceCore/IOSStartupReliabilityPlan.swift:123-130 | Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:462-467 — 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) Sources/QwenVoiceCore/GenerationStartupDiagnostics.swift:264— Sources/QwenVoiceCore/GenerationStartupDiagnostics.swift:264-269 | Sources/QwenVoiceCore/GenerationTerminalDiagnosticEvidence.swift:114-119 — 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) Sources/Services/MacMetricKitReporter.swift:236— Sources/Services/MacMetricKitReporter.swift:236-241 | Sources/iOSSupport/Services/IOSCrashObserver.swift:72-77 — 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) Sources/Services/MacStudioSingleTakeGenerationHooks.swift:72— Sources/Services/MacStudioSingleTakeGenerationHooks.swift:72-77 | Sources/iOS/Studio/IOSSingleTakeGenerationExecutionHooks.swift:96-105 — 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) Sources/ViewModels/ModelManagerViewModel.swift:567— Sources/ViewModels/ModelManagerViewModel.swift:567-574 | Sources/VocelloDesktopCore/DesktopModelSelection.swift:84-89 — 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) Sources/QwenVoiceCore/TimingExtensions.swift:23— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.swift:3392-3397 | Sources/QwenVoiceCore/TimingExtensions.swift:23-28 — 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) scripts/qc/runners/_kit.py:45— scripts/qc/runners/_kit.py:45-50 | scripts/qc/runners/speech_common.py:115-120 — 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) scripts/qc/store.py:199— scripts/qc/store.py:199-207 | scripts/voice_identity_language_reliability.py:77-82 — 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 (5 corresponding lines) · ×9
Edited copy of a member (5 corresponding lines) Sources/QwenVoiceCore/AudioQCSignalObserver.swift:656— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/ModelDiagnostics.swift:233-237 | Sources/QwenVoiceCore/AudioQCSignalObserver.swift:656-661 — 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) Sources/QwenVoiceCore/GenerationSemantics.swift:1174— Sources/QwenVoiceCore/GenerationSemantics.swift:1174-1181 | Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:675-679 — 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) Sources/iOSSupport/Services/IOSCrashObserver.swift:37— Sources/iOSSupport/Services/IOSCrashObserver.swift:37-42 | Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:17-21 — 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) Sources/Views/Settings/MacSettingsRows.swift:12— Sources/Views/Settings/MacSettingsRows.swift:12-16 | Sources/iOS/IOSSettingsViews.swift:31-41 — 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) Sources/QwenVoiceCore/SharedModelComponentStore.swift:1771— Sources/QwenVoiceCore/SharedModelComponentStore.swift:1771-1775 | Sources/SharedSupport/Database/GenerationHistoryOutbox.swift:745-750 — 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) Sources/VocelloCLI/Core/Contract/CLIEnvelope.swift:23— Sources/VocelloCLI/Core/Contract/CLIEnvelope.swift:23-27 | Sources/VocelloCLI/Core/Contract/CLIError.swift:13-23 — 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) scripts/qc/features.py:1074— scripts/qc/features.py:1074-1078 | scripts/qc/fidelity.py:60-66 — 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) scripts/qc/features.py:120— scripts/qc/features.py:120-124 | scripts/qc/pitch.py:189-194 — 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) scripts/attribution_manifest.py:68— scripts/attribution_manifest.py:68-73 | scripts/support_contact_contract.py:33-37 — 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.
Duplicated block (8 lines × 2) Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:124— Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:124-131 | Sources/QwenVoiceCore/CodecRoundTripEvidence.swift:69-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:553— Sources/QwenVoiceCore/HuggingFaceDownloader.swift:553-560 | Sources/QwenVoiceCore/HuggingFaceDownloader.swift:703-710 — 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 (8 lines × 2) Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:219— Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:219-226 | Sources/QwenVoiceCore/ModelDownloadContracts.swift:203-210 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:100— Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:100-107 | Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:229-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Sources/iOS/IOSStudioShellViews.swift:119— Sources/iOS/IOSStudioShellViews.swift:119-126 | Sources/iOS/IOSVoicesView.swift:262-269 — 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 `Sources/iOS/IOSStudioShellViews.swift:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) Sources/QwenVoiceCore/BenchRunContext.swift:142— Sources/QwenVoiceCore/BenchRunContext.swift:142-149 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1578-1585 — 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 (8 lines × 2) scripts/check_ios_ui_benchmark.py:268— scripts/check_ios_ui_benchmark.py:268-275 | scripts/check_macos_ui_bench.py:684-691 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 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 `scripts/check_ios_ui_benchmark.py:268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) scripts/quality_screen.py:631— scripts/quality_screen.py:631-638 | scripts/quality_screen.py:716-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/quality_screen.py:631` 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 (8 lines × 2) scripts/check_ios_ui_benchmark.py:255— scripts/check_ios_ui_benchmark.py:255-262 | scripts/check_macos_ui_bench.py:670-677 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×8
Edited copy of a member (21 corresponding lines) Sources/iOS/IOSSettingsViews.swift:93— Sources/iOS/IOSSettingsViews.swift:93-113 | Sources/iOS/IOSSettingsViews.swift:386-408 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Sources/SharedSupport/Views/VocelloCapsuleSelector.swift:96— Sources/SharedSupport/Views/VocelloCapsuleSelector.swift:96-116 | Sources/iOS/App/TabDock.swift:221-252 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Sources/QwenVoiceCore/LongFormAssembly.swift:50— Packages/VocelloQwen3Core/Sources/MLXAudioCore/Generation/GenerationTypes.swift:121-141 | Sources/QwenVoiceCore/LongFormAssembly.swift:50-72 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Sources/iOS/IOSGenerationModeViews.swift:922— Sources/iOS/IOSGenerationModeViews.swift:922-945 | Sources/iOS/IOSGenerationModeViews.swift:947-967 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Sources/QwenVoiceCore/SemanticTypes.swift:1778— Sources/QwenVoiceCore/SemanticTypes.swift:1778-1798 | Sources/QwenVoiceCore/SemanticTypes.swift:1802-1822 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) scripts/check_ios_ui_benchmark.py:255— scripts/check_ios_ui_benchmark.py:255-275 | scripts/check_macos_ui_bench.py:670-691 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) scripts/build_cleanup.py:388— scripts/build_cleanup.py:388-408 | scripts/build_output_policy.py:665-692 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) scripts/qc/phones.py:505— scripts/qc/phones.py:505-531 | scripts/qc/pronunciation.py:121-141 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) Sources/QwenVoiceCore/MLXTTSEngine.swift:1617— Sources/QwenVoiceCore/MLXTTSEngine.swift:1617-1629 | Sources/QwenVoiceCore/MLXTTSEngine.swift:1699-1711 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) Sources/QwenVoiceCore/SemanticTypes.swift:1689— Sources/QwenVoiceCore/SemanticTypes.swift:1689-1701 | Sources/QwenVoiceCore/SemanticTypes.swift:1726-1738 — 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 `Sources/QwenVoiceCore/SemanticTypes.swift:1689` 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 (13 lines × 2) Sources/Services/MacMetricKitReporter.swift:158— Sources/Services/MacMetricKitReporter.swift:158-170 | Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift:125-137 — before extracting anything, compare `Sources/Services/MacMetricKitReporter.swift` and `Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 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 (13 lines × 2) Sources/Services/UIPerfFrameProbe.swift:78— Sources/Services/UIPerfFrameProbe.swift:78-90 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:89-101 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/UIPerfFrameProbe.swift:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Sources/Views/Studio/MacVoiceCloningScreen.swift:917— Sources/Views/Studio/MacVoiceCloningScreen.swift:917-929 | Sources/iOS/IOSGenerationModeViews.swift:2109-2121 — 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 `Sources/Views/Studio/MacVoiceCloningScreen.swift:917` 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 (13 lines × 2) Sources/iOS/Sheets/IOSBottomSheets.swift:950— Sources/iOS/Sheets/IOSBottomSheets.swift:950-962 | Sources/iOS/Sheets/IOSBottomSheets.swift:1382-1394 — 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 `Sources/iOS/Sheets/IOSBottomSheets.swift:950` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/Sheets/IOSBottomSheets.swift:963` calls `lineLimit` and `Sources/iOS/Sheets/IOSBottomSheets.swift:1395` 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 (13 lines × 2) Sources/Services/UIPerfHistorySeeder.swift:75— Sources/Services/UIPerfHistorySeeder.swift:75-87 | Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift:79-91 — before extracting anything, compare `Sources/Services/UIPerfHistorySeeder.swift` and `Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/UIPerfHistorySeeder.swift:75` 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 (13 lines × 2) scripts/qc/features.py:87— scripts/qc/features.py:87-99 | scripts/qc/runners/_kit.py:202-214 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
FunctionTooLong: app.App design_references/Vocello iOS/app.jsx:12— FunctionTooLong — App runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: studio.Studio design_references/Vocello iOS/studio.jsx:6— FunctionTooLong — Studio 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.
FunctionTooLong: CommandLine.CommandLineGuide website/src/sections/CommandLine.jsx:28— FunctionTooLong — CommandLineGuide runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: player.PlayerSheet design_references/Vocello iOS/player.jsx:6— FunctionTooLong — PlayerSheet runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: screens.SettingsTab design_references/Vocello iOS/screens.jsx:194— FunctionTooLong — SettingsTab runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: Icon.Icon website/src/components/Icon.jsx:3— FunctionTooLong — Icon runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: GenerationScreens.VoiceCloningScreen design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:329— FunctionTooLong — VoiceCloningScreen runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×7
Edited copy of a member (15 corresponding lines) Sources/iOS/IOSDesignSystemPrimitives.swift:522— Sources/iOS/IOSDesignSystemPrimitives.swift:522-540 | Sources/iOS/IOSDesignSystemPrimitives.swift:722-736 — 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) Sources/iOS/Studio/IOSLongFormProject.swift:429— Sources/iOS/Studio/IOSLongFormProject.swift:429-443 | Sources/iOS/Studio/IOSLongFormProject.swift:445-459 — 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) Sources/Views/Voices/SavedVoiceSheetConfiguration.swift:58— Sources/Views/Voices/SavedVoiceSheetConfiguration.swift:58-72 | Sources/Views/Voices/SavedVoiceSheetConfiguration.swift:74-91 — 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) scripts/check_ios_ui_perf.py:334— scripts/check_ios_ui_perf.py:334-354 | scripts/check_macos_ui_perf.py:475-493 — 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) scripts/qc/features.py:512— scripts/qc/features.py:512-527 | scripts/qc/features.py:531-545 — 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) scripts/analyze_prosody.py:1242— scripts/analyze_prosody.py:1242-1256 | scripts/prosody_quality_gate.py:163-178 — 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) scripts/build_output_policy.py:1221— scripts/build_output_policy.py:1221-1235 | scripts/build_output_policy.py:1498-1512 — 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.
Duplicated block (14 lines × 2) Sources/Views/Studio/MacStudioChips.swift:104— Sources/Views/Studio/MacStudioChips.swift:104-117 | Sources/Views/Studio/MacVoiceCloningScreen.swift:681-694 — 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 `Sources/Views/Studio/MacStudioChips.swift:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Sources/iOS/IOSGenerationModeViews.swift:477— Sources/iOS/IOSGenerationModeViews.swift:477-490 | Sources/iOS/IOSGenerationModeViews.swift:1372-1385 — 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 `Sources/iOS/IOSGenerationModeViews.swift:477` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (14 lines × 2) Sources/iOS/Studio/IOSLongFormProject.swift:1028— Sources/iOS/Studio/IOSLongFormProject.swift:1028-1041 | Sources/iOS/Studio/IOSLongFormProject.swift:1299-1312 — 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 (14 lines × 2) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:943— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:943-956 | Sources/iOS/IOSStartupReliabilityRunner.swift:713-726 — 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 (14 lines × 2) Sources/Services/MacLineBatchRequest.swift:289— Sources/Services/MacLineBatchRequest.swift:289-302 | Sources/iOS/Studio/IOSLongFormProject.swift:414-427 — 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 (14 lines × 2) scripts/benchmark_history.py:3064— scripts/benchmark_history.py:3064-3077 | scripts/publish_benchmark_history.py:4291-4304 — 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 (14 lines × 2) scripts/lib/ui_lane_data.py:161— scripts/lib/ui_lane_data.py:161-174 | scripts/required_step_ledger.py:48-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×6
Edited copy of a member (8 corresponding lines) Sources/Views/Settings/MacSettingsRows.swift:226— Sources/Views/Settings/MacSettingsRows.swift:226-233 | Sources/iOS/IOSSettingsViews.swift:299-306 — 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) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1101— Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1101-1110 | Sources/SharedSupport/Services/GenerationOutputVerifier.swift:361-368 — 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) Sources/ViewModels/ModelManagerViewModel.swift:1703— Sources/ViewModels/ModelManagerViewModel.swift:1703-1710 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:1173-1181 — 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) Sources/iOS/History/HistoryScreen.swift:89— Sources/iOS/History/HistoryScreen.swift:89-96 | Sources/iOS/IOSRootNavigationModels.swift:1357-1369 — 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) scripts/model_host_availability.py:344— scripts/model_host_availability.py:344-351 | scripts/verify_ios_release_artifacts.py:150-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) scripts/auto_language_check.py:333— scripts/auto_language_check.py:333-340 | scripts/benchmark_history.py:2456-2466 — 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.
Duplicated block (10 lines × 2) Sources/Services/MacInterfaceText.swift:2351— Sources/Services/MacInterfaceText.swift:2351-2360 | Sources/iOS/IOSRootNavigationModels.swift:252-261 — 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 `Sources/Services/MacInterfaceText.swift:2351` 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 (10 lines × 2) Sources/Views/Voices/MacVoicesScreen.swift:384— Sources/Views/Voices/MacVoicesScreen.swift:384-393 | Sources/iOS/IOSVoicesView.swift:646-655 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) Sources/iOS/Sheets/IOSBottomSheets.swift:696— Sources/iOS/Sheets/IOSBottomSheets.swift:696-705 | Sources/iOS/Sheets/IOSBottomSheets.swift:1027-1036 — 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 `Sources/iOS/Sheets/IOSBottomSheets.swift:696` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/iOS/Sheets/IOSBottomSheets.swift:695` calls `contentShape`, `Rectangle` and `Sources/iOS/Sheets/IOSBottomSheets.swift:1026` 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 (10 lines × 2) scripts/check_ios_ui_perf.py:724— scripts/check_ios_ui_perf.py:724-733 | scripts/check_macos_ui_perf.py:857-866 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 `scripts/check_ios_ui_perf.py:724` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/check_macos_ui_perf.py:854` calls `hexdigest`, `items` and `scripts/check_ios_ui_perf.py:723` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) scripts/check_macos_ui_perf.py:684— scripts/check_macos_ui_perf.py:684-693 | scripts/lib/ui_perf_thresholds.py:286-295 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) scripts/check_ios_ui_perf.py:121— scripts/check_ios_ui_perf.py:121-130 | scripts/check_macos_ui_perf.py:134-143 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also 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) Sources/QwenVoiceCore/TTSEngine.swift:199— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Generation.swift:373-377 | Packages/VocelloQwen3Core/Sources/VocelloQwen3Core/Engine.swift:174-178 | Sources/QwenVoiceCore/TTSEngine.swift:199-203 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 3) Sources/QwenVoiceCore/LongFormPlanning.swift:194— Sources/QwenVoiceCore/LongFormPlanning.swift:194-198 | Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:663-667 | Sources/QwenVoiceCore/SpokenTextPlanning.swift:139-143 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/QwenVoiceCore/SpokenTextPlanning.swift:145` calls `canonicalDigest`, `digest`, `canonicalJSONData` and `Sources/QwenVoiceCore/LongFormPlanning.swift:199` 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) Sources/VocelloCLI/BenchCodecLoop.swift:271— Sources/VocelloCLI/BenchCodecLoop.swift:271-275 | Sources/VocelloCLI/BenchCodecReplay.swift:288-292 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:235-239 — 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.
Duplicated block (5 lines × 3) scripts/ios_startup_reliability.py:1402— scripts/ios_startup_reliability.py:1402-1406 | scripts/ios_startup_reliability.py:1412-1416 | scripts/ios_startup_reliability.py:1426-1430 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `scripts/ios_startup_reliability.py:1401` calls `add_argument` and `scripts/ios_startup_reliability.py:1411` 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 (5 lines × 3) scripts/publish_benchmark_history.py:4866— scripts/publish_benchmark_history.py:4866-4870 | scripts/publish_benchmark_history.py:4895-4899 | scripts/publish_benchmark_history.py:4952-4956 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) scripts/release_sbom.py:28— scripts/release_sbom.py:28-32 | scripts/verify_ios_release_artifacts.py:127-131 | scripts/workflow_diagnostics.py:183-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 all 3 call sites, so a change lands once.
Focus outline removed inline design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:14— <select> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator.
Focus outline removed inline design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:61— <textarea> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator.
Focus outline removed inline design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:80— <input> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator.
Focus outline removed inline design_references/Vocello iOS/app.jsx:267— <textarea> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator.
Focus outline removed inline design_references/Vocello iOS/sheets.jsx:151— <textarea> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator.
Change coupling: IOSGenerationModeViews.swift ↔ IOSRecordVoiceSheet.swift Sources/iOS/IOSGenerationModeViews.swift:1— `Sources/iOS/IOSGenerationModeViews.swift` and `Sources/iOS/Voices/IOSRecordVoiceSheet.swift` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `b308c609` clone: a recognized transcript that does not cover the whole clip nee…; `79113a02` fix(voices): a closed review surface discards its candidate; Delete w…; `1560b0f1` fix(ios,engine): PA-26 batch B2 - reference import, saved voices, tem… — run `git show` on any of them.
Change coupling: MacHistoryScreen.swift ↔ HistoryScreen.swift Sources/Views/History/MacHistoryScreen.swift:1— `Sources/Views/History/MacHistoryScreen.swift` and `Sources/iOS/History/HistoryScreen.swift` change together 55% of the time (17 of the 31 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 17 shared commits counted here, the most recent 3 are `ca438556` fix(history): deleting the take the player holds dismisses the player…; `2731c8fa` fix(history): a long-form project delete deletes nothing when the pro…; `74268123` fix(history): deleting a long-form project deletes its segments, and … — run `git show` on any of them.
Change coupling: GenerationHistoryRecovery.swift ↔ VocelloPresentationText.swift Sources/SharedSupport/Services/GenerationHistoryRecovery.swift:1— `Sources/SharedSupport/Services/GenerationHistoryRecovery.swift` and `Sources/SharedSupport/Services/VocelloPresentationText.swift` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `74268123` fix(history): deleting a long-form project deletes its segments, and …; `a59edb1e` fix(history): Discard says what it could not set aside; Mac regenerat…; `8ef203e7` fix: Discard unblocks long-form History; damaged voice metadata stays… — run `git show` on any of them.
Change coupling: MacVoiceCloningScreen.swift ↔ IOSGenerationModeViews.swift Sources/Views/Studio/MacVoiceCloningScreen.swift:1— `Sources/Views/Studio/MacVoiceCloningScreen.swift` and `Sources/iOS/IOSGenerationModeViews.swift` change together 50% of the time (9 of the 18 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 9 shared commits counted here, the most recent 3 are `b308c609` clone: a recognized transcript that does not cover the whole clip nee…; `b876e29d` clone: "Use audio only" on a saved voice is no longer overridden by i…; `25192b69` feat(observability): app console prints go to Logger with public code… — run `git show` on any of them.
Change coupling: IOSRecordingOverlay.swift ↔ IOSBottomSheets.swift Sources/iOS/Overlays/IOSRecordingOverlay.swift:1— `Sources/iOS/Overlays/IOSRecordingOverlay.swift` and `Sources/iOS/Sheets/IOSBottomSheets.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in 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 6 shared commits counted here, the most recent 3 are `e62747f0` fix(a11y): Dynamic Type layouts, 44 pt hit regions, VoiceOver state a…; `72d33bf1` Accessibility, a probe that outlived itself, and four touch targets (…; `9f4e3fd6` feat(ios-ui): IUI-5 sub-wave D — D10a shared glass gate, X4+D9 Dynami… — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×5
Edited copy of a member (23 corresponding lines) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:334— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:334-357 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2112-2135 — 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.
Edited copy of a member (23 corresponding lines) Sources/Services/UIPerfHistorySeeder.swift:65— Sources/Services/UIPerfHistorySeeder.swift:65-87 | Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift:69-91 — 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.
Edited copy of a member (23 corresponding lines) Sources/iOS/IOSGenerationModeViews.swift:411— Sources/iOS/IOSGenerationModeViews.swift:411-434 | Sources/iOS/IOSGenerationModeViews.swift:1304-1326 — 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.
Edited copy of a member (23 corresponding lines) scripts/release_source_authority.py:62— scripts/release_source_authority.py:62-84 | scripts/release_source_authority.py:91-120 — 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.
Edited copy of a member (23 corresponding lines) scripts/hooks/git_commands.py:682— scripts/hooks/git_commands.py:682-704 | scripts/hooks/git_commands.py:708-730 — 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 (20 corresponding lines) · ×5
Edited copy of a member (20 corresponding lines) Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1055— Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1055-1080 | Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1445-1464 — 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) Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:252— Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:252-273 | Sources/iOSSupport/Models/IOSStartupReliabilityRecord.swift:85-104 — 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) Sources/iOS/IOSShellPrimitives.swift:612— Sources/iOS/IOSShellPrimitives.swift:612-631 | Sources/iOS/IOSShellPrimitives.swift:877-901 — 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) Sources/QwenVoiceCore/ModelDownloadContracts.swift:103— Sources/QwenVoiceCore/ModelDownloadContracts.swift:103-122 | Sources/QwenVoiceCore/ModelDownloadContracts.swift:441-460 — 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) Sources/Models/GenerationScreenPresentation.swift:52— Sources/Models/GenerationScreenPresentation.swift:52-71 | Sources/Models/GenerationScreenPresentation.swift:75-96 — 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.
Duplicated block (17 lines × 2) Sources/QwenVoiceCore/MLXTTSEngine.swift:756— Sources/QwenVoiceCore/MLXTTSEngine.swift:756-772 | Sources/QwenVoiceCore/SemanticTypes.swift:1752-1768 — 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 `Sources/QwenVoiceCore/MLXTTSEngine.swift:756` 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 (17 lines × 2) Sources/iOS/IOSDesignSystemPrimitives.swift:657— Sources/iOS/IOSDesignSystemPrimitives.swift:657-673 | Sources/iOS/IOSDesignSystemPrimitives.swift:806-822 — 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 `Sources/iOS/IOSDesignSystemPrimitives.swift:657` 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 (17 lines × 2) scripts/check_ios_ui_perf.py:217— scripts/check_ios_ui_perf.py:217-233 | scripts/check_macos_ui_perf.py:300-316 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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, `scripts/check_ios_ui_perf.py:234` calls `median_block_cadence_hz` and `scripts/check_macos_ui_perf.py:317` 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 (17 lines × 2) scripts/check_language_hints.py:124— scripts/check_language_hints.py:124-140 | scripts/check_language_output.py:400-416 — 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 (17 lines × 2) scripts/check_ios_ui_benchmark.py:138— scripts/check_ios_ui_benchmark.py:138-154 | scripts/check_macos_ui_bench.py:527-543 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) Sources/iOS/IOSDesignSystemPrimitives.swift:563— Sources/iOS/IOSDesignSystemPrimitives.swift:563-583 | Sources/iOS/IOSDesignSystemPrimitives.swift:755-771 — 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.
Edited copy of a member (17 corresponding lines) Sources/SharedSupport/Views/VocelloPrimaryCTAButton.swift:117— Sources/SharedSupport/Views/VocelloPrimaryCTAButton.swift:117-137 | Sources/Views/Primitives/MacVoicePrimitives.swift:19-35 — 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.
Edited copy of a member (17 corresponding lines) Sources/Views/Theme/MacGlass.swift:115— Sources/Views/Theme/MacGlass.swift:115-131 | Sources/iOS/IOSShellPrimitives.swift:100-116 — 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.
Edited copy of a member (17 corresponding lines) Sources/QwenVoiceCore/NativeTelemetry.swift:104— Sources/QwenVoiceCore/NativeTelemetry.swift:104-121 | Sources/QwenVoiceCore/NativeTelemetry.swift:126-142 — 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 (14 corresponding lines) · ×4
Edited copy of a member (14 corresponding lines) Sources/iOS/IOSDesignSystemPrimitives.swift:1010— Sources/iOS/IOSDesignSystemPrimitives.swift:1010-1024 | Sources/iOS/IOSDesignSystemPrimitives.swift:1088-1101 — 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.
Edited copy of a member (14 corresponding lines) Sources/Views/History/MacHistoryScreen.swift:961— Sources/Views/History/MacHistoryScreen.swift:961-977 | Sources/iOS/History/HistoryScreen.swift:513-526 — 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.
Edited copy of a member (14 corresponding lines) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2659— Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2659-2672 | Sources/QwenVoiceCore/NativeMemoryPolicyResolver.swift:233-247 — 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.
Edited copy of a member (14 corresponding lines) Sources/QwenVoiceCore/MLXTTSEngine.swift:2141— Sources/QwenVoiceCore/MLXTTSEngine.swift:2141-2154 | Sources/iOS/TTSEngineStore.swift:503-517 — 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 copy of a member (3 corresponding lines) · ×4
Edited copy of a member (3 corresponding lines) Sources/QwenVoiceCore/GenerationStartupDiagnostics.swift:271— Sources/QwenVoiceCore/GenerationStartupDiagnostics.swift:271-273 | Sources/QwenVoiceCore/SpokenTextPlanning.swift:514-516 — 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) Sources/Views/Theme/MacTheme.swift:82— Sources/Views/Theme/MacTheme.swift:82-84 | Sources/iOS/Theme/Theme.swift:171-173 — 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) scripts/entitlement_contract.py:44— scripts/entitlement_contract.py:44-46 | scripts/release_evidence.py:119-121 — 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) scripts/qc/runners/speech_common.py:59— scripts/qc/runners/speech_common.py:59-65 | scripts/qc/store.py:244-246 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) Sources/iOS/IOSGenerationModeViews.swift:522— Sources/iOS/IOSGenerationModeViews.swift:522-540 | Sources/iOS/IOSGenerationModeViews.swift:2231-2249 — 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 `Sources/iOS/IOSGenerationModeViews.swift:522` 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 (19 lines × 2) scripts/check_ios_ui_perf.py:99— scripts/check_ios_ui_perf.py:99-117 | scripts/check_macos_ui_perf.py:112-130 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) scripts/qwen3_core_contract.py:1185— scripts/qwen3_core_contract.py:1185-1203 | scripts/qwen3_core_contract.py:1278-1296 — 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 (19 lines × 2) scripts/check_ios_ui_perf.py:235— scripts/check_ios_ui_perf.py:235-253 | scripts/check_macos_ui_perf.py:317-335 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 (10–12 lines × 2) Sources/QwenVoiceCore/MLXTTSEngine.swift:2782— Sources/QwenVoiceCore/MLXTTSEngine.swift:2782-2791 | Sources/iOSSupport/Services/IOSDeviceDiagnosticsRecorder.swift:62-73 — 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 `Sources/iOSSupport/Services/IOSDeviceDiagnosticsRecorder.swift:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) Sources/iOS/Sheets/IOSBottomSheets.swift:317— Sources/iOS/Sheets/IOSBottomSheets.swift:317-326 | Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:80-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/Sheets/IOSBottomSheets.swift:317` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–12 lines × 2) scripts/check_language_hints.py:254— scripts/check_language_hints.py:254-265 | scripts/check_language_output.py:501-510 — 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–12 lines × 2) scripts/publish_benchmark_history.py:581— scripts/publish_benchmark_history.py:581-590 | scripts/publish_benchmark_history.py:603-614 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 × 3) Sources/QwenVoiceCore/AudioPreparation.swift:1186— Sources/QwenVoiceCore/AudioPreparation.swift:1186-1193 | Sources/QwenVoiceCore/DocumentIO.swift:230-237 | Sources/QwenVoiceCore/NativeCloneSupport.swift:982-989 — 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 `Sources/QwenVoiceCore/AudioPreparation.swift:1186` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:348— Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:348-355 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:365-372 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:422-429 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:348` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) Sources/iOS/Sheets/IOSBottomSheets.swift:1021— Sources/iOS/Sheets/IOSBottomSheets.swift:1021-1028 | Sources/iOS/Sheets/IOSBottomSheets.swift:1407-1414 | Sources/iOS/Sheets/IOSBottomSheets.swift:1485-1492 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/Sheets/IOSBottomSheets.swift:1021` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) scripts/bench_delivery_prosody.py:114— scripts/bench_delivery_prosody.py:114-121 | scripts/bench_delivery_prosody.py:166-173 | scripts/bench_delivery_prosody.py:218-225 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/bench_delivery_prosody.py:122` calls `get` and `scripts/bench_delivery_prosody.py:174` 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.
AC2 · Forms & labels· <TextField> field component without a label · ×3
<TextField> field component without a label design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:227— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextField> field component without a label design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:292— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<TextField> field component without a label design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:417— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×3
Edited copy of a member (19 corresponding lines) Sources/QwenVoiceCore/NativeEngineRuntime.swift:1626— Sources/QwenVoiceCore/NativeEngineRuntime.swift:1626-1699 | Sources/QwenVoiceCore/NativeEngineRuntime.swift:1701-1742 — 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.
Edited copy of a member (19 corresponding lines) Sources/QwenVoiceCore/MetricKitMemoryExitSummary.swift:45— Packages/VocelloQwen3Core/Sources/MLXAudioCore/Generation/GenerationTypes.swift:69-87 | Sources/QwenVoiceCore/MetricKitMemoryExitSummary.swift:45-67 — 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.
Edited copy of a member (19 corresponding lines) Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:606— Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:606-624 | Sources/iOS/IOSDesignSystemPrimitives.swift:916-934 — 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 (26 corresponding lines) · ×3
Edited copy of a member (26 corresponding lines) Sources/Services/UIPerfHistorySeeder.swift:37— Sources/Services/UIPerfHistorySeeder.swift:37-62 | Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift:41-66 — 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.
Edited copy of a member (26 corresponding lines) Sources/Services/MacStudioGenerationRequestFactory.swift:37— Sources/Services/MacStudioGenerationRequestFactory.swift:37-71 | Sources/Services/MacStudioGenerationRequestFactory.swift:77-102 — 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.
Edited copy of a member (26 corresponding lines) scripts/generate_cli_scheme.py:54— scripts/generate_cli_scheme.py:54-87 | scripts/generate_ios_logic_scheme.py:46-71 — 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 (30 corresponding lines) · ×3
Edited copy of a member (30 corresponding lines) Sources/Services/UIPerfFrameProbe.swift:76— Sources/Services/UIPerfFrameProbe.swift:76-105 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:83-117 — These two members are one piece of code written twice and then edited apart: 30 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 (30 corresponding lines) Sources/iOS/IOSShellPrimitives.swift:244— Sources/iOS/IOSShellPrimitives.swift:244-273 | Sources/iOS/IOSShellPrimitives.swift:304-335 — These two members are one piece of code written twice and then edited apart: 30 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 (30 corresponding lines) Sources/iOS/Studio/IOSLongFormProject.swift:680— Sources/iOS/Studio/IOSLongFormProject.swift:680-710 | Sources/iOS/Studio/IOSStudioGenerationActions.swift:24-53 — These two members are one piece of code written twice and then edited apart: 30 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) · ×3
Edited copy of a member (24 corresponding lines) Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:123— Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:123-149 | Sources/QwenVoiceCore/CodecRoundTripEvidence.swift:68-91 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) Sources/iOS/App/RootView.swift:305— Sources/iOS/App/RootView.swift:305-334 | Sources/iOS/App/RootView.swift:337-360 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) Sources/Views/Studio/MacVoiceCloningScreen.swift:799— Sources/Views/Studio/MacVoiceCloningScreen.swift:799-822 | Sources/iOS/IOSGenerationModeViews.swift:2353-2377 — 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 (25 corresponding lines) · ×3
Edited copy of a member (25 corresponding lines) Sources/Services/MacMetricKitReporter.swift:195— Sources/Services/MacMetricKitReporter.swift:195-219 | Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift:162-188 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Sources/SharedSupport/Views/VocelloModeBackdrop.swift:43— Sources/SharedSupport/Views/VocelloModeBackdrop.swift:43-71 | Sources/iOS/Sheets/IOSPlayerSheet.swift:81-105 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Sources/ViewModels/ModelManagerViewModel.swift:248— Sources/ViewModels/ModelManagerViewModel.swift:248-274 | Sources/iOSSupport/ViewModels/ModelManagerViewModel.swift:199-223 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×3
Edited copy of a member (29 corresponding lines) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:405— Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:405-433 | Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Bridge.swift:108-142 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1129— Packages/VocelloQwen3Core/Sources/MLXAudioCodecs/Mimi/Seanet.swift:22-50 | Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1129-1159 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) scripts/build_cleanup.py:414— scripts/build_cleanup.py:414-442 | scripts/build_output_policy.py:714-745 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×3
Edited copies of one member (3 members, 7+ corresponding lines) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1882— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1882-1893 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2104-2110 | Sources/iOS/IOSStartupReliabilityRunner.swift:778-787 — 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.
Edited copies of one member (3 members, 7+ corresponding lines) Sources/QwenVoiceCore/NativeMemoryPolicyResolver.swift:46— Sources/QwenVoiceCore/NativeMemoryPolicyResolver.swift:46-52 | Sources/QwenVoiceCore/UnsafeSpeechGenerationModel.swift:61-67 | Sources/VocelloDesktopCore/DesktopAppSettings.swift:144-150 — 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.
Edited copies of one member (3 members, 7+ corresponding lines) scripts/check_ios_clone_conditioning.py:87— scripts/check_ios_clone_conditioning.py:87-93 | scripts/lib/playback_capture.py:361-367 | scripts/model_host_availability.py:30-36 — 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.
Duplicated block (25 lines × 2) Sources/Services/UIPerfFrameProbe.swift:344— Sources/Services/UIPerfFrameProbe.swift:344-368 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:331-355 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (25 lines × 2) Sources/Views/Studio/MacCustomVoiceScreen.swift:163— Sources/Views/Studio/MacCustomVoiceScreen.swift:163-187 | Sources/Views/Studio/MacVoiceDesignScreen.swift:181-205 — 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 `Sources/Views/Studio/MacCustomVoiceScreen.swift:163` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) Sources/Views/Voices/MacSavedVoiceSheet.swift:597— Sources/Views/Voices/MacSavedVoiceSheet.swift:597-621 | Sources/iOS/Voices/IOSRecordVoiceSheet.swift:259-283 — 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 (16 lines × 2) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3158— Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3158-3173 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3236-3251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) Sources/iOS/IOSVoicesView.swift:328— Sources/iOS/IOSVoicesView.swift:328-343 | Sources/iOS/Sheets/IOSBottomSheets.swift:1311-1326 — 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 `Sources/iOS/IOSVoicesView.swift:328` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `12` in one and `14` 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, `Sources/iOS/IOSVoicesView.swift:344` calls `fixedSize` and `Sources/iOS/Sheets/IOSBottomSheets.swift:1327` 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 (16 lines × 2) scripts/check_ios_ui_perf.py:188— scripts/check_ios_ui_perf.py:188-203 | scripts/check_macos_ui_perf.py:278-293 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–14 lines × 2) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3135— Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3135-3146 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3218-3231 — 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 `Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3218` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) scripts/build_output_policy.py:434— scripts/build_output_policy.py:434-447 | scripts/build_output_policy.py:454-465 — 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 `scripts/build_output_policy.py:434` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) scripts/check_macos_ui_perf.py:203— scripts/check_macos_ui_perf.py:203-214 | scripts/check_macos_ui_perf.py:244-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) Sources/Views/Studio/MacCustomVoiceScreen.swift:173— Sources/Views/Studio/MacCustomVoiceScreen.swift:173-183 | Sources/Views/Studio/MacVoiceCloningScreen.swift:280-290 | Sources/Views/Studio/MacVoiceDesignScreen.swift:191-201 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Views/Studio/MacCustomVoiceScreen.swift:173` 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 (11 lines × 3) Sources/iOS/IOSGenerationModeViews.swift:283— Sources/iOS/IOSGenerationModeViews.swift:283-293 | Sources/iOS/IOSGenerationModeViews.swift:1188-1198 | Sources/iOS/IOSGenerationModeViews.swift:1842-1852 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSGenerationModeViews.swift:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) Sources/iOS/IOSStudioShellViews.swift:132— Sources/iOS/IOSStudioShellViews.swift:132-142 | Sources/iOS/IOSVoicesView.swift:423-433 | Sources/iOS/IOSVoicesView.swift:480-490 — 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 `Sources/iOS/IOSStudioShellViews.swift:132` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2 locations) design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:207— design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:207 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2 locations) design_references/Vocello iOS/app.jsx:319— design_references/Vocello iOS/app.jsx:319 · design_references/Vocello iOS/screens.jsx:218 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (7 lines × 2 locations) design_references/Vocello iOS/screens.jsx:28— design_references/Vocello iOS/screens.jsx:28 · design_references/Vocello iOS/sheets.jsx:49 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) design_references/Vocello iOS/icons.jsx:101— design_references/Vocello iOS/icons.jsx:101 · design_references/Vocello iOS/icons.jsx:114 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (6 lines × 2 locations) design_references/Vocello iOS/player.jsx:48— design_references/Vocello iOS/player.jsx:48 · design_references/Vocello iOS/studio.jsx:231 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) design_references/Vocello iOS/screens.jsx:360— design_references/Vocello iOS/screens.jsx:360 · design_references/Vocello iOS/sheets.jsx:296 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
AC4 · Keyboard semantics· Anchor without href · ×2
Anchor without href design_references/Vocello Design System/preview/components-buttons.html:83— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href design_references/Vocello Design System/preview/components-buttons.html:84— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Low contrast colour pair in CSS (1.0:1) design_references/Vocello Design System/preview/components-sidebar-row.html:32— `.item.selected.lavender .rail, .item.selected.lavender .icon` sets color: #BFAADB on background-color: #BFAADB — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (1.0:1) design_references/Vocello Design System/preview/components-sidebar-row.html:35— `.item.selected.terra .rail, .item.selected.terra .icon` sets color: #DBA887 on background-color: #DBA887 — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×2
Focus outline removed in CSS without a :focus replacement design_references/Vocello iOS/app.css:239— `.vc-script` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement design_references/Vocello iOS/app.css:565— `.vc-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:46— Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:46-104 | Sources/QwenVoiceCore/GenerationTelemetryJSONLSink.swift:172-196 | Sources/QwenVoiceCore/MLXTTSEngine.swift:2769-2778 | Sources/Services/GenerationTelemetryMerger.swift:107-136 | Sources/iOSSupport/Services/IOSDeviceDiagnosticsRecorder.swift:166-175 — 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.
Members sharing a duplicated core (5 members, 50+ identical tokens) Sources/iOS/Sheets/IOSBottomSheets.swift:100— Sources/iOS/Sheets/IOSBottomSheets.swift:100-166 | Sources/iOS/Sheets/IOSBottomSheets.swift:577-624 | Sources/iOS/Sheets/IOSBottomSheets.swift:835-903 | Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:31-164 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:257-276 — 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 (32 corresponding lines) · ×2
Edited copy of a member (32 corresponding lines) Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1329— Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1329-1360 | Sources/QwenVoiceCore/NativeTelemetrySampler.swift:263-299 — 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.
Edited copy of a member (32 corresponding lines) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1912— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1912-1943 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1945-1981 — 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 (42 corresponding lines) · ×2
Edited copy of a member (42 corresponding lines) Sources/Views/Shell/MacInlinePlayerCard.swift:155— Sources/Views/Shell/MacInlinePlayerCard.swift:155-201 | Sources/Views/Studio/MacStudioPlayerCard.swift:297-338 — These two members are one piece of code written twice and then edited apart: 42 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 (42 corresponding lines) Sources/iOS/IOSVoicesView.swift:319— Sources/iOS/IOSVoicesView.swift:319-360 | Sources/iOS/Sheets/IOSBottomSheets.swift:1302-1349 — These two members are one piece of code written twice and then edited apart: 42 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) · ×2
Edited copy of a member (27 corresponding lines) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2008— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2008-2039 | Sources/iOS/IOSStartupReliabilityRunner.swift:863-889 — 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.
Edited copy of a member (27 corresponding lines) Sources/iOS/IOSShellPrimitives.swift:493— Sources/iOS/IOSShellPrimitives.swift:493-525 | Sources/iOS/IOSShellPrimitives.swift:549-575 — 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 (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:180— Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:180-201 | Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:203-228 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) scripts/check_ios_ui_perf.py:363— scripts/check_ios_ui_perf.py:363-403 | scripts/check_macos_ui_perf.py:445-471 — 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 copies of one member (3 members, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) Sources/QwenVoiceCore/ModelDownloadContracts.swift:212— Sources/QwenVoiceCore/ModelDownloadContracts.swift:212-222 | Sources/QwenVoiceCore/ProductionModelCatalog.swift:561-566 | Sources/QwenVoiceCore/SharedModelComponentStore.swift:1438-1448 — 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) Sources/Services/MacEngineBootstrap.swift:73— Sources/Services/MacEngineBootstrap.swift:73-78 | Sources/VocelloCLI/CLIRuntime.swift:365-370 | Sources/iOS/IOSAppBootstrap.swift:105-110 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×2
Edited copies of one member (3 members, 8+ corresponding lines) Sources/QwenVoiceCore/NativeCloneSupport.swift:98— Sources/QwenVoiceCore/NativeCloneSupport.swift:98-105 | Sources/QwenVoiceCore/NativeCloneSupport.swift:137-144 | Sources/QwenVoiceCore/NativeCloneSupport.swift:190-197 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) Sources/SharedSupport/ViewModels/ClipReviewPlayer.swift:122— Sources/SharedSupport/ViewModels/ClipReviewPlayer.swift:122-130 | Sources/iOS/Sheets/IOSPlayerSheet.swift:924-931 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:867-874 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) Sources/iOS/IOSGenerationModeViews.swift:396— Sources/iOS/IOSGenerationModeViews.swift:396-409 | Sources/iOS/IOSGenerationModeViews.swift:1289-1302 | Sources/iOS/IOSGenerationModeViews.swift:2003-2016 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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, 14+ corresponding lines) Sources/QwenVoiceCore/MLXTTSEngine.swift:2156— Sources/QwenVoiceCore/MLXTTSEngine.swift:2156-2171 | Sources/QwenVoiceCore/TTSEngine.swift:168-181 | Sources/iOS/TTSEngineStore.swift:519-535 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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, 6+ corresponding lines) · ×2
Edited copies of one member (4 members, 6+ corresponding lines) Sources/QwenVoiceCore/IOSMemoryQualificationPlan.swift:104— Sources/QwenVoiceCore/IOSMemoryQualificationPlan.swift:104-109 | Sources/QwenVoiceCore/IOSMemoryQualificationPlan.swift:235-240 | Sources/QwenVoiceCore/IOSStartupReliabilityPlan.swift:132-139 | Sources/iOS/IOSStartupReliabilityRunner.swift:896-901 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 6+ corresponding lines) Sources/SharedSupport/ViewModels/ClipReviewPlayer.swift:23— Sources/SharedSupport/ViewModels/ClipReviewPlayer.swift:23-30 | Sources/iOS/Sheets/IOSPlayerSheet.swift:777-783 | Sources/iOS/Sheets/IOSVoicePreviewPlayer.swift:29-34 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:624-632 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×2
Edited copies of one member (3 members, 5+ corresponding lines) Sources/QwenVoiceCore/TTSEngine.swift:216— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Generation.swift:398-402 | Packages/VocelloQwen3Core/Sources/VocelloQwen3Core/Engine.swift:192-196 | Sources/QwenVoiceCore/TTSEngine.swift:216-221 — 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) Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:228— Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:228-232 | Sources/QwenVoiceCore/ProductionModelCatalog.swift:549-553 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2313-2317 — 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.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×2
Edited copy of a member (1 corresponding lines) Sources/VocelloDesktopCore/DesktopLongFormProject.swift:289— Sources/VocelloDesktopCore/DesktopLongFormProject.swift:289-289 | Sources/iOS/Studio/IOSStudioLongFormPlatformHooks.swift:19-21 — 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) scripts/release_build_number.py:71— scripts/release_build_number.py:71-71 | scripts/roadmap.py:146-147 — 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.
Duplicated block (39 lines × 2) Sources/Services/MacMetricKitReporter.swift:85— Sources/Services/MacMetricKitReporter.swift:85-123 | Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift:49-87 — before extracting anything, compare `Sources/Services/MacMetricKitReporter.swift` and `Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 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 (39 lines × 2) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:872— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:872-910 | Sources/iOS/IOSStartupReliabilityRunner.swift:588-626 — 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 `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:872` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) Sources/iOS/IOSGenerationModeViews.swift:234— Sources/iOS/IOSGenerationModeViews.swift:234-254 | Sources/iOS/IOSGenerationModeViews.swift:1138-1158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/IOSGenerationModeViews.swift:1159` calls `presentSaveDesignedVoice` and `Sources/iOS/IOSGenerationModeViews.swift:255` 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 (21 lines × 2) scripts/check_ios_ui_perf.py:606— scripts/check_ios_ui_perf.py:606-626 | scripts/check_macos_ui_perf.py:739-759 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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, `scripts/check_ios_ui_perf.py:627` calls `evaluate_cadence` and `scripts/check_macos_ui_perf.py:760` 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 (17 lines × 3) Sources/iOS/IOSGenerationModeViews.swift:233— Sources/iOS/IOSGenerationModeViews.swift:233-249 | Sources/iOS/IOSGenerationModeViews.swift:1137-1153 | Sources/iOS/IOSGenerationModeViews.swift:1790-1806 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSGenerationModeViews.swift:233` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 3) Sources/iOS/Sheets/IOSBottomSheets.swift:143— Sources/iOS/Sheets/IOSBottomSheets.swift:143-159 | Sources/iOS/Sheets/IOSBottomSheets.swift:591-607 | Sources/iOS/Sheets/IOSBottomSheets.swift:849-865 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/Sheets/IOSBottomSheets.swift:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) Sources/QwenVoiceCore/MLXTTSEngine.swift:1566— Sources/QwenVoiceCore/MLXTTSEngine.swift:1566-1581 | Sources/QwenVoiceCore/MLXTTSEngine.swift:1663-1677 — 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 `Sources/QwenVoiceCore/MLXTTSEngine.swift:1566` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) Sources/Views/Studio/MacVoiceCloningScreen.swift:550— Sources/Views/Studio/MacVoiceCloningScreen.swift:550-565 | Sources/Views/Voices/MacSavedVoiceSheet.swift:119-133 — 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 `Sources/Views/Studio/MacVoiceCloningScreen.swift:550` 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 (14–15 lines × 2) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3098— Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3098-3111 | Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3137-3151 — 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 `Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3098` 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 (14–15 lines × 2) scripts/generate_cli_scheme.py:36— scripts/generate_cli_scheme.py:36-50 | scripts/generate_ios_logic_scheme.py:29-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. 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 (13 lines × 3) Sources/VocelloCLI/BenchCodecLoop.swift:112— Sources/VocelloCLI/BenchCodecLoop.swift:112-124 | Sources/VocelloCLI/BenchCodecReplay.swift:140-152 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:108-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (13 lines × 3) Sources/iOS/IOSGenerationModeViews.swift:352— Sources/iOS/IOSGenerationModeViews.swift:352-364 | Sources/iOS/IOSGenerationModeViews.swift:1254-1266 | Sources/iOS/IOSGenerationModeViews.swift:1912-1924 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSGenerationModeViews.swift:352` 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, `Sources/iOS/IOSGenerationModeViews.swift:350` calls `disabled`, `opacity` and `Sources/iOS/IOSGenerationModeViews.swift:1253` 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 (12–13 lines × 2) Sources/Services/MacStudioSingleTakeGenerationHooks.swift:98— Sources/Services/MacStudioSingleTakeGenerationHooks.swift:98-110 | Sources/iOS/Studio/IOSSingleTakeGenerationExecutionHooks.swift:59-70 — 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 `Sources/iOS/Studio/IOSSingleTakeGenerationExecutionHooks.swift:59` 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 (12–13 lines × 2) Sources/SharedSupport/Views/VocelloCapsuleSelector.swift:103— Sources/SharedSupport/Views/VocelloCapsuleSelector.swift:103-115 | Sources/iOS/App/TabDock.swift:182-193 — 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 `Sources/SharedSupport/Views/VocelloCapsuleSelector.swift:103` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/App/TabDock.swift:195` calls `stroke`, `opacity` and `Sources/SharedSupport/Views/VocelloCapsuleSelector.swift:116` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 2) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1073— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1073-1083 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1329-1340 — 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 `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1073` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) scripts/check_ios_ui_perf.py:411— scripts/check_ios_ui_perf.py:411-422 | scripts/check_macos_ui_perf.py:501-511 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 `scripts/check_ios_ui_perf.py:411` 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 (12 lines × 3) Sources/QwenVoiceCore/NativeEngineRuntime.swift:1637— Sources/QwenVoiceCore/NativeEngineRuntime.swift:1637-1648 | Sources/QwenVoiceCore/NativeEngineRuntime.swift:1712-1723 | Sources/QwenVoiceCore/NativeEngineRuntime.swift:1788-1799 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also 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 (12 lines × 3) Sources/Views/Studio/MacCustomVoiceScreen.swift:85— Sources/Views/Studio/MacCustomVoiceScreen.swift:85-98 | Sources/Views/Studio/MacVoiceCloningScreen.swift:194-205 | Sources/Views/Studio/MacVoiceDesignScreen.swift:101-112 — 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. 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–11 lines × 3) Sources/iOS/IOSGenerationModeViews.swift:520— Sources/iOS/IOSGenerationModeViews.swift:520-529 | Sources/iOS/IOSGenerationModeViews.swift:1408-1418 | Sources/iOS/IOSGenerationModeViews.swift:2229-2238 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSGenerationModeViews.swift:1408` 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 (10–11 lines × 3) scripts/build_cleanup.py:448— scripts/build_cleanup.py:448-457 | scripts/build_output_policy.py:757-767 | scripts/build_output_policy.py:783-792 — 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 `scripts/build_cleanup.py:448` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8–9 lines × 3) Sources/QwenVoiceCore/GenerationTelemetryJSONLSink.swift:182— Sources/QwenVoiceCore/GenerationTelemetryJSONLSink.swift:182-189 | Sources/QwenVoiceCore/MLXTTSEngine.swift:2770-2778 | Sources/iOSSupport/Services/IOSDeviceDiagnosticsRecorder.swift:167-175 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also 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 (8–9 lines × 3) Sources/iOS/History/HistoryScreen.swift:1030— Sources/iOS/History/HistoryScreen.swift:1030-1037 | Sources/iOS/Overlays/IOSRecordingOverlay.swift:119-127 | Sources/iOS/Sheets/IOSBottomSheets.swift:112-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/History/HistoryScreen.swift:1030` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) Sources/Models/TTSContract.swift:248— Sources/Models/TTSContract.swift:248-254 | Sources/Models/TTSContract.swift:293-302 | Sources/iOSSupport/Models/TTSContract.swift:92-98 — 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.
Duplicated block (7 lines × 3) Sources/QwenVoiceCore/SemanticTypes.swift:1003— Sources/QwenVoiceCore/SemanticTypes.swift:1003-1016 | Sources/QwenVoiceCore/SemanticTypes.swift:1028-1041 | Sources/iOS/Sheets/IOSBottomSheets.swift:1102-1108 — 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 `Sources/iOS/Sheets/IOSBottomSheets.swift:1102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) Sources/Views/Studio/MacCustomVoiceScreen.swift:27— Sources/Views/Studio/MacCustomVoiceScreen.swift:27-33 | Sources/Views/Studio/MacVoiceCloningScreen.swift:479-484 | Sources/Views/Studio/MacVoiceDesignScreen.swift:31-37 — 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.
Duplicated block (6 lines × 3) scripts/check_ios_ui_benchmark.py:288— scripts/check_ios_ui_benchmark.py:288-293 | scripts/check_macos_ui_bench.py:833-838 | scripts/publish_benchmark_history.py:770-775 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×2
Edited copy of a member (36 corresponding lines) scripts/qc/features.py:81— scripts/qc/features.py:81-116 | scripts/qc/runners/_kit.py:187-238 — These two members are one piece of code written twice and then edited apart: 36 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 (36 corresponding lines) scripts/quality_screen.py:663— scripts/quality_screen.py:663-700 | scripts/quality_screen.py:705-740 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×2
Edited copies of one member (3 members, 11+ corresponding lines) scripts/benchmark_history.py:857— scripts/benchmark_history.py:857-867 | scripts/lib/jsonio.py:127-144 | scripts/release_evidence.py:67-79 — 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.
Edited copies of one member (3 members, 11+ corresponding lines) scripts/ios_device_eligibility.py:91— scripts/ios_device_eligibility.py:91-104 | scripts/ios_storage_protection_policy.py:131-144 | scripts/saved_voice_lifecycle_contract.py:212-222 — 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.
Duplicated block (27 lines × 2) scripts/build_cleanup.py:172— scripts/build_cleanup.py:172-198 | scripts/lib/build_artifact_retention.py:54-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (27 lines × 2) scripts/check_ios_ui_perf.py:426— scripts/check_ios_ui_perf.py:426-452 | scripts/check_macos_ui_perf.py:515-542 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 4) scripts/audio_qc_script_pool.py:501— scripts/audio_qc_script_pool.py:501-505 | scripts/lib/farm_smoke.py:81-85 | scripts/pcm_identity.py:59-63 | scripts/qc/qualification.py:39-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times.
Duplicated block (5 lines × 4) scripts/convert_codec_f16.py:43— scripts/convert_codec_f16.py:43-47 | scripts/encoder_golden_codes.py:173-177 | scripts/qc/runners/speech_common.py:127-131 | scripts/quality_screen.py:85-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `Path` in one and `Path | str` 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 (13 lines × 2 locations) design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:437— design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:437 · design_references/Vocello Design System/ui_kits/mac-app/LibraryScreens.jsx:234 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 2 locations) design_references/Vocello iOS/studio.jsx:79— design_references/Vocello iOS/studio.jsx:79 · design_references/Vocello iOS/studio.jsx:105 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (10 lines × 2 locations) design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:282— design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:282 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2 locations) design_references/Vocello iOS/screens.jsx:16— design_references/Vocello iOS/screens.jsx:16 · design_references/Vocello iOS/screens.jsx:126 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 4 locations) design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:80— design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:80 · design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:95 · design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:142 · design_references/Vocello iOS/icons.jsx:117 — the 4 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 4 locations) design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:104— design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:104 · design_references/Vocello iOS/icons.jsx:71 · design_references/Vocello iOS/icons.jsx:129 · design_references/Vocello iOS/icons.jsx:137 — the 4 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
BenchCommand.run (cyclomatic 91) Sources/VocelloCLI/BenchCommand.swift:185— BenchCommand.run has cyclomatic complexity 91 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StreamingExecutionContext.run (cyclomatic 79) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1730— StreamingExecutionContext.run 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.
StreamingExecutionContext.makeAudioQCReport (cyclomatic 68) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3312— StreamingExecutionContext.makeAudioQCReport has cyclomatic complexity 68 (threshold 15). Of this number, 59 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NativeEngineRuntime.prepareGeneration (cyclomatic 65) Sources/QwenVoiceCore/NativeEngineRuntime.swift:812— NativeEngineRuntime.prepareGeneration has cyclomatic complexity 65 (threshold 15). Of this number, 64 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.
ProductionModelCatalog.validate (cyclomatic 55) Sources/QwenVoiceCore/ProductionModelCatalog.swift:425— ProductionModelCatalog.validate has cyclomatic complexity 55 (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.
VoiceClipTranscriber.isValidConsistentEvidence (cyclomatic 51) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:750— VoiceClipTranscriber.isValidConsistentEvidence has cyclomatic complexity 51 (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.
GenerationFailureDiagnosticLogger.errorMetadata (cyclomatic 48) Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:184— GenerationFailureDiagnosticLogger.errorMetadata has cyclomatic complexity 48 (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.
BenchCodecReplay.run (cyclomatic 48) Sources/VocelloCLI/BenchCodecReplay.swift:62— BenchCodecReplay.run 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.
IOSDeviceDiagnosticsRunner.requireQualificationTelemetry (cyclomatic 45) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1663— IOSDeviceDiagnosticsRunner.requireQualificationTelemetry has cyclomatic complexity 45 (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.
StreamingExecutionContext.writeEngineTelemetryRecord (cyclomatic 43) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2773— StreamingExecutionContext.writeEngineTelemetryRecord has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DesktopEngineHost.enrollVoice (cyclomatic 42) Sources/VocelloDesktopCore/DesktopVoiceEnrollment.swift:135— DesktopEngineHost.enrollVoice 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.
MacGenerationWarmupCoordinator.scheduleWarmupIfNeeded (cyclomatic 40) Sources/Services/MacGenerationWarmupCoordinator.swift:209— MacGenerationWarmupCoordinator.scheduleWarmupIfNeeded 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.
IOSDeviceDiagnosticsRunner.runCloneConditioningAcceptance (cyclomatic 38) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:969— IOSDeviceDiagnosticsRunner.runCloneConditioningAcceptance 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.
IOSLongFormProjectRunner.run (cyclomatic 35) Sources/iOS/Studio/IOSLongFormProject.swift:899— IOSLongFormProjectRunner.run 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.
NativeAudioPreparationService.convertAudio (cyclomatic 34) Sources/QwenVoiceCore/AudioPreparation.swift:569— NativeAudioPreparationService.convertAudio 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.
GenerationStreamingTelemetryV9Bridge.make (cyclomatic 33) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Bridge.swift:343— GenerationStreamingTelemetryV9Bridge.make has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 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.
ModelsCommand.run (cyclomatic 32) Sources/VocelloCLI/ModelsCommand.swift:115— ModelsCommand.run 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.
studio.Studio (cyclomatic 32) design_references/Vocello iOS/studio.jsx:6— studio.Studio 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.
PCM16StreamLimiter.append (cyclomatic 29) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1260— PCM16StreamLimiter.append 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.
IOSStartupReliabilityRunner.execute (cyclomatic 29) Sources/iOS/IOSStartupReliabilityRunner.swift:184— IOSStartupReliabilityRunner.execute 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.
MLXModelLoadCoordinator.loadModel (cyclomatic 27) Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:259— MLXModelLoadCoordinator.loadModel 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.
LocalModelAssetStore.deepIntegrity (cyclomatic 27) Sources/QwenVoiceCore/ModelAssets.swift:359— LocalModelAssetStore.deepIntegrity 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.
CodecRoundTripEvidence.monoPCM16Samples (cyclomatic 26) Sources/QwenVoiceCore/CodecRoundTripEvidence.swift:128— CodecRoundTripEvidence.monoPCM16Samples 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.
IOSModelDownloadLedger.validated (cyclomatic 26) Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:163— IOSModelDownloadLedger.validated 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.
BenchCodecLoop.run (cyclomatic 26) Sources/VocelloCLI/BenchCodecLoop.swift:70— BenchCodecLoop.run 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.
IOSVoiceDesignView.body (cyclomatic 26) Sources/iOS/IOSGenerationModeViews.swift:741— IOSVoiceDesignView.body 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.
IOSVoiceCloningView.generate (cyclomatic 26) Sources/iOS/IOSGenerationModeViews.swift:2123— IOSVoiceCloningView.generate 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.
QualityGateRegistry.evaluate (cyclomatic 25) Sources/QwenVoiceCore/GenerationQualityReport.swift:211— QualityGateRegistry.evaluate 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.
LongFormManifestV4.validated (cyclomatic 25) Sources/QwenVoiceCore/LongFormPlanning.swift:850— LongFormManifestV4.validated 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.
VocelloMain.dispatch (cyclomatic 25) Sources/VocelloCLI/VocelloMain.swift:72— VocelloMain.dispatch has cyclomatic complexity 25 (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.
IOSDeviceDiagnosticsRunner.runVoiceReliabilityExport (cyclomatic 25) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2174— IOSDeviceDiagnosticsRunner.runVoiceReliabilityExport 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.
IOSModelInstallerViewModel.apply (cyclomatic 25) Sources/iOS/IOSModelInstallerViewModel.swift:494— IOSModelInstallerViewModel.apply 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.
BenchCodecRoundTrip.run (cyclomatic 24) Sources/VocelloCLI/BenchCodecRoundTrip.swift:67— BenchCodecRoundTrip.run 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.
CLIFailure.classify (cyclomatic 24) Sources/VocelloCLI/Core/Contract/CLIFailure.swift:78— CLIFailure.classify 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.
IOSModelRow.statusText (cyclomatic 24) Sources/iOS/IOSSettingsViews.swift:649— IOSModelRow.statusText has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GenerationStreamingTelemetryV9.validate (cyclomatic 23) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:50— GenerationStreamingTelemetryV9.validate 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.
BatchCommand.run (cyclomatic 23) Sources/VocelloCLI/BatchCommand.swift:97— BatchCommand.run 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.
VoicesCommand.run (cyclomatic 23) Sources/VocelloCLI/VoicesCommand.swift:61— VoicesCommand.run 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.
IOSDeviceDiagnosticsRunner.runMemoryQualification (cyclomatic 23) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1274— IOSDeviceDiagnosticsRunner.runMemoryQualification 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.
app.App (cyclomatic 23) design_references/Vocello iOS/app.jsx:12— app.App has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 7 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.
rendered-contract.validateRenderedMarkup (cyclomatic 23) website/scripts/rendered-contract.mjs:17— rendered-contract.validateRenderedMarkup 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.
GenerationQualityReportProducer.fastReport (cyclomatic 22) Sources/QwenVoiceCore/GenerationQualityReportProducer.swift:24— GenerationQualityReportProducer.fastReport 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.
ShippingChunkObservationV9.validate (cyclomatic 22) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Bridge.swift:156— ShippingChunkObservationV9.validate 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.
GenerationStreamingTelemetryV9Publication.makeCompleteDocument (cyclomatic 22) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Publication.swift:158— GenerationStreamingTelemetryV9Publication.makeCompleteDocument 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.
HistoryPersistenceError.classify (cyclomatic 22) Sources/SharedSupport/Database/HistoryPersistenceError.swift:87— HistoryPersistenceError.classify 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.
GenerationOutputVerifier.evaluate (cyclomatic 22) Sources/SharedSupport/Services/GenerationOutputVerifier.swift:170— GenerationOutputVerifier.evaluate 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.
DoctorCommand.run (cyclomatic 22) Sources/VocelloCLI/DoctorCommand.swift:29— DoctorCommand.run 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.
ModelsCommand.runVerify (cyclomatic 22) Sources/VocelloCLI/ModelsCommand.swift:254— ModelsCommand.runVerify 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.
CLIGenerateRequest.parse (cyclomatic 22) Sources/VocelloCLI/Core/Contract/CLIGenerateRequest.swift:56— CLIGenerateRequest.parse 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.
player.PlayerSheet (cyclomatic 22) design_references/Vocello iOS/player.jsx:6— player.PlayerSheet has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 6 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.
IOSUnloadQuiescenceEvaluator.violations (cyclomatic 21) Sources/QwenVoiceCore/IOSUnloadQuiescence.swift:65— IOSUnloadQuiescenceEvaluator.violations 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.
PreparedVoiceRepository.reconcileCommitTransaction (cyclomatic 21) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:906— PreparedVoiceRepository.reconcileCommitTransaction 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.
MacSavedVoiceSheet.body (cyclomatic 21) Sources/Views/Voices/MacSavedVoiceSheet.swift:161— MacSavedVoiceSheet.body 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.
site-contract.validateText (cyclomatic 21) website/scripts/site-contract.mjs:48— site-contract.validateText 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.
GenerationStreamingTelemetryV9Publication.isPublicationReady (cyclomatic 20) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Publication.swift:78— GenerationStreamingTelemetryV9Publication.isPublicationReady 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.
LongFormHistoryAcceptanceStore.prepare (cyclomatic 20) Sources/SharedSupport/Database/LongFormHistoryAcceptance.swift:274— LongFormHistoryAcceptanceStore.prepare 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.
GenerateCommand.run (cyclomatic 20) Sources/VocelloCLI/GenerateCommand.swift:423— GenerateCommand.run 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.
DesktopAppSettings.set (cyclomatic 20) Sources/VocelloDesktopCore/DesktopAppSettings.swift:74— DesktopAppSettings.set 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.
IOSDeviceDiagnosticsRunner.run (cyclomatic 20) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:605— IOSDeviceDiagnosticsRunner.run 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.
TTSEngineStore.syncFromSnapshot (cyclomatic 20) Sources/iOS/TTSEngineStore.swift:730— TTSEngineStore.syncFromSnapshot 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.
IOSLongFormProjectRunner.regenerateSegment (cyclomatic 20) Sources/iOS/Studio/IOSLongFormProject.swift:1207— IOSLongFormProjectRunner.regenerateSegment 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.
IOSRecordVoiceSheet.body (cyclomatic 20) Sources/iOS/Voices/IOSRecordVoiceSheet.swift:87— IOSRecordVoiceSheet.body has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
sheets.VoicePickerSheet (cyclomatic 20) design_references/Vocello iOS/sheets.jsx:6— sheets.VoicePickerSheet has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 2 function items 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.
AudioQCSignalObserver.repetitionStripe (cyclomatic 19) Sources/QwenVoiceCore/AudioQCSignalObserver.swift:816— AudioQCSignalObserver.repetitionStripe 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.
NativeEngineRuntime.recordGenerationPlanShadow (cyclomatic 19) Sources/QwenVoiceCore/NativeEngineRuntime.swift:2480— NativeEngineRuntime.recordGenerationPlanShadow 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.
GenerationHistoryOutboxStore.scan (cyclomatic 19) Sources/SharedSupport/Database/GenerationHistoryOutbox.swift:351— GenerationHistoryOutboxStore.scan 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.
ModelManagerViewModel.localModelInfo (cyclomatic 19) Sources/ViewModels/ModelManagerViewModel.swift:1517— ModelManagerViewModel.localModelInfo 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.
Parser.parseAll (cyclomatic 19) Sources/VocelloCLI/Core/CommandModel/CLIParser.swift:153— Parser.parseAll 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.
NativeAudioPreparationService.resampledToCanonicalRate (cyclomatic 18) Sources/QwenVoiceCore/AudioPreparation.swift:967— NativeAudioPreparationService.resampledToCanonicalRate 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.
HuggingFaceDownloader.downloadTemporaryFile (cyclomatic 18) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3049— HuggingFaceDownloader.downloadTemporaryFile 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.
LongFormPlanner.scanWindow (cyclomatic 18) Sources/QwenVoiceCore/LongFormPlanning.swift:388— LongFormPlanner.scanWindow 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.
NativeGenerationTerminalClassifier.disposition (cyclomatic 18) Sources/QwenVoiceCore/NativeEngineRuntime.swift:284— NativeGenerationTerminalClassifier.disposition 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.
PreparedVoiceRepository.commit (cyclomatic 18) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:351— PreparedVoiceRepository.commit 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.
tweaks-panel.TweaksPanel (cyclomatic 18) REDACTED:186— tweaks-panel.TweaksPanel has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 207, a function literal at line 209, a function literal at line 239, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
NativeAudioPreparationService.normalizeAudioAsynchronously (cyclomatic 17) Sources/QwenVoiceCore/AudioPreparation.swift:405— NativeAudioPreparationService.normalizeAudioAsynchronously 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.
NativeAudioPreparationService.decodedMonoSamples (cyclomatic 17) Sources/QwenVoiceCore/AudioPreparation.swift:816— NativeAudioPreparationService.decodedMonoSamples has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WAVDataLayout.init (cyclomatic 17) Sources/QwenVoiceCore/AudioPublicationMarking.swift:154— WAVDataLayout.init 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.
PCM16LeadingSilenceGate.filter (cyclomatic 17) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1077— PCM16LeadingSilenceGate.filter 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.
IOSStartupReliabilityLaunchSpec.validate (cyclomatic 17) Sources/QwenVoiceCore/IOSStartupReliabilityPlan.swift:76— IOSStartupReliabilityLaunchSpec.validate 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.
ModelDownloadRetryPolicy.disposition (cyclomatic 17) Sources/QwenVoiceCore/ModelDownloadContracts.swift:496— ModelDownloadRetryPolicy.disposition 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.
ModelUpdateLedger.reconcile (cyclomatic 17) Sources/QwenVoiceCore/ModelUpdateLedger.swift:214— ModelUpdateLedger.reconcile has cyclomatic complexity 17 (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.
NativePreparedCloneConditioningCache.resolveVoiceClonePrompt (cyclomatic 17) Sources/QwenVoiceCore/NativeCloneSupport.swift:437— NativePreparedCloneConditioningCache.resolveVoiceClonePrompt 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.
PreparedVoiceRepository.publishClonePromptArtifact (cyclomatic 17) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:521— PreparedVoiceRepository.publishClonePromptArtifact 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.
StartupReliabilityDiagnosticEvidence.verifiedReplayTrace (cyclomatic 17) Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:301— StartupReliabilityDiagnosticEvidence.verifiedReplayTrace 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.
VoiceClipTranscriber.enrollmentResult (cyclomatic 17) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:467— VoiceClipTranscriber.enrollmentResult 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.
ModelManagerViewModel.downloadDetail (cyclomatic 17) Sources/ViewModels/ModelManagerViewModel.swift:915— ModelManagerViewModel.downloadDetail 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.
RunCommand.report (cyclomatic 17) Sources/VocelloCLI/RunCommand.swift:226— RunCommand.report 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.
CLICompletionGenerator.zsh (cyclomatic 17) Sources/VocelloCLI/Core/CommandModel/CLICompletionGenerator.swift:58— CLICompletionGenerator.zsh has cyclomatic complexity 17 (threshold 15). 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.
Parser.option (cyclomatic 17) Sources/VocelloCLI/Core/CommandModel/CLIParser.swift:201— Parser.option 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.
ContentView.screenView (cyclomatic 17) Sources/ContentView.swift:285— ContentView.screenView 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.
IOSCustomVoiceView.generate (cyclomatic 17) Sources/iOS/IOSGenerationModeViews.swift:449— IOSCustomVoiceView.generate 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.
IOSModelInstallerViewModel.state (cyclomatic 17) Sources/iOS/IOSModelInstallerViewModel.swift:301— IOSModelInstallerViewModel.state 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.
DiagnosticPrivacy.redactingExceptionReasons (cyclomatic 16) Sources/QwenVoiceCore/DiagnosticPrivacy.swift:108— DiagnosticPrivacy.redactingExceptionReasons 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.
GenerationFailurePresentationReason.reason (cyclomatic 16) Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:509— GenerationFailurePresentationReason.reason has cyclomatic complexity 16 (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.
ScriptUnits.init (cyclomatic 16) Sources/QwenVoiceCore/GenerationSemantics.swift:1293— ScriptUnits.init 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.
GenerationTelemetryJSONLSink.pruneJSONLFromFront (cyclomatic 16) Sources/QwenVoiceCore/GenerationTelemetryJSONLSink.swift:205— GenerationTelemetryJSONLSink.pruneJSONLFromFront 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.
HuggingFaceDownloader.runDownload (cyclomatic 16) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:1714— HuggingFaceDownloader.runDownload 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.
HuggingFaceDownloader.runChunkTransfers (cyclomatic 16) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:2608— HuggingFaceDownloader.runChunkTransfers 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.
HuggingFaceDownloader.validateStagedRepository (cyclomatic 16) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3321— HuggingFaceDownloader.validateStagedRepository 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.
Qwen3TTSRuntimeProfile.validate (cyclomatic 16) Sources/QwenVoiceCore/Qwen3TTSRuntimeProfile.swift:299— Qwen3TTSRuntimeProfile.validate 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.
SharedModelComponentStore.installStagedModel (cyclomatic 16) Sources/QwenVoiceCore/SharedModelComponentStore.swift:577— SharedModelComponentStore.installStagedModel has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: SharedModelComponentStoreError.errorDescription (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
SharedModelComponentStore.replaceModelWithSharedLinks (cyclomatic 16) Sources/QwenVoiceCore/SharedModelComponentStore.swift:1133— SharedModelComponentStore.replaceModelWithSharedLinks 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. This is NOT this file's highest cyclomatic complexity: SharedModelComponentStoreError.errorDescription (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
LongFormHistoryAcceptanceStore.commit (cyclomatic 16) Sources/SharedSupport/Database/LongFormHistoryAcceptance.swift:93— LongFormHistoryAcceptanceStore.commit 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.
VoiceClipTranscriber.recognizeDetailed (cyclomatic 16) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1354— VoiceClipTranscriber.recognizeDetailed 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.
VocelloCapsuleSelector.body (cyclomatic 16) Sources/SharedSupport/Views/VocelloCapsuleSelector.swift:27— VocelloCapsuleSelector.body 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.
MacVoiceCloningScreen.syncCloneReferencePriming (cyclomatic 16) Sources/Views/Studio/MacVoiceCloningScreen.swift:946— MacVoiceCloningScreen.syncCloneReferencePriming 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.
IOSMultilineTextView.updateUIView (cyclomatic 16) Sources/iOS/IOSGenerationInputControls.swift:208— IOSMultilineTextView.updateUIView 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.
IOSStudioComposerCard.body (cyclomatic 16) Sources/iOS/IOSGenerationSharedViews.swift:129— IOSStudioComposerCard.body 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.
sheets.RecordingOverlay (cyclomatic 16) design_references/Vocello iOS/sheets.jsx:172— sheets.RecordingOverlay has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 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.
BenchCommand.run (cognitive 166) Sources/VocelloCLI/BenchCommand.swift:185— BenchCommand.run has cognitive complexity 166 (threshold 15). Drivers by points: if/else 48 (89 pts), boolean chains 29, ternaries 8 (19 pts), loops 6 (15 pts), error handling 3 (14 pts) (nesting depth added 72). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StreamingExecutionContext.run (cognitive 143) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1730— StreamingExecutionContext.run has cognitive complexity 143 (threshold 15). Drivers by points: if/else 33 (78 pts), ternaries 17 (33 pts), boolean chains 21, error handling 6 (7 pts), loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeEngineRuntime.prepareGeneration (cognitive 123) Sources/QwenVoiceCore/NativeEngineRuntime.swift:812— NativeEngineRuntime.prepareGeneration has cognitive complexity 123 (threshold 15). Drivers by points: if/else 38 (76 pts), ternaries 13 (28 pts), boolean chains 10, match/switch 2 (5 pts), error handling 2 (4 pts) (nesting depth added 58). Of this number, 121 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.
PCM16StreamLimiter.append (cognitive 74) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1260— PCM16StreamLimiter.append has cognitive complexity 74 (threshold 15). Drivers by points: if/else 25 (64 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 43). 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.
StreamingExecutionContext.makeAudioQCReport (cognitive 70) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3312— StreamingExecutionContext.makeAudioQCReport has cognitive complexity 70 (threshold 15). Drivers by points: if/else 38 (40 pts), boolean chains 16, ternaries 13, loops 1 (nesting depth added 2). Of this number, 61 points are the body's own statements and 9 belong to 3 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, 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.
ProductionModelCatalog.validate (cognitive 69) Sources/QwenVoiceCore/ProductionModelCatalog.swift:425— ProductionModelCatalog.validate has cognitive complexity 69 (threshold 15). Drivers by points: boolean chains 32, if/else 17 (30 pts), loops 5 (7 pts) (nesting depth added 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.
IOSLongFormProjectRunner.run (cognitive 65) Sources/iOS/Studio/IOSLongFormProject.swift:899— IOSLongFormProjectRunner.run has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (46 pts), boolean chains 10, ternaries 1 (4 pts), error handling 2 (3 pts), loops 2 (nesting depth added 31). Of this number, 64 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.
IOSDeviceDiagnosticsRunner.runCloneConditioningAcceptance (cognitive 64) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:969— IOSDeviceDiagnosticsRunner.runCloneConditioningAcceptance has cognitive complexity 64 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 19, error handling 2 (4 pts), ternaries 1 (3 pts), loops 1 (2 pts) (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.
BenchCodecReplay.run (cognitive 59) Sources/VocelloCLI/BenchCodecReplay.swift:62— BenchCodecReplay.run has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 25, if/else 19 (25 pts), ternaries 5 (8 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.
IOSStartupReliabilityRunner.execute (cognitive 55) Sources/iOS/IOSStartupReliabilityRunner.swift:184— IOSStartupReliabilityRunner.execute has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (26 pts), ternaries 8 (17 pts), boolean chains 6, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenerationHistoryOutboxStore.scan (cognitive 54) Sources/SharedSupport/Database/GenerationHistoryOutbox.swift:351— GenerationHistoryOutboxStore.scan has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (38 pts), error handling 3 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSDeviceDiagnosticsRunner.runMemoryQualification (cognitive 53) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1274— IOSDeviceDiagnosticsRunner.runMemoryQualification has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (34 pts), error handling 4 (11 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioQCSignalObserver.repetitionStripe (cognitive 52) Sources/QwenVoiceCore/AudioQCSignalObserver.swift:816— AudioQCSignalObserver.repetitionStripe has cognitive complexity 52 (threshold 15). Drivers by points: if/else 8 (33 pts), loops 5 (12 pts), ternaries 2 (4 pts), boolean chains 3 (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.
VoiceClipTranscriber.isValidConsistentEvidence (cognitive 51) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:750— VoiceClipTranscriber.isValidConsistentEvidence has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 46, if/else 3 (4 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.
NativeAudioPreparationService.convertAudio (cognitive 49) Sources/QwenVoiceCore/AudioPreparation.swift:569— NativeAudioPreparationService.convertAudio has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (29 pts), error handling 10 (13 pts), boolean chains 2, loops 1 (2 pts), ternaries 2, match/switch 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.
StreamingExecutionContext.writeEngineTelemetryRecord (cognitive 49) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2773— StreamingExecutionContext.writeEngineTelemetryRecord has cognitive complexity 49 (threshold 15). Drivers by points: if/else 28 (38 pts), boolean chains 5, ternaries 2 (3 pts), match/switch 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacGenerationWarmupCoordinator.scheduleWarmupIfNeeded (cognitive 46) Sources/Services/MacGenerationWarmupCoordinator.swift:209— MacGenerationWarmupCoordinator.scheduleWarmupIfNeeded has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 17, error handling 2 (3 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopEngineHost.enrollVoice (cognitive 45) Sources/VocelloDesktopCore/DesktopVoiceEnrollment.swift:135— DesktopEngineHost.enrollVoice has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 7, match/switch 4 (7 pts), error handling 2 (4 pts), 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.
IOSDeviceDiagnosticsRunner.requireQualificationTelemetry (cognitive 45) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1663— IOSDeviceDiagnosticsRunner.requireQualificationTelemetry has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 30, if/else 12 (13 pts), error handling 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.
BatchCommand.run (cognitive 44) Sources/VocelloCLI/BatchCommand.swift:97— BatchCommand.run has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 5 (14 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelsCommand.runVerify (cognitive 44) Sources/VocelloCLI/ModelsCommand.swift:254— ModelsCommand.runVerify has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 9 (12 pts), loops 5 (12 pts), boolean chains 4 (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.
ModelsCommand.run (cognitive 43) Sources/VocelloCLI/ModelsCommand.swift:115— ModelsCommand.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 5 (10 pts), loops 4 (8 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VoicesCommand.run (cognitive 43) Sources/VocelloCLI/VoicesCommand.swift:61— VoicesCommand.run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (25 pts), ternaries 3 (8 pts), loops 3 (7 pts), boolean chains 2, match/switch 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.
PreparedVoiceRepository.reconcileCommitTransaction (cognitive 42) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:906— PreparedVoiceRepository.reconcileCommitTransaction has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 3, loops 1 (3 pts), error handling 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.
IOSVoiceDesignView.body (cognitive 42) Sources/iOS/IOSGenerationModeViews.swift:741— IOSVoiceDesignView.body has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 8, error handling 2 (6 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.
IOSDeviceDiagnosticsRunner.runVoiceReliabilityExport (cognitive 40) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2174— IOSDeviceDiagnosticsRunner.runVoiceReliabilityExport has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 12, ternaries 3 (9 pts), loops 2 (4 pts), error handling 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.
RunCommand.runRequests (cognitive 37) Sources/VocelloCLI/RunCommand.swift:129— RunCommand.runRequests has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (27 pts), error handling 2 (5 pts), match/switch 1 (4 pts), loops 1 (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.
LongFormManifestV4.validated (cognitive 36) Sources/QwenVoiceCore/LongFormPlanning.swift:850— LongFormManifestV4.validated has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 8, loops 4 (7 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.
BenchCodecLoop.run (cognitive 36) Sources/VocelloCLI/BenchCodecLoop.swift:70— BenchCodecLoop.run has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 7, loops 3 (5 pts), error handling 3 (4 pts), ternaries 2 (4 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.
site-contract.validateText (cognitive 36) website/scripts/site-contract.mjs:48— site-contract.validateText has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 6 (10 pts), boolean chains 3 (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.
GenerationStreamingTelemetryV9Bridge.make (cognitive 35) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Bridge.swift:343— GenerationStreamingTelemetryV9Bridge.make has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 8 (10 pts), boolean chains 9, error handling 1, loops 1 (nesting depth added 3). Of this number, 31 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.
HuggingFaceDownloader.runChunkTransfers (cognitive 35) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:2608— HuggingFaceDownloader.runChunkTransfers has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (11 pts), error handling 3 (8 pts), boolean chains 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BenchCodecRoundTrip.run (cognitive 35) Sources/VocelloCLI/BenchCodecRoundTrip.swift:67— BenchCodecRoundTrip.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 6, error handling 3 (4 pts), ternaries 2 (4 pts), loops 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.
DoctorCommand.run (cognitive 35) Sources/VocelloCLI/DoctorCommand.swift:29— DoctorCommand.run has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 11 (19 pts), if/else 9 (11 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodecRoundTripEvidence.monoPCM16Samples (cognitive 34) Sources/QwenVoiceCore/CodecRoundTripEvidence.swift:128— CodecRoundTripEvidence.monoPCM16Samples has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 15, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LongFormHistoryAcceptanceStore.commit (cognitive 34) Sources/SharedSupport/Database/LongFormHistoryAcceptance.swift:93— LongFormHistoryAcceptanceStore.commit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), error handling 3 (8 pts), match/switch 1 (2 pts), boolean chains 1, 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.
IOSDeviceDiagnosticsRunner.run (cognitive 34) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:605— IOSDeviceDiagnosticsRunner.run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 5 (11 pts), boolean chains 2, error handling 2 (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.
QualityGateRegistry.evaluate (cognitive 33) Sources/QwenVoiceCore/GenerationQualityReport.swift:211— QualityGateRegistry.evaluate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MLXModelLoadCoordinator.loadModel (cognitive 33) Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:259— MLXModelLoadCoordinator.loadModel has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 8, boolean chains 7, error handling 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalModelAssetStore.deepIntegrity (cognitive 33) Sources/QwenVoiceCore/ModelAssets.swift:359— LocalModelAssetStore.deepIntegrity has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 11, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenerateCommand.run (cognitive 33) Sources/VocelloCLI/GenerateCommand.swift:423— GenerateCommand.run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (23 pts), ternaries 2 (5 pts), boolean chains 2, match/switch 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSVoiceCloningView.generate (cognitive 33) Sources/iOS/IOSGenerationModeViews.swift:2123— IOSVoiceCloningView.generate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 7, error handling 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.
HuggingFaceDownloader.downloadFile (cognitive 32) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:2207— HuggingFaceDownloader.downloadFile has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (25 pts), match/switch 1 (3 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiagnosticPrivacy.redactingExceptionReasons (cognitive 31) Sources/QwenVoiceCore/DiagnosticPrivacy.swift:108— DiagnosticPrivacy.redactingExceptionReasons has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (8 pts), boolean chains 5 (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.
GenerationFailureDiagnosticLogger.errorMetadata (cognitive 31) Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:184— GenerationFailureDiagnosticLogger.errorMetadata has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (19 pts), match/switch 6 (12 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.
PCM16LeadingSilenceGate.filter (cognitive 31) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:1077— PCM16LeadingSilenceGate.filter has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 4 (11 pts), boolean chains 3, ternaries 1 (2 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.
HuggingFaceDownloader.downloadTemporaryFile (cognitive 31) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3049— HuggingFaceDownloader.downloadTemporaryFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 4, error handling 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.
MLXTTSEngine.generate (cognitive 30) Sources/QwenVoiceCore/MLXTTSEngine.swift:1528— MLXTTSEngine.generate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 3 (10 pts), error handling 3 (5 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.
CLIFailure.classify (cognitive 30) Sources/VocelloCLI/Core/Contract/CLIFailure.swift:78— CLIFailure.classify has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 3 (6 pts), match/switch 2 (4 pts), boolean chains 3 (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.
LongFormPlanner.scanWindow (cognitive 29) Sources/QwenVoiceCore/LongFormPlanning.swift:388— LongFormPlanner.scanWindow has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 5, 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.
RunCommand.report (cognitive 29) Sources/VocelloCLI/RunCommand.swift:226— RunCommand.report has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 1 (4 pts), boolean chains 2, loops 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.
IOSLongFormProjectRunner.regenerateSegment (cognitive 29) Sources/iOS/Studio/IOSLongFormProject.swift:1207— IOSLongFormProjectRunner.regenerateSegment has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rendered-contract.validateRenderedMarkup (cognitive 29) website/scripts/rendered-contract.mjs:17— rendered-contract.validateRenderedMarkup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 6 (7 pts), boolean chains 4 (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.
GenerationStreamingTelemetryV9.validate (cognitive 28) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9.swift:50— GenerationStreamingTelemetryV9.validate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 5, 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.
SharedModelComponentStore.installStagedModel (cognitive 28) Sources/QwenVoiceCore/SharedModelComponentStore.swift:577— SharedModelComponentStore.installStagedModel has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (5 pts), boolean chains 3, error handling 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeAudioPreparationService.decodedMonoSamples (cognitive 27) Sources/QwenVoiceCore/AudioPreparation.swift:816— NativeAudioPreparationService.decodedMonoSamples has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (8 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 10). 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.
ScriptUnits.init (cognitive 27) Sources/QwenVoiceCore/GenerationSemantics.swift:1293— ScriptUnits.init has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CLIGenerateRequest.parse (cognitive 27) Sources/VocelloCLI/Core/Contract/CLIGenerateRequest.swift:56— CLIGenerateRequest.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (8 pts), boolean chains 2, 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.
IOSModelDownloadLedger.validated (cognitive 26) Sources/QwenVoiceCore/IOSModelDownloadLedger.swift:163— IOSModelDownloadLedger.validated has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 22, if/else 2 (3 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.
PreparedVoiceRepository.commit (cognitive 26) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:351— PreparedVoiceRepository.commit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 4 (5 pts), ternaries 2, 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.
VoiceClipTranscriber.enrollmentResult (cognitive 26) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:467— VoiceClipTranscriber.enrollmentResult has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (5 pts), boolean chains 4, 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.
ShippingChunkObservationV9.validate (cognitive 25) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Bridge.swift:156— ShippingChunkObservationV9.validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9 (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.
CLICompletionGenerator.zsh (cognitive 25) Sources/VocelloCLI/Core/CommandModel/CLICompletionGenerator.swift:58— CLICompletionGenerator.zsh has cognitive complexity 25 (threshold 15). Drivers by points: loops 12 (18 pts), if/else 3 (5 pts), match/switch 1 (2 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.
app.App (cognitive 25) design_references/Vocello iOS/app.jsx:12— app.App has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 7, ternaries 5 (nesting depth added 3). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 148, a function literal at line 179, a function literal at line 192, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
studio.Studio (cognitive 25) design_references/Vocello iOS/studio.jsx:6— studio.Studio has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 21, ternaries 3 (4 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.
GenerationQualityReportProducer.fastReport (cognitive 24) Sources/QwenVoiceCore/GenerationQualityReportProducer.swift:24— GenerationQualityReportProducer.fastReport has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, match/switch 2 (3 pts), ternaries 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenerationTelemetryJSONLSink.pruneJSONLFromFront (cognitive 24) Sources/QwenVoiceCore/GenerationTelemetryJSONLSink.swift:205— GenerationTelemetryJSONLSink.pruneJSONLFromFront has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 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.
HuggingFaceDownloader.runDownload (cognitive 24) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:1714— HuggingFaceDownloader.runDownload has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSUnloadQuiescenceEvaluator.violations (cognitive 24) Sources/QwenVoiceCore/IOSUnloadQuiescence.swift:65— IOSUnloadQuiescenceEvaluator.violations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6 (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.
NativeEngineRuntime.recordGenerationPlanShadow (cognitive 24) Sources/QwenVoiceCore/NativeEngineRuntime.swift:2480— NativeEngineRuntime.recordGenerationPlanShadow has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 4, match/switch 2 (4 pts), ternaries 2 (4 pts), error handling 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.
SharedModelComponentStore.replaceModelWithSharedLinks (cognitive 24) Sources/QwenVoiceCore/SharedModelComponentStore.swift:1133— SharedModelComponentStore.replaceModelWithSharedLinks has cognitive complexity 24 (threshold 15). Drivers by points: error handling 7 (9 pts), if/else 4 (9 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CLIHelpRenderer.command (cognitive 24) Sources/VocelloCLI/Core/CommandModel/CLIHelpRenderer.swift:48— CLIHelpRenderer.command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (6 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseAll (cognitive 24) Sources/VocelloCLI/Core/CommandModel/CLIParser.swift:153— Parser.parseAll has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7, ternaries 3, 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.
CLIEventStream.writeLoop (cognitive 24) Sources/VocelloCLI/Core/Contract/CLIEventStream.swift:214— CLIEventStream.writeLoop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), boolean chains 3, loops 2 (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.
IOSDeviceDiagnosticsRunner.runSpeechAssetBootstrap (cognitive 24) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:359— IOSDeviceDiagnosticsRunner.runSpeechAssetBootstrap has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (5 pts), boolean chains 2, error handling 2, loops 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.
NativeAudioPreparationService.resampledToCanonicalRate (cognitive 23) Sources/QwenVoiceCore/AudioPreparation.swift:967— NativeAudioPreparationService.resampledToCanonicalRate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, ternaries 2 (4 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.
Qwen3TTSRuntimeProfile.validate (cognitive 23) Sources/QwenVoiceCore/Qwen3TTSRuntimeProfile.swift:299— Qwen3TTSRuntimeProfile.validate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (22 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.
GenerationOutputVerifier.evaluate (cognitive 23) Sources/SharedSupport/Services/GenerationOutputVerifier.swift:170— GenerationOutputVerifier.evaluate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8, ternaries 2 (4 pts), match/switch 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.
MacHistoryDisplayEntry.entries (cognitive 23) Sources/Views/History/MacHistoryScreen.swift:98— MacHistoryDisplayEntry.entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (6 pts), match/switch 2 (4 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.
MacSavedVoiceSheet.body (cognitive 23) Sources/Views/Voices/MacSavedVoiceSheet.swift:161— MacSavedVoiceSheet.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5, ternaries 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.
CLICompletionGenerator.fish (cognitive 23) Sources/VocelloCLI/Core/CommandModel/CLICompletionGenerator.swift:288— CLICompletionGenerator.fish has cognitive complexity 23 (threshold 15). Drivers by points: loops 8 (14 pts), if/else 2 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 10). 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.
DesktopAppSettings.set (cognitive 23) Sources/VocelloDesktopCore/DesktopAppSettings.swift:74— DesktopAppSettings.set has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, match/switch 2 (3 pts), loops 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.
IOSStartupReliabilityRunner.run (cognitive 23) Sources/iOS/IOSStartupReliabilityRunner.swift:100— IOSStartupReliabilityRunner.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioQCSignalObserver.loudnessMeasures (cognitive 22) Sources/QwenVoiceCore/AudioQCSignalObserver.swift:663— AudioQCSignalObserver.loudnessMeasures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 9). Of this number, 19 points are the body's own statements and 3 belong to 3 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.
ModelDownloadRetryPolicy.disposition (cognitive 22) Sources/QwenVoiceCore/ModelDownloadContracts.swift:496— ModelDownloadRetryPolicy.disposition has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 4 (8 pts), boolean chains 2, 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.
NativePreparedCloneConditioningCache.resolveVoiceClonePrompt (cognitive 22) Sources/QwenVoiceCore/NativeCloneSupport.swift:437— NativePreparedCloneConditioningCache.resolveVoiceClonePrompt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, error handling 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.
PreparedVoiceRepository.removeDerivedCloneReferences (cognitive 22) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:700— PreparedVoiceRepository.removeDerivedCloneReferences has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts), boolean chains 3 (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.
Parser.option (cognitive 22) Sources/VocelloCLI/Core/CommandModel/CLIParser.swift:201— Parser.option has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CLIRequestLedger.pruneHoldingLedgerLock (cognitive 22) Sources/VocelloCLI/Core/Contract/CLIRequestLedger.swift:233— CLIRequestLedger.pruneHoldingLedgerLock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesktopModelInventory.verify (cognitive 22) Sources/VocelloDesktopCore/DesktopModelInventory.swift:53— DesktopModelInventory.verify has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSCustomVoiceView.generate (cognitive 22) Sources/iOS/IOSGenerationModeViews.swift:449— IOSCustomVoiceView.generate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (6 pts), boolean chains 2, error handling 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QVoiceiOSApp.body (cognitive 22) Sources/iOS/QVoiceiOSApp.swift:56— QVoiceiOSApp.body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TTSEngineStore.syncFromSnapshot (cognitive 22) Sources/iOS/TTSEngineStore.swift:730— TTSEngineStore.syncFromSnapshot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (16 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.
GenerationStreamingTelemetryV9Publication.makeCompleteDocument (cognitive 21) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Publication.swift:158— GenerationStreamingTelemetryV9Publication.makeCompleteDocument has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, if/else 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.
HistoryPersistenceError.classify (cognitive 21) Sources/SharedSupport/Database/HistoryPersistenceError.swift:87— HistoryPersistenceError.classify has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 6, match/switch 2 (4 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.
VoiceClipTranscriber.audibleSpan (cognitive 21) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:582— VoiceClipTranscriber.audibleSpan has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacHistoryScreen.reloadHistory (cognitive 21) Sources/Views/History/MacHistoryScreen.swift:771— MacHistoryScreen.reloadHistory has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (20 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContentView.screenView (cognitive 21) Sources/ContentView.swift:285— ContentView.screenView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IOSStudioComposerCard.body (cognitive 21) Sources/iOS/IOSGenerationSharedViews.swift:129— IOSStudioComposerCard.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WAVDataLayout.init (cognitive 20) Sources/QwenVoiceCore/AudioPublicationMarking.swift:154— WAVDataLayout.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, 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.
IOSStartupReliabilityLaunchSpec.validate (cognitive 20) Sources/QwenVoiceCore/IOSStartupReliabilityPlan.swift:76— IOSStartupReliabilityLaunchSpec.validate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 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.
PreparedVoiceRepository.reconcileLocked (cognitive 20) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:182— PreparedVoiceRepository.reconcileLocked has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 2 (4 pts), loops 2, 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.
GenerationHistoryPageQuery.fetch (cognitive 20) Sources/SharedSupport/Database/GenerationHistoryPage.swift:207— GenerationHistoryPageQuery.fetch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (6 pts) (nesting depth added 6). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LongFormHistoryAcceptanceStore.prepare (cognitive 20) Sources/SharedSupport/Database/LongFormHistoryAcceptance.swift:274— LongFormHistoryAcceptanceStore.prepare has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, 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.
AppGenerationTimeline.recordCompleted (cognitive 20) Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:205— AppGenerationTimeline.recordCompleted has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacShellStatusPresentation.resolve (cognitive 20) Sources/Views/Shell/MacShellStatus.swift:31— MacShellStatusPresentation.resolve has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 3 (4 pts), match/switch 2, 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.
GenerateCommand.generateObservingFirstChunk (cognitive 20) Sources/VocelloCLI/GenerateCommand.swift:90— GenerateCommand.generateObservingFirstChunk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, match/switch 1 (2 pts), error handling 1, loops 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.
MCPTool.commandLine (cognitive 20) Sources/VocelloCLI/Core/MCP/MCPTools.swift:92— MCPTool.commandLine has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSModelDownloadCoordinator.restoreInFlightDownloadsIfNeeded (cognitive 20) Sources/iOS/IOSModelDownloadCoordinator.swift:353— IOSModelDownloadCoordinator.restoreInFlightDownloadsIfNeeded has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 1 (3 pts), ternaries 1 (3 pts), loops 1 (2 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSHistoryLibrarySection.makeGroupedItems (cognitive 20) Sources/iOS/History/HistoryScreen.swift:662— IOSHistoryLibrarySection.makeGroupedItems has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSRecordVoiceSheet.body (cognitive 20) Sources/iOS/Voices/IOSRecordVoiceSheet.swift:87— IOSRecordVoiceSheet.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 3 (4 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.
IOSPullableDiagnosticsMirror.syncGenerationTelemetry (cognitive 20) Sources/iOSSupport/Services/IOSPullableDiagnosticsMirror.swift:119— IOSPullableDiagnosticsMirror.syncGenerationTelemetry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BoundedGenerationEventChannel.send (cognitive 19) Sources/QwenVoiceCore/GenerationEventDeliveryProbe.swift:49— BoundedGenerationEventChannel.send has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 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.
StreamingExecutionContext.computeDerivedMetrics (cognitive 19) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3722— StreamingExecutionContext.computeDerivedMetrics has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 5 (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.
GenerationStreamingTelemetryV9Publication.isPublicationReady (cognitive 19) Sources/QwenVoiceCore/GenerationStreamingTelemetryV9Publication.swift:78— GenerationStreamingTelemetryV9Publication.isPublicationReady has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 19. 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.
BoundedLongFormAssembler.assemble (cognitive 19) Sources/QwenVoiceCore/LongFormAssembly.swift:220— BoundedLongFormAssembler.assemble has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, error handling 2, loops 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.
NativeEngineRuntime.prepareInteractiveReadiness (cognitive 19) Sources/QwenVoiceCore/NativeEngineRuntime.swift:721— NativeEngineRuntime.prepareInteractiveReadiness has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 3 (5 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.
PreparedVoiceRepository.publishClonePromptArtifact (cognitive 19) Sources/QwenVoiceCore/PreparedVoiceRepository.swift:521— PreparedVoiceRepository.publishClonePromptArtifact has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 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.
VoiceClipTranscriber.segmentationAwareDistance (cognitive 19) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1279— VoiceClipTranscriber.segmentationAwareDistance has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 3 (5 pts), ternaries 1 (3 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.
IOSModelInstallerViewModel.apply (cognitive 19) Sources/iOS/IOSModelInstallerViewModel.swift:494— IOSModelInstallerViewModel.apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, 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.
IOSRecordVoiceSheet.performEnroll (cognitive 19) Sources/iOS/Voices/IOSRecordVoiceSheet.swift:312— IOSRecordVoiceSheet.performEnroll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IOSLeftoverAudioAnalysis.listing (cognitive 19) Sources/iOSSupport/Services/IOSLeftoverAudioAnalysis.swift:130— IOSLeftoverAudioAnalysis.listing has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 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.
AudioSpeakingRateQC.conservativeUnits (cognitive 18) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:4023— AudioSpeakingRateQC.conservativeUnits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HistoryDeletionEngine.deleteUnit (cognitive 18) Sources/SharedSupport/Database/GenerationHistoryOutbox.swift:1398— HistoryDeletionEngine.deleteUnit has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (9 pts), error handling 3 (5 pts), if/else 2 (4 pts) (nesting depth added 7). 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.
BoundedLongFormAssembler.write (cognitive 18) Sources/QwenVoiceCore/LongFormAssembly.swift:558— BoundedLongFormAssembler.write has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, 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.
LongFormPlanner.plan (cognitive 18) Sources/QwenVoiceCore/LongFormPlanning.swift:208— LongFormPlanner.plan has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeEngineRuntime.ensureWarmStateIfNeeded (cognitive 18) Sources/QwenVoiceCore/NativeEngineRuntime.swift:1765— NativeEngineRuntime.ensureWarmStateIfNeeded has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SharedModelComponentStore.audit (cognitive 18) Sources/QwenVoiceCore/SharedModelComponentStore.swift:720— SharedModelComponentStore.audit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 1 (3 pts), boolean chains 2, 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.
ModelManagerViewModel.localModelInfo (cognitive 18) Sources/ViewModels/ModelManagerViewModel.swift:1517— ModelManagerViewModel.localModelInfo has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 4 (5 pts), 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.
MacSavedVoiceSheet.saveVoice (cognitive 18) Sources/Views/Voices/MacSavedVoiceSheet.swift:634— MacSavedVoiceSheet.saveVoice has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (6 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeliveriesCommand.run (cognitive 18) Sources/VocelloCLI/DeliveriesCommand.swift:27— DeliveriesCommand.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (8 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.
IOSDeviceDiagnosticsRunner.buildPayload (cognitive 18) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1519— IOSDeviceDiagnosticsRunner.buildPayload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 1 (3 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.
IOSModelInstallerViewModel.state (cognitive 18) Sources/iOS/IOSModelInstallerViewModel.swift:301— IOSModelInstallerViewModel.state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
player.PlayerSheet (cognitive 18) design_references/Vocello iOS/player.jsx:6— player.PlayerSheet has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 7, ternaries 1. Of this number, 10 points are the body's own statements and 8 belong to 6 function items 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.
sheets.VoicePickerSheet (cognitive 18) design_references/Vocello iOS/sheets.jsx:6— sheets.VoicePickerSheet has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 5 (6 pts), if/else 4 (nesting depth added 1). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, 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.
site-contract.validateTokenContrast (cognitive 18) website/scripts/site-contract.mjs:160— site-contract.validateTokenContrast has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 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.
EngineHostLeaseKeeper.settle (cognitive 17) Sources/DesktopShared/EngineHostLease.swift:284— EngineHostLeaseKeeper.settle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CodecLoopMutationEvidence.decodeJob (cognitive 17) Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:123— CodecLoopMutationEvidence.decodeJob has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, error handling 1, 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.
GenerationOutputAdapter.runReservedTake (cognitive 17) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:344— GenerationOutputAdapter.runReservedTake has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 4 (7 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.
StreamingExecutionContext.makePersistedWAVAudioQCReport (cognitive 17) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:3101— StreamingExecutionContext.makePersistedWAVAudioQCReport has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 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, 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.
NativeGenerationTerminalClassifier.disposition (cognitive 17) Sources/QwenVoiceCore/NativeEngineRuntime.swift:284— NativeGenerationTerminalClassifier.disposition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, match/switch 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.
SharedModelComponentStore.reclaimUnreferencedComponents (cognitive 17) Sources/QwenVoiceCore/SharedModelComponentStore.swift:868— SharedModelComponentStore.reclaimUnreferencedComponents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 5 (7 pts), error handling 1 (2 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.
GenerationPersistence.emitClonePromptMetricsIfNeeded (cognitive 17) Sources/SharedSupport/Services/GenerationPersistence.swift:66— GenerationPersistence.emitClonePromptMetricsIfNeeded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, loops 3, ternaries 1 (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.
VoiceClipTranscriber.recognizeDetailed (cognitive 17) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1354— VoiceClipTranscriber.recognizeDetailed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 3, boolean chains 2, error handling 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.
WaveformService.extractSamples (cognitive 17) Sources/SharedSupport/Services/WaveformService.swift:21— WaveformService.extractSamples has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (6 pts), if/else 3 (4 pts), boolean chains 3, error handling 1 (2 pts), ternaries 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.
WordTimingPlanner.plan (cognitive 17) Sources/SharedSupport/Services/WordTimingPlanner.swift:9— WordTimingPlanner.plan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 3 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.
AudioPlayerViewModel.updatePlaybackProgress (cognitive 17) Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:2107— AudioPlayerViewModel.updatePlaybackProgress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 2 (5 pts), boolean chains 1, 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.
ModelManagerViewModel.runModelDownload (cognitive 17) Sources/ViewModels/ModelManagerViewModel.swift:1109— ModelManagerViewModel.runModelDownload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 3, 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.
MacHistoryScreen.content (cognitive 17) Sources/Views/History/MacHistoryScreen.swift:397— MacHistoryScreen.content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacBatchGenerationSheet.editorView (cognitive 17) Sources/Views/Studio/MacBatchGenerationSheet.swift:216— MacBatchGenerationSheet.editorView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 6 (7 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ModelsCommand.install (cognitive 17) Sources/VocelloCLI/ModelsCommand.swift:360— ModelsCommand.install has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, ternaries 2, error handling 1, 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, 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.
ModelsCommand.runInstallRecommended (cognitive 17) Sources/VocelloCLI/ModelsCommand.swift:542— ModelsCommand.runInstallRecommended has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 3 (5 pts), error handling 1 (2 pts), loops 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.
VoicesCommand.runWrite (cognitive 17) Sources/VocelloCLI/VoicesCommand.swift:143— VoicesCommand.runWrite has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 1 (2 pts), error handling 1, loops 1, 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, 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.
IOSModelDeliverySupport.validate (cognitive 17) Sources/iOSSupport/Services/IOSModelDeliverySupport.swift:241— IOSModelDeliverySupport.validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sheets.RecordingOverlay (cognitive 17) design_references/Vocello iOS/sheets.jsx:172— sheets.RecordingOverlay has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 5, if/else 4 (5 pts) (nesting depth added 2). Of this number, 10 points are the body's own statements and 7 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.
TTSContract.validate (cognitive 16) Sources/Models/TTSContract.swift:199— TTSContract.validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeAudioPreparationService.normalizeAudioAsynchronously (cognitive 16) Sources/QwenVoiceCore/AudioPreparation.swift:405— NativeAudioPreparationService.normalizeAudioAsynchronously has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, error handling 5, boolean chains 4, ternaries 1. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeAudioPreparationService.decodedMonoSamples (cognitive 16) Sources/QwenVoiceCore/AudioPreparation.swift:880— NativeAudioPreparationService.decodedMonoSamples has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, 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.
AudioQCSignalObserver.observeSeams (cognitive 16) Sources/QwenVoiceCore/AudioQCSignalObserver.swift:415— AudioQCSignalObserver.observeSeams has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (4 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HuggingFaceDownloader.validateStagedRepository (cognitive 16) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3321— HuggingFaceDownloader.validateStagedRepository has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (5 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.
BoundedLongFormAssembler.analyze (cognitive 16) Sources/QwenVoiceCore/LongFormAssembly.swift:467— BoundedLongFormAssembler.analyze has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SharedModelComponentStore.publishBlob (cognitive 16) Sources/QwenVoiceCore/SharedModelComponentStore.swift:1071— SharedModelComponentStore.publishBlob has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 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.
StartupReliabilityDiagnosticEvidence.verifiedReplayTrace (cognitive 16) Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:301— StartupReliabilityDiagnosticEvidence.verifiedReplayTrace has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, 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.
MacGenerationWarmupCoordinator.warmupDecision (cognitive 16) Sources/Services/MacGenerationWarmupCoordinator.swift:523— MacGenerationWarmupCoordinator.warmupDecision has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenerationHistoryOutboxStore.loadClearTransaction (cognitive 16) Sources/SharedSupport/Database/GenerationHistoryOutbox.swift:453— GenerationHistoryOutboxStore.loadClearTransaction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 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. This shape REPEATS in the file: one other method here (GenerationHistoryOutboxStore.loadPendingAudioRemovals) 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.
GenerationHistoryOutboxStore.loadPendingAudioRemovals (cognitive 16) Sources/SharedSupport/Database/GenerationHistoryOutbox.swift:502— GenerationHistoryOutboxStore.loadPendingAudioRemovals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 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. This shape REPEATS in the file: one other method here (GenerationHistoryOutboxStore.loadClearTransaction) 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.
VoiceClipTranscriber.editMetrics (cognitive 16) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1223— VoiceClipTranscriber.editMetrics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReferenceClipRecorder.start (cognitive 16) Sources/SharedSupport/ViewModels/ReferenceClipRecorder.swift:136— ReferenceClipRecorder.start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, error handling 2, 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.
ModelManagerViewModel.downloadDetail (cognitive 16) Sources/ViewModels/ModelManagerViewModel.swift:915— ModelManagerViewModel.downloadDetail 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.
MacSettingsScreen.body (cognitive 16) Sources/Views/Settings/MacSettingsScreen.swift:51— MacSettingsScreen.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), 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.
MacVoiceCloningScreen.syncCloneReferencePriming (cognitive 16) Sources/Views/Studio/MacVoiceCloningScreen.swift:946— MacVoiceCloningScreen.syncCloneReferencePriming has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 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.
HistoryCommand.list (cognitive 16) Sources/VocelloCLI/HistoryCommand.swift:75— HistoryCommand.list has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 5, 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.
CLISuggestion.editDistance (cognitive 16) Sources/VocelloCLI/Core/CommandModel/CLIParser.swift:428— CLISuggestion.editDistance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (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.
IOSModelDownloadCoordinator.runDownload (cognitive 16) Sources/iOS/IOSModelDownloadCoordinator.swift:535— IOSModelDownloadCoordinator.runDownload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 3 (6 pts), boolean chains 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.
IOSStorageProtectionPolicy.apply (cognitive 16) Sources/iOSSupport/Services/IOSStorageProtectionPolicy.swift:60— IOSStorageProtectionPolicy.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Nav.Nav (cognitive 16) website/src/sections/Nav.jsx:38— Nav.Nav has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, ternaries 5 (6 pts), boolean chains 3 (nesting depth added 1). None of this is in the body itself: all 16 points belong to 7 function items inside it that branch (currentFor, a function literal at line 64, a function literal at line 58, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
Near-duplicate member pair (68 shared lines) Sources/VocelloCLI/BenchCodecLoop.swift:70— Sources/VocelloCLI/BenchCodecLoop.swift:70-248 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:67-224 — These two members are variants of one another: 68 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (39 shared lines) Sources/iOS/IOSGenerationModeViews.swift:449— Sources/iOS/IOSGenerationModeViews.swift:449-545 | Sources/iOS/IOSGenerationModeViews.swift:1336-1444 — These two members are variants of one another: 39 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) Sources/iOS/Settings/OpenSourceLicensesScreen.swift:161— Sources/iOS/Settings/OpenSourceLicensesScreen.swift:161-185 | Sources/iOS/Settings/OpenSourceLicensesScreen.swift:238-262 | Sources/iOS/Settings/SettingsScreen.swift:491-525 | Sources/iOS/Settings/VoiceModelsScreen.swift:199-228 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) Sources/Views/Studio/MacCustomVoiceScreen.swift:135— Sources/Views/Studio/MacCustomVoiceScreen.swift:135-196 | Sources/Views/Studio/MacVoiceDesignScreen.swift:152-226 — These two members are one piece of code written twice and then edited apart: 62 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 (69 corresponding lines) · ×1
Edited copy of a member (69 corresponding lines) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:863— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:863-931 | Sources/iOS/IOSStartupReliabilityRunner.swift:575-647 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (66 corresponding lines) · ×1
Edited copy of a member (66 corresponding lines) Sources/QwenVoiceCore/ModelDownloadDiagnosticsStore.swift:89— Sources/QwenVoiceCore/ModelDownloadDiagnosticsStore.swift:89-164 | Sources/QwenVoiceCore/NativeTelemetrySampler.swift:160-225 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) Sources/Views/Studio/MacCustomVoiceScreen.swift:313— Sources/Views/Studio/MacCustomVoiceScreen.swift:313-361 | Sources/Views/Studio/MacVoiceDesignScreen.swift:368-432 — These two members are one piece of code written twice and then edited apart: 49 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 (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) Sources/iOS/IOSDesignSystemPrimitives.swift:657— Sources/iOS/IOSDesignSystemPrimitives.swift:657-701 | Sources/iOS/IOSDesignSystemPrimitives.swift:806-850 — These two members are one piece of code written twice and then edited apart: 45 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 (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1426— Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1426-1492 | Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1536-1586 — These two members are one piece of code written twice and then edited apart: 51 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 (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) Sources/iOS/Sheets/IOSBottomSheets.swift:655— Sources/iOS/Sheets/IOSBottomSheets.swift:655-709 | Sources/iOS/Sheets/IOSBottomSheets.swift:1378-1421 — These two members are one piece of code written twice and then edited apart: 44 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 (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) Sources/Views/Studio/MacStudioCanvas.swift:127— Sources/Views/Studio/MacStudioCanvas.swift:127-171 | Sources/iOS/IOSStudioCanvas.swift:59-101 — These two members are one piece of code written twice and then edited apart: 43 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, 50+ corresponding lines) · ×1
Edited copies of one member (3 members, 50+ corresponding lines) Sources/iOS/IOSGenerationModeViews.swift:320— Sources/iOS/IOSGenerationModeViews.swift:320-370 | Sources/iOS/IOSGenerationModeViews.swift:1223-1272 | Sources/iOS/IOSGenerationModeViews.swift:1878-1930 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 50 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 (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) Sources/Views/Primitives/MacListPrimitives.swift:47— Sources/Views/Primitives/MacListPrimitives.swift:47-81 | Sources/iOS/IOSDesignSystemPrimitives.swift:1043-1084 — These two members are one piece of code written twice and then edited apart: 35 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 (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) Sources/QwenVoiceCore/MLXTTSEngine.swift:1159— Sources/QwenVoiceCore/MLXTTSEngine.swift:1159-1189 | Sources/QwenVoiceCore/MLXTTSEngine.swift:1198-1251 — These two members are one piece of code written twice and then edited apart: 31 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 (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) Sources/Views/Studio/MacVoiceCloningScreen.swift:946— Sources/Views/Studio/MacVoiceCloningScreen.swift:946-988 | Sources/iOS/IOSGenerationModeViews.swift:2256-2295 — These two members are one piece of code written twice and then edited apart: 40 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, 42+ corresponding lines) · ×1
Edited copies of one member (3 members, 42+ corresponding lines) Sources/iOS/IOSGenerationModeViews.swift:218— Sources/iOS/IOSGenerationModeViews.swift:218-259 | Sources/iOS/IOSGenerationModeViews.swift:1122-1164 | Sources/iOS/IOSGenerationModeViews.swift:1774-1818 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 42 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 (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) Sources/Services/UIPerfFrameProbe.swift:258— Sources/Services/UIPerfFrameProbe.swift:258-295 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:247-280 — 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 copies of one member (3 members, 34+ corresponding lines) · ×1
Edited copies of one member (3 members, 34+ corresponding lines) Sources/iOS/IOSGenerationModeViews.swift:282— Sources/iOS/IOSGenerationModeViews.swift:282-317 | Sources/iOS/IOSGenerationModeViews.swift:1187-1220 | Sources/iOS/IOSGenerationModeViews.swift:1841-1875 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 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 (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1015— Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1015-1051 | Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:1407-1443 — These two members are one piece of code written twice and then edited apart: 37 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 (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) Sources/Models/TTSModel.swift:56— Sources/Models/TTSModel.swift:56-90 | Sources/QwenVoiceCore/SemanticTypes.swift:436-468 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:431— Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSVoiceClonePrompt.swift:165-191 | Packages/VocelloQwen3Core/Sources/VocelloQwen3Core/LoadedModel.swift:296-322 | Sources/QwenVoiceCore/GenerationTelemetryRecord.swift:431-455 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 23+ corresponding lines) · ×1
Edited copies of one member (3 members, 23+ corresponding lines) Sources/iOS/IOSGenerationInputControls.swift:116— Sources/iOS/IOSGenerationInputControls.swift:116-143 | Sources/iOS/IOSGenerationModeViews.swift:411-434 | Sources/iOS/IOSGenerationModeViews.swift:1304-1326 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 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, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) Sources/QwenVoiceCore/LongFormAssembly.swift:649— Sources/QwenVoiceCore/LongFormAssembly.swift:649-659 | Sources/QwenVoiceCore/NativeCloneSupport.swift:1008-1023 | Sources/SharedSupport/Services/VoiceClipTranscriber.swift:306-316 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2068-2078 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) Sources/iOS/IOSGenerationModeViews.swift:262— Sources/iOS/IOSGenerationModeViews.swift:262-280 | Sources/iOS/IOSGenerationModeViews.swift:1167-1185 | Sources/iOS/IOSGenerationModeViews.swift:1821-1839 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 16+ corresponding lines) · ×1
Edited copies of one member (5 members, 16+ corresponding lines) Sources/iOS/IOSDesignSystemPrimitives.swift:351— Sources/iOS/IOSDesignSystemPrimitives.swift:351-367 | Sources/iOS/IOSDesignSystemPrimitives.swift:369-386 | Sources/iOS/IOSDesignSystemPrimitives.swift:388-406 | Sources/iOS/IOSDesignSystemPrimitives.swift:542-561 | Sources/iOS/IOSDesignSystemPrimitives.swift:738-753 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) Sources/Views/Voices/MacSavedVoiceSheet.swift:696— Sources/Views/Voices/MacSavedVoiceSheet.swift:696-719 | Sources/Views/Voices/MacSavedVoiceSheet.swift:721-741 | Sources/iOS/Voices/IOSRecordVoiceSheet.swift:371-393 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) Sources/VocelloCLI/ModelsCommand.swift:27— Sources/VocelloCLI/ModelsCommand.swift:27-44 | Sources/iOSSupport/ViewModels/ModelManagerViewModel.swift:55-70 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) Sources/QwenVoiceCore/ModelAssets.swift:467— Sources/QwenVoiceCore/ModelAssets.swift:467-484 | Sources/ViewModels/ModelManagerViewModel.swift:1757-1770 | Sources/VocelloCLI/Support.swift:155-164 — 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 copies of one member (3 members, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1521— Sources/SharedSupport/Services/VoiceClipTranscriber.swift:1521-1524 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:597-601 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:958-962 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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 (5 members, 3+ corresponding lines) · ×1
Edited copies of one member (5 members, 3+ corresponding lines) Sources/QwenVoiceCore/GenerationSemantics.swift:1183— Sources/QwenVoiceCore/GenerationSemantics.swift:1183-1187 | Sources/QwenVoiceCore/GenerationStartupDiagnostics.swift:275-277 | Sources/QwenVoiceCore/NativeCloneSupport.swift:1192-1196 | Sources/SharedSupport/Services/VoiceClipTranscriber.swift:265-269 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2492-2496 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 3+ corresponding lines) · ×1
Edited copies of one member (8 members, 3+ corresponding lines) Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:248— Sources/QwenVoiceCore/CodecLoopMutationEvidence.swift:248-250 | Sources/QwenVoiceCore/CodecRoundTripEvidence.swift:211-213 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:1405-1407 | Sources/QwenVoiceCore/RuntimeRefactorContracts.swift:685-687 | Sources/QwenVoiceCore/SpokenTextPlanning.swift:510-512 | Sources/QwenVoiceCore/StartupReliabilityDiagnosticEvidence.swift:458-460 | Sources/SharedSupport/Database/LongFormHistoryAcceptance.swift:654-656 | Sources/VocelloCLI/BenchCodecReplay.swift:284-286 — These 8 members are one piece of code written 8 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 8 times and the copies will drift further apart.
Duplicated block (44–45 lines × 2) Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1439— Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1439-1483 | Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1542-1585 — 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 `Sources/SharedSupport/ViewModels/AudioPlayerViewModel.swift:1439` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (44 lines × 2) Sources/Services/UIPerfFrameProbe.swift:205— Sources/Services/UIPerfFrameProbe.swift:205-248 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:157-200 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (34 lines × 2) Sources/Services/UIPerfFrameProbe.swift:170— Sources/Services/UIPerfFrameProbe.swift:170-203 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:122-155 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/UIPerfFrameProbe.swift:170` 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. 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 (32 lines × 2) Sources/Services/MacMetricKitReporter.swift:125— Sources/Services/MacMetricKitReporter.swift:125-156 | Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift:92-123 — before extracting anything, compare `Sources/Services/MacMetricKitReporter.swift` and `Sources/iOSSupport/Services/IOSMetricKitMemoryReporter.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 95 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 (30 lines × 2) Sources/Services/UIPerfFrameProbe.swift:110— Sources/Services/UIPerfFrameProbe.swift:110-139 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:208-237 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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 (28 lines × 2) Sources/Services/UIPerfFrameProbe.swift:258— Sources/Services/UIPerfFrameProbe.swift:258-285 | Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift:247-274 — before extracting anything, compare `Sources/Services/UIPerfFrameProbe.swift` and `Sources/iOSSupport/Services/IOSUIPerfFrameProbe.swift` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 218 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/UIPerfFrameProbe.swift:258` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25–26 lines × 2) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1919— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1919-1943 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1956-1981 — 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 `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1919` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1954` calls `DiagnosticsError` and `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1918` 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 (22–24 lines × 2) Sources/iOS/Sheets/IOSBottomSheets.swift:401— Sources/iOS/Sheets/IOSBottomSheets.swift:401-422 | Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:182-205 — 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 (18–22 lines × 2) Sources/iOS/Sheets/IOSBottomSheets.swift:1398— Sources/iOS/Sheets/IOSBottomSheets.swift:1398-1419 | Sources/iOS/Sheets/IOSBottomSheets.swift:1480-1497 — 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 `Sources/iOS/Sheets/IOSBottomSheets.swift:1398` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/Sheets/IOSBottomSheets.swift:1420` calls `accessibilityAddTraits` and `Sources/iOS/Sheets/IOSBottomSheets.swift:1498` 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 (21 lines × 3) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2143— Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2143-2163 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2195-2215 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2367-2387 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2164` calls `discard`, `removeItem` and `Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2388` 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 (17–21 lines × 2) Sources/SharedSupport/Database/GenerationMigrations.swift:77— Sources/SharedSupport/Database/GenerationMigrations.swift:77-93 | Sources/SharedSupport/Database/GenerationMigrations.swift:113-133 — 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 `Sources/SharedSupport/Database/GenerationMigrations.swift:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) Sources/Services/UIPerfHistorySeeder.swift:37— Sources/Services/UIPerfHistorySeeder.swift:37-56 | Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift:41-60 — before extracting anything, compare `Sources/Services/UIPerfHistorySeeder.swift` and `Sources/iOSSupport/Services/IOSUIPerfHistorySeeder.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Services/UIPerfHistorySeeder.swift:37` 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 (18 lines × 2) Sources/Views/History/MacHistoryScreen.swift:749— Sources/Views/History/MacHistoryScreen.swift:749-766 | Sources/Views/Voices/MacVoicesScreen.swift:235-252 — 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 `Sources/Views/History/MacHistoryScreen.swift:749` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17–18 lines × 2) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1632— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1632-1649 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2474-2490 — 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 `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:1632` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15–17 lines × 3) Sources/iOS/IOSGenerationModeViews.swift:531— Sources/iOS/IOSGenerationModeViews.swift:531-545 | Sources/iOS/IOSGenerationModeViews.swift:1428-1444 | Sources/iOS/IOSGenerationModeViews.swift:2240-2254 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSGenerationModeViews.swift:531` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–17 lines × 2) Sources/Services/MacStudioSingleTakeGenerationHooks.swift:82— Sources/Services/MacStudioSingleTakeGenerationHooks.swift:82-95 | Sources/iOS/Studio/IOSSingleTakeGenerationExecutionHooks.swift:107-123 — 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 (16 lines × 4) Sources/iOS/IOSDesignSystemPrimitives.swift:678— Sources/iOS/IOSDesignSystemPrimitives.swift:678-693 | Sources/iOS/IOSDesignSystemPrimitives.swift:828-843 | Sources/iOS/Overlays/IOSRecordingOverlay.swift:122-137 | Sources/iOS/Sheets/IOSBottomSheets.swift:115-130 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSDesignSystemPrimitives.swift:678` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/IOSDesignSystemPrimitives.swift:694` calls `buttonStyle` and `Sources/iOS/IOSDesignSystemPrimitives.swift:844` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–16 lines × 3) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:342— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:342-357 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2120-2135 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2505-2516 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:342` 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 (11–15 lines × 2) Sources/QwenVoiceCore/HuggingFaceDownloader.swift:2388— Sources/QwenVoiceCore/HuggingFaceDownloader.swift:2388-2402 | Sources/QwenVoiceCore/HuggingFaceDownloader.swift:2582-2592 — 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 `Sources/QwenVoiceCore/HuggingFaceDownloader.swift:2388` 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 (14 lines × 4) Sources/iOS/Sheets/IOSBottomSheets.swift:138— Sources/iOS/Sheets/IOSBottomSheets.swift:138-151 | Sources/iOS/Sheets/IOSBottomSheets.swift:586-599 | Sources/iOS/Sheets/IOSBottomSheets.swift:844-857 | Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:41-54 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/Sheets/IOSBottomSheets.swift:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/iOS/Sheets/IOSBottomSheets.swift:153` calls `frame`, `contentShape`, `Rectangle` and `Sources/iOS/Sheets/IOSVoiceDesignBriefSheet.swift:55` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–13 lines × 2) Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:89— Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:89-96 | Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:211-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SharedSupport/Telemetry/AppGenerationTimeline.swift:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–12 lines × 2) Sources/iOS/IOSVoicesView.swift:418— Sources/iOS/IOSVoicesView.swift:418-429 | Sources/iOS/IOSVoicesView.swift:478-486 — 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 `Sources/iOS/IOSVoicesView.swift:418` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) Sources/QwenVoiceCore/GenerationOutputAdapter.swift:810— Sources/QwenVoiceCore/GenerationOutputAdapter.swift:810-820 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:825-835 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:840-850 | Sources/QwenVoiceCore/GenerationOutputAdapter.swift:2293-2303 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 (8–10 lines × 3) Sources/VocelloCLI/BenchCodecLoop.swift:137— Sources/VocelloCLI/BenchCodecLoop.swift:137-146 | Sources/VocelloCLI/BenchCodecReplay.swift:164-171 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:130-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/VocelloCLI/BenchCodecLoop.swift:148` calls `resolvedEnabled` and `Sources/VocelloCLI/BenchCodecRoundTrip.swift:141` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–10 lines × 2) Sources/QwenVoiceCore/MLXTTSEngine.swift:2781— Sources/QwenVoiceCore/MLXTTSEngine.swift:2781-2790 | Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2565-2572 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7–9 lines × 4) Sources/iOS/Settings/OpenSourceLicensesScreen.swift:162— Sources/iOS/Settings/OpenSourceLicensesScreen.swift:162-168 | Sources/iOS/Settings/OpenSourceLicensesScreen.swift:239-245 | Sources/iOS/Settings/SettingsScreen.swift:497-503 | Sources/iOS/Settings/VoiceModelsScreen.swift:200-208 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/iOS/Settings/OpenSourceLicensesScreen.swift:162` 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, `Sources/iOS/Settings/OpenSourceLicensesScreen.swift:169` calls `Circle`, `stroke` and `Sources/iOS/Settings/SettingsScreen.swift:504` 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 (8–9 lines × 2) Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2021— Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2021-2029 | Sources/iOS/IOSStartupReliabilityRunner.swift:873-880 — 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 `Sources/iOS/IOSDeviceDiagnosticsRunner.swift:2021` 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. 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 (8 lines × 5) Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:87— Sources/QwenVoiceCore/GenerationFailureDiagnosticLogger.swift:87-94 | Sources/QwenVoiceCore/GenerationTelemetryJSONLSink.swift:182-189 | Sources/QwenVoiceCore/MLXTTSEngine.swift:2770-2777 | Sources/Services/GenerationTelemetryMerger.swift:115-122 | Sources/iOSSupport/Services/IOSDeviceDiagnosticsRecorder.swift:167-174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (6–8 lines × 2) Sources/iOS/IOSStudioCanvas.swift:531— Sources/iOS/IOSStudioCanvas.swift:531-538 | Sources/iOS/Studio/IOSStudioInlinePlayerCard.swift:393-398 — 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 `Sources/iOS/IOSStudioCanvas.swift:531` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–6 lines × 3) Sources/VocelloCLI/BenchCodecLoop.swift:101— Sources/VocelloCLI/BenchCodecLoop.swift:101-106 | Sources/VocelloCLI/BenchCodecReplay.swift:128-131 | Sources/VocelloCLI/BenchCodecRoundTrip.swift:95-101 — 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 `Sources/VocelloCLI/BenchCodecLoop.swift:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 4) Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:353— Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:353-358 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:370-375 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:427-432 | Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:451-456 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/QwenVoiceCore/MLXModelLoadCoordinator.swift:353` 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.
Near-duplicate member pair (57 shared lines) scripts/check_ios_ui_perf.py:549— scripts/check_ios_ui_perf.py:549-733 | scripts/check_macos_ui_perf.py:697-866 — These two members are variants of one another: 57 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (88 corresponding lines) · ×1
Edited copy of a member (88 corresponding lines) scripts/check_ios_ui_benchmark.py:298— scripts/check_ios_ui_benchmark.py:298-385 | scripts/check_macos_ui_bench.py:843-942 — These two members are one piece of code written twice and then edited apart: 88 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 (105 corresponding lines) · ×1
Edited copy of a member (105 corresponding lines) scripts/check_ios_ui_perf.py:188— scripts/check_ios_ui_perf.py:188-292 | scripts/check_macos_ui_perf.py:278-383 — These two members are one piece of code written twice and then edited apart: 105 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 (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) scripts/check_ios_ui_benchmark.py:166— scripts/check_ios_ui_benchmark.py:166-206 | scripts/check_macos_ui_bench.py:563-605 — These two members are one piece of code written twice and then edited apart: 41 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 (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) scripts/check_macos_ui_perf.py:661— scripts/check_macos_ui_perf.py:661-693 | scripts/lib/ui_perf_thresholds.py:268-295 — These two members are one piece of code written twice and then edited apart: 28 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, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) scripts/qc/calibrate.py:378— scripts/qc/calibrate.py:378-386 | scripts/qc/runners/_kit.py:71-79 | scripts/qc/runners/speech_common.py:91-99 | scripts/qc/store.py:183-195 — 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 copy of a member (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) scripts/check_ios_ui_perf.py:465— scripts/check_ios_ui_perf.py:465-526 | scripts/check_macos_ui_perf.py:555-610 — These two members are one piece of code written twice and then edited apart: 56 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, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) scripts/build_cleanup.py:448— scripts/build_cleanup.py:448-459 | scripts/build_cleanup.py:465-477 | scripts/build_output_policy.py:757-769 | scripts/build_output_policy.py:780-797 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 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, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) scripts/entitlement_contract.py:34— scripts/entitlement_contract.py:34-40 | scripts/entitlement_contract.py:50-56 | scripts/swift_dependency_snapshot.py:52-58 | scripts/swift_dependency_updates.py:37-43 — 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 copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) scripts/pcm_identity.py:67— scripts/pcm_identity.py:67-70 | scripts/quality_screen.py:519-520 — 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 (3 members, 3+ corresponding lines) · ×1
Edited copies of one member (3 members, 3+ corresponding lines) scripts/benchmark_memory.py:288— scripts/benchmark_memory.py:288-295 | scripts/check_ios_clone_conditioning.py:106-113 | scripts/qc/qualification.py:59-61 — 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.
Duplicated block (46–47 lines × 2) scripts/check_ios_ui_benchmark.py:298— scripts/check_ios_ui_benchmark.py:298-343 | scripts/check_macos_ui_bench.py:843-889 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 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 (30–33 lines × 2) scripts/check_ios_ui_benchmark.py:349— scripts/check_ios_ui_benchmark.py:349-378 | scripts/check_macos_ui_bench.py:903-935 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 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 `scripts/check_macos_ui_bench.py:903` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25–28 lines × 2) scripts/check_ios_ui_perf.py:465— scripts/check_ios_ui_perf.py:465-492 | scripts/check_macos_ui_perf.py:555-579 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 `scripts/check_ios_ui_perf.py:465` 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.
Duplicated block (24–25 lines × 2) scripts/check_ios_ui_benchmark.py:446— scripts/check_ios_ui_benchmark.py:446-469 | scripts/check_macos_ui_bench.py:1232-1256 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 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 `scripts/check_ios_ui_benchmark.py:446` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–25 lines × 2) scripts/generate_cli_scheme.py:61— scripts/generate_cli_scheme.py:61-85 | scripts/generate_ios_logic_scheme.py:49-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. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/generate_cli_scheme.py:61` 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 (19–20 lines × 2) scripts/check_ios_ui_perf.py:559— scripts/check_ios_ui_perf.py:559-577 | scripts/check_macos_ui_perf.py:702-721 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 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 `scripts/check_ios_ui_perf.py:559` 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 (15–17 lines × 2) scripts/check_ios_ui_perf.py:134— scripts/check_ios_ui_perf.py:134-150 | scripts/check_macos_ui_perf.py:147-161 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also 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–16 lines × 2) scripts/check_ios_ui_benchmark.py:235— scripts/check_ios_ui_benchmark.py:235-246 | scripts/check_macos_ui_bench.py:646-661 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10–15 lines × 2) scripts/check_ios_ui_benchmark.py:57— scripts/check_ios_ui_benchmark.py:57-66 | scripts/check_macos_ui_bench.py:446-460 — before extracting anything, compare `scripts/check_ios_ui_benchmark.py` and `scripts/check_macos_ui_bench.py` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 227 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also 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–13 lines × 2) scripts/summarize_generation_telemetry.py:160— scripts/summarize_generation_telemetry.py:160-169 | scripts/summarize_generation_telemetry.py:232-244 — 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–13 lines × 2) scripts/summarize_generation_telemetry.py:190— scripts/summarize_generation_telemetry.py:190-196 | scripts/summarize_generation_telemetry.py:278-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note 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 (10–11 lines × 4) scripts/summarize_generation_telemetry.py:2384— scripts/summarize_generation_telemetry.py:2384-2393 | scripts/summarize_generation_telemetry.py:2407-2417 | scripts/summarize_generation_telemetry.py:2440-2449 | scripts/summarize_generation_telemetry.py:2469-2478 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/summarize_generation_telemetry.py:2384` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–10 lines × 4) scripts/summarize_generation_telemetry.py:2395— scripts/summarize_generation_telemetry.py:2395-2398 | scripts/summarize_generation_telemetry.py:2423-2432 | scripts/summarize_generation_telemetry.py:2454-2461 | scripts/summarize_generation_telemetry.py:2485-2488 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/summarize_generation_telemetry.py:2395` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–17 lines × 2) scripts/check_ios_ui_perf.py:387— scripts/check_ios_ui_perf.py:387-403 | scripts/check_macos_ui_perf.py:459-471 — before extracting anything, compare `scripts/check_ios_ui_perf.py` and `scripts/check_macos_ui_perf.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 292 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7–8 lines × 3) scripts/bench_delivery_prosody.py:547— scripts/bench_delivery_prosody.py:547-554 | scripts/lib/ui_lane_data.py:163-169 | scripts/required_step_ledger.py:50-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/bench_delivery_prosody.py:547` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) scripts/publish_benchmark_history.py:1298— scripts/publish_benchmark_history.py:1298-1304 | scripts/publish_benchmark_history.py:1315-1322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 5) scripts/ios_startup_reliability.py:1397— scripts/ios_startup_reliability.py:1397-1401 | scripts/ios_startup_reliability.py:1408-1412 | scripts/ios_startup_reliability.py:1413-1417 | scripts/ios_startup_reliability.py:1422-1426 | scripts/ios_startup_reliability.py:1427-1431 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `scripts/ios_startup_reliability.py:1402` calls `add_argument` and `scripts/ios_startup_reliability.py:1413` 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.
Off the main sequence: QwenVoiceBackendCore — QwenVoiceBackendCore: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Duplication concentrated across 2 sibling directories (5 clone groups) design_references/Vocello Design System/ui_kits/mac-app/icons.jsx:80— 5 duplicated blocks under design_references/ have copies in at least two of the sibling directories Vocello Design System, Vocello iOS — 2 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplicated block (22 lines × 2 locations) design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:232— design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:232 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2 locations) design_references/Vocello iOS/screens.jsx:36— design_references/Vocello iOS/screens.jsx:36 · design_references/Vocello iOS/screens.jsx:76 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 3 locations) design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:191— design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:191 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:276 · design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:337 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) design_references/Vocello iOS/icons.jsx:84— design_references/Vocello iOS/icons.jsx:84 · design_references/Vocello iOS/icons.jsx:104 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (11 matched lines × 2 locations) · ×1
Duplicated block with local edits (11 matched lines × 2 locations) REDACTED:403— REDACTED:403 · REDACTED:469 — the two spans are one implementation copied and then locally edited — 54 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.
R10 · Code Duplication· Duplicated block with local edits (10 matched lines × 2 locations) · ×1
Duplicated block with local edits (10 matched lines × 2 locations) design_references/Vocello iOS/player.jsx:59— design_references/Vocello iOS/player.jsx:59 · REDACTED:393 — the two spans are one implementation copied and then locally edited — 67 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (9 lines × 2 locations) design_references/Vocello iOS/screens.jsx:290— design_references/Vocello iOS/screens.jsx:290 · design_references/Vocello iOS/screens.jsx:309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 5 locations) design_references/Vocello iOS/icons.jsx:70— design_references/Vocello iOS/icons.jsx:70 · design_references/Vocello iOS/icons.jsx:83 · design_references/Vocello iOS/icons.jsx:103 · design_references/Vocello iOS/icons.jsx:116 · +1 more site(s) not listed — all 5 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity· Complex function Studio (cyclomatic 32, cognitive 28) · ×1
Complex function Studio (cyclomatic 32, cognitive 28) design_references/Vocello iOS/studio.jsx:6— Studio has cyclomatic complexity 32 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function VoiceCloningScreen (cyclomatic 13, cognitive 12) design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:329— VoiceCloningScreen has cyclomatic complexity 13 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function VoicePickerSheet (cyclomatic 13, cognitive 10) design_references/Vocello iOS/sheets.jsx:6— VoicePickerSheet has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function CustomVoiceScreen (cyclomatic 12, cognitive 11) design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:160— CustomVoiceScreen has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function App (cyclomatic 12, cognitive 11) design_references/Vocello iOS/app.jsx:12— App has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function ModelInstallSheet (cyclomatic 11, cognitive 9) design_references/Vocello iOS/sheets.jsx:291— ModelInstallSheet has cyclomatic complexity 11 and cognitive complexity 9; 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.
REDACTED: 530 lines of code REDACTED:1— REDACTED has 530 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx · ×1
design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx: 516 lines of code design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx:1— design_references/Vocello Design System/ui_kits/mac-app/GenerationScreens.jsx has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· design_references/Vocello iOS/screens.jsx · ×1
design_references/Vocello iOS/screens.jsx: 432 lines of code design_references/Vocello iOS/screens.jsx:1— design_references/Vocello iOS/screens.jsx has 432 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~338 LoC) design_references/Vocello iOS/ios-frame.jsx— no import path from any entry point (14 application, 0 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 scripts/bench_delivery_prosody.py:428— `"error" in instructed_metrics or "error" in neutral_metrics` appears character-identically in 2 files — scripts/bench_delivery_prosody.py, scripts/delivery_quality_gate.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 scripts/check_ios_ui_benchmark.py:244— `_number(underruns) and underruns > max_underruns` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/qc/features.py:1075— `a.size == 0 or a.shape != b.shape or a.ndim != 1 or not np.isfinite(a).all() or not np.isfinite(b).all()` appears character-identically in 2 files — scripts/qc/features.py, scripts/qc/fidelity.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 scripts/check_ios_ui_benchmark.py:687— `args.evidence_manifest and args.evidence_manifest.exists()` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/check_ios_ui_benchmark.py:691— `args.evidence_manifest and not args.build_provenance` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/check_ios_ui_benchmark.py:689— `args.evidence_manifest and not args.crash_delta_passed` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/check_ios_ui_perf.py:202— `b["endEpochMS"] > start and b["startEpochMS"] < end` appears character-identically in 2 files — scripts/check_ios_ui_perf.py, scripts/check_macos_ui_perf.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 scripts/check_ios_ui_benchmark.py:288— `backend.get("stages") or engine.get("stageMarks") or summary.get("stageMarks") or []` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/benchmark_memory.py:458— `backend.get("stages") or row.get("stageMarks") or summary.get("stageMarks") or []` appears character-identically in 3 files — scripts/benchmark_memory.py, scripts/lib/rtf.py, scripts/publish_benchmark_history.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 scripts/qc/runners/qwen3_asr.py:156— `context.audio is None or context.audio.size < common.SAMPLE_RATE // 10` appears character-identically in 4 files — scripts/qc/runners/qwen3_asr.py, scripts/qc/runners/wav2vec2_phones.py, scripts/qc/runners/whisper.py, scripts/qc/runners/zipa.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 scripts/qc/runners/fcpe.py:114— `device == "mps" and not torch.backends.mps.is_available()` appears character-identically in 2 files — scripts/qc/runners/fcpe.py, scripts/qc/runners/redimnet.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 scripts/check_ios_ui_benchmark.py:491— `exact_model_variant(model_identity, row) or "not-applicable"` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/check_ios_ui_benchmark.py:227— `frontend["playbackChunksReceived"] <= 0 or frontend["playbackStartBufferedChunks"] <= 0` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/check_ios_ui_perf.py:349— `gap_ceiling is not None and summary["maxGapMS"] > gap_ceiling` appears character-identically in 2 files — scripts/check_ios_ui_perf.py, scripts/check_macos_ui_perf.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 scripts/ios_startup_reliability.py:398— `handle.getnchannels() != 1 or handle.getsampwidth() != 2` appears character-identically in 2 files — scripts/ios_startup_reliability.py, scripts/quality_screen.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 scripts/check_ios_ui_perf.py:343— `hitch_ceiling is not None and summary["hitchTimeMSPerS"] > hitch_ceiling` appears character-identically in 2 files — scripts/check_ios_ui_perf.py, scripts/check_macos_ui_perf.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 scripts/check_ios_ui_benchmark.py:61— `identity.get("resolvedModelID") or row.get("modelID")` appears character-identically in 2 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.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 scripts/check_ios_ui_benchmark.py:292— `isinstance(mark, dict) and mark.get("stage") == "memory_trim"` appears character-identically in 3 files — scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.py, scripts/publish_benchmark_history.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 scripts/public_facts_contract.py:65— `isinstance(profile, dict) and profile.get("platform") == platform and profile.get("canonical") is True` appears character-identically in 2 files — scripts/public_facts_contract.py, scripts/publish_benchmark_history.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 scripts/auto_language_check.py:480— `isinstance(provenance, dict) and isinstance(provenance.get("activeOverrideKeys"), list)` appears character-identically in 2 files — scripts/auto_language_check.py, scripts/publish_benchmark_history.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 scripts/qc/calibrate.py:477— `isinstance(reuse, str) and reuse.strip()` appears character-identically in 2 files — scripts/qc/calibrate.py, scripts/qc/fit.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 scripts/benchmark_history.py:1227— `isinstance(value, (int, float)) and not isinstance(value, bool)` appears character-identically in 7 files — scripts/benchmark_history.py, scripts/check_ios_ui_benchmark.py, scripts/check_macos_ui_bench.py, scripts/check_marking_peak_equality.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 scripts/benchmark_history.py:3986— `isinstance(value, (int, float)) and not isinstance(value, bool) and math.isfinite(value)` appears character-identically in 6 files — scripts/benchmark_history.py, scripts/prosody_quality_gate.py, scripts/qc/acoustics.py, scripts/qc/assessment.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 scripts/ios_memory_field_report.py:132— `isinstance(value, bool) or not isinstance(value, (int, float))` appears character-identically in 5 files — scripts/ios_memory_field_report.py, scripts/language_bench_evidence.py, scripts/lib/audio_qc.py, scripts/lib/rtf.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 scripts/lib/trace_cpu.py:132— `isinstance(value, bool) or not isinstance(value, (int, float)) or not math.isfinite(float(value)) or value < 0` appears character-identically in 2 files — scripts/lib/trace_cpu.py, scripts/lib/trace_intervals.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.
Silent fallback default in catch scripts/summarize_generation_telemetry.py:89— `git_short_sha` swallows every exception into `return '-'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 in catch Sources/QwenVoiceCore/HuggingFaceDownloader.swift:3466— `fileSizeIfPresent` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/QwenVoiceCore/ModelUpdateDecisions.swift:191— `remove` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/SharedSupport/Services/WaveformService.swift:43— `extractSamples` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOS/IOSDeviceDiagnosticsRunner.swift:946— `telemetryRecords` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOS/IOSModelDownloadCoordinator.swift:1183— `ledgerReceivedBytes` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOS/IOSStartupReliabilityRunner.swift:716— `telemetryRecords` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOSSupport/Models/TTSContract.swift:42— `models` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOSSupport/Models/TTSContract.swift:46— `defaultSpeaker` turns every thrown error into `""` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOSSupport/Models/TTSContract.swift:50— `groupedSpeakers` turns every thrown error into `[:]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOSSupport/Models/TTSContract.swift:57— `groupedSpeakerDescriptors` turns every thrown error into `[:]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOSSupport/Models/TTSContract.swift:61— `allSpeakers` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch Sources/iOSSupport/Models/TTSContract.swift:65— `allSpeakerDescriptors` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Silent fallback default in catch REDACTED:216— `TweaksPanel` swallows every exception into `return true` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 scripts/build_cleanup.py:232— `tracked_paths_below` returns `[]` when `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 scripts/check_ios_ui_benchmark.py:636— `take_seed` returns `{}` when `(TypeError, 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 scripts/ci/classify_changes.py:160— `_imported_script_modules` returns `set()` when `(OSError, SyntaxError, UnicodeDecodeError)` 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 scripts/lib/iphone_mirroring.py:111— `installed_vocello` returns `'unverified'` when `(json.JSONDecodeError, AttributeError)` 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 scripts/release_sbom.py:101— `_hashes` returns `[]` when `(ValueError, base64.binascii.Error)` 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 scripts/sparkle_appcast.py:392— `_mount_points` returns `set()` when `(plistlib.InvalidFileException, 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.
D20 · ADR Quality· ADR has no Context section · ×2
ADR has no Context section docs/decisions/product-identity-compatibility.md:9— docs/decisions/product-identity-compatibility.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
ADR has no Context section docs/decisions/runtime-hardening-and-trust-boundary.md:9— docs/decisions/runtime-hardening-and-trust-boundary.md has no Context section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
redundant comment design_references/Vocello iOS/sheets.jsx:5— "— VOICE PICKER SHEET ——————————————————————————" repeats the code it sits on: 3 of its 3 words (voice, picker, sheet) are already in `function VoicePickerSheet({ open, onClose, selected, onSelect, mode = 'custom' })`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment design_references/Vocello iOS/sheets.jsx:290— "— MODEL INSTALL SHEET ——————————————————————————" repeats the code it sits on: 3 of its 3 words (model, install, sheet) are already in `function ModelInstallSheet({ open, onClose, model, onInstall })`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Fat interface: TTSEngine (24 requirements) Sources/QwenVoiceCore/TTSEngine.swift:97— `TTSEngine` declares 24 requirements: `supportDecision`, `start`, `stop`, `initialize`, `ping`, `loadModel`, `unloadModel`, `prepareAudio`, `ensureModelLoadedIfNeeded`, `prewarmModelIfNeeded`, `ensureCloneReferencePrimed`, `cancelClonePreparationIfNeeded`, `cancelProactiveModelWork`, `generate`, `listPreparedVoices`, `preparePreparedVoiceCandidate`, `commitPreparedVoiceCandidate`, `discardPreparedVoiceCandidate`, `enrollPreparedVoice`, `deletePreparedVoice`, `importReferenceAudio`, `exportGeneratedAudio`, `clearGenerationActivity`, `clearVisibleError`. Counted over its method requirements (members with no body), once per name; a default supplied by a protocol extension is not counted, because no conformer is forced to write it. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D20 · ADR Quality· ADR has no Decision and Consequences section · ×1
ADR has no Decision and Consequences section docs/decisions/ios-6gb-floor-feasibility.md:10— docs/decisions/ios-6gb-floor-feasibility.md has no Decision and Consequences section (a heading such as `## Decision`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion QwenVoice.xcodeproj/project.pbxproj:1— `(repository root)` (214425 LoC, 1919 module-visible types across 48 directories) overshoots its size bounds. 1 of 3 build unit(s) (SwiftPM, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 3.3/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
Security headers incomplete website/vercel.json:1— Set: Content-Security-Policy, Permissions-Policy, Referrer-Policy, X-Content-Type-Options, X-Frame-Options. Missing: Strict-Transport-Security — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−0.5 on this card.)
Outdated: eventsource — `eventsource` is resolved at 1.4.1, but 1.6.0 is the newest release tagged on https://github.com/mattt/EventSource.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update eventsource` reaches this one with no change to Package.swift.
Outdated: grdb.swift — `grdb.swift` is resolved at 7.10.0, but 7.12.0 is the newest release tagged on https://github.com/groue/GRDB.swift within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update grdb.swift` reaches this one with no change to Package.swift.
Outdated: mlx-swift — `mlx-swift` is resolved at 0.32.3, but 0.33.0 is the newest release tagged on https://github.com/ml-explore/mlx-swift.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update mlx-swift` reaches this one with no change to Package.swift.
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-asn1 — `swift-asn1` is resolved at 1.7.0, but 1.7.4 is the newest release tagged on https://github.com/apple/swift-asn1.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-asn1` reaches this one with no change to Package.swift.
Outdated: swift-atomics — `swift-atomics` is resolved at 1.3.0, but 1.3.1 is the newest release tagged on https://github.com/apple/swift-atomics.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-atomics` reaches this one with no change to Package.swift.
Outdated: swift-collections — `swift-collections` is resolved at 1.4.1, but 1.7.6 is the newest release tagged on https://github.com/apple/swift-collections.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-collections` reaches this one with no change to Package.swift.
Outdated: swift-crypto — `swift-crypto` is resolved at 4.4.0, but 4.5.2 is the newest release tagged on https://github.com/apple/swift-crypto.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-crypto` reaches this one with no change to Package.swift.
Outdated: swift-jinja — `swift-jinja` is resolved at 2.4.2, but 2.5.2 is the newest release tagged on https://github.com/huggingface/swift-jinja.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-jinja` reaches this one with no change to Package.swift.
Outdated: swift-nio — `swift-nio` is resolved at 2.100.0, but 2.105.0 is the newest release tagged on https://github.com/apple/swift-nio.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-nio` reaches this one with no change to Package.swift.
Outdated: swift-system — `swift-system` is resolved at 1.6.4, but 1.9.0 is the newest release tagged on https://github.com/apple/swift-system.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-system` reaches this one with no change to Package.swift.
Outdated: swift-transformers — `swift-transformers` is resolved at 1.3.5, but 1.4.0 is the newest release tagged on https://github.com/huggingface/swift-transformers.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-transformers` reaches this one with no change to Package.swift.
Outdated: yyjson — `yyjson` is resolved at 0.12.0, but 0.13.0 is the newest release tagged on https://github.com/ibireme/yyjson.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update yyjson` 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 127 file(s) — `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Generation.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTS.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSCaches.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSCodePredictor.swift`, `Packages/VocelloQwen3Core/Sources/MLXAudioTTS/Models/Qwen3TTS/Qwen3TTSLoading.swift`, … (+122 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 01a1e809-3380-7c4d-997a-d15715f0bad1 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 54 · Warnings: 1247 · Recommendations: 69 · Info: 13 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 05:44 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.