Public report of EcoPasteHub/EcoPaste, published 14 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 report Measured 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, 14 November 2026, 17:29 UTC · Survey ID cd_6abfbbd07a9e4e9b910b77ddebec9f16

EcoPasteHub/EcoPaste

Measured 14 November 2026, 17:26 UTC, at code version 5139d30

CAI score 54out of 100 At risk Up 2 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 38,023 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Accessibility, 49

Findings by how serious they are

47 critical 401 serious 77 minor

14 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 17:26 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.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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 ▸

58of 58 dimensions measured by tools.
493of 525 findings point to an exact file and line, so you can open each one in the code. The other 32 concern the repository as a whole, such as missing documentation.
58dimensions across 7 lenses, read from 38,023 lines of product code in 2 projects.
Chapters

Executive summary

EcoPasteHub/EcoPaste is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back in part because it has buttons or links with no name. It scores 54 out of 100, which the At risk rating leaves unchanged.

Accessibility, at 49, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step is making the controls keyboard-usable, worth about 3 points. Recording design decisions comes next, worth about 2 points.

Twenty-four pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Twelve known security holes in the packages the code depends on can be used by attackers, and five secrets can leak from the build pipeline. Pinning each tool to an exact version, updating the vulnerable packages and limiting each secret to its own step would close these risks. The password or key in the code's history needs replacing, with the old one switched off. The two buttons or links with no name need a name, even when they only show an icon.

The product code is 38,023 lines, about €37,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 for The 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.
Accessibility 49 · counts for 46%Production Readiness 52 · counts for 25%Security and Compliance 54 · counts for 14%Maturity 63 · counts for 8%Code Health 72 · counts for 4%Architecture 87 · counts for 2%Performance 100 · counts for 1%

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Product code 100%Tests 0%
New since the last survey: 83 findings

These 83 critical or serious findings weren't in the previous survey, on 27 October 2026.

  • Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Edited copy of a member (40 corresponding lines) .trellis/scripts/common/task_store.py
  • Code Duplication · Edited copy of a member (69 corresponding lines) .trellis/scripts/add_session.py
  • Code Duplication · Edited copies of one member (3 members, 30+ corresponding lines) src-tauri/src/keyboard/windows.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src-tauri/src/window/position.rs
  • Code Duplication · Edited copy of a member (34 corresponding lines) src-tauri/src/window/mod.rs
  • Code Duplication · Edited copy of a member (27 corresponding lines) src-tauri/src/menu/context_window.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) src-tauri/src/backup/mod.rs
  • Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) .trellis/scripts/common/task_store.py
  • Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) src-tauri/src/backup/mod.rs
  • Code Duplication · Edited copy of a member (25 corresponding lines) src-tauri/src/commands/storage.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src-tauri/src/tray/mod.rs
  • Code Duplication · Edited copy of a member (20 corresponding lines) src-tauri/src/menu/context_window.rs
  • Code Duplication · Edited copy of a member (20 corresponding lines) .trellis/scripts/common/session_context.py
  • Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) src-tauri/src/window/lifecycle/mod.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) src-tauri/src/db/apps.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) src-tauri/src/update.rs
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src-tauri/src/clipboard/app_store.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) src-tauri/src/drag_out/mod.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) src-tauri/src/window/preview.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) src-tauri/src/autostart/macos.rs
  • Code Duplication · Edited copy of a member (18 corresponding lines) src-tauri/src/window/preview.rs
  • Code Duplication · Edited copy of a member (6 corresponding lines) src-tauri/src/clipboard/apps_registry.rs
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src-tauri/src/db/items.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) src-tauri/src/mouse/windows.rs
  • Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) src-tauri/src/window/macos.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src-tauri/src/db/file_icons.rs
  • Code Duplication · Edited copy of a member (9 corresponding lines) src-tauri/src/drag_out/windows_ghost.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) src-tauri/src/backup/mod.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src-tauri/src/autostart/windows.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src-tauri/src/menu/context_window.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) src-tauri/src/mouse/windows.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) .trellis/scripts/common/paths.py
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src-tauri/src/admin.rs
  • Code Duplication · Edited copy of a member (13 corresponding lines) src-tauri/src/backup/mod.rs
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src-tauri/src/clipboard/apps_registry.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) .trellis/scripts/common/config.py
  • Code Duplication · Edited copy of a member (4 corresponding lines) src-tauri/src/core/paths.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) src-tauri/src/window/lifecycle/mod.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) .cursor/hooks/inject-shell-session-context.py
  • Code Duplication · Edited copy of a member (5 corresponding lines) src-tauri/src/i18n/mod.rs
  • Code Duplication · Duplicated block (11 lines × 2) src-tauri/src/keyboard/windows.rs
  • Code Duplication · Duplicated block (11 lines × 2) src-tauri/src/menu/context_window.rs
  • Code Duplication · Duplicated block (10 lines × 2) src-tauri/src/update.rs
  • Code Duplication · Duplicated block (6–7 lines × 2) src-tauri/src/commands/clipboard.rs
  • Code Duplication · Duplicated block (10 lines × 3) src-tauri/src/keyboard/windows.rs
  • Code Duplication · Duplicated block (11 lines × 2) src-tauri/src/keyboard/windows.rs
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) src/pages/Preference/utils/preferenceI18n.ts
  • Cyclomatic Complexity · Complex function ActionControl (cyclomatic 11, cognitive 9) src/pages/Preference/components/settingControls/ActionControl.tsx
  • Dependency Hygiene · Unused dependency '@release-it/bumper'
  • Dependency Hygiene · Unused dependency '@release-it/conventional-changelog'
  • Forms & labels · <Input> field component without a label src/components/ShortcutRecorder/index.tsx
  • Forms & labels · <Segmented> field component without a label src/pages/Preference/components/BackupExportModal.tsx
  • Forms & labels · <Input> field component without a label src/pages/Preference/components/PreferenceHeader.tsx
  • Forms & labels · <Input> field component without a label src/pages/Preference/components/settingControls/TextControl.tsx

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 42 findings

These 42 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one.

  • Code Duplication · Near-duplicate member family (6 members, 43 shared lines) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py
  • Code Duplication · Duplicated block (8 lines × 2) src-tauri/src/update.rs
  • Code Duplication · Duplicated block (6–7 lines × 2) src-tauri/src/commands/clipboard.rs
  • Code Duplication · Duplicated block (11 lines × 2) src-tauri/src/keyboard/windows.rs
  • Code Duplication · Duplicated block (19 lines × 3) .trellis/scripts/common/safe_commit.py
  • Code Duplication · Duplicated block (19 lines × 2) .trellis/scripts/common/task_store.py
  • Code Duplication · Duplicated block (16 lines × 3) .trellis/scripts/common/task_store.py
  • Code Duplication · Duplicated block (13–15 lines × 2) .trellis/scripts/common/cli_adapter.py
  • Code Duplication · Duplicated block (15 lines × 2) .trellis/scripts/common/cli_adapter.py
  • Code Duplication · Duplicated block (11 lines × 2) .trellis/scripts/task.py
  • Code Duplication · Duplicated block (8 lines × 3) .claude/hooks/inject-subagent-context.py
  • Code Duplication · Duplicated block (7 lines × 6) .claude/hooks/session-start.py
  • REDACTED Scanning · Leaked secret: hardcoded-credential REDACTED
  • Secrets (history) · High secret: WD-SECRET-0005 REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium vulnerability: RUSTSEC-2026-0367 REDACTED
  • A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €37,000 · Estimate
Cost to rebuild€12,000 to €62,000, for 207 to 658 hours of work, about 0.3 person-years for one engineer
Difficulty of the problemStandard, 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 54. 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.
SizeMedium: 38,023 lines of product code
What it is notNot 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
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 3 points · Medium effort · Keyboard semantics
2
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json.
Raises the score by about 2 points · Low effort · ADR Quality
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 3 points · Medium effort · Forms & labels

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 €37,000 to build again, about 0.3 person-years of work. Its weakest lens is Accessibility, at 49 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 3 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 6.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 129,518 lines over the last 90 days, which is about 525,267 lines a year. At that pace, the extra work comes to an estimated 61.9 to 371.5 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: 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.

215 modules, with 167 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 175 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.
uses →1 .trellis.scripts.common2 EcoPaste.clipboard.app_store3 EcoPaste.clipboard.file_icon_store4 EcoPaste.clipboard.guard5 EcoPaste.clipboard.payload6 EcoPaste.core.error7 EcoPaste.core.paths8 EcoPaste.db.models9 EcoPaste.db.state10 src.types.clipboard11 EcoPaste.clipboard.apps_registry12 EcoPaste.clipboard.source13 EcoPaste.clipboard.storage14 EcoPaste.commands.backup15 EcoPaste.settings.model16 src.commands17 src.hooks18 src.pages.Clipboard.hooks19 src.types.settings20 EcoPaste.clipboard.ingest21 EcoPaste.clipboard.read22 EcoPaste.clipboard.write23 EcoPaste.commands.clipboard24 EcoPaste.commands.drag25 EcoPaste.commands.onboarding26 EcoPaste.commands.window27 EcoPaste.menu.clipboard_item28 src29 src.constants30 src.pages.Preference.types.preferences31 src.pages.Preview32 EcoPaste.clipboard.watcher33 EcoPaste.commands.context_menu34 EcoPaste.menu.clipboard_item.native35 src.pages.Preference.components.SourceAppsTransfer36 src.pages.Preference.components.settingControls37 EcoPaste.backup38 EcoPaste.menu.context_window39 src.pages.Preference.components40 EcoPaste.commands.storage
1 .trellis.scripts.common
2 EcoPaste.clipboard.app_store
3 EcoPaste.clipboard.file_icon_store
4 EcoPaste.clipboard.guard
5 EcoPaste.clipboard.payload
6 EcoPaste.core.error
7 EcoPaste.core.paths
8 EcoPaste.db.models
9 EcoPaste.db.state
10 src.types.clipboard
11 EcoPaste.clipboard.apps_registry13
12 EcoPaste.clipboard.source1
13 EcoPaste.clipboard.storage11
14 EcoPaste.commands.backup4
15 EcoPaste.settings.model1
16 src.commands3
17 src.hooks2
18 src.pages.Clipboard.hooks1
19 src.types.settings1
20 EcoPaste.clipboard.ingest2312
21 EcoPaste.clipboard.read112
22 EcoPaste.clipboard.write1111
23 EcoPaste.commands.clipboard11101
24 EcoPaste.commands.drag1211
25 EcoPaste.commands.onboarding11
26 EcoPaste.commands.window1
27 EcoPaste.menu.clipboard_item1
28 src282
29 src.constants22
30 src.pages.Preference.types.preferences1
31 src.pages.Preview3
32 EcoPaste.clipboard.watcher2222121
33 EcoPaste.commands.context_menu2
34 EcoPaste.menu.clipboard_item.native11
35 src.pages.Preference.components.SourceAppsTransfer11
36 src.pages.Preference.components.settingControls228
37 EcoPaste.backup1111
38 EcoPaste.menu.context_window125
39 src.pages.Preference.components111
40 EcoPaste.commands.storage11111
Uses a module listed above itPart of a loopThe module itself
1 .trellis.scripts.common2 EcoPaste.clipboard.app_store3 EcoPaste.clipboard.file_icon_store4 EcoPaste.clipboard.guard5 EcoPaste.clipboard.payload6 EcoPaste.core.error7 EcoPaste.core.paths8 EcoPaste.db.models9 EcoPaste.db.state10 src.types.clipboard11 EcoPaste.clipboard.apps_registry12 EcoPaste.clipboard.source13 EcoPaste.clipboard.storage14 EcoPaste.commands.backup15 EcoPaste.settings.model16 src.commands17 src.hooks18 src.pages.Clipboard.hooks19 src.types.settings20 EcoPaste.clipboard.ingest21 EcoPaste.clipboard.read22 EcoPaste.clipboard.write23 EcoPaste.commands.clipboard24 EcoPaste.commands.drag25 EcoPaste.commands.onboarding26 EcoPaste.commands.window27 EcoPaste.menu.clipboard_item28 src29 src.constants30 src.pages.Preference.types.preferences31 src.pages.Preview32 EcoPaste.clipboard.watcher33 EcoPaste.commands.context_menu34 EcoPaste.menu.clipboard_item.native35 src.pages.Preference.components.SourceAppsTransfer36 src.pages.Preference.components.settingControls37 EcoPaste.backup38 EcoPaste.menu.context_window39 src.pages.Preference.components40 EcoPaste.commands.storage.trellis.scripts.common1EcoPaste.clipboard.app_store2EcoPaste.clipboard.file_icon_store3EcoPaste.clipboard.guard4EcoPaste.clipboard.payload5EcoPaste.core.error6EcoPaste.core.paths7EcoPaste.db.models8EcoPaste.db.state9src.types.clipboard10EcoPaste.clipboard.apps_registry11EcoPaste.clipboard.source12EcoPaste.clipboard.storage13EcoPaste.commands.backup14EcoPaste.settings.model15src.commands16src.hooks17src.pages.Clipboard.hooks18src.types.settings19EcoPaste.clipboard.ingest20EcoPaste.clipboard.read21EcoPaste.clipboard.write22EcoPaste.commands.clipboard23EcoPaste.commands.drag24EcoPaste.commands.onboarding25EcoPaste.commands.window26EcoPaste.menu.clipboard_item27src28src.constants29src.pages.Preference.types.preferences30src.pages.Preview31EcoPaste.clipboard.watcher32EcoPaste.commands.context_menu33EcoPaste.menu.clipboard_item.native34src.pages.Preference.components.SourceAppsTransfer35src.pages.Preference.components.settingControls36EcoPaste.backup37EcoPaste.menu.context_window38src.pages.Preference.components39EcoPaste.commands.storage40131114132112312112111111101121111112822213222212121111228111112511111111+175 more modules (most-connected shown)

At a glance — Code Health · 72% · Adequate · gated by D4 ·

At a glance — Architecture · 87% · Adequate · gated by D26 ·

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

At a glance — Readiness · 52% · Adequate · gated by R4 ·

At a glance — Security · 54% · Adequate · gated by D29, D36 ·

At a glance — Accessibility · 49% · Weak · gated by AC2, AC4 ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures36High / Critical
A05:2025 — Injection30High / Critical
A07:2025 — Authentication Failures1High / Critical

Roadmap

Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label; Add tests that import the unreached modules (directly or through their public entry).

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

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+3.4 ptsMediumKeyboard semantics
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json.+1.6 ptsLowADR Quality
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+2.7 ptsMediumForms & labels
Add tests that import the unreached modules (directly or through their public entry).+2.4 ptsMediumTest Coverage
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2).+1.2 ptsLowStatic Analysis (SAST)
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.+2.2 ptsMediumVisual & motion safety
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with rust-toolchain.toml.+0.9 ptsLowPlatform End-of-Life
Resolve the 9 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (9).+0.7 ptsLowDependency Vulnerabilities

File quality

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

FileScoreBandWorst signal
REDACTED2.3SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
src/pages/Preference/index.tsx5.4MixedChange Coupling: Boundary-crossing change coupling: index.tsx ↔ index.ts
.claude/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
.claude/hooks/inject-subagent-context.py7.0MixedCyclomatic Complexity: inject-subagent-context._extract_subagent_name (cyclomatic 18)
.codex/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._build_compact_current_state (cyclomatic 16)
.claude/hooks/inject-workflow-state.py7.0MixedCode Duplication: Members sharing a duplicated core (5 members, 50+ identical tokens)
.cursor/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
.gemini/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
.kiro/hooks/session-start.py7.0MixedCyclomatic Complexity: session-start._resolve_spec_scope (cyclomatic 20)
src-tauri/src/backup/mod.rs7.0MixedGod Classes: FileTooLong: backup/mod.rs
src-tauri/src/keyboard/windows.rs7.0MixedCyclomatic Complexity: EcoPaste::keyboard::windows::hook_proc (cyclomatic 32)
src/pages/Clipboard/components/List.tsx7.1MixedCyclomatic Complexity: List.List::handleKeyDown (cyclomatic 32)
.trellis/scripts/common/task_store.py7.1MixedCyclomatic Complexity: task_store.cmd_create (cyclomatic 28)
src-tauri/src/clipboard/app_store.rs7.1MixedCode Duplication: Edited copies of one member (3 members, 11+ corresponding lines)
.trellis/scripts/common/cli_adapter.py7.1MixedCyclomatic Complexity: cli_adapter.detect_platform (cyclomatic 30)
.trellis/scripts/add_session.py7.1MixedCyclomatic Complexity: add_session.update_index (cyclomatic 21)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 47

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

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

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

Could not be resolved — 14

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 58 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 — 58 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D17D19D20D26D28D29D30D34D35D36D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX9M1M2M3M4P1P2P3P4P6P8PF3R1R10R2R3R4R6R7R8R9X1X15X21X29X30X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 493 of 525 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1db18-cb81-7a4a-9497-bc6d3bc221b4.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • 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 Rust half could not be measured — the Cargo suite in src-tauri did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • 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 source is present (.rs) and this repository declares a Cargo test suite (src-tauri, 28 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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 crate 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 (23 contributor(s) across 813 commit(s) sampled, automation and bot accounts excluded). One of them holds 85% of the history; the other 22 hold 0.7% 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.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
  • D24 Comment Value — 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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — 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. 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 — 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • 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. `.release-it.ts`, `src/App.tsx`, `src/components/ScrollArea/index.tsx`, `src/components/VirtuosoScroller/index.tsx`, `src/constants/windowOpenSelection.ts`, … (+5 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.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The dev server kept running but no port it opened served a page in the time allowed. (rule: no-answer). The renderer reported: the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "Android Creating mipmap-hdpi/ic_launcher.png / Android Creating mipmap-mdpi/ic_launcher_round.png / Android Creating mipmap-mdpi/ic_launcher.png / Android Creating mipmap-xhdpi/ic_launcher_round.png / Android Creating mipmap-xhdpi/ic_launcher.png / Android Creating mipmap-xxhdpi/ic_launcher_round.png / Android Creating mipmap-xxhdpi/ic_launcher.png / Android Creating mipmap-xxxhdpi/ic_launcher_round.png / Android Creating mipmap-xxxhdpi/ic_launcher.png / > eco-paste@1.1.0 dev:vite / > vite / VITE v7.3.8 ready in 917 ms / ➜ Local: http://localhost:1420/" 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`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "Android Creating mipmap-hdpi/ic_launcher.png / Android Creating mipmap-mdpi/ic_launcher_round.png / Android Creating mipmap-mdpi/ic_launcher.png / Android Creating mipmap-xhdpi/ic_launcher_round.png / Android Creating mipmap-xhdpi/ic_launcher.png / Android Creating mipmap-xxhdpi/ic_launcher_round.png / Android Creating mipmap-xxhdpi/ic_launcher.png / Android Creating mipmap-xxxhdpi/ic_launcher_round.png / Android Creating mipmap-xxxhdpi/ic_launcher.png / > eco-paste@1.1.0 dev:vite / > vite / VITE v7.3.8 ready in 917 ms / ➜ Local: http://localhost:1420/" No runtime evidence was gathered.
  • 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 and Scala source only, and this repository's Rust 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 and Scala source only, and this repository's Rust 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.
  • 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.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X4 Structured logging — 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, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • 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.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.9 / 10Adequate✓ Tool-verified

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

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

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

43 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Group.Group at 43. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being EcoPaste::i18n::en_us::clipboard_menu::label at 17 — 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 functions was excluded, so the exclusion is disclosed nowhere in the file itself: src-tauri/src/i18n/en_us/clipboard_menu.rs (EcoPaste::i18n::en_us::clipboard_menu::label at 17), src-tauri/src/i18n/zh_cn/clipboard_menu.rs (EcoPaste::i18n::zh_cn::clipboard_menu::label at 17). 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.

session-start._build_compact_current_state (cyclomatic 16) · ×6.claude/hooks/session-start.py:600
session-start._resolve_spec_scope (cyclomatic 20) · ×4.claude/hooks/session-start.py:510
session-start._get_task_status (cyclomatic 19) · ×4.claude/hooks/session-start.py:327
inject-subagent-context._extract_subagent_name (cyclomatic 18) · ×3.claude/hooks/inject-subagent-context.py:577
EcoPaste::keyboard::windows::hook_proc (cyclomatic 32) · ×2src-tauri/src/keyboard/windows.rs:131

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

What to do

  1. Bring the 43 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with Group.Group (cyclomatic 43), index.Update (cyclomatic 35), index.ShortcutRecorder (cyclomatic 34). — 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 43 together lifts Cyclomatic Complexity from 6.9 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

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

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

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

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

76 method(s) exceeded the cognitive complexity threshold of 15; the worst was EcoPaste::keyboard::windows::hook_proc at 76.

session-start._build_compact_current_state (cognitive 23) · ×6.claude/hooks/session-start.py:600
EcoPaste::keyboard::windows::hook_proc (cognitive 76) · ×5src-tauri/src/keyboard/windows.rs:131
session-start._resolve_spec_scope (cognitive 30) · ×4.claude/hooks/session-start.py:510
session-start._get_task_status (cognitive 23) · ×4.claude/hooks/session-start.py:327
session-start._collect_spec_index_paths (cognitive 19) · ×4.claude/hooks/session-start.py:569

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

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cognitive Complexity — start with EcoPaste::keyboard::windows::hook_proc (cognitive 76), buildSessionContext (cognitive 65). — 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 2 together lifts Cognitive Complexity from 5.1 to about 5.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.

D3 · God Classes5.8 / 10Adequate✓ Tool-verified

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

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

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

37 god class(es) detected.

FunctionTooLong: List.List · ×23src/pages/Clipboard/components/List.tsx:86
FileTooLong: backup/mod.rs · ×13src-tauri/src/backup/mod.rs
ClassTooLong: Listsrc/pages/Clipboard/components/List.tsx:1

What to do

  1. Resolve the 23 FunctionTooLong finding(s) in God Classes — start with index.tsx (5), List.tsx, Group.tsx. — One of this dimension's main actionable groups (23 warning-level).
  2. Resolve the 13 FileTooLong finding(s) in God Classes — start with session-start.py (4), mod.rs, clipboard.rs. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 1 ClassTooLong finding(s) in God Classes — start with List.tsx. — One of this dimension's main actionable groups (1 warning-level).

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

D4 · Code Duplication2.5 / 10Weak✓ Tool-verified

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.

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

86 duplicated block group(s) detected. 18.7 % of the production lines (7,114 of 38,023) are in a reported copy. A further 64 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .tsx, .ts (48% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Members sharing a duplicated core (6 members, 50+ identical tokens) · ×9.claude/hooks/inject-subagent-context.py:276
Members sharing a duplicated core (5 members, 50+ identical tokens) · ×7.claude/hooks/inject-workflow-state.py:144
Duplicated block (11 lines × 2) · ×7src-tauri/src/backup/mod.rs:1277
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×6.claude/hooks/session-start.py:269
Edited copy of a member (13 corresponding lines) · ×5src-tauri/src/window/preview.rs:182

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

What to do

  1. Resolve the 9 Members sharing a duplicated core (6 members, 50+ identical tokens) finding(s) in Code Duplication — start with session-start.py (8), inject-subagent-context.py. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 7 Members sharing a duplicated core (5 members, 50+ identical tokens) finding(s) in Code Duplication — start with inject-workflow-state.py (7). — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 7 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with windows.rs (3), mod.rs (2), context_window.rs. — One of this dimension's main actionable groups (7 warning-level).

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

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

2 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence.

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

0 of 18 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D12 · Dependency Hygiene9.1 / 10Exemplary✓ Tool-verified

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.

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

18 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: blake3 · ×18

✓ On the Gold path — maintain.

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 695 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 1 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 4 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

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

Top hotspots: src/pages/Clipboard/components/List.tsx (2×150=300); src-tauri/src/lib.rs (9×26=234); src/pages/Preference/components/settingControls/ActionControl.tsx (6×27=162) Repeated repair below the complexity floor: src-tauri/src/commands/onboarding.rs (3 of 4 changes were fixes)

Hotspot: src/pages/Clipboard/components/List.tsx · ×3src/pages/Clipboard/components/List.tsx:86
Repeated repair: src-tauri/src/commands/onboarding.rssrc-tauri/src/commands/onboarding.rs:139

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with List.tsx, lib.rs, ActionControl.tsx. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with onboarding.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

0 deducted task-comment markers across 38023 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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.

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

1 of 1 documentation facets pass in full. 3 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

Method: 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.

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

No architecture decision records were found.

No ADRs foundpackage.json:23

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with package.json. — 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.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

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

2 of 2 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — 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.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

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

1 finding(s): 0 critical, 1 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D29 · Static Analysis (SAST)4.0 / 10Weak✓ Tool-verified

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

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

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

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

30 finding(s): 0 critical, 29 high, 1 medium, 0 low. 24 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 11 file(s) — `.agents/skills/sync-zh-changelog/agents/openai.yaml`, `.release-it.ts` (line 63), `src/App.tsx` (line 24), `src/components/ScrollArea/index.tsx` (line 14), `src/components/VirtuosoScroller/index.tsx` (line 11), … (+6 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 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. No action in Static Analysis (SAST) — all 24 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (24 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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.

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

30 finding(s): 4 critical, 8 high, 18 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 9 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (9). — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 8 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
  3. Resolve the 4 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).

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

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

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 118 of the 225 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling10.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

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

Strongest change-coupling: index.tsx↔index.ts 74%

Boundary-crossing change coupling: index.tsx ↔ index.tssrc/pages/Preference/index.tsx:1

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with index.tsx. — One of this dimension's main actionable groups (1 issue-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

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.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 20 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

End-of-life runtime: Rust 1.96rust-toolchain.toml:1

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with rust-toolchain.toml. — One of this dimension's main actionable groups (1 warning-level).

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

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.

AC2 · Forms & labels3.5 / 10Weak✓ 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.

  • 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) — src/components/ClipboardGroupModal/index.tsx:200, src/pages/Clipboard/components/Group.tsx:655
  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it 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. (×6) — src/components/LanguageSwitcher/index.tsx:120, src/components/ShortcutRecorder/index.tsx:330, src/pages/Preference/components/BackupExportModal.tsx:181, …
  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. — src/components/ShortcutRecorder/index.tsx:314
  • 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) — src/pages/Clipboard/components/Header.tsx:189, src/pages/Preference/components/PreferenceHeader.tsx:70, src/pages/Preference/components/settingControls/TextControl.tsx:46

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.
AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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.

AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

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

  • This <div> binds mousedown, pointermove, dragstart and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — src/pages/Clipboard/components/cards/ClipboardCard.tsx:136

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

AC6 · Visual & motion safety5.0 / 10Adequate✓ Tool-verified

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

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

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

  • `html body *` 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. — src/styles/global.scss:16

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.
AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

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.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

  • `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — package.json:39

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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.

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

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.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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.

R1 · Type Safety10.0 / 10Exemplary✓ 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.

R10 · Code Duplication7.8 / 10Strong✓ Tool-verified

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.

  • 7 duplicated blocks under src/pages/ have copies in at least two of the sibling directories Clipboard, ContextMenu, Preference, Preview, Update — 5 of them are reported below, and 2 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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. — src/pages/Clipboard/components/Group.tsx:427
  • src/pages/Preference/components/BackupExportModal.tsx:55 · src/pages/Preference/components/BackupImportModal.tsx:53 — the two spans are one implementation copied and then locally edited — 561 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. — src/pages/Preference/components/BackupExportModal.tsx:55
  • src/pages/Onboarding/components/DoneStep.tsx:14 · src/pages/Onboarding/components/WelcomeStep.tsx:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/pages/Onboarding/components/DoneStep.tsx:14
  • src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54 · src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx:76 — 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. — src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54
  • src/pages/Clipboard/components/Group.tsx:427 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:124 — 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. — src/pages/Clipboard/components/Group.tsx:427
  • src/hooks/useClipboardItems.ts:159 · src/hooks/useClipboardItems.ts:185 — 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. — src/hooks/useClipboardItems.ts:159
  • src/components/LanguageSwitcher/index.tsx:43 · src/components/LanguageSwitcher/index.tsx:82 — 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. — src/components/LanguageSwitcher/index.tsx:43
  • src/pages/Clipboard/components/Group.tsx:322 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:74 — 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. — src/pages/Clipboard/components/Group.tsx:322
  • src/components/Dropdown/index.tsx:83 · src/components/Popover/index.tsx:20 — 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. — src/components/Dropdown/index.tsx:83
  • src/pages/Preference/utils/preferenceI18n.ts:98 · src/pages/Preference/utils/preferenceI18n.ts:116 — 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. — src/pages/Preference/utils/preferenceI18n.ts:98
  • src/pages/Preview/components/PreviewContent.tsx:107 · src/pages/Preview/components/PreviewContent.tsx:190 — 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. — src/pages/Preview/components/PreviewContent.tsx:107
  • src/components/ShortcutRecorder/index.tsx:220 · src/components/ShortcutRecorder/index.tsx:270 — the two spans are one implementation copied and then locally edited — 67 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. — src/components/ShortcutRecorder/index.tsx:220
  • src/pages/Clipboard/components/Group.tsx:136 · src/pages/Clipboard/components/List.tsx:183 — the two spans are one implementation copied and then locally edited — 62 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. — src/pages/Clipboard/components/Group.tsx:136
  • src/pages/Preference/config/preferenceSchema.ts:908 · src/pages/Preference/index.tsx:422 — the two spans are one implementation copied and then locally edited — 53 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. — src/pages/Preference/config/preferenceSchema.ts:908
  • src/pages/ContextMenu/index.tsx:242 · src/pages/Preview/index.tsx:109 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/pages/ContextMenu/index.tsx:242
  • src/pages/Preference/utils/storageUsage.ts:11 · src/pages/Preview/components/PreviewContent.tsx:380 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — src/pages/Preference/utils/storageUsage.ts:11
  • src/pages/Update/index.tsx:117 · src/pages/Update/index.tsx:130 — 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. — src/pages/Update/index.tsx:117
  • src/utils/shortcut.ts:207 · src/utils/shortcut.ts:233 — the two spans are one implementation copied and then locally edited — 56 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. — src/utils/shortcut.ts:207
  • src/pages/Preference/components/SourceAppsTransfer.tsx:129 · src/pages/Preference/components/SourceAppsTransfer.tsx:151 — 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. — src/pages/Preference/components/SourceAppsTransfer.tsx:129
  • src/pages/Preference/components/settingControls/NumberControl.tsx:11 · src/pages/Preference/components/settingControls/TextControl.tsx:9 — 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. — src/pages/Preference/components/settingControls/NumberControl.tsx:11
  • src/pages/Preference/components/settingControls/SelectControls.tsx:18 · src/pages/Preference/components/settingControls/SelectControls.tsx:50 — 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. — src/pages/Preference/components/settingControls/SelectControls.tsx:18
  • src/pages/Preference/components/settingControls/NumberControl.tsx:13 · src/pages/Preference/components/settingControls/RetentionControl.tsx:36 — 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. — src/pages/Preference/components/settingControls/NumberControl.tsx:13
  • src/pages/Clipboard/components/Group.tsx:111 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:54 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — src/pages/Clipboard/components/Group.tsx:111

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.
R2 · Cyclomatic Complexity8.6 / 10Strong✓ Tool-verified

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.

  • handleKeyDown has cyclomatic complexity 32 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/List.tsx:587
  • PreferenceSettingControl has cyclomatic complexity 26 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50
  • current has cyclomatic complexity 23 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/pages/Clipboard/components/List.tsx:522
  • resolveSectionVisual has cyclomatic complexity 22 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/pages/Preference/components/PreferenceSection.tsx:136
  • Update has cyclomatic complexity 20 and cognitive complexity 19; 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. — src/pages/Update/index.tsx:43
  • handleQuickAction has cyclomatic complexity 20 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/List.tsx:872
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/commands/index.ts:1082
  • PreferenceSettingRow has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/pages/Preference/components/PreferenceSettingRow.tsx:42
  • BackupImportModal has cyclomatic complexity 15 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. — src/pages/Preference/components/BackupImportModal.tsx:31
  • Preview has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preview/index.tsx:62
  • getEmptyDescription has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/List.tsx:1117
  • handleWindowVisibility has cyclomatic complexity 13 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. — src/pages/Clipboard/components/List.tsx:284
  • settingValuesEqual has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/services/preferenceSettings.ts:26
  • handleClick 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. — src/pages/Preference/components/settingControls/ActionControl.tsx:323
  • (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/hooks/useClipboardItems.ts:80
  • ClipboardCard has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/components/cards/ClipboardCard.tsx:58
  • openPreviewForItem has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Clipboard/hooks/useClipboardPreviewController.ts:348
  • PreferenceStorageUsagePanel has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/components/PreferenceStorageUsagePanel.tsx:21
  • Preference has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/pages/Preference/index.tsx:70
  • ActionControl 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. — src/pages/Preference/components/settingControls/ActionControl.tsx:100
R3 · Large Files8.2 / 10Strong✓ 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.

  • src/commands/index.ts has 1311 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/commands/index.ts:1
  • src/pages/Clipboard/components/List.tsx has 1180 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/Clipboard/components/List.tsx:1
  • src/pages/Preference/config/preferenceSchema.ts has 947 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/Preference/config/preferenceSchema.ts:1
  • src/pages/Clipboard/components/Group.tsx has 891 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/Clipboard/components/Group.tsx:1
  • src/pages/Preference/components/settingControls/ActionControl.tsx has 597 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/Preference/components/settingControls/ActionControl.tsx:1
  • src/pages/Clipboard/hooks/useClipboardPreviewController.ts has 483 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/pages/Clipboard/hooks/useClipboardPreviewController.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • 0% of 124 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
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.

R7 · Dead Code9.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 5 application, 5 tooling and 0 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (5 application, 5 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 — src/hooks/useWindowLifecycle.ts
  • Nothing imports this binding — it is safe to review for removal. (×6) — src/constants/commands.ts:90, src/constants/events.ts:22, src/constants/urls.ts:6, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene7.5 / 10Strong✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×5)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.3 / 10Strong✓ Tool-verified

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.

  • src/commands/index.ts → src/stores/settings.ts → src/commands/index.ts — src/commands/index.ts:14

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

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

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

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types6.0 / 10Adequate✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 1/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

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

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

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

Reference — by lens

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

LensScoreRatingImpact
Code Health72%Adequate — gated by D4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture87%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity63%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness52%Adequate — gated by R4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security54%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility49%Weak — gated by AC2, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

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

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 33 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

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

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 66 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 applicable: Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No 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. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. 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
  • AX6 Interface segregation — AX6 reached only 48% of this repository's production lines — rust (19,761 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "Android Creating mipmap-hdpi/ic_launcher.png / Android Creating mipmap-mdpi/ic_launcher_round.png / Android Creating mipmap-mdpi/ic_launcher.png / Android Creating mipmap-xhdpi/ic_launcher_round.png / Android Creating mipmap-xhdpi/ic_launcher.png / Android Creating mipmap-xxhdpi/ic_launcher_round.png / Android Creating mipmap-xxhdpi/ic_launcher.png / Android Creating mipmap-xxxhdpi/ic_launcher_round.png / Android Creating mipmap-xxxhdpi/ic_launcher.png / > eco-paste@1.1.0 dev:vite / > vite / VITE v7.3.8 ready in 917 ms / ➜ Local: http://localhost:1420/" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~3 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • 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 — N/A — too few peers to establish a naming convention (5978 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • 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"]`.
  • D24 Comment Value — 18 of 25 comment blocks were not judged (18 in a non-Latin script): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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) — 10 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — Rust suite
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (8 value object(s))
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner 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 and Scala, 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Rust 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
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not 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.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • S1 Web-Security Posture — No web surface: 93 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
  • X12 Unreachable branch — X12 reached only 48% of this repository's production lines — rust (19,761 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
  • X16 Unfloored truncation loop — X16 reached only 48% of this repository's production lines — rust (19,761 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
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Rust was read, and no request in it can be cancelled by a caller — a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • 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.
  • 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
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — X3 reached only 48% of this repository's production lines — rust (19,761 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 — 47 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text src/components/ClipboardGroupModal/index.tsx:200 — 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 src/pages/Clipboard/components/Group.tsx:655 — 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).
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> src/pages/Clipboard/components/cards/ClipboardCard.tsx:136 — This <div> binds mousedown, pointermove, dragstart and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: index.tsx ↔ index.ts src/pages/Preference/index.tsx:1 — `src/pages/Preference/index.tsx` (context pages) and `src/router/index.ts` (context router) sit in DIFFERENT parts of the tree yet change together 74% of the time (14 of the 19 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `b9afe513` feat: 在偏好设置窗口中切换页面时,新增了过渡动画 (#748) (at that commit the file was still `src/layouts/Preference/index.tsx`); `62aa9809` refactor: 双窗口模式+哈希路由 (#357) (at that commit the file was still `src/layouts/Preference/index.tsx`); `2f74cb00` fix: 修复在 Windows 上 app 无限重启的 bug (#327) (at that commit the file was still `src/layouts/Preference/index.tsx`) — run `git show` on any of them.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) src/commands/index.ts:14 — src/commands/index.ts → src/stores/settings.ts → src/commands/index.ts
Serious — 401 finding(s)
D3 · God Classes · FunctionTooLong · ×23
  • FunctionTooLong: List.List src/pages/Clipboard/components/List.tsx:86 — FunctionTooLong — List runs 654 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 554 over it, 6.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Group.Group src/pages/Clipboard/components/Group.tsx:109 — FunctionTooLong — Group runs 348 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 248 over it, 3.48× 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: useClipboardPreviewController.useClipboardPreviewController src/pages/Clipboard/hooks/useClipboardPreviewController.ts:46 — FunctionTooLong — useClipboardPreviewController runs 287 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× 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: ActionControl.ActionControl src/pages/Preference/components/settingControls/ActionControl.tsx:100 — FunctionTooLong — ActionControl runs 268 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.Preference src/pages/Preference/index.tsx:70 — FunctionTooLong — Preference runs 245 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 145 over it, 2.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: EcoPaste::run src-tauri/src/lib.rs:25 — FunctionTooLong — EcoPaste::run runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× 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: useClipboardItems.useClipboardItems src/hooks/useClipboardItems.ts:28 — FunctionTooLong — useClipboardItems runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.ShortcutRecorder src/components/ShortcutRecorder/index.tsx:43 — FunctionTooLong — ShortcutRecorder runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.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.
  • FunctionTooLong: index.Update src/pages/Update/index.tsx:43 — FunctionTooLong — Update 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.
  • FunctionTooLong: BackupExportModal.BackupExportModal src/pages/Preference/components/BackupExportModal.tsx:32 — FunctionTooLong — BackupExportModal runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× 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: motion.usePreviewMotion src/pages/Preview/motion.ts:16 — FunctionTooLong — usePreviewMotion runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: BackupImportModal.BackupImportModal src/pages/Preference/components/BackupImportModal.tsx:31 — FunctionTooLong — BackupImportModal runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: LegacyImportStep.LegacyImportStep src/pages/Onboarding/components/LegacyImportStep.tsx:17 — FunctionTooLong — LegacyImportStep runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PreferenceSearchResults.PreferenceSearchResults src/pages/Preference/components/PreferenceSearchResults.tsx:33 — FunctionTooLong — PreferenceSearchResults 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.
  • FunctionTooLong: ClipboardGroupManagerModal.ClipboardGroupManagerModal src/pages/Preference/components/ClipboardGroupManagerModal.tsx:48 — FunctionTooLong — ClipboardGroupManagerModal runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.ClipboardGroupModal src/components/ClipboardGroupModal/index.tsx:74 — FunctionTooLong — ClipboardGroupModal 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.
  • FunctionTooLong: PreferenceSettingControl.PreferenceSettingControl src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50 — FunctionTooLong — PreferenceSettingControl 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.
  • FunctionTooLong: index.Preview src/pages/Preview/index.tsx:62 — FunctionTooLong — Preview 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.
  • FunctionTooLong: SourceAppsTransfer.SourceAppsTransfer src/pages/Preference/components/SourceAppsTransfer.tsx:48 — FunctionTooLong — SourceAppsTransfer runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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: Header.Header src/pages/Clipboard/components/Header.tsx:40 — FunctionTooLong — Header runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ClipboardCard.ClipboardCard src/pages/Clipboard/components/cards/ClipboardCard.tsx:58 — FunctionTooLong — ClipboardCard runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: EcoPaste::clipboard::ingest::build_item_with_settings src-tauri/src/clipboard/ingest.rs:193 — FunctionTooLong — EcoPaste::clipboard::ingest::build_item_with_settings runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× 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: PreferenceSettingRow.PreferenceSettingRow src/pages/Preference/components/PreferenceSettingRow.tsx:42 — FunctionTooLong — PreferenceSettingRow runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.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.
D3 · God Classes · FileTooLong · ×13
  • FileTooLong: backup/mod.rs src-tauri/src/backup/mod.rs — FileTooLong — 1027 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 57 free functions. The bar is 500 significant lines; this is 527 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: commands/clipboard.rs src-tauri/src/commands/clipboard.rs — FileTooLong — 1005 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 505 over it, 2.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/List.tsx src/pages/Clipboard/components/List.tsx — FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: List (86-1112). The bar is 500 significant lines; this is 387 over it, 1.77× 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: commands/index.ts src/commands/index.ts — FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 271 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/Group.tsx src/pages/Clipboard/components/Group.tsx — FileTooLong — 607 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 107 over it, 1.21× 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: config/preferenceSchema.ts src/pages/Preference/config/preferenceSchema.ts — FileTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 104 over it, 1.21× 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: commands/onboarding.rs src-tauri/src/commands/onboarding.rs — FileTooLong — 576 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 76 over it, 1.15× 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: hooks/session-start.py .claude/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.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: hooks/session-start.py .cursor/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.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: hooks/session-start.py .gemini/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.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: hooks/session-start.py .kiro/hooks/session-start.py — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.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: common/session_context.py .trellis/scripts/common/session_context.py — FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 55 over it, 1.11× 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: window/preview.rs src-tauri/src/window/preview.rs — FileTooLong — 531 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 31 over it, 1.06× 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×9
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py:276 — .claude/hooks/inject-subagent-context.py:276-311 | .claude/hooks/inject-subagent-context.py:315-339 | .cursor/hooks/inject-subagent-context.py:276-311 | .cursor/hooks/inject-subagent-context.py:315-339 | .kiro/hooks/inject-subagent-context.py:276-311 | .kiro/hooks/inject-subagent-context.py:315-339 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:23 — .claude/hooks/session-start.py:23-67 | .codex/hooks/session-start.py:45-89 | .cursor/hooks/session-start.py:23-67 | .gemini/hooks/session-start.py:23-67 | .github/copilot/hooks/session-start.py:55-99 | .kiro/hooks/session-start.py:23-67 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:100 — .claude/hooks/session-start.py:100-120 | .codex/hooks/session-start.py:123-142 | .cursor/hooks/session-start.py:100-120 | .gemini/hooks/session-start.py:100-120 | .github/copilot/hooks/session-start.py:128-147 | .kiro/hooks/session-start.py:100-120 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:160 — .claude/hooks/session-start.py:160-174 | .codex/hooks/session-start.py:295-309 | .cursor/hooks/session-start.py:160-174 | .gemini/hooks/session-start.py:160-174 | .github/copilot/hooks/session-start.py:300-314 | .kiro/hooks/session-start.py:160-174 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:178 — .claude/hooks/session-start.py:178-184 | .codex/hooks/session-start.py:313-319 | .cursor/hooks/session-start.py:178-184 | .gemini/hooks/session-start.py:178-184 | .github/copilot/hooks/session-start.py:318-324 | .kiro/hooks/session-start.py:178-184 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:570 — .claude/hooks/session-start.py:570-597 | .codex/hooks/session-start.py:330-353 | .cursor/hooks/session-start.py:570-597 | .gemini/hooks/session-start.py:570-597 | .github/copilot/hooks/session-start.py:335-358 | .kiro/hooks/session-start.py:570-597 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:605 — .claude/hooks/session-start.py:605-657 | .codex/hooks/session-start.py:361-413 | .cursor/hooks/session-start.py:605-657 | .gemini/hooks/session-start.py:605-657 | .github/copilot/hooks/session-start.py:366-418 | .kiro/hooks/session-start.py:605-657 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:661 — .claude/hooks/session-start.py:661-682 | .codex/hooks/session-start.py:417-433 | .cursor/hooks/session-start.py:661-682 | .gemini/hooks/session-start.py:661-682 | .github/copilot/hooks/session-start.py:422-438 | .kiro/hooks/session-start.py:661-682 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) .claude/hooks/session-start.py:692 — .claude/hooks/session-start.py:692-703 | .codex/hooks/session-start.py:443-446 | .cursor/hooks/session-start.py:692-703 | .gemini/hooks/session-start.py:692-703 | .github/copilot/hooks/session-start.py:448-451 | .kiro/hooks/session-start.py:692-703 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×7
  • Members sharing a duplicated core (5 members, 50+ identical tokens) .claude/hooks/inject-workflow-state.py:144 — .claude/hooks/inject-workflow-state.py:144-167 | .codex/hooks/inject-workflow-state.py:144-167 | .gemini/hooks/inject-workflow-state.py:144-167 | .github/copilot/hooks/inject-workflow-state.py:144-167 | .kiro/hooks/inject-workflow-state.py:144-167 — 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) .claude/hooks/inject-workflow-state.py:182 — .claude/hooks/inject-workflow-state.py:182-204 | .codex/hooks/inject-workflow-state.py:182-204 | .gemini/hooks/inject-workflow-state.py:182-204 | .github/copilot/hooks/inject-workflow-state.py:182-204 | .kiro/hooks/inject-workflow-state.py:182-204 — 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) .claude/hooks/inject-workflow-state.py:227 — .claude/hooks/inject-workflow-state.py:227-254 | .codex/hooks/inject-workflow-state.py:227-254 | .gemini/hooks/inject-workflow-state.py:227-254 | .github/copilot/hooks/inject-workflow-state.py:227-254 | .kiro/hooks/inject-workflow-state.py:227-254 — 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) .claude/hooks/inject-workflow-state.py:260 — .claude/hooks/inject-workflow-state.py:260-279 | .codex/hooks/inject-workflow-state.py:260-279 | .gemini/hooks/inject-workflow-state.py:260-279 | .github/copilot/hooks/inject-workflow-state.py:260-279 | .kiro/hooks/inject-workflow-state.py:260-279 — 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) .claude/hooks/inject-workflow-state.py:289 — .claude/hooks/inject-workflow-state.py:289-303 | .codex/hooks/inject-workflow-state.py:289-303 | .gemini/hooks/inject-workflow-state.py:289-303 | .github/copilot/hooks/inject-workflow-state.py:289-303 | .kiro/hooks/inject-workflow-state.py:289-303 — 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) .claude/hooks/inject-workflow-state.py:311 — .claude/hooks/inject-workflow-state.py:311-340 | .codex/hooks/inject-workflow-state.py:311-340 | .gemini/hooks/inject-workflow-state.py:311-340 | .github/copilot/hooks/inject-workflow-state.py:311-340 | .kiro/hooks/inject-workflow-state.py:311-340 — 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) .claude/hooks/inject-workflow-state.py:344 — .claude/hooks/inject-workflow-state.py:344-404 | .codex/hooks/inject-workflow-state.py:344-404 | .gemini/hooks/inject-workflow-state.py:344-404 | .github/copilot/hooks/inject-workflow-state.py:344-404 | .kiro/hooks/inject-workflow-state.py:344-404 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×7
  • Duplicated block (11 lines × 2) src-tauri/src/backup/mod.rs:1277 — src-tauri/src/backup/mod.rs:1277-1287 | src-tauri/src/commands/storage.rs:395-405 — 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 (11 lines × 2) src-tauri/src/backup/mod.rs:1331 — src-tauri/src/backup/mod.rs:1331-1341 | src-tauri/src/backup/mod.rs:1429-1439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/backup/mod.rs:1331` 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) src-tauri/src/keyboard/windows.rs:88 — src-tauri/src/keyboard/windows.rs:88-98 | src-tauri/src/mouse/windows.rs:37-47 — 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 `src-tauri/src/keyboard/windows.rs:88` 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) src-tauri/src/menu/context_window.rs:488 — src-tauri/src/menu/context_window.rs:488-498 | src-tauri/src/mouse/windows.rs:105-116 — 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 `src-tauri/src/menu/context_window.rs:488` 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 (11 lines × 2) src-tauri/src/keyboard/windows.rs:202 — src-tauri/src/keyboard/windows.rs:202-212 | src-tauri/src/keyboard/windows.rs:244-254 — 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 `src-tauri/src/keyboard/windows.rs:202` 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 (11 lines × 2) src-tauri/src/keyboard/windows.rs:76 — src-tauri/src/keyboard/windows.rs:76-86 | src-tauri/src/shortcut/win_v.rs:51-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. Read the line range as the matched WINDOW rather than a finished unit: at `src-tauri/src/keyboard/windows.rs:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) .codex/hooks/session-start.py:109 — .codex/hooks/session-start.py:109-119 | .github/copilot/hooks/session-start.py:114-124 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 410 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.
D1 · Cyclomatic Complexity · session-start._build_compact_current_state (cyclomatic 16) · ×6
  • session-start._build_compact_current_state (cyclomatic 16) .claude/hooks/session-start.py:600 — session-start._build_compact_current_state 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.
  • session-start._build_compact_current_state (cyclomatic 16) .codex/hooks/session-start.py:356 — session-start._build_compact_current_state 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.
  • session-start._build_compact_current_state (cyclomatic 16) .cursor/hooks/session-start.py:600 — session-start._build_compact_current_state 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.
  • session-start._build_compact_current_state (cyclomatic 16) .gemini/hooks/session-start.py:600 — session-start._build_compact_current_state 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.
  • session-start._build_compact_current_state (cyclomatic 16) .github/copilot/hooks/session-start.py:361 — session-start._build_compact_current_state 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.
  • session-start._build_compact_current_state (cyclomatic 16) .kiro/hooks/session-start.py:600 — session-start._build_compact_current_state 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.
D2 · Cognitive Complexity · session-start._build_compact_current_state (cognitive 23) · ×6
  • session-start._build_compact_current_state (cognitive 23) .claude/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._build_compact_current_state (cognitive 23) .codex/hooks/session-start.py:356 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._build_compact_current_state (cognitive 23) .cursor/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._build_compact_current_state (cognitive 23) .gemini/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._build_compact_current_state (cognitive 23) .github/copilot/hooks/session-start.py:361 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._build_compact_current_state (cognitive 23) .kiro/hooks/session-start.py:600 — session-start._build_compact_current_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (6 pts), boolean chains 4, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×6
  • Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py:269 — .claude/hooks/session-start.py:269-295 | .cursor/hooks/session-start.py:269-295 | .gemini/hooks/session-start.py:269-295 | .kiro/hooks/session-start.py:269-295 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py:328 — .claude/hooks/session-start.py:328-417 | .cursor/hooks/session-start.py:328-417 | .gemini/hooks/session-start.py:328-417 | .kiro/hooks/session-start.py:328-417 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py:421 — .claude/hooks/session-start.py:421-461 | .cursor/hooks/session-start.py:421-461 | .gemini/hooks/session-start.py:421-461 | .kiro/hooks/session-start.py:421-461 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py:465 — .claude/hooks/session-start.py:465-507 | .cursor/hooks/session-start.py:465-507 | .gemini/hooks/session-start.py:465-507 | .kiro/hooks/session-start.py:465-507 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py:517 — .claude/hooks/session-start.py:517-566 | .cursor/hooks/session-start.py:517-566 | .gemini/hooks/session-start.py:517-566 | .kiro/hooks/session-start.py:517-566 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) .claude/hooks/session-start.py:726 — .claude/hooks/session-start.py:726-818 | .cursor/hooks/session-start.py:726-818 | .gemini/hooks/session-start.py:726-818 | .kiro/hooks/session-start.py:726-818 — 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.
D2 · Cognitive Complexity · EcoPaste · ×5
  • EcoPaste::keyboard::windows::hook_proc (cognitive 76) src-tauri/src/keyboard/windows.rs:131 — EcoPaste::keyboard::windows::hook_proc has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (71 pts), boolean chains 5 (nesting depth added 42). 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.
  • EcoPaste::run (cognitive 38) src-tauri/src/lib.rs:25 — EcoPaste::run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (35 pts), loops 1 (2 pts), match/switch 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.
  • EcoPaste::clipboard::ingest::build_item_with_settings (cognitive 22) src-tauri/src/clipboard/ingest.rs:193 — EcoPaste::clipboard::ingest::build_item_with_settings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EcoPaste::clipboard::ingest::draft_from_text (cognitive 21) src-tauri/src/clipboard/ingest.rs:81 — EcoPaste::clipboard::ingest::draft_from_text has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (3 pts), loops 1 (2 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.
  • EcoPaste::window::show_window (cognitive 19) src-tauri/src/window/mod.rs:112 — EcoPaste::window::show_window has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×5
  • Edited copy of a member (13 corresponding lines) src-tauri/src/window/preview.rs:182 — src-tauri/src/window/preview.rs:182-194 | src-tauri/src/window/preview.rs:197-209 — 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) src-tauri/src/autostart/macos.rs:12 — src-tauri/src/autostart/macos.rs:12-24 | src-tauri/src/autostart/windows.rs:18-33 — 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) src-tauri/src/mouse/windows.rs:51 — src-tauri/src/mouse/windows.rs:51-63 | src-tauri/src/shortcut/win_v.rs:82-94 — 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) .trellis/scripts/common/paths.py:236 — .trellis/scripts/common/paths.py:236-251 | .trellis/scripts/common/active_task.py:123-135 — 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) src-tauri/src/backup/mod.rs:1037 — src-tauri/src/backup/mod.rs:1037-1049 | src-tauri/src/commands/onboarding.rs:526-538 — 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 · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) src-tauri/src/clipboard/apps_registry.rs:350 — src-tauri/src/clipboard/apps_registry.rs:350-354 | src-tauri/src/clipboard/source.rs:78-82 — 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 `src-tauri/src/clipboard/apps_registry.rs:350` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src-tauri/src/commands/clipboard.rs:835 — src-tauri/src/commands/clipboard.rs:835-839 | src-tauri/src/commands/clipboard.rs:928-932 — 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 `src-tauri/src/commands/clipboard.rs:835` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src-tauri/src/menu/context_window.rs:157 — src-tauri/src/menu/context_window.rs:157-161 | src-tauri/src/menu/context_window.rs:196-200 — 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) src-tauri/src/window/position.rs:55 — src-tauri/src/window/position.rs:55-59 | src-tauri/src/window/position.rs:80-84 — 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) .codex/hooks/session-start.py:101 — .codex/hooks/session-start.py:101-105 | .github/copilot/hooks/session-start.py:106-110 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 410 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
AC2 · Forms & labels · <Select> field component without a label · ×4
  • <Select> field component without a label src/components/LanguageSwitcher/index.tsx:120 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it 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.
  • <Select> field component without a label src/pages/Preference/components/settingControls/ClipboardGroupSelectControl.tsx:93 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it 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.
  • <Select> field component without a label src/pages/Preference/components/settingControls/SelectControls.tsx:33 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it 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.
  • <Select> field component without a label src/pages/Preference/components/settingControls/SelectControls.tsx:65 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it 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.
D1 · Cyclomatic Complexity · session-start._resolve_spec_scope (cyclomatic 20) · ×4
  • session-start._resolve_spec_scope (cyclomatic 20) .claude/hooks/session-start.py:510 — session-start._resolve_spec_scope 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.
  • session-start._resolve_spec_scope (cyclomatic 20) .cursor/hooks/session-start.py:510 — session-start._resolve_spec_scope 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.
  • session-start._resolve_spec_scope (cyclomatic 20) .gemini/hooks/session-start.py:510 — session-start._resolve_spec_scope 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.
  • session-start._resolve_spec_scope (cyclomatic 20) .kiro/hooks/session-start.py:510 — session-start._resolve_spec_scope has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · session-start._get_task_status (cyclomatic 19) · ×4
  • session-start._get_task_status (cyclomatic 19) .claude/hooks/session-start.py:327 — session-start._get_task_status 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.
  • session-start._get_task_status (cyclomatic 19) .cursor/hooks/session-start.py:327 — session-start._get_task_status 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.
  • session-start._get_task_status (cyclomatic 19) .gemini/hooks/session-start.py:327 — session-start._get_task_status 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.
  • session-start._get_task_status (cyclomatic 19) .kiro/hooks/session-start.py:327 — session-start._get_task_status 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.
D2 · Cognitive Complexity · session-start._resolve_spec_scope (cognitive 30) · ×4
  • session-start._resolve_spec_scope (cognitive 30) .claude/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
  • session-start._resolve_spec_scope (cognitive 30) .cursor/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
  • session-start._resolve_spec_scope (cognitive 30) .gemini/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
  • session-start._resolve_spec_scope (cognitive 30) .kiro/hooks/session-start.py:510 — session-start._resolve_spec_scope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 7, 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.
D2 · Cognitive Complexity · session-start._get_task_status (cognitive 23) · ×4
  • session-start._get_task_status (cognitive 23) .claude/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • session-start._get_task_status (cognitive 23) .cursor/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • session-start._get_task_status (cognitive 23) .gemini/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • session-start._get_task_status (cognitive 23) .kiro/hooks/session-start.py:327 — session-start._get_task_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · session-start._collect_spec_index_paths (cognitive 19) · ×4
  • session-start._collect_spec_index_paths (cognitive 19) .claude/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._collect_spec_index_paths (cognitive 19) .cursor/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._collect_spec_index_paths (cognitive 19) .gemini/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • session-start._collect_spec_index_paths (cognitive 19) .kiro/hooks/session-start.py:569 — session-start._collect_spec_index_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-start._load_trellis_config (cognitive 17) · ×4
  • session-start._load_trellis_config (cognitive 17) .claude/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). 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.
  • session-start._load_trellis_config (cognitive 17) .cursor/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). 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.
  • session-start._load_trellis_config (cognitive 17) .gemini/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). 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.
  • session-start._load_trellis_config (cognitive 17) .kiro/hooks/session-start.py:420 — session-start._load_trellis_config has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 8). 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.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×4
  • Edited copy of a member (7 corresponding lines) src-tauri/src/backup/mod.rs:606 — src-tauri/src/backup/mod.rs:606-613 | src-tauri/src/backup/mod.rs:1420-1426 — 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) .trellis/scripts/common/config.py:156 — .trellis/scripts/common/config.py:156-163 | .trellis/scripts/common/trellis_config.py:46-52 — 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) src-tauri/src/window/lifecycle/mod.rs:201 — src-tauri/src/window/lifecycle/mod.rs:201-207 | src-tauri/src/window/state.rs:71-77 — 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) .cursor/hooks/inject-shell-session-context.py:47 — .cursor/hooks/inject-shell-session-context.py:47-53 | .trellis/scripts/common/active_task.py:250-256 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×4
  • Duplicated block (6 lines × 2) src-tauri/src/settings/store.rs:32 — src-tauri/src/settings/store.rs:32-40 | src-tauri/src/settings/store.rs:113-118 — 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 `src-tauri/src/settings/store.rs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src-tauri/src/autostart/macos.rs:26 — src-tauri/src/autostart/macos.rs:26-31 | src-tauri/src/autostart/windows.rs:35-40 — 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) src-tauri/src/clipboard/app_store.rs:54 — src-tauri/src/clipboard/app_store.rs:54-59 | src-tauri/src/clipboard/file_icon_store.rs:43-48 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 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) .codex/hooks/session-start.py:164 — .codex/hooks/session-start.py:164-169 | .github/copilot/hooks/session-start.py:169-174 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 410 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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.
AC2 · Forms & labels · <Input> field component without a label · ×3
  • <Input> field component without a label src/components/ShortcutRecorder/index.tsx:330 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it 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.
  • <Input> field component without a label src/pages/Preference/components/PreferenceHeader.tsx:70 — 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.
  • <Input> field component without a label src/pages/Preference/components/settingControls/TextControl.tsx:46 — 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.
D1 · Cyclomatic Complexity · inject-subagent-context._extract_subagent_name (cyclomatic 18) · ×3
  • inject-subagent-context._extract_subagent_name (cyclomatic 18) .claude/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name 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.
  • inject-subagent-context._extract_subagent_name (cyclomatic 18) .cursor/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name 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.
  • inject-subagent-context._extract_subagent_name (cyclomatic 18) .kiro/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: src/pages/Clipboard/components/List.tsx src/pages/Clipboard/components/List.tsx:86 — src/pages/Clipboard/components/List.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 150 in List.List at line 86. 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-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src/pages/Clipboard/components/List.tsx`: 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: src-tauri/src/lib.rs src-tauri/src/lib.rs:25 — src-tauri/src/lib.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in EcoPaste::run at line 25. 4 of those changes were fix/bug commits, and the other 5 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-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src-tauri/src/lib.rs`: 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: src/pages/Preference/components/settingControls/ActionControl.tsx src/pages/Preference/components/settingControls/ActionControl.tsx:100 — src/pages/Preference/components/settingControls/ActionControl.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in ActionControl.ActionControl at line 100. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src/pages/Preference/components/settingControls/ActionControl.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · inject-subagent-context._extract_subagent_name (cognitive 30) · ×3
  • inject-subagent-context._extract_subagent_name (cognitive 30) .claude/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (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.
  • inject-subagent-context._extract_subagent_name (cognitive 30) .cursor/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (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.
  • inject-subagent-context._extract_subagent_name (cognitive 30) .kiro/hooks/inject-subagent-context.py:577 — inject-subagent-context._extract_subagent_name has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inject-subagent-context.read_jsonl_entries (cognitive 17) · ×3
  • inject-subagent-context.read_jsonl_entries (cognitive 17) .claude/hooks/inject-subagent-context.py:190 — inject-subagent-context.read_jsonl_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (3 pts), boolean chains 1, 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.
  • inject-subagent-context.read_jsonl_entries (cognitive 17) .cursor/hooks/inject-subagent-context.py:190 — inject-subagent-context.read_jsonl_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (3 pts), boolean chains 1, 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.
  • inject-subagent-context.read_jsonl_entries (cognitive 17) .kiro/hooks/inject-subagent-context.py:190 — inject-subagent-context.read_jsonl_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inject-subagent-context.main (cognitive 16) · ×3
  • inject-subagent-context.main (cognitive 16) .claude/hooks/inject-subagent-context.py:687 — inject-subagent-context.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
  • inject-subagent-context.main (cognitive 16) .cursor/hooks/inject-subagent-context.py:687 — inject-subagent-context.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
  • inject-subagent-context.main (cognitive 16) .kiro/hooks/inject-subagent-context.py:687 — inject-subagent-context.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×3
  • Edited copy of a member (15 corresponding lines) src-tauri/src/window/position.rs:54 — src-tauri/src/window/position.rs:54-68 | src-tauri/src/window/position.rs:79-93 — 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) src-tauri/src/tray/mod.rs:83 — src-tauri/src/tray/mod.rs:83-97 | src-tauri/src/tray/mod.rs:100-116 — 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) src-tauri/src/db/file_icons.rs:37 — src-tauri/src/db/file_icons.rs:37-58 | src-tauri/src/db/groups.rs:56-70 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×3
  • Edited copy of a member (18 corresponding lines) src-tauri/src/db/apps.rs:30 — src-tauri/src/db/apps.rs:30-47 | src-tauri/src/db/items.rs:285-304 — 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) src-tauri/src/update.rs:94 — src-tauri/src/update.rs:94-111 | src-tauri/src/update.rs:113-137 — 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) src-tauri/src/window/preview.rs:358 — src-tauri/src/window/preview.rs:358-375 | src-tauri/src/window/preview.rs:394-411 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 11+ corresponding lines) src-tauri/src/clipboard/app_store.rs:79 — src-tauri/src/clipboard/app_store.rs:79-89 | src-tauri/src/clipboard/file_icon_store.rs:68-78 | src-tauri/src/clipboard/storage.rs:183-193 — 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) src-tauri/src/db/items.rs:89 — src-tauri/src/db/items.rs:89-101 | src-tauri/src/db/items.rs:161-171 | src-tauri/src/db/items.rs:180-191 — 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) src-tauri/src/admin.rs:194 — src-tauri/src/admin.rs:194-204 | src-tauri/src/admin.rs:265-276 | src-tauri/src/admin.rs:279-289 — 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.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×3
  • Duplicated block (13 lines × 2 locations) src/components/Dropdown/index.tsx:83 — src/components/Dropdown/index.tsx:83 · src/components/Popover/index.tsx:20 — 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) src/pages/Preference/utils/preferenceI18n.ts:98 — src/pages/Preference/utils/preferenceI18n.ts:98 · src/pages/Preference/utils/preferenceI18n.ts:116 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (13 lines × 2 locations) src/pages/Preview/components/PreviewContent.tsx:107 — src/pages/Preview/components/PreviewContent.tsx:107 · src/pages/Preview/components/PreviewContent.tsx:190 — 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.
R10 · Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (12 matched lines × 2 locations) src/components/ShortcutRecorder/index.tsx:220 — src/components/ShortcutRecorder/index.tsx:220 · src/components/ShortcutRecorder/index.tsx:270 — the two spans are one implementation copied and then locally edited — 67 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.
  • Duplicated block with local edits (12 matched lines × 2 locations) src/pages/Clipboard/components/Group.tsx:136 — src/pages/Clipboard/components/Group.tsx:136 · src/pages/Clipboard/components/List.tsx:183 — the two spans are one implementation copied and then locally edited — 62 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 with local edits (12 matched lines × 2 locations) src/pages/Preference/config/preferenceSchema.ts:908 — src/pages/Preference/config/preferenceSchema.ts:908 · src/pages/Preference/index.tsx:422 — the two spans are one implementation copied and then locally edited — 53 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.
D1 · Cyclomatic Complexity · EcoPaste · ×2
  • EcoPaste::keyboard::windows::hook_proc (cyclomatic 32) src-tauri/src/keyboard/windows.rs:131 — EcoPaste::keyboard::windows::hook_proc 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.
  • EcoPaste::run (cyclomatic 26) src-tauri/src/lib.rs:25 — EcoPaste::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.
D1 · Cyclomatic Complexity · List.List · ×2
  • List.List::handleKeyDown (cyclomatic 32) src/pages/Clipboard/components/List.tsx:587 — List.List::handleKeyDown 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. This shape REPEATS in the file: one other method here (List.List::renderItemContent::handleQuickAction) 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.
  • List.List::renderItemContent::handleQuickAction (cyclomatic 20) src/pages/Clipboard/components/List.tsx:872 — List.List::renderItemContent::handleQuickAction has cyclomatic complexity 20 (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. This shape REPEATS in the file: one other method here (List.List::handleKeyDown) 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.
D2 · Cognitive Complexity · session-start._collect_spec_index_paths (cognitive 16) · ×2
  • session-start._collect_spec_index_paths (cognitive 16) .codex/hooks/session-start.py:329 — session-start._collect_spec_index_paths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 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.
  • session-start._collect_spec_index_paths (cognitive 16) .github/copilot/hooks/session-start.py:334 — session-start._collect_spec_index_paths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 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.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) src-tauri/src/menu/context_window.rs:483 — src-tauri/src/menu/context_window.rs:483-505 | src-tauri/src/mouse/windows.rs:103-122 — 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) .trellis/scripts/common/session_context.py:90 — .trellis/scripts/common/session_context.py:90-109 | .trellis/scripts/common/session_context.py:113-140 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) src-tauri/src/autostart/windows.rs:115 — src-tauri/src/autostart/windows.rs:115-126 | src-tauri/src/autostart/windows.rs:128-141 — 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) src-tauri/src/menu/context_window.rs:441 — src-tauri/src/menu/context_window.rs:441-455 | src-tauri/src/menu/context_window.rs:458-469 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) src-tauri/src/clipboard/apps_registry.rs:537 — src-tauri/src/clipboard/apps_registry.rs:537-549 | src-tauri/src/clipboard/source.rs:130-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (13 lines × 2) src-tauri/src/mouse/windows.rs:21 — src-tauri/src/mouse/windows.rs:21-33 | src-tauri/src/shortcut/win_v.rs:47-59 — 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 `src-tauri/src/mouse/windows.rs:21` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) src-tauri/src/update.rs:95 — src-tauri/src/update.rs:95-104 | src-tauri/src/update.rs:114-123 — 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 `src-tauri/src/update.rs:95` 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 (10 lines × 2) src-tauri/src/window/lifecycle/mod.rs:542 — src-tauri/src/window/lifecycle/mod.rs:542-551 | src-tauri/src/window/lifecycle/mod.rs:613-622 — 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 `src-tauri/src/window/lifecycle/mod.rs:542` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) src-tauri/src/window/state.rs:37 — src-tauri/src/window/state.rs:37-45 | src-tauri/src/window/state.rs:108-117 — 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 `src-tauri/src/window/state.rs:37` 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) src-tauri/src/admin.rs:196 — src-tauri/src/admin.rs:196-204 | src-tauri/src/admin.rs:281-289 — 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 `src-tauri/src/admin.rs:196` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) src-tauri/src/backup/mod.rs:1089 — src-tauri/src/backup/mod.rs:1089-1100 | src-tauri/src/backup/mod.rs:1126-1137 | src-tauri/src/backup/mod.rs:1155-1166 — 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 `src-tauri/src/backup/mod.rs:1089` 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 × 3) .claude/hooks/inject-subagent-context.py:68 — .claude/hooks/inject-subagent-context.py:68-79 | .cursor/hooks/inject-subagent-context.py:68-79 | .kiro/hooks/inject-subagent-context.py:68-79 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×2
  • Duplicated block (15 lines × 6) .claude/hooks/session-start.py:160 — .claude/hooks/session-start.py:160-174 | .codex/hooks/session-start.py:295-309 | .cursor/hooks/session-start.py:160-174 | .gemini/hooks/session-start.py:160-174 | .github/copilot/hooks/session-start.py:300-314 | .kiro/hooks/session-start.py:160-174 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 6) .claude/hooks/session-start.py:300 — .claude/hooks/session-start.py:300-314 | .codex/hooks/session-start.py:196-210 | .cursor/hooks/session-start.py:300-314 | .gemini/hooks/session-start.py:300-314 | .github/copilot/hooks/session-start.py:201-215 | .kiro/hooks/session-start.py:300-314 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×2
  • Duplicated block (7 lines × 6) .claude/hooks/session-start.py:178 — .claude/hooks/session-start.py:178-184 | .codex/hooks/session-start.py:313-319 | .cursor/hooks/session-start.py:178-184 | .gemini/hooks/session-start.py:178-184 | .github/copilot/hooks/session-start.py:318-324 | .kiro/hooks/session-start.py:178-184 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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 × 6) .claude/hooks/session-start.py:318 — .claude/hooks/session-start.py:318-324 | .codex/hooks/session-start.py:214-220 | .cursor/hooks/session-start.py:318-324 | .gemini/hooks/session-start.py:318-324 | .github/copilot/hooks/session-start.py:219-225 | .kiro/hooks/session-start.py:318-324 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
R10 · Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (11 matched lines × 2 locations) src/pages/ContextMenu/index.tsx:242 — src/pages/ContextMenu/index.tsx:242 · src/pages/Preview/index.tsx:109 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (11 matched lines × 2 locations) src/utils/shortcut.ts:207 — src/utils/shortcut.ts:207 · src/utils/shortcut.ts:233 — the two spans are one implementation copied and then locally edited — 56 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 (11 lines × 2 locations) · ×2
  • Duplicated block (11 lines × 2 locations) src/pages/Preference/utils/storageUsage.ts:11 — src/pages/Preference/utils/storageUsage.ts:11 · src/pages/Preview/components/PreviewContent.tsx:380 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (11 lines × 2 locations) src/pages/Update/index.tsx:117 — src/pages/Update/index.tsx:117 · src/pages/Update/index.tsx:130 — 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 (8 lines × 2 locations) · ×2
  • Duplicated block (8 lines × 2 locations) src/pages/Preference/components/settingControls/NumberControl.tsx:11 — src/pages/Preference/components/settingControls/NumberControl.tsx:11 · src/pages/Preference/components/settingControls/TextControl.tsx:9 — 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 (8 lines × 2 locations) src/pages/Preference/components/settingControls/SelectControls.tsx:18 — src/pages/Preference/components/settingControls/SelectControls.tsx:18 · src/pages/Preference/components/settingControls/SelectControls.tsx:50 — 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.
AC2 · Forms & labels · <fieldset> without a <legend> · ×1
  • <fieldset> without a <legend> src/components/ShortcutRecorder/index.tsx:314 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
AC2 · Forms & labels · <SearchInput> field component without a label · ×1
  • <SearchInput> field component without a label src/pages/Clipboard/components/Header.tsx:189 — 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.
AC2 · Forms & labels · <Segmented> field component without a label · ×1
  • <Segmented> field component without a label src/pages/Preference/components/BackupExportModal.tsx:181 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it 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.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×1
  • Focus outline removed in CSS without a :focus replacement src/styles/global.scss:16 — `html body *` 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.
D1 · Cyclomatic Complexity · Group.Group (cyclomatic 43) · ×1
  • Group.Group (cyclomatic 43) src/pages/Clipboard/components/Group.tsx:109 — Group.Group has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 3 of the 43 points are its own statements and the rest belongs to 16 function items inside it that branch (handleKeyDown, handleGroupClick, handleGroupMenuClick, …). 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.
D1 · Cyclomatic Complexity · index.Update (cyclomatic 35) · ×1
  • index.Update (cyclomatic 35) src/pages/Update/index.tsx:43 — index.Update has cyclomatic complexity 35 (threshold 15). Of this number, 20 points are the body's own statements and 15 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.
D1 · Cyclomatic Complexity · index.ShortcutRecorder (cyclomatic 34) · ×1
  • index.ShortcutRecorder (cyclomatic 34) src/components/ShortcutRecorder/index.tsx:43 — index.ShortcutRecorder has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (handleKeyDown, handleBlur, handleKeyUp, …). 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.
D1 · Cyclomatic Complexity · (anonymous).tool.execute.before (cyclomatic 32) · ×1
  • (anonymous).tool.execute.before (cyclomatic 32) .opencode/plugins/inject-subagent-context.js:380 — (anonymous).tool.execute.before has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildSessionContext (cyclomatic 31) · ×1
  • buildSessionContext (cyclomatic 31) .opencode/lib/session-utils.js:236 — buildSessionContext has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cli_adapter.detect_platform (cyclomatic 30) · ×1
  • cli_adapter.detect_platform (cyclomatic 30) .trellis/scripts/common/cli_adapter.py:688 — cli_adapter.detect_platform has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · task_store.cmd_create (cyclomatic 28) · ×1
  • task_store.cmd_create (cyclomatic 28) .trellis/scripts/common/task_store.py:196 — task_store.cmd_create has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.Preference (cyclomatic 28) · ×1
  • index.Preference (cyclomatic 28) src/pages/Preference/index.tsx:70 — index.Preference has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 9 function items inside it that branch (handleActionComplete, handleSettingChange, a function literal at line 298, …). 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.
D1 · Cyclomatic Complexity · ActionControl.ActionControl (cyclomatic 27) · ×1
  • ActionControl.ActionControl (cyclomatic 27) src/pages/Preference/components/settingControls/ActionControl.tsx:100 — ActionControl.ActionControl has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (handleClick, pickImportBackup, changeDataDirectory). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · BackupImportModal.BackupImportModal (cyclomatic 26) · ×1
  • BackupImportModal.BackupImportModal (cyclomatic 26) src/pages/Preference/components/BackupImportModal.tsx:31 — BackupImportModal.BackupImportModal has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 6 function items inside it that branch (getOkText, a function literal at line 96, importBackup, …). 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.
D1 · Cyclomatic Complexity · BackupExportModal.BackupExportModal (cyclomatic 25) · ×1
  • BackupExportModal.BackupExportModal (cyclomatic 25) src/pages/Preference/components/BackupExportModal.tsx:32 — BackupExportModal.BackupExportModal has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (getOkText, a function literal at line 87, exportBackup, …). 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.
D1 · Cyclomatic Complexity · PreferenceSettingControl.PreferenceSettingControl (cyclomatic 24) · ×1
  • PreferenceSettingControl.PreferenceSettingControl (cyclomatic 24) src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50 — PreferenceSettingControl.PreferenceSettingControl 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.
D1 · Cyclomatic Complexity · CLIAdapter.get_commands_path (cyclomatic 22) · ×1
  • CLIAdapter.get_commands_path (cyclomatic 22) .trellis/scripts/common/cli_adapter.py:163 — CLIAdapter.get_commands_path has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PreferenceSection.resolveSectionVisual (cyclomatic 22) · ×1
  • PreferenceSection.resolveSectionVisual (cyclomatic 22) src/pages/Preference/components/PreferenceSection.tsx:136 — PreferenceSection.resolveSectionVisual has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · add_session.update_index (cyclomatic 21) · ×1
  • add_session.update_index (cyclomatic 21) .trellis/scripts/add_session.py:204 — add_session.update_index has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CLIAdapter.build_run_command (cyclomatic 20) · ×1
  • CLIAdapter.build_run_command (cyclomatic 20) .trellis/scripts/common/cli_adapter.py:321 — CLIAdapter.build_run_command has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · session_context.get_context_text (cyclomatic 18) · ×1
  • session_context.get_context_text (cyclomatic 18) .trellis/scripts/common/session_context.py:507 — session_context.get_context_text has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PreferenceSettingRow.PreferenceSettingRow (cyclomatic 18) · ×1
  • PreferenceSettingRow.PreferenceSettingRow (cyclomatic 18) src/pages/Preference/components/PreferenceSettingRow.tsx:42 — PreferenceSettingRow.PreferenceSettingRow 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.
D1 · Cyclomatic Complexity · ClipboardMenuAction · ×1
  • ClipboardMenuAction::label (cyclomatic 17) src-tauri/src/menu/clipboard_item.rs:47 — ClipboardMenuAction::label 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.
D1 · Cyclomatic Complexity · resolveSpecScope (cyclomatic 17) · ×1
  • resolveSpecScope (cyclomatic 17) .opencode/lib/session-utils.js:202 — resolveSpecScope has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · packages_context._resolve_scope_set (cyclomatic 16) · ×1
  • packages_context._resolve_scope_set (cyclomatic 16) .trellis/scripts/common/packages_context.py:53 — packages_context._resolve_scope_set has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PermissionControl.PermissionControl (cyclomatic 16) · ×1
  • PermissionControl.PermissionControl (cyclomatic 16) src/pages/Preference/components/settingControls/PermissionControl.tsx:38 — PermissionControl.PermissionControl has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (handleChange, a function literal at line 50, a function literal at line 130, …). 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: src-tauri/src/commands/onboarding.rs src-tauri/src/commands/onboarding.rs:139 — src-tauri/src/commands/onboarding.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is EcoPaste::commands::onboarding::import_legacy_data at line 139), 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: correct timezone offset for legacy data import (#1338)”; “fix: skip invalid legacy import rows (#1326)”; “fix: improve legacy import detection (#1289)”. 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-05-14..2026-08-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-05-14 12:05:51 +08:00' --until='2026-08-12 12:05:51 +08:00' --full-history --no-merges -- src-tauri/src/commands/onboarding.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · buildSessionContext (cognitive 65) · ×1
  • buildSessionContext (cognitive 65) .opencode/lib/session-utils.js:236 — buildSessionContext has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (37 pts), error handling 4 (12 pts), loops 5 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 34). Of this number, 57 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_store.cmd_create (cognitive 44) · ×1
  • task_store.cmd_create (cognitive 44) .trellis/scripts/common/task_store.py:196 — task_store.cmd_create has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).tool.execute.before (cognitive 43) · ×1
  • (anonymous).tool.execute.before (cognitive 43) .opencode/plugins/inject-subagent-context.js:380 — (anonymous).tool.execute.before has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (32 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Group.Group (cognitive 40) · ×1
  • Group.Group (cognitive 40) src/pages/Clipboard/components/Group.tsx:109 — Group.Group has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23, ternaries 7 (9 pts), boolean chains 8 (nesting depth added 2). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 16 function items inside it that branch (handleKeyDown, handleGroupClick, handleGroupMenuClick, …). 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.
D2 · Cognitive Complexity · task_store.cmd_archive (cognitive 39) · ×1
  • task_store.cmd_archive (cognitive 39) .trellis/scripts/common/task_store.py:376 — task_store.cmd_archive has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · List.List · ×1
  • List.List::handleKeyDown (cognitive 39) src/pages/Clipboard/components/List.tsx:587 — List.List::handleKeyDown has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 8, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add_session.update_index (cognitive 37) · ×1
  • add_session.update_index (cognitive 37) .trellis/scripts/add_session.py:204 — add_session.update_index has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.Update (cognitive 36) · ×1
  • index.Update (cognitive 36) src/pages/Update/index.tsx:43 — index.Update has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 13 (15 pts), if/else 9, boolean chains 7, error handling 5 (nesting depth added 2). Of this number, 21 points are the body's own statements and 15 belong to 7 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.
D2 · Cognitive Complexity · CLIAdapter.get_commands_path (cognitive 33) · ×1
  • CLIAdapter.get_commands_path (cognitive 33) .trellis/scripts/common/cli_adapter.py:163 — CLIAdapter.get_commands_path has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli_adapter.detect_platform (cognitive 33) · ×1
  • cli_adapter.detect_platform (cognitive 33) .trellis/scripts/common/cli_adapter.py:688 — cli_adapter.detect_platform has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 8, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.ShortcutRecorder (cognitive 33) · ×1
  • index.ShortcutRecorder (cognitive 33) src/components/ShortcutRecorder/index.tsx:43 — index.ShortcutRecorder has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23, ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 11 function items inside it that branch (handleKeyDown, handleBlur, handleKeyUp, …). 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.
D2 · Cognitive Complexity · index.Preference (cognitive 29) · ×1
  • index.Preference (cognitive 29) src/pages/Preference/index.tsx:70 — index.Preference has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14, ternaries 7 (9 pts), boolean chains 3, error handling 3 (nesting depth added 2). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 9 function items inside it that branch (handleActionComplete, handleSettingChange, a function literal at line 298, …). 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.
D2 · Cognitive Complexity · config._parse_yaml_block (cognitive 27) · ×1
  • config._parse_yaml_block (cognitive 27) .trellis/scripts/common/config.py:89 — config._parse_yaml_block has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · session_context.get_context_text (cognitive 27) · ×1
  • session_context.get_context_text (cognitive 27) .trellis/scripts/common/session_context.py:507 — session_context.get_context_text has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 2, ternaries 1 (2 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.
D2 · Cognitive Complexity · trellis_config._parse_yaml_block (cognitive 27) · ×1
  • trellis_config._parse_yaml_block (cognitive 27) .trellis/scripts/common/trellis_config.py:55 — trellis_config._parse_yaml_block has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · task.cmd_start (cognitive 26) · ×1
  • task.cmd_start (cognitive 26) .trellis/scripts/task.py:70 — task.cmd_start has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · safe_commit.safe_trellis_paths_to_add (cognitive 25) · ×1
  • safe_commit.safe_trellis_paths_to_add (cognitive 25) .trellis/scripts/common/safe_commit.py:61 — safe_commit.safe_trellis_paths_to_add has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActionControl.ActionControl (cognitive 25) · ×1
  • ActionControl.ActionControl (cognitive 25) src/pages/Preference/components/settingControls/ActionControl.tsx:100 — ActionControl.ActionControl has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 6, ternaries 3, error handling 1. Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (handleClick, pickImportBackup, changeDataDirectory). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ClipboardReader · ×1
  • ClipboardReader::read_with_capture (cognitive 24) src-tauri/src/clipboard/read.rs:31 — ClipboardReader::read_with_capture has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 1 (2 pts), loops 1 (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.
D2 · Cognitive Complexity · resolveSpecScope (cognitive 24) · ×1
  • resolveSpecScope (cognitive 24) .opencode/lib/session-utils.js:202 — resolveSpecScope has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getResearchContext (cognitive 24) · ×1
  • getResearchContext (cognitive 24) .opencode/plugins/inject-subagent-context.js:90 — getResearchContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (7 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 14). Of this number, 22 points are the body's own statements and 2 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupImportModal.BackupImportModal (cognitive 23) · ×1
  • BackupImportModal.BackupImportModal (cognitive 23) src/pages/Preference/components/BackupImportModal.tsx:31 — BackupImportModal.BackupImportModal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 4, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (getOkText, importBackup, a function literal at line 76, …). 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.
D2 · Cognitive Complexity · packages_context.get_context_packages_text (cognitive 22) · ×1
  • packages_context.get_context_packages_text (cognitive 22) .trellis/scripts/common/packages_context.py:157 — packages_context.get_context_packages_text has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupExportModal.BackupExportModal (cognitive 22) · ×1
  • BackupExportModal.BackupExportModal (cognitive 22) src/pages/Preference/components/BackupExportModal.tsx:32 — BackupExportModal.BackupExportModal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, ternaries 2, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (getOkText, exportBackup, a function literal at line 78, …). 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.
D2 · Cognitive Complexity · add_session.main (cognitive 21) · ×1
  • add_session.main (cognitive 21) .trellis/scripts/add_session.py:499 — add_session.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · packages_context._resolve_scope_set (cognitive 21) · ×1
  • packages_context._resolve_scope_set (cognitive 21) .trellis/scripts/common/packages_context.py:53 — packages_context._resolve_scope_set has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task_context.cmd_list_context (cognitive 21) · ×1
  • task_context.cmd_list_context (cognitive 21) .trellis/scripts/common/task_context.py:172 — task_context.cmd_list_context has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task.cmd_list_archive (cognitive 20) · ×1
  • task.cmd_list_archive (cognitive 20) .trellis/scripts/task.py:268 — task.cmd_list_archive has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreferenceSection.resolveSectionVisual (cognitive 20) · ×1
  • PreferenceSection.resolveSectionVisual (cognitive 20) src/pages/Preference/components/PreferenceSection.tsx:136 — PreferenceSection.resolveSectionVisual has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · workflow_phase.filter_platform (cognitive 19) · ×1
  • workflow_phase.filter_platform (cognitive 19) .trellis/scripts/common/workflow_phase.py:171 — workflow_phase.filter_platform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreferenceSettingRow.PreferenceSettingRow (cognitive 19) · ×1
  • PreferenceSettingRow.PreferenceSettingRow (cognitive 19) src/pages/Preference/components/PreferenceSettingRow.tsx:42 — PreferenceSettingRow.PreferenceSettingRow has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 15 (17 pts), boolean chains 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.
D2 · Cognitive Complexity · active_task._lookup_env_context_key (cognitive 18) · ×1
  • active_task._lookup_env_context_key (cognitive 18) .trellis/scripts/common/active_task.py:218 — active_task._lookup_env_context_key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 6 (9 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · git_context.main (cognitive 18) · ×1
  • git_context.main (cognitive 18) .trellis/scripts/common/git_context.py:46 — git_context.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add_session._auto_commit_workspace (cognitive 17) · ×1
  • add_session._auto_commit_workspace (cognitive 17) .trellis/scripts/add_session.py:323 — add_session._auto_commit_workspace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · active_task.resolve_context_key (cognitive 16) · ×1
  • active_task.resolve_context_key (cognitive 16) .trellis/scripts/common/active_task.py:382 — active_task.resolve_context_key has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · PermissionControl.PermissionControl (cognitive 16) · ×1
  • PermissionControl.PermissionControl (cognitive 16) src/pages/Preference/components/settingControls/PermissionControl.tsx:38 — PermissionControl.PermissionControl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4, boolean chains 2, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (handleChange, a function literal at line 50, a function literal at line 130, …). 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.
D2 · Cognitive Complexity · readJsonlWithFiles (cognitive 16) · ×1
  • readJsonlWithFiles (cognitive 16) .opencode/lib/trellis-context.js:356 — readJsonlWithFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous).chat.message (cognitive 16) · ×1
  • (anonymous).chat.message (cognitive 16) .opencode/plugins/inject-workflow-state.js:121 — (anonymous).chat.message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, ternaries 4 (5 pts), boolean chains 4, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: List src/pages/Clipboard/components/List.tsx:1 — ClassTooLong — 654 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 254 over it, 1.64× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) .claude/hooks/inject-subagent-context.py:83 — .claude/hooks/inject-subagent-context.py:83-113 | .claude/hooks/inject-workflow-state.py:96-131 | .claude/hooks/session-start.py:188-223 | .codex/hooks/inject-workflow-state.py:96-131 | .cursor/hooks/inject-subagent-context.py:83-113 | .cursor/hooks/session-start.py:188-223 | .gemini/hooks/inject-workflow-state.py:96-131 | .gemini/hooks/session-start.py:188-223 | .github/copilot/hooks/inject-workflow-state.py:96-131 | .kiro/hooks/inject-subagent-context.py:83-113 | .kiro/hooks/inject-workflow-state.py:96-131 | .kiro/hooks/session-start.py:188-223 — These 12 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 12 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 12 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) .claude/hooks/session-start.py:299 — .claude/hooks/session-start.py:299-314 | .codex/hooks/session-start.py:195-210 | .cursor/hooks/session-start.py:299-314 | .gemini/hooks/session-start.py:299-314 | .github/copilot/hooks/session-start.py:200-215 | .kiro/hooks/session-start.py:299-314 | .trellis/scripts/common/active_task.py:103-119 | .trellis/scripts/common/paths.py:211-232 — These 8 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 8 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 8 times.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) .trellis/scripts/common/task_store.py:558 — .trellis/scripts/common/task_store.py:558-603 | .trellis/scripts/common/task_store.py:611-650 — 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 copy of a member (69 corresponding lines) · ×1
  • Edited copy of a member (69 corresponding lines) .trellis/scripts/add_session.py:324 — .trellis/scripts/add_session.py:324-392 | .trellis/scripts/common/task_store.py:473-550 — 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 copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) src-tauri/src/keyboard/windows.rs:71 — src-tauri/src/keyboard/windows.rs:71-104 | src-tauri/src/mouse/windows.rs:20-49 | src-tauri/src/shortcut/win_v.rs:46-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 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) src-tauri/src/window/mod.rs:270 — src-tauri/src/window/mod.rs:270-303 | src-tauri/src/window/mod.rs:306-339 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) src-tauri/src/menu/context_window.rs:91 — src-tauri/src/menu/context_window.rs:91-117 | src-tauri/src/window/preview.rs:240-276 — 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 (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) src-tauri/src/backup/mod.rs:1330 — src-tauri/src/backup/mod.rs:1330-1360 | src-tauri/src/backup/mod.rs:1362-1390 — 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, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) .trellis/scripts/common/task_store.py:658 — .trellis/scripts/common/task_store.py:658-681 | .trellis/scripts/common/task_store.py:689-716 | .trellis/scripts/common/task_store.py:724-747 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 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, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) src-tauri/src/backup/mod.rs:1062 — src-tauri/src/backup/mod.rs:1062-1100 | src-tauri/src/backup/mod.rs:1102-1137 | src-tauri/src/backup/mod.rs:1142-1166 — 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 copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) src-tauri/src/commands/storage.rs:476 — src-tauri/src/commands/storage.rs:476-502 | src-tauri/src/commands/storage.rs:558-582 — 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 copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) src-tauri/src/window/lifecycle/mod.rs:481 — src-tauri/src/window/lifecycle/mod.rs:481-496 | src-tauri/src/window/lifecycle/mod.rs:522-537 | src-tauri/src/window/lifecycle/mod.rs:594-609 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) src-tauri/src/drag_out/mod.rs:44 — src-tauri/src/drag_out/mod.rs:44-60 | src-tauri/src/drag_out/mod.rs:75-91 — 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 (6 corresponding lines) · ×1
  • Edited copy of a member (6 corresponding lines) src-tauri/src/clipboard/apps_registry.rs:349 — src-tauri/src/clipboard/apps_registry.rs:349-354 | src-tauri/src/clipboard/source.rs: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 (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) src-tauri/src/mouse/windows.rs:130 — src-tauri/src/mouse/windows.rs:130-139 | src-tauri/src/shortcut/win_v.rs:183-196 — 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 copies of one member (4 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 11+ corresponding lines) src-tauri/src/window/macos.rs:182 — src-tauri/src/window/macos.rs:182-192 | src-tauri/src/window/macos.rs:195-205 | src-tauri/src/window/preview.rs:463-475 | src-tauri/src/window/preview.rs:504-515 — 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 copy of a member (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) src-tauri/src/drag_out/windows_ghost.rs:53 — src-tauri/src/drag_out/windows_ghost.rs:53-61 | src-tauri/src/drag_out/windows_ghost.rs:92-100 — 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.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) src-tauri/src/clipboard/apps_registry.rs:190 — src-tauri/src/clipboard/apps_registry.rs:190-203 | src-tauri/src/clipboard/apps_registry.rs:205-219 | src-tauri/src/clipboard/apps_registry.rs:221-236 — 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 copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) src-tauri/src/core/paths.rs:272 — src-tauri/src/core/paths.rs:272-281 | src-tauri/src/backup/mod.rs:1315-1318 — 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.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×1
  • Edited copy of a member (5 corresponding lines) src-tauri/src/i18n/mod.rs:17 — src-tauri/src/i18n/mod.rs:17-21 | src-tauri/src/window/lifecycle/mod.rs:680-684 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) src-tauri/src/commands/clipboard.rs:374 — src-tauri/src/commands/clipboard.rs:374-380 | src-tauri/src/commands/clipboard.rs:410-415 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) src-tauri/src/clipboard/app_store.rs:73 — src-tauri/src/clipboard/app_store.rs:73-77 | src-tauri/src/clipboard/file_icon_store.rs:62-66 | src-tauri/src/clipboard/storage.rs:176-180 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×1
  • Duplicated block (7 lines × 2) src-tauri/src/clipboard/app_store.rs:28 — src-tauri/src/clipboard/app_store.rs:28-34 | src-tauri/src/clipboard/file_icon_store.rs:24-30 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) src-tauri/src/clipboard/app_store.rs:44 — src-tauri/src/clipboard/app_store.rs:44-51 | src-tauri/src/clipboard/file_icon_store.rs:33-40 | src-tauri/src/clipboard/storage.rs:72-79 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) src-tauri/src/keyboard/windows.rs:88 — src-tauri/src/keyboard/windows.rs:88-97 | src-tauri/src/mouse/windows.rs:37-46 | src-tauri/src/shortcut/win_v.rs:63-74 — 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 `src-tauri/src/keyboard/windows.rs:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) src-tauri/src/window/mod.rs:291 — src-tauri/src/window/mod.rs:291-302 | src-tauri/src/window/mod.rs:327-338 — 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 `src-tauri/src/window/mod.rs:291` 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, `src-tauri/src/window/mod.rs:325` calls `decorations`, `transparent` and `src-tauri/src/window/mod.rs:290` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) src-tauri/src/clipboard/app_store.rs:80 — src-tauri/src/clipboard/app_store.rs:80-86 | src-tauri/src/clipboard/file_icon_store.rs:69-75 | src-tauri/src/clipboard/storage.rs:184-190 — before extracting anything, compare `src-tauri/src/clipboard/app_store.rs` and `src-tauri/src/clipboard/file_icon_store.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (93 lines × 4) · ×1
  • Duplicated block (93 lines × 4) .claude/hooks/session-start.py:726 — .claude/hooks/session-start.py:726-818 | .cursor/hooks/session-start.py:726-818 | .gemini/hooks/session-start.py:726-818 | .kiro/hooks/session-start.py:726-818 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 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 `.claude/hooks/session-start.py:726` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (90 lines × 4) · ×1
  • Duplicated block (90 lines × 4) .claude/hooks/session-start.py:328 — .claude/hooks/session-start.py:328-417 | .cursor/hooks/session-start.py:328-417 | .gemini/hooks/session-start.py:328-417 | .kiro/hooks/session-start.py:328-417 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (80 lines × 3) · ×1
  • Duplicated block (80 lines × 3) .claude/hooks/inject-subagent-context.py:688 — .claude/hooks/inject-subagent-context.py:688-767 | .cursor/hooks/inject-subagent-context.py:688-767 | .kiro/hooks/inject-subagent-context.py:688-767 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 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.
D4 · Code Duplication · Duplicated block (68 lines × 2) · ×1
  • Duplicated block (68 lines × 2) .codex/hooks/session-start.py:224 — .codex/hooks/session-start.py:224-291 | .github/copilot/hooks/session-start.py:229-296 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 410 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (66 lines × 3) · ×1
  • Duplicated block (66 lines × 3) .claude/hooks/inject-subagent-context.py:191 — .claude/hooks/inject-subagent-context.py:191-256 | .cursor/hooks/inject-subagent-context.py:191-256 | .kiro/hooks/inject-subagent-context.py:191-256 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (61 lines × 5) · ×1
  • Duplicated block (61 lines × 5) .claude/hooks/inject-workflow-state.py:344 — .claude/hooks/inject-workflow-state.py:344-404 | .codex/hooks/inject-workflow-state.py:344-404 | .gemini/hooks/inject-workflow-state.py:344-404 | .github/copilot/hooks/inject-workflow-state.py:344-404 | .kiro/hooks/inject-workflow-state.py:344-404 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (59–61 lines × 2) · ×1
  • Duplicated block (59–61 lines × 2) .codex/hooks/session-start.py:469 — .codex/hooks/session-start.py:469-529 | .github/copilot/hooks/session-start.py:474-532 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 410 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 `.codex/hooks/session-start.py:469` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (51–60 lines × 2) · ×1
  • Duplicated block (51–60 lines × 2) .trellis/scripts/common/config.py:93 — .trellis/scripts/common/config.py:93-152 | .trellis/scripts/common/trellis_config.py:58-108 — 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.
D4 · Code Duplication · Duplicated block (53 lines × 6) · ×1
  • Duplicated block (53 lines × 6) .claude/hooks/session-start.py:605 — .claude/hooks/session-start.py:605-657 | .codex/hooks/session-start.py:361-413 | .cursor/hooks/session-start.py:605-657 | .gemini/hooks/session-start.py:605-657 | .github/copilot/hooks/session-start.py:366-418 | .kiro/hooks/session-start.py:605-657 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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.
D4 · Code Duplication · Duplicated block (51 lines × 3) · ×1
  • Duplicated block (51 lines × 3) .claude/hooks/inject-subagent-context.py:578 — .claude/hooks/inject-subagent-context.py:578-628 | .cursor/hooks/inject-subagent-context.py:578-628 | .kiro/hooks/inject-subagent-context.py:578-628 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 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.
D4 · Code Duplication · Duplicated block (50 lines × 4) · ×1
  • Duplicated block (50 lines × 4) .claude/hooks/session-start.py:517 — .claude/hooks/session-start.py:517-566 | .cursor/hooks/session-start.py:517-566 | .gemini/hooks/session-start.py:517-566 | .kiro/hooks/session-start.py:517-566 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (43 lines × 4) · ×1
  • Duplicated block (43 lines × 4) .claude/hooks/session-start.py:465 — .claude/hooks/session-start.py:465-507 | .cursor/hooks/session-start.py:465-507 | .gemini/hooks/session-start.py:465-507 | .kiro/hooks/session-start.py:465-507 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (41 lines × 4) · ×1
  • Duplicated block (41 lines × 4) .claude/hooks/session-start.py:421 — .claude/hooks/session-start.py:421-461 | .cursor/hooks/session-start.py:421-461 | .gemini/hooks/session-start.py:421-461 | .kiro/hooks/session-start.py:421-461 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (39 lines × 3) · ×1
  • Duplicated block (39 lines × 3) .claude/hooks/inject-subagent-context.py:149 — .claude/hooks/inject-subagent-context.py:149-187 | .cursor/hooks/inject-subagent-context.py:149-187 | .kiro/hooks/inject-subagent-context.py:149-187 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (37 lines × 3) · ×1
  • Duplicated block (37 lines × 3) .claude/hooks/inject-subagent-context.py:648 — .claude/hooks/inject-subagent-context.py:648-684 | .cursor/hooks/inject-subagent-context.py:648-684 | .kiro/hooks/inject-subagent-context.py:648-684 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (45 lines × 6) · ×1
  • Duplicated block (45 lines × 6) .claude/hooks/session-start.py:23 — .claude/hooks/session-start.py:23-67 | .codex/hooks/session-start.py:45-89 | .cursor/hooks/session-start.py:23-67 | .gemini/hooks/session-start.py:23-67 | .github/copilot/hooks/session-start.py:55-99 | .kiro/hooks/session-start.py:23-67 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 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.
D4 · Code Duplication · Duplicated block (30–31 lines × 12) · ×1
  • Duplicated block (30–31 lines × 12) .claude/hooks/inject-subagent-context.py:83 — .claude/hooks/inject-subagent-context.py:83-112 | .claude/hooks/inject-workflow-state.py:96-126 | .claude/hooks/session-start.py:188-218 | .codex/hooks/inject-workflow-state.py:96-126 | .cursor/hooks/inject-subagent-context.py:83-112 | .cursor/hooks/session-start.py:188-218 | .gemini/hooks/inject-workflow-state.py:96-126 | .gemini/hooks/session-start.py:188-218 | .github/copilot/hooks/inject-workflow-state.py:96-126 | .kiro/hooks/inject-subagent-context.py:83-112 | .kiro/hooks/inject-workflow-state.py:96-126 | .kiro/hooks/session-start.py:188-218 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (30 lines × 5) · ×1
  • Duplicated block (30 lines × 5) .claude/hooks/inject-workflow-state.py:311 — .claude/hooks/inject-workflow-state.py:311-340 | .codex/hooks/inject-workflow-state.py:311-340 | .gemini/hooks/inject-workflow-state.py:311-340 | .github/copilot/hooks/inject-workflow-state.py:311-340 | .kiro/hooks/inject-workflow-state.py:311-340 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (28 lines × 5) · ×1
  • Duplicated block (28 lines × 5) .claude/hooks/inject-workflow-state.py:227 — .claude/hooks/inject-workflow-state.py:227-254 | .codex/hooks/inject-workflow-state.py:227-254 | .gemini/hooks/inject-workflow-state.py:227-254 | .github/copilot/hooks/inject-workflow-state.py:227-254 | .kiro/hooks/inject-workflow-state.py:227-254 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (27 lines × 4) · ×1
  • Duplicated block (27 lines × 4) .claude/hooks/session-start.py:269 — .claude/hooks/session-start.py:269-295 | .cursor/hooks/session-start.py:269-295 | .gemini/hooks/session-start.py:269-295 | .kiro/hooks/session-start.py:269-295 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×1
  • Duplicated block (25 lines × 3) .claude/hooks/inject-subagent-context.py:276 — .claude/hooks/inject-subagent-context.py:276-300 | .cursor/hooks/inject-subagent-context.py:276-300 | .kiro/hooks/inject-subagent-context.py:276-300 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 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 `.claude/hooks/inject-subagent-context.py:276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 5) · ×1
  • Duplicated block (24 lines × 5) .claude/hooks/inject-workflow-state.py:144 — .claude/hooks/inject-workflow-state.py:144-167 | .codex/hooks/inject-workflow-state.py:144-167 | .gemini/hooks/inject-workflow-state.py:144-167 | .github/copilot/hooks/inject-workflow-state.py:144-167 | .kiro/hooks/inject-workflow-state.py:144-167 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 5) · ×1
  • Duplicated block (23 lines × 5) .claude/hooks/inject-workflow-state.py:182 — .claude/hooks/inject-workflow-state.py:182-204 | .codex/hooks/inject-workflow-state.py:182-204 | .gemini/hooks/inject-workflow-state.py:182-204 | .github/copilot/hooks/inject-workflow-state.py:182-204 | .kiro/hooks/inject-workflow-state.py:182-204 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) .trellis/scripts/common/task_store.py:558 — .trellis/scripts/common/task_store.py:558-580 | .trellis/scripts/common/task_store.py:611-633 — 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.
D4 · Code Duplication · Duplicated block (17–22 lines × 2) · ×1
  • Duplicated block (17–22 lines × 2) .trellis/scripts/common/active_task.py:103 — .trellis/scripts/common/active_task.py:103-119 | .trellis/scripts/common/paths.py:211-232 — 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 6) · ×1
  • Duplicated block (20–21 lines × 6) .claude/hooks/session-start.py:100 — .claude/hooks/session-start.py:100-120 | .codex/hooks/session-start.py:123-142 | .cursor/hooks/session-start.py:100-120 | .gemini/hooks/session-start.py:100-120 | .github/copilot/hooks/session-start.py:128-147 | .kiro/hooks/session-start.py:100-120 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) .claude/hooks/inject-workflow-state.py:260 — .claude/hooks/inject-workflow-state.py:260-279 | .codex/hooks/inject-workflow-state.py:260-279 | .gemini/hooks/inject-workflow-state.py:260-279 | .github/copilot/hooks/inject-workflow-state.py:260-279 | .kiro/hooks/inject-workflow-state.py:260-279 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 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.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) .claude/hooks/inject-subagent-context.py:465 — .claude/hooks/inject-subagent-context.py:465-493 | .cursor/hooks/inject-subagent-context.py:465-493 | .kiro/hooks/inject-subagent-context.py:465-493 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 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.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) .trellis/scripts/common/config.py:40 — .trellis/scripts/common/config.py:40-59 | .trellis/scripts/common/trellis_config.py:26-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 matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 6) · ×1
  • Duplicated block (19 lines × 6) .claude/hooks/inject-subagent-context.py:293 — .claude/hooks/inject-subagent-context.py:293-311 | .claude/hooks/inject-subagent-context.py:321-339 | .cursor/hooks/inject-subagent-context.py:293-311 | .cursor/hooks/inject-subagent-context.py:321-339 | .kiro/hooks/inject-subagent-context.py:293-311 | .kiro/hooks/inject-subagent-context.py:321-339 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) .codex/hooks/session-start.py:173 — .codex/hooks/session-start.py:173-191 | .github/copilot/hooks/session-start.py:178-196 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 410 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) .claude/hooks/session-start.py:580 — .claude/hooks/session-start.py:580-597 | .cursor/hooks/session-start.py:580-597 | .gemini/hooks/session-start.py:580-597 | .kiro/hooks/session-start.py:580-597 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 6) · ×1
  • Duplicated block (16–17 lines × 6) .claude/hooks/session-start.py:570 — .claude/hooks/session-start.py:570-586 | .codex/hooks/session-start.py:330-345 | .cursor/hooks/session-start.py:570-586 | .gemini/hooks/session-start.py:570-586 | .github/copilot/hooks/session-start.py:335-350 | .kiro/hooks/session-start.py:570-586 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 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.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) .claude/hooks/session-start.py:661 — .claude/hooks/session-start.py:661-676 | .cursor/hooks/session-start.py:661-676 | .gemini/hooks/session-start.py:661-676 | .kiro/hooks/session-start.py:661-676 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) .claude/hooks/inject-workflow-state.py:289 — .claude/hooks/inject-workflow-state.py:289-303 | .codex/hooks/inject-workflow-state.py:289-303 | .gemini/hooks/inject-workflow-state.py:289-303 | .github/copilot/hooks/inject-workflow-state.py:289-303 | .kiro/hooks/inject-workflow-state.py:289-303 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) .claude/hooks/inject-subagent-context.py:117 — .claude/hooks/inject-subagent-context.py:117-131 | .cursor/hooks/inject-subagent-context.py:117-131 | .kiro/hooks/inject-subagent-context.py:117-131 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) .claude/hooks/session-start.py:669 — .claude/hooks/session-start.py:669-682 | .codex/hooks/session-start.py:420-433 | .cursor/hooks/session-start.py:669-682 | .gemini/hooks/session-start.py:669-682 | .github/copilot/hooks/session-start.py:425-438 | .kiro/hooks/session-start.py:669-682 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 8) · ×1
  • Duplicated block (11 lines × 8) .claude/hooks/session-start.py:299 — .claude/hooks/session-start.py:299-309 | .codex/hooks/session-start.py:195-205 | .cursor/hooks/session-start.py:299-309 | .gemini/hooks/session-start.py:299-309 | .github/copilot/hooks/session-start.py:200-210 | .kiro/hooks/session-start.py:299-309 | .trellis/scripts/common/active_task.py:104-114 | .trellis/scripts/common/paths.py:217-227 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (3–11 lines × 6) · ×1
  • Duplicated block (3–11 lines × 6) .claude/hooks/session-start.py:692 — .claude/hooks/session-start.py:692-702 | .codex/hooks/session-start.py:443-445 | .cursor/hooks/session-start.py:692-702 | .gemini/hooks/session-start.py:692-702 | .github/copilot/hooks/session-start.py:448-450 | .kiro/hooks/session-start.py:692-702 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) .claude/hooks/inject-subagent-context.py:135 — .claude/hooks/inject-subagent-context.py:135-143 | .cursor/hooks/inject-subagent-context.py:135-143 | .kiro/hooks/inject-subagent-context.py:135-143 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) .claude/hooks/inject-subagent-context.py:262 — .claude/hooks/inject-subagent-context.py:262-272 | .cursor/hooks/inject-subagent-context.py:262-272 | .kiro/hooks/inject-subagent-context.py:262-272 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) .claude/hooks/inject-subagent-context.py:632 — .claude/hooks/inject-subagent-context.py:632-644 | .cursor/hooks/inject-subagent-context.py:632-644 | .kiro/hooks/inject-subagent-context.py:632-644 — before extracting anything, compare `.claude/hooks/inject-subagent-context.py` and `.cursor/hooks/inject-subagent-context.py` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 437 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) .claude/hooks/inject-workflow-state.py:78 — .claude/hooks/inject-workflow-state.py:78-88 | .codex/hooks/inject-workflow-state.py:78-88 | .gemini/hooks/inject-workflow-state.py:78-88 | .github/copilot/hooks/inject-workflow-state.py:78-88 | .kiro/hooks/inject-workflow-state.py:78-88 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) .claude/hooks/inject-workflow-state.py:135 — .claude/hooks/inject-workflow-state.py:135-140 | .codex/hooks/inject-workflow-state.py:135-140 | .gemini/hooks/inject-workflow-state.py:135-140 | .github/copilot/hooks/inject-workflow-state.py:135-140 | .kiro/hooks/inject-workflow-state.py:135-140 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×1
  • Duplicated block (16 lines × 5) .claude/hooks/inject-workflow-state.py:208 — .claude/hooks/inject-workflow-state.py:208-223 | .codex/hooks/inject-workflow-state.py:208-223 | .gemini/hooks/inject-workflow-state.py:208-223 | .github/copilot/hooks/inject-workflow-state.py:208-223 | .kiro/hooks/inject-workflow-state.py:208-223 — before extracting anything, compare `.claude/hooks/inject-workflow-state.py` and `.codex/hooks/inject-workflow-state.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) .claude/hooks/session-start.py:124 — .claude/hooks/session-start.py:124-142 | .cursor/hooks/session-start.py:124-142 | .gemini/hooks/session-start.py:124-142 | .kiro/hooks/session-start.py:124-142 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) .claude/hooks/session-start.py:227 — .claude/hooks/session-start.py:227-232 | .cursor/hooks/session-start.py:227-232 | .gemini/hooks/session-start.py:227-232 | .kiro/hooks/session-start.py:227-232 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `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.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) .claude/hooks/session-start.py:236 — .claude/hooks/session-start.py:236-252 | .cursor/hooks/session-start.py:236-252 | .gemini/hooks/session-start.py:236-252 | .kiro/hooks/session-start.py:236-252 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) .claude/hooks/session-start.py:256 — .claude/hooks/session-start.py:256-265 | .cursor/hooks/session-start.py:256-265 | .gemini/hooks/session-start.py:256-265 | .kiro/hooks/session-start.py:256-265 — before extracting anything, compare `.claude/hooks/session-start.py` and `.cursor/hooks/session-start.py` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 693 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) .claude/hooks/session-start.py:707 — .claude/hooks/session-start.py:707-722 | .codex/hooks/session-start.py:450-465 | .cursor/hooks/session-start.py:707-722 | .gemini/hooks/session-start.py:707-722 | .github/copilot/hooks/session-start.py:455-470 | .kiro/hooks/session-start.py:707-722 — before extracting anything, compare `.claude/hooks/session-start.py` and `.codex/hooks/session-start.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 232 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×1
  • Duplicated block (8 lines × 2) .codex/hooks/session-start.py:153 — .codex/hooks/session-start.py:153-160 | .github/copilot/hooks/session-start.py:158-165 — before extracting anything, compare `.codex/hooks/session-start.py` and `.github/copilot/hooks/session-start.py` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 410 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Rust 1.96 rust-toolchain.toml:1 — rust-toolchain.toml declares Rust 1.96 as this project's toolchain file, and Rust 1.96, superseded by 1.97 on 2026-07-09 (the Rust project patches only the current stable). An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-07-09 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (7 clone groups) src/pages/Clipboard/components/Group.tsx:427 — 7 duplicated blocks under src/pages/ have copies in at least two of the sibling directories Clipboard, ContextMenu, Preference, Preview, Update — 5 of them are reported below, and 2 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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.
R10 · Code Duplication · Duplicated block with local edits (124 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (124 matched lines × 2 locations) src/pages/Preference/components/BackupExportModal.tsx:55 — src/pages/Preference/components/BackupExportModal.tsx:55 · src/pages/Preference/components/BackupImportModal.tsx:53 — the two spans are one implementation copied and then locally edited — 561 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.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) src/pages/Onboarding/components/DoneStep.tsx:14 — src/pages/Onboarding/components/DoneStep.tsx:14 · src/pages/Onboarding/components/WelcomeStep.tsx:14 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54 — src/pages/Preference/components/settingControls/CaptureOrderControl.tsx:54 · src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx:76 — 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.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) src/pages/Clipboard/components/Group.tsx:427 — src/pages/Clipboard/components/Group.tsx:427 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:124 — 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.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) src/hooks/useClipboardItems.ts:159 — src/hooks/useClipboardItems.ts:159 · src/hooks/useClipboardItems.ts:185 — 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.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) src/components/LanguageSwitcher/index.tsx:43 — src/components/LanguageSwitcher/index.tsx:43 · src/components/LanguageSwitcher/index.tsx:82 — 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 (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) src/pages/Clipboard/components/Group.tsx:322 — src/pages/Clipboard/components/Group.tsx:322 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:74 — 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.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) src/pages/Preference/components/SourceAppsTransfer.tsx:129 — src/pages/Preference/components/SourceAppsTransfer.tsx:129 · src/pages/Preference/components/SourceAppsTransfer.tsx:151 — 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 (6 lines × 2 locations) · ×1
  • Duplicated block (6 lines × 2 locations) src/pages/Preference/components/settingControls/NumberControl.tsx:13 — src/pages/Preference/components/settingControls/NumberControl.tsx:13 · src/pages/Preference/components/settingControls/RetentionControl.tsx:36 — 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.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) src/pages/Clipboard/components/Group.tsx:111 — src/pages/Clipboard/components/Group.tsx:111 · src/pages/Preference/components/ClipboardGroupManagerModal.tsx:54 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R2 · Cyclomatic Complexity · Complex function handleKeyDown (cyclomatic 32, cognitive 39) · ×1
  • Complex function handleKeyDown (cyclomatic 32, cognitive 39) src/pages/Clipboard/components/List.tsx:587 — handleKeyDown has cyclomatic complexity 32 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function PreferenceSettingControl (cyclomatic 26, cognitive 15) · ×1
  • Complex function PreferenceSettingControl (cyclomatic 26, cognitive 15) src/pages/Preference/components/settingControls/PreferenceSettingControl.tsx:50 — PreferenceSettingControl has cyclomatic complexity 26 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function current (cyclomatic 23, cognitive 16) · ×1
  • Complex function current (cyclomatic 23, cognitive 16) src/pages/Clipboard/components/List.tsx:522 — current has cyclomatic complexity 23 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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.
R2 · Cyclomatic Complexity · Complex function resolveSectionVisual (cyclomatic 22, cognitive 20) · ×1
  • Complex function resolveSectionVisual (cyclomatic 22, cognitive 20) src/pages/Preference/components/PreferenceSection.tsx:136 — resolveSectionVisual has cyclomatic complexity 22 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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.
R2 · Cyclomatic Complexity · Complex function Update (cyclomatic 20, cognitive 19) · ×1
  • Complex function Update (cyclomatic 20, cognitive 19) src/pages/Update/index.tsx:43 — Update has cyclomatic complexity 20 and cognitive complexity 19; 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.
R2 · Cyclomatic Complexity · Complex function handleQuickAction (cyclomatic 20, cognitive 13) · ×1
  • Complex function handleQuickAction (cyclomatic 20, cognitive 13) src/pages/Clipboard/components/List.tsx:872 — handleQuickAction has cyclomatic complexity 20 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 17) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 17) src/commands/index.ts:1082 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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.
R2 · Cyclomatic Complexity · Complex function PreferenceSettingRow (cyclomatic 18, cognitive 17) · ×1
  • Complex function PreferenceSettingRow (cyclomatic 18, cognitive 17) src/pages/Preference/components/PreferenceSettingRow.tsx:42 — PreferenceSettingRow has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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.
R2 · Cyclomatic Complexity · Complex function BackupImportModal (cyclomatic 15, cognitive 12) · ×1
  • Complex function BackupImportModal (cyclomatic 15, cognitive 12) src/pages/Preference/components/BackupImportModal.tsx:31 — BackupImportModal has cyclomatic complexity 15 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.
R2 · Cyclomatic Complexity · Complex function Preview (cyclomatic 14, cognitive 13) · ×1
  • Complex function Preview (cyclomatic 14, cognitive 13) src/pages/Preview/index.tsx:62 — Preview has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getEmptyDescription (cyclomatic 13, cognitive 15) · ×1
  • Complex function getEmptyDescription (cyclomatic 13, cognitive 15) src/pages/Clipboard/components/List.tsx:1117 — getEmptyDescription has cyclomatic complexity 13 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleWindowVisibility (cyclomatic 13, cognitive 11) · ×1
  • Complex function handleWindowVisibility (cyclomatic 13, cognitive 11) src/pages/Clipboard/components/List.tsx:284 — handleWindowVisibility has cyclomatic complexity 13 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.
R2 · Cyclomatic Complexity · Complex function settingValuesEqual (cyclomatic 12, cognitive 15) · ×1
  • Complex function settingValuesEqual (cyclomatic 12, cognitive 15) src/pages/Preference/services/preferenceSettings.ts:26 — settingValuesEqual has cyclomatic complexity 12 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleClick (cyclomatic 12, cognitive 11) · ×1
  • Complex function handleClick (cyclomatic 12, cognitive 11) src/pages/Preference/components/settingControls/ActionControl.tsx:323 — handleClick 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 11, cognitive 13) · ×1
  • Complex function (anonymous) (cyclomatic 11, cognitive 13) src/hooks/useClipboardItems.ts:80 — (anonymous) has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ClipboardCard (cyclomatic 11, cognitive 10) · ×1
  • Complex function ClipboardCard (cyclomatic 11, cognitive 10) src/pages/Clipboard/components/cards/ClipboardCard.tsx:58 — ClipboardCard has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function openPreviewForItem (cyclomatic 11, cognitive 10) · ×1
  • Complex function openPreviewForItem (cyclomatic 11, cognitive 10) src/pages/Clipboard/hooks/useClipboardPreviewController.ts:348 — openPreviewForItem has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function PreferenceStorageUsagePanel (cyclomatic 11, cognitive 10) · ×1
  • Complex function PreferenceStorageUsagePanel (cyclomatic 11, cognitive 10) src/pages/Preference/components/PreferenceStorageUsagePanel.tsx:21 — PreferenceStorageUsagePanel has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Preference (cyclomatic 11, cognitive 10) · ×1
  • Complex function Preference (cyclomatic 11, cognitive 10) src/pages/Preference/index.tsx:70 — Preference has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ActionControl (cyclomatic 11, cognitive 9) · ×1
  • Complex function ActionControl (cyclomatic 11, cognitive 9) src/pages/Preference/components/settingControls/ActionControl.tsx:100 — ActionControl 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.
R3 · Large Files · src/commands/index.ts · ×1
  • src/commands/index.ts: 1311 lines of code src/commands/index.ts:1 — src/commands/index.ts has 1311 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 · src/pages/Clipboard/components/List.tsx · ×1
  • src/pages/Clipboard/components/List.tsx: 1180 lines of code src/pages/Clipboard/components/List.tsx:1 — src/pages/Clipboard/components/List.tsx has 1180 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 · src/pages/Preference/config/preferenceSchema.ts · ×1
  • src/pages/Preference/config/preferenceSchema.ts: 947 lines of code src/pages/Preference/config/preferenceSchema.ts:1 — src/pages/Preference/config/preferenceSchema.ts has 947 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 · src/pages/Clipboard/components/Group.tsx · ×1
  • src/pages/Clipboard/components/Group.tsx: 891 lines of code src/pages/Clipboard/components/Group.tsx:1 — src/pages/Clipboard/components/Group.tsx has 891 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 · src/pages/Preference/components/settingControls/ActionControl.tsx · ×1
  • src/pages/Preference/components/settingControls/ActionControl.tsx: 597 lines of code src/pages/Preference/components/settingControls/ActionControl.tsx:1 — src/pages/Preference/components/settingControls/ActionControl.tsx has 597 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 · src/pages/Clipboard/hooks/useClipboardPreviewController.ts · ×1
  • src/pages/Clipboard/hooks/useClipboardPreviewController.ts: 483 lines of code src/pages/Clipboard/hooks/useClipboardPreviewController.ts:1 — src/pages/Clipboard/hooks/useClipboardPreviewController.ts has 483 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 124 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
R7 · Dead Code · Dead file (~11 LoC) · ×1
  • Dead file (~11 LoC) src/hooks/useWindowLifecycle.ts — no import path from any entry point (5 application, 5 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
R8 · Dependency Hygiene · Unused dependency '@iconify-json/lets-icons' · ×1
  • Unused dependency '@iconify-json/lets-icons' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@iconify-json/lucide' · ×1
  • Unused dependency '@iconify-json/lucide' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@iconify-json/ph' · ×1
  • Unused dependency '@iconify-json/ph' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@release-it/bumper' · ×1
  • Unused dependency '@release-it/bumper' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@release-it/conventional-changelog' · ×1
  • Unused dependency '@release-it/conventional-changelog' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×1
  • JavaScript dependencies are not locked .opencode/package.json:2 — .opencode/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / REDACTED / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Minor — 59 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×33
  • Duplicated predicate src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx:117 — `!("selected" in value) || !("order" in value)` appears character-identically in 2 files — src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx, src/pages/Preference/services/preferenceSettings.ts. 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 .opencode/lib/session-utils.js:52 — `active.stale || !taskDir || !existsSync(taskDir)` appears character-identically in 2 files — .opencode/lib/session-utils.js, .opencode/plugins/inject-workflow-state.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .opencode/plugins/inject-workflow-state.js:154 — `p.type === "text" && p.text !== undefined` appears character-identically in 2 files — .opencode/plugins/inject-workflow-state.js, .opencode/plugins/session-start.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .opencode/plugins/inject-subagent-context.js:383 — `process.env.TRELLIS_HOOKS === "0" || process.env.TRELLIS_DISABLE_HOOKS === "1"` appears character-identically in 3 files — .opencode/plugins/inject-subagent-context.js, .opencode/plugins/inject-workflow-state.js, .opencode/plugins/session-start.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/pages/Preference/utils/storageUsage.ts:16 — `size >= 1024 && unitIndex < units.length - 1` appears character-identically in 2 files — src/pages/Preference/utils/storageUsage.ts, src/pages/Preview/components/PreviewContent.tsx. 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 src/hooks/useClipboardWindowEditableFocus.ts:119 — `tagName === "input" || tagName === "textarea"` appears character-identically in 4 files — src/hooks/useClipboardWindowEditableFocus.ts, src/hooks/useKeyboardEvent.ts, src/pages/Clipboard/components/Group.tsx, src/pages/Clipboard/components/List.tsx. 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 src/components/Dropdown/index.tsx:84 — `tooltip === false || tooltip === null || tooltip === void 0` appears character-identically in 2 files — src/components/Dropdown/index.tsx, src/components/Popover/index.tsx. 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 src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx:113 — `typeof value !== "object" || value === null` appears character-identically in 2 files — src/pages/Preference/components/settingControls/SortableCheckboxTreeControl.tsx, src/pages/Preference/services/preferenceSettings.ts. 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 .opencode/lib/trellis-context.js:30 — `typeof value === "string" && value.trim()` appears character-identically in 2 files — .opencode/lib/trellis-context.js, .opencode/plugins/inject-subagent-context.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate .claude/hooks/session-start.py:178 — `_run_git(repo_root, ["branch", "--show-current"]) or "(detached)"` appears character-identically in 6 files — .claude/hooks/session-start.py, .codex/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.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 .claude/hooks/session-start.py:588 — `allowed_pkgs is not None and sub.name not in allowed_pkgs` appears character-identically in 4 files — .claude/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.py, .kiro/hooks/session-start.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 .claude/hooks/inject-subagent-context.py:171 — `f.endswith(".md") and os.path.isfile(os.path.join(full_path, f))` appears character-identically in 3 files — .claude/hooks/inject-subagent-context.py, .cursor/hooks/inject-subagent-context.py, .kiro/hooks/inject-subagent-context.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 .trellis/scripts/common/task_queue.py:67 — `filter_status and t.status != filter_status` appears character-identically in 2 files — .trellis/scripts/common/task_queue.py, .trellis/scripts/task.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 .claude/hooks/inject-subagent-context.py:661 — `input_data.get("tool_name", "") or input_data.get("toolName", "")` appears character-identically in 3 files — .claude/hooks/inject-subagent-context.py, .cursor/hooks/inject-subagent-context.py, .kiro/hooks/inject-subagent-context.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 .cursor/hooks/inject-shell-session-context.py:98 — `isinstance(expires_at, (int, float)) and expires_at < now` appears character-identically in 2 files — .cursor/hooks/inject-shell-session-context.py, .trellis/scripts/common/active_task.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 .claude/hooks/session-start.py:116 — `isinstance(row, dict) and row.get("file")` appears character-identically in 6 files — .claude/hooks/session-start.py, .codex/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.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 .claude/hooks/session-start.py:528 — `isinstance(scope, str) and scope == "active_task"` appears character-identically in 4 files — .claude/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.py, .kiro/hooks/session-start.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 .claude/hooks/session-start.py:480 — `legacy_dir.is_dir() and (legacy_dir / "index.md").is_file()` appears character-identically in 4 files — .claude/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.py, .kiro/hooks/session-start.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 .claude/hooks/session-start.py:378 — `not check_jsonl.is_file() or _has_curated_jsonl_entry(check_jsonl)` appears character-identically in 4 files — .claude/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.py, .kiro/hooks/session-start.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 .claude/hooks/session-start.py:377 — `not implement_jsonl.is_file() or _has_curated_jsonl_entry(implement_jsonl)` appears character-identically in 4 files — .claude/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.py, .kiro/hooks/session-start.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 .claude/hooks/session-start.py:33 — `not isinstance(path_str, str) or not path_str` appears character-identically in 6 files — .claude/hooks/session-start.py, .codex/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.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 .claude/hooks/inject-workflow-state.py:165 — `not isinstance(status, str) or not status` appears character-identically in 5 files — .claude/hooks/inject-workflow-state.py, .codex/hooks/inject-workflow-state.py, .gemini/hooks/inject-workflow-state.py, .github/copilot/hooks/inject-workflow-state.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 .claude/hooks/inject-subagent-context.py:161 — `not os.path.exists(full_path) or not os.path.isdir(full_path)` appears character-identically in 3 files — .claude/hooks/inject-subagent-context.py, .cursor/hooks/inject-subagent-context.py, .kiro/hooks/inject-subagent-context.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 .trellis/scripts/common/config.py:101 — `not stripped or stripped.startswith("#")` appears character-identically in 2 files — .trellis/scripts/common/config.py, .trellis/scripts/common/trellis_config.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 .claude/hooks/session-start.py:580 — `not sub.is_dir() or sub.name.startswith(".") or sub.name == "guides"` appears character-identically in 6 files — .claude/hooks/session-start.py, .codex/hooks/session-start.py, .cursor/hooks/session-start.py, .gemini/hooks/session-start.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.
  • + 8 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×7
  • Silent fallback default on parse failure .claude/hooks/inject-workflow-state.py:338 — `_load_hook_input` returns `{}` when `(json.JSONDecodeError, 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 .codex/hooks/inject-workflow-state.py:338 — `_load_hook_input` returns `{}` when `(json.JSONDecodeError, 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 .cursor/hooks/inject-shell-session-context.py:72 — `_extract_task_subcommands` 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 .gemini/hooks/inject-workflow-state.py:338 — `_load_hook_input` returns `{}` when `(json.JSONDecodeError, 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 .github/copilot/hooks/inject-workflow-state.py:338 — `_load_hook_input` returns `{}` when `(json.JSONDecodeError, 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 .kiro/hooks/inject-workflow-state.py:338 — `_load_hook_input` returns `{}` when `(json.JSONDecodeError, 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 .trellis/scripts/hooks/linear_sync.py:61 — `_load_config` returns `{}` when `(OSError, json.JSONDecodeError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
X7 · Silent fallback defaults · Silent fallback default in catch · ×5
  • Silent fallback default in catch .claude/hooks/inject-workflow-state.py:218 — `_read_trellis_config` 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 .codex/hooks/inject-workflow-state.py:218 — `_read_trellis_config` 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 .gemini/hooks/inject-workflow-state.py:218 — `_read_trellis_config` 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 .github/copilot/hooks/inject-workflow-state.py:218 — `_read_trellis_config` 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 .kiro/hooks/inject-workflow-state.py:218 — `_read_trellis_config` 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.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found package.json:23 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `package.json` makes this repository a deployable product (line 23).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (18262 LoC, 284 module-visible types across 48 directories). 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation package.json:39 — `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R7 · Dead Code · Unused export 'TauriCommand' · ×1
  • Unused export 'TauriCommand' src/constants/commands.ts:90 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'TauriEvent' · ×1
  • Unused export 'TauriEvent' src/constants/events.ts:22 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SVG_ICON_HELP_URL' · ×1
  • Unused export 'SVG_ICON_HELP_URL' src/constants/urls.ts:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'windowLifecycleReady' · ×1
  • Unused export 'windowLifecycleReady' src/stores/windowLifecycle.ts:54 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'default' · ×1
  • Unused export 'default' src/unocss/presetAntdColors.ts:78 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'isImage' · ×1
  • Unused export 'isImage' src/utils/is.ts:30 — Nothing imports this binding — it is safe to review for removal.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 1/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
Minor — 18 finding(s)
D12 · Dependency Hygiene · Outdated · ×18
  • Outdated: blake3 — `blake3` is locked at 1.8.6 but 1.8.7 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p blake3` and commit the updated REDACTED.
  • Outdated: log — `log` is locked at 0.4.33 but 0.4.35 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p log` and commit the updated REDACTED.
  • Outdated: objc2 — `objc2` is locked at 0.6.4 but 0.6.5 is the current stable release on crates.io, and it already satisfies the `"0.6"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p objc2` and commit the updated REDACTED.
  • Outdated: plist — `plist` is locked at 1.10.0 but 1.10.3 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p plist` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: tauri — `tauri` is locked at 2.11.5 but 2.12.5 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri` and commit the updated REDACTED.
  • Outdated: tauri-build — `tauri-build` is locked at 2.6.3 but 2.7.4 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-build` and commit the updated REDACTED.
  • Outdated: tauri-plugin-dialog — `tauri-plugin-dialog` is locked at 2.7.2 but 2.8.4 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-dialog` and commit the updated REDACTED.
  • Outdated: tauri-plugin-global-shortcut — `tauri-plugin-global-shortcut` is locked at 2.3.2 but 2.4.1 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-global-shortcut` and commit the updated REDACTED.
  • Outdated: tauri-plugin-log — `tauri-plugin-log` is locked at 2.9.0 but 2.10.2 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-log` and commit the updated REDACTED.
  • Outdated: tauri-plugin-opener — `tauri-plugin-opener` is locked at 2.5.4 but 2.7.3 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-opener` and commit the updated REDACTED.
  • Outdated: tauri-plugin-os — `tauri-plugin-os` is locked at 2.3.2 but 2.4.0 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-os` and commit the updated REDACTED.
  • Outdated: tauri-plugin-single-instance — `tauri-plugin-single-instance` is locked at 2.4.3 but 2.5.5 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-single-instance` and commit the updated REDACTED.
  • Outdated: tauri-plugin-updater — `tauri-plugin-updater` is locked at 2.10.1 but 2.14.1 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tauri-plugin-updater` and commit the updated REDACTED.
  • Outdated: thiserror — `thiserror` is locked at 2.0.20 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.53.1 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.24.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
  • Outdated: zeroize — `zeroize` is locked at 1.9.0 but 1.9.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src-tauri/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p zeroize` and commit the updated REDACTED.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-740aa3c2f20b4882992f2dc4dda25a9f/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-740aa3c2f20b4882992f2dc4dda25a9f/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .30artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .30artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 10 file(s) — `.release-it.ts`, `src/App.tsx`, `src/components/ScrollArea/index.tsx`, `src/components/VirtuosoScroller/index.tsx`, `src/constants/windowOpenSelection.ts`, … (+5 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1db18-cb81-7a4a-9497-bc6d3bc221b4 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md