Public report of yyh-001/DSH-X, published 17 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive 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, 17 November 2026, 11:07 UTC · Survey ID cd_7bbcd73d89ed4676a6996425fb6ed5a7

yyh-001/DSH-X

Measured 17 November 2026, 11:03 UTC, at code version f006082

First survey, so nothing to compare with yet
CAI score 35.9out of 100 Weak
CriticalWeakAdequateStrongExemplary

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

A medium codebase: 62,548 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 0.7 person-years · Weakest lens: Accessibility, 30.1

Findings by how serious they are

35 critical 880 serious 115 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
17 November 2026, 11:03 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

58of 58 dimensions measured by tools.
1016of 1030 findings point to an exact file and line, so you can open each one in the code. The other 14 concern the repository as a whole, such as missing documentation.
58dimensions across 7 lenses, read from 62,548 lines of product code in 10 projects.
Chapters

Executive summary

yyh-001/DSH-X falls short of our standard for a preview release, held back most by its Accessibility lens, the interface's usability with a keyboard or assistive technology. It scores 35.9 out of 100 and is rated Weak, and 23 of its 35 critical findings are security problems.

Accessibility, at 30.1, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first steps are adding text alternatives and fixing focus, motion and contrast, each worth about 2.8 points.

Twenty pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two known security holes in the packages the code depends on can be used by attackers, and nine form fields can't be read by a screen reader. Pinning each tool to an exact version, updating the vulnerable packages and labelling the form fields would close these risks. Fixing the weaknesses the scanner points to would fix the security weakness in the code. The image with no text description needs a text description.

The product code is 62,548 lines, about €98,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 30.1 · counts for 46%Code Health 32.8 · counts for 25%Production Readiness 34.1 · counts for 14%Maturity 55.1 · counts for 8%Performance 60.0 · counts for 4%Architecture 66.6 · counts for 2%Security and Compliance 77.3 · 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
Business logic 0%Supporting code 0%Tests 100%
Rebuild cost: about €98,000 · Estimate
Cost to rebuild€32,000 to €160,000, for 541 to 1,715 hours of work, about 0.7 person-years for 1 to 2 engineers
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.7 at a score of 36. 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: 62,548 lines of product code
Comment linesThe estimate prices 62,104 lines. Comment lines count towards the size of 62,548 lines but aren't priced as work.
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.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 2.8 points · Medium effort · Text alternatives
2
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.
Raises the score by about 2.8 points · Medium effort · Visual & motion safety
3
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 2.4 points · Medium effort · Type Safety

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 €98,000 to build again, about 0.7 person-years of work. Its weakest lens is Accessibility, at 30.1 (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
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video. Of all the actions in this report, it raises the score most for the work it takes: about 2.8 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 4.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 9% to 21% on every change. The history of the code shows how much it changes: about 198,304 lines over the last 90 days, which is about 804,233 lines a year. At that pace, the extra work comes to an estimated 183.6 to 1101.8 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 · 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.

43 modules, with 4 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 3 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 docs2 docs.mascot-design3 npm-package.bin4 plugins5 plugins.dsh-x-aquarium.lib6 plugins.dsh-x-context-menu7 plugins.dsh-x-desktop-notify8 plugins.dsh-x-desktop-notify.lib9 plugins.dsh-x-memory10 plugins.dsh-x-memory.lib11 plugins.dsh-x-memory.lib.store12 plugins.dsh-x-sync13 plugins.dsh-x-sync.lib.engine14 plugins.dsh-x-sync.lib.engine.sync15 plugins.dsh-x-sync.scripts16 repository17 scripts18 shell19 shell.browser-guests20 shell.instance-views21 shell.tab-detach22 shell.tab-drag-session23 shell.tabs24 shell.window-fade25 skills.dsh-x-selfcheck.scripts26 src27 src.compat28 src.environments29 src.filemanager-base30 src.instance-link31 src.manager-auth32 src.public33 src.remote-core34 src.repair-actions35 src.runtime-diagnostics36 src.server37 shell.instance-window38 src.filemanager-linux39 src.filemanager-mac40 src.filemanager-windows
1 docs
2 docs.mascot-design
3 npm-package.bin
4 plugins
5 plugins.dsh-x-aquarium.lib
6 plugins.dsh-x-context-menu
7 plugins.dsh-x-desktop-notify
8 plugins.dsh-x-desktop-notify.lib
9 plugins.dsh-x-memory
10 plugins.dsh-x-memory.lib
11 plugins.dsh-x-memory.lib.store
12 plugins.dsh-x-sync
13 plugins.dsh-x-sync.lib.engine
14 plugins.dsh-x-sync.lib.engine.sync
15 plugins.dsh-x-sync.scripts
16 repository
17 scripts
18 shell
19 shell.browser-guests
20 shell.instance-views
21 shell.tab-detach
22 shell.tab-drag-session
23 shell.tabs
24 shell.window-fade
25 skills.dsh-x-selfcheck.scripts
26 src
27 src.compat
28 src.environments
29 src.filemanager-base
30 src.instance-link
31 src.manager-auth
32 src.public
33 src.remote-core
34 src.repair-actions
35 src.runtime-diagnostics
36 src.server
37 shell.instance-window1
38 src.filemanager-linux1
39 src.filemanager-mac1
40 src.filemanager-windows1
Uses a module listed above itPart of a loopThe module itself
1 docs2 docs.mascot-design3 npm-package.bin4 plugins5 plugins.dsh-x-aquarium.lib6 plugins.dsh-x-context-menu7 plugins.dsh-x-desktop-notify8 plugins.dsh-x-desktop-notify.lib9 plugins.dsh-x-memory10 plugins.dsh-x-memory.lib11 plugins.dsh-x-memory.lib.store12 plugins.dsh-x-sync13 plugins.dsh-x-sync.lib.engine14 plugins.dsh-x-sync.lib.engine.sync15 plugins.dsh-x-sync.scripts16 repository17 scripts18 shell19 shell.browser-guests20 shell.instance-views21 shell.tab-detach22 shell.tab-drag-session23 shell.tabs24 shell.window-fade25 skills.dsh-x-selfcheck.scripts26 src27 src.compat28 src.environments29 src.filemanager-base30 src.instance-link31 src.manager-auth32 src.public33 src.remote-core34 src.repair-actions35 src.runtime-diagnostics36 src.server37 shell.instance-window38 src.filemanager-linux39 src.filemanager-mac40 src.filemanager-windowsdocs1docs.mascot-design2npm-package.bin3plugins4plugins.dsh-x-aquarium.lib5plugins.dsh-x-context-menu6plugins.dsh-x-desktop-notify7plugins.dsh-x-desktop-notify.lib8plugins.dsh-x-memory9plugins.dsh-x-memory.lib10plugins.dsh-x-memory.lib.store11plugins.dsh-x-sync12plugins.dsh-x-sync.lib.engine13plugins.dsh-x-sync.lib.engine.sync14plugins.dsh-x-sync.scripts15repository16scripts17shell18shell.browser-guests19shell.instance-views20shell.tab-detach21shell.tab-drag-session22shell.tabs23shell.window-fade24skills.dsh-x-selfcheck.scripts25src26src.compat27src.environments28src.filemanager-base29src.instance-link30src.manager-auth31src.public32src.remote-core33src.repair-actions34src.runtime-diagnostics35src.server36shell.instance-window37src.filemanager-linux38src.filemanager-mac39src.filemanager-windows401111+3 more modules (most-connected shown)

At a glance — Code Health · 32.8 · Weak · gated by D1, D2, R1, R3 ·

At a glance — Architecture · 66.6 · Adequate · gated by R11 ·

At a glance — Maturity · 55.1 · Adequate · gated by D15, M2 ·

At a glance — Readiness · 34.1 · Weak · gated by R6, P2, P3, P7 ·

At a glance — Security · 77.3 · Adequate · gated by D36 ·

At a glance — Accessibility · 30.1 · Weak · gated by AC1, AC4, AC6 ·

At a glance — Performance · 60.0 · Adequate ·

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
A05:2025 — Injection27High / Critical
A03:2025 — Software Supply Chain Failures11High / Critical

Roadmap

Top priorities: Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; 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; Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.

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

Do thisHelpsEffortDimension
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+2.8 ptsMediumText alternatives
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.8 ptsMediumVisual & motion safety
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+2.4 ptsMediumType Safety
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.+1.2 ptsLowADR Quality
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+2.0 ptsMediumKeyboard semantics
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+1.7 ptsMediumForms & labels
Adopt pino (or winston) and log at meaningful points in the services you run.+1.7 ptsMediumObservability
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.+1.7 ptsMediumSecurity & performance tooling

File quality

Per-file score 0–10 — a quality signature. Of 84 files carrying findings, judged against the Preview bar: 1% slop · 9% mixed · 90% near-clean.

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.3MixedDependency Vulnerabilities: Medium CVE: REDACTED
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.7MixedDependency Vulnerabilities: High CVE: REDACTED
src/server.js7.0Near-cleanCyclomatic Complexity: handleApi (cyclomatic 765)
src/public/index.html7.0Near-cleanCyclomatic Complexity: index.html.paintLaunchHome (cyclomatic 137)
src/runtime-diagnostics.mjs7.0Near-cleanCyclomatic Complexity: runtime-diagnostics.readRuntimeEvidence (cyclomatic 78)
plugins/dsh-x-sidebar-browser/client.js7.0Near-cleanCyclomatic Complexity: factory.executeCommand (cyclomatic 71)
src/public/internal-tabs.js7.0Near-cleanCyclomatic Complexity: internal-tabs.updateInternalTabs (cyclomatic 69)
src/settings.js7.0Near-cleanCyclomatic Complexity: safeLaunchPresets (cyclomatic 60)
src/repair-actions.js7.0Near-cleanCyclomatic Complexity: DiagnosticRepairs.rollback (cyclomatic 59)
skills/dsh-x-selfcheck/scripts/selfcheck.mjs7.0Near-cleanCyclomatic Complexity: selfcheck.buildContext (cyclomatic 44)
src/mcp.js7.0Near-cleanCyclomatic Complexity: buildConfig (cyclomatic 44)
src/startup-diagnosis.js7.0Near-cleanCyclomatic Complexity: parseActivation (cyclomatic 43)
plugins/dsh-x-sync/lib/engine/sync.js7.0Near-cleanCyclomatic Complexity: sync.runSync (cyclomatic 39)
src/sync.js7.0Near-cleanCyclomatic Complexity: sync.runSync (cyclomatic 39)

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

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

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

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
D1D2D3D5D6D10D12D13D14D15D16D17D19D20D27D28D29D30D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4GD1M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R11R2R3R4R5R6R7R8R9X24

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, 1016 of 1030 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 01a1e92c-bcde-78cb-8d2c-e05cad547fc2.

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.

  • D4 Code Duplication — 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. Most of this repository's production source (.html) was not read by duplication detection: no source of those file kinds was exposed to the token comparison by any language model this pass could load. Duplication in .cjs, .js, .mjs is measured by R10 Code Duplication and is not part of this gap.
  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for the repository root could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. 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 reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for the repository root could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in the repository root was NOT MEASURED: the dependency install for the repository root could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in plugins/dsh-x-context-menu/ was NOT MEASURED: the dependency install for plugins/dsh-x-context-menu/ could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in plugins/dsh-x-desktop-notify/ was NOT MEASURED: the dependency install for plugins/dsh-x-desktop-notify/ could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in plugins/dsh-x-memory/ was NOT MEASURED: the dependency install for plugins/dsh-x-memory/ could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in plugins/dsh-x-sync/ was NOT MEASURED: the dependency install for plugins/dsh-x-sync/ could not reach registry.npmmirror.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — 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.
  • 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. `scripts/make-icon-sprite.mjs` 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.
  • 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. A program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. (rule: missing-tool). The renderer reported: the dev server (`npm run start`) kept running but served no page within 2 minutes. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> dsh-x@0.1.27-rc.3 start / > node src/start.js / 启动管理器 <repo>/src / DSH 管理器 http://127.0.0.1:3780/?token=<redacted> / dsh-versions: http://127.0.0.1:3780 / dsh-versions data: <repo>/src/data / dsh-versions home: <path> / 打开地址失败,已跳过:http://127.0.0.1:3780/?token=<redacted> xdg-open ENOENT)" 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 (start). the dev server (`npm run start`) kept running but served no page within 2 minutes. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> dsh-x@0.1.27-rc.3 start / > node src/start.js / 启动管理器 <repo>/src / DSH 管理器 http://127.0.0.1:3780/?token=<redacted> / dsh-versions: http://127.0.0.1:3780 / dsh-versions data: <repo>/src/data / dsh-versions home: <path> / 打开地址失败,已跳过:http://127.0.0.1:3780/?token=<redacted> xdg-open ENOENT)" No runtime evidence was gathered.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — 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. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • PF3 Async & latency hygiene — 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. 125 further occurrence(s) are not listed individually; the score already reflects all 165.
  • R10 Code Duplication — 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. 79 further occurrence(s) are not listed individually; the score already reflects all 119.
  • R2 Cyclomatic Complexity — 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. 283 further occurrence(s) are not listed individually; the score already reflects all 323.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 28 further occurrence(s) are not listed individually; the score already reflects all 68.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
  • 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.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 4 further occurrence(s) are not listed individually; the score already reflects all 44.

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.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • 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.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • 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 Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

391 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was handleApi at 765. A further 1 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 ssh.createSshBackend.connect at 19 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/ssh.js (ssh.createSshBackend.connect at 19). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

sync.runSync (cyclomatic 39) · ×2plugins/dsh-x-sync/lib/engine/sync.js:1824
createStartupDiagnosis::report (cyclomatic 32) · ×2src/startup-diagnosis.js:364
apply (cyclomatic 28) · ×2plugins/dsh-x-sync/lib/index.js:339
mergeManifests (cyclomatic 24) · ×2plugins/dsh-x-sync/lib/engine/sync.js:1969
writeZip (cyclomatic 24) · ×2src/zipfile.js:210

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

What to do

  1. Bring the 20 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with handleApi (cyclomatic 765), saveLaunchPresetNow (cyclomatic 159), factory.apply (cyclomatic 157). — 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 20 together lifts Cyclomatic Complexity from 2.0 to about 3.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

464 method(s) exceeded the cognitive complexity threshold of 15; the worst was handleApi at 1185.

runSync (cognitive 92) · ×2plugins/dsh-x-sync/lib/engine/sync.js:1824
writeZip (cognitive 47) · ×2src/zipfile.js:210
sync.planSync (cognitive 40) · ×2plugins/dsh-x-sync/lib/engine/sync.js:1581
mergeManifests (cognitive 26) · ×2plugins/dsh-x-sync/lib/engine/sync.js:1969
mergeProfileManifest (cognitive 24) · ×2plugins/dsh-x-sync/lib/engine/sync.js:1702

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

What to do

  1. Bring the 31 bodies over 60 down to 60 or less in Cognitive Complexity — start with handleApi (cognitive 1185), main (cognitive 214), saveLaunchPresetNow (cognitive 170). — 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 31 together lifts Cognitive Complexity from 2.0 to about 3.2/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 Classes8.0 / 10Strong✓ Tool-verified

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

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

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

31 god class(es) detected.

FunctionTooLong: index.apply · ×17plugins/dsh-x-sidebar-browser/index.js:222
FileTooLong: public/index.html · ×11src/public/index.html
MethodTooLong: DiagnosticRepairs.execute · ×2src/repair-actions.js:360
ClassTooLong: DiagnosticRepairssrc/repair-actions.js:79

What to do

  1. Resolve the 17 FunctionTooLong finding(s) in God Classes — start with index.js (3), index.html (3), zipfile.js (2). — One of this dimension's main actionable groups (17 warning-level).
  2. Resolve the 11 FileTooLong finding(s) in God Classes — start with sync.js (2), index.html, server.js. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 2 MethodTooLong finding(s) in God Classes — start with repair-actions.js (2). — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d3_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

10 production modules (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, with abstractness counted on 1 of the 10 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.0 / 10Stronggated by 2 serious findings✓ 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 9.0 / 10 · rule-coverage 100% · ceiling Verified

2 of 25 classes have LCOM4 above 3.

Low cohesion: FileManager (LCOM4 5) · ×2src/filemanager-base.js:26

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with filemanager-base.js, internal-tabs-dom.mjs. — One of this dimension's main actionable groups (2 warning-level).

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

D10 · Test Quality10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

6 skipped (6 with a documented reason), 1 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1763 tests.

No assertions: 已存在的目录同样要能写才算通过test/writable-dir.test.mjs:20
Skipped (documented): R10 auto 的环境、本机一个能用的 DSH 都没有:导出报错,不写文件 · ×6test/environment-export.test.mjs:389

What to do

  1. Resolve the 1 No assertions finding(s) in Test Quality — start with writable-dir.test.mjs. — One of this dimension's main actionable groups (1 warning-level).

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

D12 · Dependency Hygiene10.0 / 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 outdated direct production npm dependency(ies) of 1 graded, 0 pinning defect(s), across 3 REDACTED (3 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 0 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: glob · ×7REDACTED:883

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 8 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 8 package(s) this repository's committed lockfile installs for a consumer — its 1 production, optional and peer dependency(ies), across 3 product REDACTED manifest(s), and everything those install in turn. Its 4 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. No third-party code was found shipping without a manifest entry (vendored or copied-in directories, licence comments preserved in committed bundles, bundled module paths, compiled wasm modules). This repository publishes itself under MIT, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/server.js (168×756=127008); src/public/index.html (165×137=22605); src/settings.js (69×52=3588)

Hotspot: src/server.js · ×20src/server.js:9940

What to do

  1. Resolve the 20 Hotspot finding(s) in Churn × Complexity Hotspots — start with mascot.js (2), server.js, index.html. — One of this dimension's main actionable groups (20 warning-level).

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

D16 · Bus Factor8.8 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

12 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/sync.js. Counted over 102 of the 124 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d16_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 605 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

2 of 2 documentation facets pass in full. 30 document(s) read across 10 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 foundREDACTED:13

What to do

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

12 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)6.2 / 10Adequate✓ 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 6.2 / 10 · rule-coverage 100% · ceiling Documented

27 finding(s): 0 critical, 21 high, 6 medium, 0 low. 20 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 6 file(s) — `scripts/make-icon-sprite.mjs` (lines 18–46), `src/packs/dsh-x-workbench/home/skills/agent-browser/templates/authenticated-session.sh` (line 27), `src/packs/dsh-x-workbench/home/skills/agent-browser/templates/capture-workflow.sh` (line 16), `src/packs/dsh-x-workbench/home/skills/agent-browser/templates/form-automation.sh` (line 16), `src/public/environments-page.js`, … (+1 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 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 20 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 (20 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities8.8 / 10Adequategated by 2 critical findings✓ 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 8.8 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 2 high, 3 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-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 102 of the 124 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 / 10Exemplary✓ 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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.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 — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.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-Life10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 1 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.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified

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.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — plugins/dsh-x-aquarium/lib/mascot-part.js:20

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.0 / 10Adequate✓ Tool-verified

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

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

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

  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — plugins/dsh-x-context-menu/lib/client.js:953
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×8) — plugins/dsh-x-context-menu/lib/client.js:954, plugins/dsh-x-memory/lib/client.js:318, plugins/dsh-x-memory/lib/client.js:380, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — plugins/dsh-x-sync/lib/client.js:298

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 structure5.4 / 10Adequate✓ Tool-verified

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

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

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

  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — src/public/booting.html:130
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — src/public/mascot-preview.html:2, src/public/tab-window.html:2

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics3.5 / 10Weak✓ 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 role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — plugins/dsh-x-context-menu/lib/client.js:951

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 safety1.0 / 10Critical✓ 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.

  • `body` sets color: #d5d9e1 on background-color: #d9eaf7 — 1.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — wallpaper/wallpaper.css:4
  • `.internal-tabs.has-tabs .brand-home:hover` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:293
  • `.internal-tab:hover` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:328
  • `.launch-actions [data-stop-id], .instance-actions [data-stop-version]` sets color: #e5484d on background-color: #fff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:683
  • `.launch-enhance-tip` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:758
  • `.profile-pick .profile-pick-tool` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:876
  • `.select-option.more.active` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:1188
  • `#main.icon-btn.stop` sets color: #e11d48 on background-color: #fff1f2 — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:1526
  • `.remote-device-search` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:1914
  • `.connection-progress-status[data-state="connecting"]` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2035
  • `.connection-progress-status[data-state="waiting"]` sets color: #b7791f on background-color: #fff7e6 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2036
  • `.connection-progress-status[data-state="ready"]` sets color: #1f8a45 on background-color: #e8f8ee — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2039
  • `.connection-progress-step[data-status="done"] .connection-progress-step-icon` sets color: #1f8a45 on background-color: #e8f8ee — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2057
  • `.pack-actions .ghost.primary` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2411
  • `#pane-mcp .pane-top .action-icon` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2722
  • `#versionManageDialog .version-remove` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2920
  • `.launch-icon-trigger` sets color: #6b7d9c on background-color: #eaf1ff — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2947
  • `#launchDialog .launch-icon-choice[aria-pressed=true]` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — src/public/launcher.css:2954
  • `.internal-tab-list.dragging button:focus-visible` 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/public/launcher.css:389
  • `.launch-app-icon` 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/public/launcher.css:610
  • `.launch-app-icon[data-pointer-focus]` 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/public/launcher.css:613
  • `.connection-import-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/public/launcher.css:1847
  • `#connectionSshImportSearch:focus` 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/public/launcher.css:1850
  • `#pane-remote .remote-device-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/public/launcher.css:1916

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 composition10.0 / 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.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

M1 · Documentation (README)8.4 / 10Exemplary✓ 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 documentation0.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.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

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.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ 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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability0.0 / 10Critical✓ 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.

  • No logging call was found in the 126 Python, JavaScript/TypeScript production file(s) this check read across 10 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Adopt pino (or winston) and log at meaningful points in the services you run.
  • Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `REDACTED` 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`. — REDACTED:44

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.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.

What to do

  • Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
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.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:172

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ 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.

  • `readdirSync` in `listWorkspaces` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — plugins/dsh-x-memory/lib/index.js:275
  • `statSync` in `workspaceStats` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — plugins/dsh-x-memory/lib/index.js:293
  • `statSync` in `getFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — plugins/dsh-x-sync/lib/engine/sync.js:1038
  • `existsSync` in `readIndex` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — plugins/dsh-x-sync/lib/engine/sync.js:1121
  • `statSync` in `copyTimes` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — plugins/dsh-x-sync/lib/engine/sync.js:1257
  • `existsSync` in `buildAssets` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/update-flow-demo.mjs:44
  • `rmSync` in `buildAssets` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/update-flow-demo.mjs:45
  • `existsSync` in `prepareInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — scripts/update-flow-demo.mjs:99, scripts/update-flow-demo.mjs:111
  • `rmSync` in `prepareInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/update-flow-demo.mjs:100
  • `existsSync` in `callback to find` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/update-flow-demo.mjs:105
  • `spawnSync` in `prepareInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/update-flow-demo.mjs:107
  • `readFileSync` in `callback to listen` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/verify-tab-detach.mjs:64
  • `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×9) — scripts/verify-tab-detach.mjs:118, scripts/verify-tab-detach.mjs:179, scripts/verify-tab-detach.mjs:183, …
  • `existsSync` in `installCore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — shell/core-fetch.mjs:249
  • `rmSync` in `installCore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — shell/core-fetch.mjs:251, shell/core-fetch.mjs:255, shell/core-fetch.mjs:261, …
  • `mkdirSync` in `installCore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — shell/core-fetch.mjs:252
  • `renameSync` in `installCore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — shell/core-fetch.mjs:253, shell/core-fetch.mjs:258
  • `existsSync` in `callback to filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — shell/core-fetch.mjs:314
  • `readFileSync` in `downloadCoreTarball` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/core-npm.js:146
  • `mkdirSync` in `applyInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — src/packs.js:506, src/packs.js:562
  • `existsSync` in `applyInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/packs.js:511
  • `readFileSync` in `applyInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — src/packs.js:514, src/packs.js:557
  • `mkdirSync` in `withProfileLock` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/recovery.js:31
  • `openSync` in `withProfileLock` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/recovery.js:36
  • `unlinkSync` in `withProfileLock` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — src/recovery.js:42

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 363 plain JS — the untyped files are npm-package/lib/core.mjs, plugins/dsh-x-aquarium/index.js, plugins/dsh-x-aquarium/lib/mascot-part.js, plugins/dsh-x-aquarium/lib/panels-block.js, plugins/dsh-x-context-menu/lib/client.js, plugins/dsh-x-context-menu/lib/index.js (+357 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication4.3 / 10Weak✓ 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.

  • 23 duplicated blocks under the repository root have copies in at least two of the sibling directories plugins, scripts, shell, skills, src — 20 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 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 23 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. — plugins/dsh-x-sync/lib/engine/sync.js:21
  • 10 duplicated blocks under plugins/ have copies in at least two of the sibling directories dsh-x-context-menu, dsh-x-memory, dsh-x-sidebar-browser, dsh-x-sync — 9 of them are reported below, and 1 is 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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. — plugins/dsh-x-context-menu/lib/index.js:144
  • plugins/dsh-x-sync/lib/engine/sync.js:21 · src/sync.js:19 — these 2 files are line-for-line copies of one another — 1185 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — plugins/dsh-x-sync/lib/engine/sync.js:21
  • plugins/dsh-x-sync/lib/engine/zipfile.js:14 · src/zipfile.js:12 — these 2 files are line-for-line copies of one another — 254 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — plugins/dsh-x-sync/lib/engine/zipfile.js:14
  • plugins/dsh-x-sync/lib/engine/version.js:11 · src/version.js:16 — 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. — plugins/dsh-x-sync/lib/engine/version.js:11
  • plugins/dsh-x-context-menu/lib/index.js:144 · plugins/dsh-x-memory/lib/index.js:165 — 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. — plugins/dsh-x-context-menu/lib/index.js:144
  • skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1373 · src/skills.js:78 — 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. — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1373
  • plugins/dsh-x-memory/lib/index.js:65 · plugins/dsh-x-sync/lib/index.js:51 — 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. — plugins/dsh-x-memory/lib/index.js:65
  • plugins/dsh-x-memory/lib/index.js:444 · plugins/dsh-x-sync/lib/index.js:464 — 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. — plugins/dsh-x-memory/lib/index.js:444
  • shell/env.mjs:53 · src/server.js:4894 — 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. — shell/env.mjs:53
  • REDACTED:1067 · REDACTED:1117 — the two spans are one implementation copied and then locally edited — 141 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:1067
  • src/wsl.js:821 · src/wsl.js:856 — 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/wsl.js:821
  • plugins/dsh-x-aquarium/lib/mascot-part.js:57 · src/public/mascot.js:71 — 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. — plugins/dsh-x-aquarium/lib/mascot-part.js:57
  • plugins/dsh-x-aquarium/lib/mascot-part.js:158 · src/public/mascot.js:227 — 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. — plugins/dsh-x-aquarium/lib/mascot-part.js:158
  • src/mcp.js:629 · src/mcp.js:723 — the two spans are one implementation copied and then locally edited — 102 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/mcp.js:629
  • src/server.js:11005 · src/server.js:11034 — 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/server.js:11005
  • src/remote-core.js:216 · src/ssh-core.js:202 — 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/remote-core.js:216
  • src/repair-actions.js:499 · src/repair-actions.js:643 — the two spans are one implementation copied and then locally edited — 93 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/repair-actions.js:499
  • src/registry.js:420 · src/registry.js:436 — 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/registry.js:420
  • src/remote-profile.js:9 · src/remote-profile.js:36 — 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/remote-profile.js:9
  • src/server.js:7832 · src/server.js:7980 — 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/server.js:7832
  • plugins/dsh-x-aquarium/lib/mascot-part.js:109 · src/public/mascot.js:170 — 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. — plugins/dsh-x-aquarium/lib/mascot-part.js:109
  • plugins/dsh-x-memory/lib/client.js:403 · plugins/dsh-x-sync/lib/client.js:459 — 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. — plugins/dsh-x-memory/lib/client.js:403
  • plugins/dsh-x-memory/lib/index.js:334 · plugins/dsh-x-memory/lib/index.js:348 — 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. — plugins/dsh-x-memory/lib/index.js:334
  • plugins/dsh-x-memory/lib/index.js:390 · plugins/dsh-x-memory/lib/index.js:412 — 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. — plugins/dsh-x-memory/lib/index.js:390
  • src/filemanager-linux.js:7 · src/filemanager-mac.js:8 — 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/filemanager-linux.js:7
  • src/remote-core.js:185 · src/ssh-core.js:170 — 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/remote-core.js:185
  • src/remote-core.js:267 · src/ssh-core.js:285 — 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/remote-core.js:267
  • plugins/dsh-x-memory/lib/store.js:217 · plugins/dsh-x-memory/lib/store.js:246 — the two spans are one implementation copied and then locally edited — 68 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. — plugins/dsh-x-memory/lib/store.js:217
  • REDACTED:159 · REDACTED:186 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:159
  • src/server.js:10337 · src/server.js:10909 — 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/server.js:10337
  • src/skills.js:188 · src/skills.js:200 — the two spans are one implementation copied and then locally edited — 53 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/skills.js:188
  • plugins/dsh-x-aquarium/lib/mascot-part.js:126 · src/public/mascot.js:190 — 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. — plugins/dsh-x-aquarium/lib/mascot-part.js:126
  • plugins/dsh-x-context-menu/lib/client.js:994 · plugins/dsh-x-memory/lib/client.js:399 — 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. — plugins/dsh-x-context-menu/lib/client.js:994
  • plugins/dsh-x-memory/lib/index.js:368 · plugins/dsh-x-memory/lib/index.js:392 · plugins/dsh-x-memory/lib/index.js:414 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — plugins/dsh-x-memory/lib/index.js:368
  • plugins/dsh-x-memory/lib/tools.js:102 · plugins/dsh-x-memory/lib/tools.js:157 — 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. — plugins/dsh-x-memory/lib/tools.js:102
  • scripts/pack-mac.mjs:103 · scripts/pack.mjs:69 — 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. — scripts/pack-mac.mjs:103
  • shell/core-fetch.mjs:196 · src/core-npm.js:170 — 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. — shell/core-fetch.mjs:196
  • src/remote-core.js:286 · src/ssh-core.js:298 — 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/remote-core.js:286
  • src/server.js:5519 · src/server.js:5537 — 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/server.js:5519

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.
R11 · Import Boundaries0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • npm-package/lib/core.mjs:7 reaches into another package with a relative path (../../shell/core-fetch.mjs) — import the package by name instead. — npm-package/lib/core.mjs:7
  • scripts/verify-tab-detach.mjs:8 reaches into another package with a relative path (../shell/instance-views.mjs) — import the package by name instead. — scripts/verify-tab-detach.mjs:8
  • scripts/verify-tab-detach.mjs:9 reaches into another package with a relative path (../shell/instance-window.mjs) — import the package by name instead. — scripts/verify-tab-detach.mjs:9
  • scripts/verify-tab-detach.mjs:10 reaches into another package with a relative path (../shell/tabs.mjs) — import the package by name instead. — scripts/verify-tab-detach.mjs:10
  • scripts/verify-tab-detach.mjs:11 reaches into another package with a relative path (../shell/browser-guests.mjs) — import the package by name instead. — scripts/verify-tab-detach.mjs:11
  • scripts/verify-tab-detach.mjs:12 reaches into another package with a relative path (../shell/tab-detach.mjs) — import the package by name instead. — scripts/verify-tab-detach.mjs:12
  • scripts/verify-tab-detach.mjs:13 reaches into another package with a relative path (../shell/tab-drag-session.mjs) — import the package by name instead. — scripts/verify-tab-detach.mjs:13
  • scripts/verify-tab-detach.mjs:14 reaches into another package with a relative path (../shell/model.mjs) — import the package by name instead. — scripts/verify-tab-detach.mjs:14
  • scripts/verify-tab-groups.mjs:120 reaches into another package with a relative path (../shell/env.mjs) — import the package by name instead. — scripts/verify-tab-groups.mjs:120
  • scripts/verify-tab-groups.mjs:126 reaches into another package with a relative path (../REDACTED) — import the package by name instead. — scripts/verify-tab-groups.mjs:126
  • test/core-fetch.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../shell/core-fetch.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/core-fetch.test.mjs:6
  • test/core-recovery.test.mjs:9 reaches past another workspace package's public entry into its internals with a relative path (../shell/core-recovery.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/core-recovery.test.mjs:9
  • test/helpers/tab-drag-hosts.mjs:3 reaches past another workspace package's public entry into its internals with a relative path (../../shell/instance-views.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/helpers/tab-drag-hosts.mjs:3
  • test/helpers/tab-drag-hosts.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../../shell/tabs.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/helpers/tab-drag-hosts.mjs:4
  • test/helpers/tab-drag-hosts.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../../shell/instance-window.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/helpers/tab-drag-hosts.mjs:5
  • test/helpers/tab-drag-hosts.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/helpers/tab-drag-hosts.mjs:6
  • test/instance-views.test.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../shell/instance-views.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/instance-views.test.mjs:4
  • test/instance-views.test.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../shell/instance-window.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/instance-views.test.mjs:5
  • test/instance-views.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../shell/tabs.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/instance-views.test.mjs:6
  • test/instance-views.test.mjs:7 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-detach.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/instance-views.test.mjs:7
  • test/platform-launch.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../shell/relaunch.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/platform-launch.test.mjs:8
  • test/platform-launch.test.mjs:9 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-detach.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/platform-launch.test.mjs:9
  • test/quit-confirm.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/quit-confirm.test.mjs:10
  • test/shell-desktop.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/desktop.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-desktop.test.mjs:10
  • test/shell-model.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-model.test.mjs:10
  • test/shell-model.test.mjs:29 reaches past another workspace package's public entry into its internals with a relative path (../shell/pages.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-model.test.mjs:29
  • test/shell-prefs.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/prefs.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-prefs.test.mjs:10
  • test/shell-split.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../shell/pages.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-split.test.mjs:6
  • test/shell-window-recall.test.mjs:11 reaches past another workspace package's public entry into its internals with a relative path (../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-window-recall.test.mjs:11
  • test/shell-window-recovery.test.mjs:14 reaches past another workspace package's public entry into its internals with a relative path (../shell/instance-views.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-window-recovery.test.mjs:14
  • test/shell-window-recovery.test.mjs:15 reaches past another workspace package's public entry into its internals with a relative path (../shell/tabs.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/shell-window-recovery.test.mjs:15
  • test/system-prefs.test.mjs:11 reaches past another workspace package's public entry into its internals with a relative path (../shell/prefs.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/system-prefs.test.mjs:11
  • test/tab-detach.test.mjs:3 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-detach.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/tab-detach.test.mjs:3
  • test/tab-detach.test.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/tab-detach.test.mjs:4
  • test/tab-drag-regressions.test.mjs:7 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-drag-session.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/tab-drag-regressions.test.mjs:7
  • test/tab-drag-regressions.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-detach.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/tab-drag-regressions.test.mjs:8
  • test/tab-drag-regressions.test.mjs:9 reaches past another workspace package's public entry into its internals with a relative path (../shell/pages.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/tab-drag-regressions.test.mjs:9
  • test/tab-drag-regressions.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/tab-drag-regressions.test.mjs:10
  • test/tab-drag-session.test.mjs:3 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-drag-session.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/tab-drag-session.test.mjs:3
  • test/window-fade.test.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../shell/window-fade.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — test/window-fade.test.mjs:4

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity5.0 / 10Adequate✓ 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.

  • handleApi has cyclomatic complexity 719 and cognitive complexity 1116; 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/server.js:9940
  • saveLaunchPresetNow has cyclomatic complexity 124 and cognitive complexity 134; 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/server.js:2586
  • main has cyclomatic complexity 122 and cognitive complexity 193; 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/repair-probe.mjs:23
  • saveManagerSettings has cyclomatic complexity 95 and cognitive complexity 129; 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/server.js:4403
  • parseTabAction has cyclomatic complexity 83 and cognitive complexity 79; 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. — shell/model.mjs:205
  • buildRepairPresentation has cyclomatic complexity 73 and cognitive complexity 138; 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/repair-evidence.js:48
  • executeCommand has cyclomatic complexity 71 and cognitive complexity 86; 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. — plugins/dsh-x-sidebar-browser/client.js:619
  • updateInternalTabs has cyclomatic complexity 65 and cognitive complexity 68; 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/public/internal-tabs.js:372
  • (anonymous) has cyclomatic complexity 56 and cognitive complexity 57; 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/settings.js:818
  • readRuntimeEvidence has cyclomatic complexity 56 and cognitive complexity 53; 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/runtime-diagnostics.mjs:618
  • summarize has cyclomatic complexity 52 and cognitive complexity 77; 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/perf/plugin-profile.mjs:112
  • handler has cyclomatic complexity 46 and cognitive complexity 80; 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/server.js:11660
  • buildConfig has cyclomatic complexity 44 and cognitive complexity 65; 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/mcp.js:80
  • buildContext has cyclomatic complexity 44 and cognitive complexity 48; 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. — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:460
  • runConnectionPrepare has cyclomatic complexity 41 and cognitive complexity 56; 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/server.js:9657
  • parseActivation has cyclomatic complexity 40 and cognitive complexity 70; 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/startup-diagnosis.js:142
  • validateSettings has cyclomatic complexity 40 and cognitive complexity 52; 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. — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:605
  • SyncPanel has cyclomatic complexity 36 and cognitive complexity 40; 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. — plugins/dsh-x-sync/lib/client.js:225
  • saveSettingsNow has cyclomatic complexity 36 and cognitive complexity 40; 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/settings.js:1146
  • bootWslOnce has cyclomatic complexity 36 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/server.js:7899
  • runSync has cyclomatic complexity 35 and cognitive complexity 83; 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. (×2) — plugins/dsh-x-sync/lib/engine/sync.js:1824, src/sync.js:1822
  • (anonymous) has cyclomatic complexity 35 and cognitive complexity 48; 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/repair-actions.js:569
  • tick has cyclomatic complexity 35 and cognitive complexity 41; 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/public/mascot.js:158
  • startRemoteViaCore has cyclomatic complexity 35 and cognitive complexity 38; 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/server.js:8226
  • checkData has cyclomatic complexity 34 and cognitive complexity 83; 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. — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:881
  • parseManifest has cyclomatic complexity 33 and cognitive complexity 54; 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/packs.js:178
  • tick has cyclomatic complexity 33 and cognitive complexity 36; 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. — plugins/dsh-x-aquarium/lib/mascot-part.js:98
  • declaredService has cyclomatic complexity 33 and cognitive complexity 32; 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/configuration-evidence.js:92
  • validate has cyclomatic complexity 33 and cognitive complexity 31; 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. — plugins/dsh-x-sidebar-browser/index.js:184
  • report 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/startup-diagnosis.js:364
  • checkPlugins has cyclomatic complexity 31 and cognitive complexity 49; 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. — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1255
  • dependencyRemovalScope has cyclomatic complexity 31 and cognitive complexity 37; 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/repair-dependencies.js:246
  • startServer has cyclomatic complexity 30 and cognitive complexity 47; 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/server.js:11599
  • safeConnection has cyclomatic complexity 30 and cognitive complexity 36; 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/settings.js:441
  • inspectWslDistro has cyclomatic complexity 30 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/wsl.js:553
  • classify has cyclomatic complexity 29 and cognitive complexity 58; 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/packs.js:264
  • checkInstances has cyclomatic complexity 29 and cognitive complexity 43; 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. — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1165
  • saveConnectionFromBody has cyclomatic complexity 29 and cognitive complexity 32; 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/server.js:9421
  • exportEnvironmentNow has cyclomatic complexity 29 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/server.js:4085
R3 · Large Files2.4 / 10Weak✓ 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/server.js has 11383 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/server.js:1
  • plugins/dsh-x-sync/lib/engine/sync.js has 1899 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dsh-x-sync/lib/engine/sync.js:1
  • src/sync.js has 1897 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/sync.js:1
  • REDACTED has 1649 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • plugins/dsh-x-sidebar-browser/client.js has 1370 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dsh-x-sidebar-browser/client.js:1
  • src/settings.js has 1198 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/settings.js:1
  • plugins/dsh-x-context-menu/lib/client.js has 932 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dsh-x-context-menu/lib/client.js:1
  • src/environments.js has 898 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/environments.js:1
  • src/wsl.js has 830 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/wsl.js:1
  • src/mcp.js has 721 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/mcp.js:1
  • src/packs.js has 651 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/packs.js:1
  • src/runtime-diagnostics.mjs has 635 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/runtime-diagnostics.mjs:1
  • src/repair-actions.js has 634 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/repair-actions.js:1
  • src/public/environments-page.js has 620 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/public/environments-page.js:1
  • plugins/dsh-x-sidebar-browser/index.js has 558 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dsh-x-sidebar-browser/index.js:1
  • src/registry.js has 541 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/registry.js:1
  • src/public/internal-tabs.js has 514 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/public/internal-tabs.js:1
  • src/plugins.js 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/plugins.js:1
  • src/skills.js has 466 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/skills.js:1
  • plugins/dsh-x-sync/lib/index.js has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dsh-x-sync/lib/index.js:1
  • src/proxy.js has 462 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/proxy.js:1
  • plugins/dsh-x-sync/lib/client.js has 455 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dsh-x-sync/lib/client.js:1
  • src/environment-pack.js has 452 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/environment-pack.js:1
  • plugins/dsh-x-memory/lib/index.js has 430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — plugins/dsh-x-memory/lib/index.js:1
  • src/ssh-core.js has 429 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/ssh-core.js:1
  • src/startup-diagnosis.js has 424 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/startup-diagnosis.js:1

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×15) — src/repair-probe.mjs:1, src/public/mascot.js:1, plugins/dsh-x-aquarium/lib/mascot-part.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.9 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling3.4 / 10Weak✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✓ · lint ✗ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as REDACTED scripts and run them in CI.
R7 · Dead Code9.3 / 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 115 application, 29 tooling and 228 test entry point(s) detected in this repo. Nothing this repository declares compiles or type-checks these files, so a wrong deletion here would raise no compile error — gate removals on `npm test`, which loads the modules, and note that it only covers what it exercises. An undetected custom entry would make these reachable.
  • no import path from any entry point (115 application, 29 tooling, 228 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 (×4) — scripts/pack-mac.mjs, scripts/verify-tab-detach.mjs, plugins/dsh-x-aquarium/lib/mascot-part.js, …
  • Nothing imports this binding — it is safe to review for removal. (×3) — plugins/dsh-x-sync/lib/engine/zipfile.js:42, plugins/dsh-x-sync/lib/engine/zipfile.js:382, shell/model.mjs:15
  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×8) — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:30, skills/dsh-x-selfcheck/scripts/selfcheck.mjs:49, skills/dsh-x-selfcheck/scripts/selfcheck.mjs:349, …

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.0 / 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.

  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. — src/server.js:10368
  • Declared in REDACTED 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. — REDACTED:28
  • Declared in plugins/dsh-x-desktop-bundle/REDACTED 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. — plugins/dsh-x-desktop-bundle/REDACTED:34

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ 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.

X24 · Document value interpolated into markup unescaped5.0 / 10Adequate✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `inUse?`title="${escapeHtml(t('还有启动项在用,先给它们换一个实例'))}"`:''` is text this program did not author, and it is written into an unquoted attribute through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — src/public/environments-page.js:109
  • `[...environments.map((env)=>gridCardHtml({data:{environment:env.id},label:t('查看实例 {name} 的插件',{name:env.name}),tile:{…` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/public/environments-page.js:115
  • `packNotes(t('问题(先解决这些)'),data.errors||[],'warn')` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/public/environments-page.js:508
  • `packNotes(t('要注意'),data.warnings||[],'warn')` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/public/environments-page.js:514
  • `markup` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/public/launch-list.js:173
  • `html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/public/launch-list.js:233
  • `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. (×8) — src/public/mascot.js:19, src/public/mascot.js:20, src/public/mascot.js:22, …

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.

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 Health32.8Weak — gated by D1, D2, R1, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture66.6Adequate — gated by R11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity55.1Adequate — gated by D15, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness34.1Weak — gated by R6, P2, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security77.3Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility30.1Weak — gated by AC1, AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateStrongest area.
Unscored — 4 check(s) recorded observations but carry no score

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

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 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 — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • 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 — no public interfaces
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • 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 start`) kept running but served no page within 2 minutes. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> dsh-x@0.1.27-rc.3 start / > node src/start.js / 启动管理器 <repo> / DSH 管理器 http://127.0.0.1:3780/?token=<redacted> / dsh-versions: http://127.0.0.1:3780 / dsh-versions data: <repo>data / dsh-versions home: <path> / 打开地址失败,已跳过:http://127.0.0.1:3780/?token=<redacted> xdg-open ENOENT)" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • 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 — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed JavaScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — 2652 of 2676 comment blocks were not judged (2618 in a non-Latin script, 34 in a language other than English): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, 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) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D4 Code Duplication — Duplication not measured — .html not exposed to the token comparison
  • 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 — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • IC1 Incompleteness & stubs — IC1 reached only 0% of this repository's production lines — javascript (61,497 lines), python (451 lines), swift (94 lines), vbscript (7 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — 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 — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • 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.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — javascript (61,497 lines), python (451 lines), swift (94 lines), vbscript (7 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — X13 reached only 0% of this repository's production lines — javascript (61,497 lines), python (451 lines), swift (94 lines), vbscript (7 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 async method does work a token could cancel
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
  • 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
  • X29 Per-element action decided by a fixed element — 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 0% of this repository's production lines — javascript (61,497 lines), python (451 lines), swift (94 lines), vbscript (7 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X5 Nullable reference types — X5 reached only 0% of this repository's production lines — javascript (61,497 lines), python (451 lines), swift (94 lines), vbscript (7 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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 — 35 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
AC2 · Forms & labels · <input> without a programmatic label · ×5
  • <input> without a programmatic label plugins/dsh-x-context-menu/lib/client.js:954 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label plugins/dsh-x-memory/lib/client.js:380 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label plugins/dsh-x-memory/lib/client.js:385 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label plugins/dsh-x-memory/lib/client.js:390 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label plugins/dsh-x-sync/lib/client.js:298 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <select> without a programmatic label · ×4
  • <select> without a programmatic label plugins/dsh-x-memory/lib/client.js:318 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label plugins/dsh-x-sync/lib/client.js:339 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label plugins/dsh-x-sync/lib/client.js:425 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label plugins/dsh-x-sync/lib/client.js:446 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D30 · Dependency Vulnerabilities · High CVE · ×2
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative plugins/dsh-x-aquarium/lib/mascot-part.js:20 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels · <label> that labels no control · ×1
  • <label> that labels no control plugins/dsh-x-context-menu/lib/client.js:953 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'semver' · ×1
  • Unlisted import 'semver' src/server.js:10368 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Serious — 880 finding(s)
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking plugins/dsh-x-memory/lib/index.js:275 — `readdirSync` in `listWorkspaces` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking plugins/dsh-x-memory/lib/index.js:293 — `statSync` in `workspaceStats` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking plugins/dsh-x-sync/lib/engine/sync.js:1038 — `statSync` in `getFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking plugins/dsh-x-sync/lib/engine/sync.js:1121 — `existsSync` in `readIndex` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking plugins/dsh-x-sync/lib/engine/sync.js:1257 — `statSync` in `copyTimes` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/update-flow-demo.mjs:44 — `existsSync` in `buildAssets` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/update-flow-demo.mjs:45 — `rmSync` in `buildAssets` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/update-flow-demo.mjs:99 — `existsSync` in `prepareInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/update-flow-demo.mjs:100 — `rmSync` in `prepareInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/update-flow-demo.mjs:105 — `existsSync` in `callback to find` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/update-flow-demo.mjs:107 — `spawnSync` in `prepareInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/update-flow-demo.mjs:111 — `existsSync` in `prepareInstall` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-detach.mjs:64 — `readFileSync` in `callback to listen` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-detach.mjs:118 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-detach.mjs:179 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-detach.mjs:183 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-groups.mjs:113 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-groups.mjs:124 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-groups.mjs:149 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-groups.mjs:173 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-groups.mjs:259 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking scripts/verify-tab-groups.mjs:263 — `writeFileSync` in `run` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking shell/core-fetch.mjs:249 — `existsSync` in `installCore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking shell/core-fetch.mjs:251 — `rmSync` in `installCore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking shell/core-fetch.mjs:252 — `mkdirSync` in `installCore` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • + 15 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×40
  • Boundary violation [package:relative-cross-package] npm-package/lib/core.mjs:7 — npm-package/lib/core.mjs:7 reaches into another package with a relative path (../../shell/core-fetch.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-detach.mjs:8 — scripts/verify-tab-detach.mjs:8 reaches into another package with a relative path (../shell/instance-views.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-detach.mjs:9 — scripts/verify-tab-detach.mjs:9 reaches into another package with a relative path (../shell/instance-window.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-detach.mjs:10 — scripts/verify-tab-detach.mjs:10 reaches into another package with a relative path (../shell/tabs.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-detach.mjs:11 — scripts/verify-tab-detach.mjs:11 reaches into another package with a relative path (../shell/browser-guests.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-detach.mjs:12 — scripts/verify-tab-detach.mjs:12 reaches into another package with a relative path (../shell/tab-detach.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-detach.mjs:13 — scripts/verify-tab-detach.mjs:13 reaches into another package with a relative path (../shell/tab-drag-session.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-detach.mjs:14 — scripts/verify-tab-detach.mjs:14 reaches into another package with a relative path (../shell/model.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-groups.mjs:120 — scripts/verify-tab-groups.mjs:120 reaches into another package with a relative path (../shell/env.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] scripts/verify-tab-groups.mjs:126 — scripts/verify-tab-groups.mjs:126 reaches into another package with a relative path (../REDACTED) — import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/core-fetch.test.mjs:6 — test/core-fetch.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../shell/core-fetch.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/core-recovery.test.mjs:9 — test/core-recovery.test.mjs:9 reaches past another workspace package's public entry into its internals with a relative path (../shell/core-recovery.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/helpers/tab-drag-hosts.mjs:3 — test/helpers/tab-drag-hosts.mjs:3 reaches past another workspace package's public entry into its internals with a relative path (../../shell/instance-views.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/helpers/tab-drag-hosts.mjs:4 — test/helpers/tab-drag-hosts.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../../shell/tabs.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/helpers/tab-drag-hosts.mjs:5 — test/helpers/tab-drag-hosts.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../../shell/instance-window.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/helpers/tab-drag-hosts.mjs:6 — test/helpers/tab-drag-hosts.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/instance-views.test.mjs:4 — test/instance-views.test.mjs:4 reaches past another workspace package's public entry into its internals with a relative path (../shell/instance-views.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/instance-views.test.mjs:5 — test/instance-views.test.mjs:5 reaches past another workspace package's public entry into its internals with a relative path (../shell/instance-window.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/instance-views.test.mjs:6 — test/instance-views.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../shell/tabs.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/instance-views.test.mjs:7 — test/instance-views.test.mjs:7 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-detach.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/platform-launch.test.mjs:8 — test/platform-launch.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../shell/relaunch.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/platform-launch.test.mjs:9 — test/platform-launch.test.mjs:9 reaches past another workspace package's public entry into its internals with a relative path (../shell/tab-detach.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/quit-confirm.test.mjs:10 — test/quit-confirm.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/shell-desktop.test.mjs:10 — test/shell-desktop.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/desktop.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] test/shell-model.test.mjs:10 — test/shell-model.test.mjs:10 reaches past another workspace package's public entry into its internals with a relative path (../shell/model.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • + 15 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×20
  • Hotspot: src/server.js src/server.js:9940 — src/server.js changed 168 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 756 in server.handleApi at line 9940. 25 of those changes were fix/bug commits, and the other 143 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/server.js`: 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/public/index.html src/public/index.html:8966 — src/public/index.html changed 165 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 137 in index.html.paintLaunchHome at line 8966. 18 of those changes were fix/bug commits, and the other 147 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/public/index.html`: 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/settings.js src/settings.js:816 — src/settings.js changed 69 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in settings.safeLaunchPresets at line 816. 6 of those changes were fix/bug commits, and the other 63 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/settings.js`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:594 — REDACTED changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in main.start at line 594. 15 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: shell/model.mjs shell/model.mjs:205 — shell/model.mjs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in model.parseTabAction at line 205. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- shell/model.mjs`: 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/public/mascot.js src/public/mascot.js:158 — src/public/mascot.js changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in mascot.tick at line 158. 1 of those changes was a fix/bug commit, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/public/mascot.js`: 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/registry.js src/registry.js:485 — src/registry.js changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in registry.installSpec at line 485. 2 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/registry.js`: 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/wsl.js src/wsl.js:553 — src/wsl.js changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in wsl.inspectWslDistro at line 553. 5 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/wsl.js`: 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/public/internal-tabs.js src/public/internal-tabs.js:372 — src/public/internal-tabs.js changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in internal-tabs.updateInternalTabs at line 372. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/public/internal-tabs.js`: 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/perf/plugin-profile.mjs src/perf/plugin-profile.mjs:112 — src/perf/plugin-profile.mjs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in plugin-profile.summarize at line 112. 1 of those changes was a fix/bug commit, 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-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/perf/plugin-profile.mjs`: 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/sync.js src/sync.js:1822 — src/sync.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in sync.runSync at line 1822. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/sync.js`: 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/packs.js src/packs.js:493 — src/packs.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in packs.applyInstall at line 493. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/packs.js`: 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/public/environments-page.js src/public/environments-page.js:277 — src/public/environments-page.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in environments-page.renderView at line 277. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/public/environments-page.js`: 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: shell/updater.mjs shell/updater.mjs:36 — shell/updater.mjs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in updater.createUpdater at line 36. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- shell/updater.mjs`: 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/recovery.js src/recovery.js:195 — src/recovery.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in recovery.restoreProfileBackup at line 195. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/recovery.js`: 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/perf/patch-hooks.mjs src/perf/patch-hooks.mjs:32 — src/perf/patch-hooks.mjs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in patch-hooks.load at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/perf/patch-hooks.mjs`: 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: shell/tab-detach.mjs shell/tab-detach.mjs:120 — shell/tab-detach.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in TabDetacher.detach at line 120. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- shell/tab-detach.mjs`: 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/instance-link.js src/instance-link.js:56 — src/instance-link.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in instance-link.createInstanceLink.server at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- src/instance-link.js`: 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: docs/mascot.js docs/mascot.js:108 — docs/mascot.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in mascot.tick at line 108. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- docs/mascot.js`: 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: shell/instance-views.mjs shell/instance-views.mjs:101 — shell/instance-views.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in InstanceViews.transferView at line 101. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 18:31:49 +08:00' --until='2026-11-17 18:31:49 +08:00' --full-history --no-merges -- shell/instance-views.mjs`: 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.
D3 · God Classes · FunctionTooLong · ×17
  • FunctionTooLong: index.apply plugins/dsh-x-sidebar-browser/index.js:222 — FunctionTooLong — apply runs 281 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 181 over it, 2.81× 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: repair-probe.main src/repair-probe.mjs:23 — FunctionTooLong — main runs 256 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 156 over it, 2.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ssh.createSshBackend src/ssh.js:44 — FunctionTooLong — createSshBackend runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: tools.createTools plugins/dsh-x-memory/lib/tools.js:16 — FunctionTooLong — createTools runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.apply plugins/dsh-x-memory/lib/index.js:195 — FunctionTooLong — apply runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: mascot-part.startMascot plugins/dsh-x-aquarium/lib/mascot-part.js:19 — FunctionTooLong — startMascot runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.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: wsl.createWslBackend src/wsl.js:308 — FunctionTooLong — createWslBackend runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.html.listenEvents src/public/index.html:10254 — FunctionTooLong — listenEvents runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.html.paintRemoteSettings src/public/index.html:6130 — FunctionTooLong — paintRemoteSettings runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: zipfile.writeZip src/zipfile.js:210 — FunctionTooLong — writeZip 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: zipfile.writeZip plugins/dsh-x-sync/lib/engine/zipfile.js:212 — FunctionTooLong — writeZip 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: launch-list.sortable src/public/launch-list.js:30 — FunctionTooLong — sortable runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sync.runSync plugins/dsh-x-sync/lib/engine/sync.js:1824 — FunctionTooLong — runSync runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: sync.runSync src/sync.js:1822 — FunctionTooLong — runSync runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.apply plugins/dsh-x-sync/lib/index.js:339 — FunctionTooLong — apply runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× 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.html.renderRepairActionGroups src/public/index.html:3965 — FunctionTooLong — renderRepairActionGroups runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: startup-diagnosis.parseActivation src/startup-diagnosis.js:142 — FunctionTooLong — parseActivation runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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.
R4 · Test Coverage · No test reaches this file · ×15
  • No test reaches this file src/repair-probe.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/public/mascot.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/dsh-x-aquarium/lib/mascot-part.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/public/water.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file wallpaper/wallpaper.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/plugin-tool.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/compat/worker-events.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file wallpaper/spectrum.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/reserved-profile-boot.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/dsh-x-sync/scripts/sync-engine.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file wallpaper/intro.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/public/idle.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/repair-uninstall.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file plugins/dsh-x-aquarium/lib/panels-block.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file src/stdio-unblock.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×14
  • Untrusted text written into markup unescaped src/public/environments-page.js:109 — `inUse?`title="${escapeHtml(t('还有启动项在用,先给它们换一个实例'))}"`:''` is text this program did not author, and it is written into an unquoted attribute through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
  • Untrusted text written into markup unescaped src/public/environments-page.js:115 — `[...environments.map((env)=>gridCardHtml({data:{environment:env.id},label:t('查看实例 {name} 的插件',{name:env.name}),tile:{…` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/public/environments-page.js:508 — `packNotes(t('问题(先解决这些)'),data.errors||[],'warn')` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/public/environments-page.js:514 — `packNotes(t('要注意'),data.warnings||[],'warn')` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/public/launch-list.js:173 — `markup` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/public/launch-list.js:233 — `html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped src/public/mascot.js:19 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/public/mascot.js:20 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/public/mascot.js:22 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/public/mascot.js:23 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/public/mascot.js:25 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/public/mascot.js:26 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/public/mascot.js:29 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped src/public/mascot.js:30 — `assetRoot` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
D3 · God Classes · FileTooLong · ×11
  • FileTooLong: public/index.html src/public/index.html — FileTooLong — 8377 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7877 over it, 16.75× 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: src/server.js src/server.js — FileTooLong — 8060 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 7560 over it, 16.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: scripts/selfcheck.mjs skills/dsh-x-selfcheck/scripts/selfcheck.mjs — FileTooLong — 1427 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 927 over it, 2.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: engine/sync.js plugins/dsh-x-sync/lib/engine/sync.js — FileTooLong — 1314 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 814 over it, 2.63× 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: src/sync.js src/sync.js — FileTooLong — 1314 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 814 over it, 2.63× 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: REDACTED REDACTED — FileTooLong — 1110 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 610 over it, 2.22× 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: src/settings.js src/settings.js — FileTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 318 over it, 1.64× 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: src/wsl.js src/wsl.js — FileTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 135 over it, 1.27× 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: src/environments.js src/environments.js — FileTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 95 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/mcp.js src/mcp.js — FileTooLong — 531 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). 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.
  • FileTooLong: src/repair-actions.js src/repair-actions.js — FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 89% of them inside a single declaration: DiagnosticRepairs (79-659). The bar is 500 significant lines; this is 10 over it, 1.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×7
  • Duplicated block (13 lines × 2 locations) plugins/dsh-x-aquarium/lib/mascot-part.js:109 — plugins/dsh-x-aquarium/lib/mascot-part.js:109 · src/public/mascot.js:170 — 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 (13 lines × 2 locations) plugins/dsh-x-memory/lib/client.js:403 — plugins/dsh-x-memory/lib/client.js:403 · plugins/dsh-x-sync/lib/client.js:459 — 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) plugins/dsh-x-memory/lib/index.js:334 — plugins/dsh-x-memory/lib/index.js:334 · plugins/dsh-x-memory/lib/index.js:348 — 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) plugins/dsh-x-memory/lib/index.js:390 — plugins/dsh-x-memory/lib/index.js:390 · plugins/dsh-x-memory/lib/index.js:412 — 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/filemanager-linux.js:7 — src/filemanager-linux.js:7 · src/filemanager-mac.js:8 — 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/remote-core.js:185 — src/remote-core.js:185 · src/ssh-core.js:170 — 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/remote-core.js:267 — src/remote-core.js:267 · src/ssh-core.js:285 — 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 (11 lines × 2 locations) · ×7
  • Duplicated block (11 lines × 2 locations) plugins/dsh-x-aquarium/lib/mascot-part.js:126 — plugins/dsh-x-aquarium/lib/mascot-part.js:126 · src/public/mascot.js:190 — 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 (11 lines × 2 locations) plugins/dsh-x-context-menu/lib/client.js:994 — plugins/dsh-x-context-menu/lib/client.js:994 · plugins/dsh-x-memory/lib/client.js:399 — 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) plugins/dsh-x-memory/lib/tools.js:102 — plugins/dsh-x-memory/lib/tools.js:102 · plugins/dsh-x-memory/lib/tools.js:157 — 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 (11 lines × 2 locations) scripts/pack-mac.mjs:103 — scripts/pack-mac.mjs:103 · scripts/pack.mjs:69 — 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 (11 lines × 2 locations) shell/core-fetch.mjs:196 — shell/core-fetch.mjs:196 · src/core-npm.js:170 — 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/remote-core.js:286 — src/remote-core.js:286 · src/ssh-core.js:298 — 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 (11 lines × 2 locations) src/server.js:5519 — src/server.js:5519 · src/server.js:5537 — 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.1 · ×6
  • Low contrast colour pair in CSS (4.1:1) src/public/launcher.css:293 — `.internal-tabs.has-tabs .brand-home:hover` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.1:1) src/public/launcher.css:328 — `.internal-tab:hover` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.1:1) src/public/launcher.css:1188 — `.select-option.more.active` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.1:1) src/public/launcher.css:2035 — `.connection-progress-status[data-state="connecting"]` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.1:1) src/public/launcher.css:2411 — `.pack-actions .ghost.primary` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.1:1) src/public/launcher.css:2954 — `#launchDialog .launch-icon-choice[aria-pressed=true]` sets color: #3b6fe0 on background-color: #eaf1ff — 4.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×6
  • Focus outline removed in CSS without a :focus replacement src/public/launcher.css:389 — `.internal-tab-list.dragging button:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/public/launcher.css:610 — `.launch-app-icon` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/public/launcher.css:613 — `.launch-app-icon[data-pointer-focus]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/public/launcher.css:1847 — `.connection-import-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/public/launcher.css:1850 — `#connectionSshImportSearch:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement src/public/launcher.css:1916 — `#pane-remote .remote-device-search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.2 · ×5
  • Low contrast colour pair in CSS (4.2:1) src/public/launcher.css:758 — `.launch-enhance-tip` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.2:1) src/public/launcher.css:876 — `.profile-pick .profile-pick-tool` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.2:1) src/public/launcher.css:1914 — `.remote-device-search` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.2:1) src/public/launcher.css:2722 — `#pane-mcp .pane-top .action-icon` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.2:1) src/public/launcher.css:2920 — `#versionManageDialog .version-remove` sets color: #6b7d9c on background-color: #fff — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×5
  • JavaScript dependencies are not locked REDACTED:26 — REDACTED declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / 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.
  • JavaScript dependencies are not locked plugins/dsh-x-context-menu/REDACTED:73 — plugins/dsh-x-context-menu/REDACTED declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / 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.
  • JavaScript dependencies are not locked plugins/dsh-x-desktop-bundle/REDACTED:33 — plugins/dsh-x-desktop-bundle/REDACTED declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / 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.
  • JavaScript dependencies are not locked plugins/dsh-x-memory/REDACTED:69 — plugins/dsh-x-memory/REDACTED declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / 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.
  • JavaScript dependencies are not locked plugins/dsh-x-sync/REDACTED:71 — plugins/dsh-x-sync/REDACTED declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / pnpm-lock.yaml / 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×3
  • Duplicated block (16 lines × 2 locations) plugins/dsh-x-aquarium/lib/mascot-part.js:57 — plugins/dsh-x-aquarium/lib/mascot-part.js:57 · src/public/mascot.js:71 — 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 (16 lines × 2 locations) plugins/dsh-x-aquarium/lib/mascot-part.js:158 — plugins/dsh-x-aquarium/lib/mascot-part.js:158 · src/public/mascot.js:227 — 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 (16 lines × 2 locations) src/server.js:11005 — src/server.js:11005 · src/server.js:11034 — 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 (14 lines × 2 locations) · ×3
  • Duplicated block (14 lines × 2 locations) src/registry.js:420 — src/registry.js:420 · src/registry.js:436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2 locations) src/remote-profile.js:9 — src/remote-profile.js:9 · src/remote-profile.js:36 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 2 locations) src/server.js:7832 — src/server.js:7832 · src/server.js:7980 — 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) plugins/dsh-x-memory/lib/store.js:217 — plugins/dsh-x-memory/lib/store.js:217 · plugins/dsh-x-memory/lib/store.js:246 — the two spans are one implementation copied and then locally edited — 68 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) REDACTED:159 — REDACTED:159 · REDACTED:186 — the two spans are one implementation copied and then locally edited — 51 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/skills.js:188 — src/skills.js:188 · src/skills.js:200 — the two spans are one implementation copied and then locally edited — 53 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.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark src/public/mascot-preview.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark src/public/tab-window.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.0 · ×2
  • Low contrast colour pair in CSS (4.0:1) src/public/launcher.css:2039 — `.connection-progress-status[data-state="ready"]` sets color: #1f8a45 on background-color: #e8f8ee — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.0:1) src/public/launcher.css:2057 — `.connection-progress-step[data-status="done"] .connection-progress-step-icon` sets color: #1f8a45 on background-color: #e8f8ee — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · sync.runSync (cyclomatic 39) · ×2
  • sync.runSync (cyclomatic 39) plugins/dsh-x-sync/lib/engine/sync.js:1824 — sync.runSync has cyclomatic complexity 39 (threshold 15). Of this number, 35 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • sync.runSync (cyclomatic 39) src/sync.js:1822 — sync.runSync has cyclomatic complexity 39 (threshold 15). Of this number, 35 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createStartupDiagnosis · ×2
  • createStartupDiagnosis::report (cyclomatic 32) src/startup-diagnosis.js:364 — createStartupDiagnosis::report 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.
  • createStartupDiagnosis::addLine (cyclomatic 16) src/startup-diagnosis.js:328 — createStartupDiagnosis::addLine has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · apply (cyclomatic 28) · ×2
  • apply (cyclomatic 28) plugins/dsh-x-sync/lib/index.js:339 — apply has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 19 function items inside it that branch (runJob, handler, handler, …). 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.
  • apply (cyclomatic 28) plugins/dsh-x-desktop-notify/lib/index.js:79 — apply has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 121, a function literal at line 154, send, …). 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 · mergeManifests (cyclomatic 24) · ×2
  • mergeManifests (cyclomatic 24) plugins/dsh-x-sync/lib/engine/sync.js:1969 — mergeManifests has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • mergeManifests (cyclomatic 24) src/sync.js:1967 — mergeManifests has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · writeZip (cyclomatic 24) · ×2
  • writeZip (cyclomatic 24) src/zipfile.js:210 — writeZip has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • writeZip (cyclomatic 24) plugins/dsh-x-sync/lib/engine/zipfile.js:212 — writeZip has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 12 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · safeS3Config (cyclomatic 23) · ×2
  • safeS3Config (cyclomatic 23) plugins/dsh-x-sync/lib/engine/sync.js:81 — safeS3Config has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • safeS3Config (cyclomatic 23) src/sync.js:79 — safeS3Config has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mergeProfileManifest (cyclomatic 21) · ×2
  • mergeProfileManifest (cyclomatic 21) plugins/dsh-x-sync/lib/engine/sync.js:1702 — mergeProfileManifest has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • mergeProfileManifest (cyclomatic 21) src/sync.js:1700 — mergeProfileManifest has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · zipfile.readZipIndex (cyclomatic 17) · ×2
  • zipfile.readZipIndex (cyclomatic 17) plugins/dsh-x-sync/lib/engine/zipfile.js:94 — zipfile.readZipIndex 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.
  • zipfile.readZipIndex (cyclomatic 17) src/zipfile.js:92 — zipfile.readZipIndex has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · runSync (cognitive 92) · ×2
  • runSync (cognitive 92) plugins/dsh-x-sync/lib/engine/sync.js:1824 — runSync has cognitive complexity 92 (threshold 15). Drivers by points: ternaries 10 (39 pts), if/else 13 (31 pts), loops 5 (10 pts), boolean chains 9, error handling 1 (3 pts) (nesting depth added 54). Of this number, 83 points are the body's own statements and 9 belong to 13 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • runSync (cognitive 92) src/sync.js:1822 — runSync has cognitive complexity 92 (threshold 15). Drivers by points: ternaries 10 (39 pts), if/else 13 (31 pts), loops 5 (10 pts), boolean chains 9, error handling 1 (3 pts) (nesting depth added 54). Of this number, 83 points are the body's own statements and 9 belong to 13 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · writeZip (cognitive 47) · ×2
  • writeZip (cognitive 47) src/zipfile.js:210 — writeZip has cognitive complexity 47 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 8 (15 pts), error handling 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 22). Of this number, 45 points are the body's own statements and 2 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • writeZip (cognitive 47) plugins/dsh-x-sync/lib/engine/zipfile.js:212 — writeZip has cognitive complexity 47 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 8 (15 pts), error handling 3 (8 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 22). Of this number, 45 points are the body's own statements and 2 belong to 12 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.planSync (cognitive 40) · ×2
  • sync.planSync (cognitive 40) plugins/dsh-x-sync/lib/engine/sync.js:1581 — sync.planSync has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 4 (18 pts), if/else 8 (16 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • sync.planSync (cognitive 40) src/sync.js:1579 — sync.planSync has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 4 (18 pts), if/else 8 (16 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · mergeManifests (cognitive 26) · ×2
  • mergeManifests (cognitive 26) plugins/dsh-x-sync/lib/engine/sync.js:1969 — mergeManifests has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, ternaries 2 (4 pts), loops 3, other 2, 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.
  • mergeManifests (cognitive 26) src/sync.js:1967 — mergeManifests has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, ternaries 2 (4 pts), loops 3, other 2, 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.
D2 · Cognitive Complexity · mergeProfileManifest (cognitive 24) · ×2
  • mergeProfileManifest (cognitive 24) plugins/dsh-x-sync/lib/engine/sync.js:1702 — mergeProfileManifest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), other 8, ternaries 3, loops 2 (nesting depth added 4). Of this number, 22 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • mergeProfileManifest (cognitive 24) src/sync.js:1700 — mergeProfileManifest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), other 8, ternaries 3, loops 2 (nesting depth added 4). Of this number, 22 points are the body's own statements and 2 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · zipfile.readZipIndex (cognitive 21) · ×2
  • zipfile.readZipIndex (cognitive 21) plugins/dsh-x-sync/lib/engine/zipfile.js:94 — zipfile.readZipIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • zipfile.readZipIndex (cognitive 21) src/zipfile.js:92 — zipfile.readZipIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safeS3Config (cognitive 21) · ×2
  • safeS3Config (cognitive 21) plugins/dsh-x-sync/lib/engine/sync.js:81 — safeS3Config has cognitive complexity 21 (threshold 15). Drivers by points: other 7, boolean chains 5, ternaries 5, if/else 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.
  • safeS3Config (cognitive 21) src/sync.js:79 — safeS3Config has cognitive complexity 21 (threshold 15). Drivers by points: other 7, boolean chains 5, ternaries 5, if/else 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 · version.cmpPre (cognitive 20) · ×2
  • version.cmpPre (cognitive 20) plugins/dsh-x-sync/lib/engine/version.js:30 — version.cmpPre has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • version.cmpPre (cognitive 20) src/version.js:35 — version.cmpPre has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · list (cognitive 17) · ×2
  • list (cognitive 17) plugins/dsh-x-sync/lib/engine/sync.js:844 — list has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1, other 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.
  • list (cognitive 17) src/sync.js:842 — list has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1, other 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 · sync.scanLocal (cognitive 16) · ×2
  • sync.scanLocal (cognitive 16) plugins/dsh-x-sync/lib/engine/sync.js:1536 — sync.scanLocal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), error handling 1 (4 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.
  • sync.scanLocal (cognitive 16) src/sync.js:1534 — sync.scanLocal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), error handling 1 (4 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.
D3 · God Classes · MethodTooLong · ×2
  • MethodTooLong: DiagnosticRepairs.execute src/repair-actions.js:360 — MethodTooLong — execute runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DiagnosticRepairs.rollback src/repair-actions.js:526 — MethodTooLong — rollback runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: FileManager (LCOM4 5) src/filemanager-base.js:26 — FileManager's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Node (LCOM4 4) test/helpers/internal-tabs-dom.mjs:10 — Node's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×2
  • Duplicated block (23 lines × 2 locations) plugins/dsh-x-memory/lib/index.js:65 — plugins/dsh-x-memory/lib/index.js:65 · plugins/dsh-x-sync/lib/index.js:51 — 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 (23 lines × 2 locations) plugins/dsh-x-memory/lib/index.js:444 — plugins/dsh-x-memory/lib/index.js:444 · plugins/dsh-x-sync/lib/index.js:464 — 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.
R2 · Cyclomatic Complexity · Complex function runSync (cyclomatic 35, cognitive 83) · ×2
  • Complex function runSync (cyclomatic 35, cognitive 83) plugins/dsh-x-sync/lib/engine/sync.js:1824 — runSync has cyclomatic complexity 35 and cognitive complexity 83; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function runSync (cyclomatic 35, cognitive 83) src/sync.js:1822 — runSync has cyclomatic complexity 35 and cognitive complexity 83; 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.
AC3 · Page structure · Empty <h1> heading · ×1
  • Empty <h1> heading src/public/booting.html:130 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus plugins/dsh-x-context-menu/lib/client.js:951 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.1 · ×1
  • Low contrast colour pair in CSS (1.1:1) wallpaper/wallpaper.css:4 — `body` sets color: #d5d9e1 on background-color: #d9eaf7 — 1.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.9 · ×1
  • Low contrast colour pair in CSS (3.9:1) src/public/launcher.css:683 — `.launch-actions [data-stop-id], .instance-actions [data-stop-version]` sets color: #e5484d on background-color: #fff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.3 · ×1
  • Low contrast colour pair in CSS (4.3:1) src/public/launcher.css:1526 — `#main.icon-btn.stop` sets color: #e11d48 on background-color: #fff1f2 — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.4 · ×1
  • Low contrast colour pair in CSS (3.4:1) src/public/launcher.css:2036 — `.connection-progress-status[data-state="waiting"]` sets color: #b7791f on background-color: #fff7e6 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.7 · ×1
  • Low contrast colour pair in CSS (3.7:1) src/public/launcher.css:2947 — `.launch-icon-trigger` sets color: #6b7d9c on background-color: #eaf1ff — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · handleApi (cyclomatic 765) · ×1
  • handleApi (cyclomatic 765) src/server.js:9940 — handleApi has cyclomatic complexity 765 (threshold 15). Of this number, 719 points are the body's own statements and 46 belong to 61 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · saveLaunchPresetNow (cyclomatic 159) · ×1
  • saveLaunchPresetNow (cyclomatic 159) src/server.js:2586 — saveLaunchPresetNow has cyclomatic complexity 159 (threshold 15). Of this number, 124 points are the body's own statements and 35 belong to 13 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 · factory.apply (cyclomatic 157) · ×1
  • factory.apply (cyclomatic 157) plugins/dsh-x-context-menu/lib/client.js:310 — factory.apply has cyclomatic complexity 157 (threshold 15). Most of this is not in the body itself: 1 of the 157 points is its own statement and the rest belongs to 116 function items inside it that branch (renameSession, buildSessionItems, buildMenu, …). 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 · main (cyclomatic 141) · ×1
  • main (cyclomatic 141) src/repair-probe.mjs:23 — main has cyclomatic complexity 141 (threshold 15). Of this number, 122 points are the body's own statements and 19 belong to 33 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.paintLaunchHome (cyclomatic 137) · ×1
  • index.html.paintLaunchHome (cyclomatic 137) src/public/index.html:8966 — index.html.paintLaunchHome has cyclomatic complexity 137 (threshold 15). Most of this is not in the body itself: 10 of the 137 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 8971, 9043, 9042, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · model.parseTabAction (cyclomatic 97) · ×1
  • model.parseTabAction (cyclomatic 97) shell/model.mjs:205 — model.parseTabAction has cyclomatic complexity 97 (threshold 15). Of this number, 91 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.saveManagerSettings (cyclomatic 95) · ×1
  • server.saveManagerSettings (cyclomatic 95) src/server.js:4403 — server.saveManagerSettings has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent 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 · buildRepairPresentation (cyclomatic 89) · ×1
  • buildRepairPresentation (cyclomatic 89) src/repair-evidence.js:48 — buildRepairPresentation has cyclomatic complexity 89 (threshold 15). Of this number, 73 points are the body's own statements and 16 belong to 28 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 · index.html.applyState (cyclomatic 78) · ×1
  • index.html.applyState (cyclomatic 78) src/public/index.html:10149 — index.html.applyState has cyclomatic complexity 78 (threshold 15). Of this number, 76 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · runtime-diagnostics.readRuntimeEvidence (cyclomatic 78) · ×1
  • runtime-diagnostics.readRuntimeEvidence (cyclomatic 78) src/runtime-diagnostics.mjs:618 — runtime-diagnostics.readRuntimeEvidence has cyclomatic complexity 78 (threshold 15). Of this number, 61 points are the body's own statements and 17 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.flushSettings (cyclomatic 75) · ×1
  • index.html.flushSettings (cyclomatic 75) src/public/index.html:11523 — index.html.flushSettings has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent 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 · renameProfile (cyclomatic 71) · ×1
  • renameProfile (cyclomatic 71) src/server.js:8697 — renameProfile has cyclomatic complexity 71 (threshold 15). Of this number, 17 points are the body's own statements and 54 belong to 20 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · factory.executeCommand (cyclomatic 71) · ×1
  • factory.executeCommand (cyclomatic 71) plugins/dsh-x-sidebar-browser/client.js:619 — factory.executeCommand has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent 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 · factory.SyncPanel (cyclomatic 71) · ×1
  • factory.SyncPanel (cyclomatic 71) plugins/dsh-x-sync/lib/client.js:225 — factory.SyncPanel has cyclomatic complexity 71 (threshold 15). Of this number, 36 points are the body's own statements and 35 belong to 27 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 · internal-tabs.updateInternalTabs (cyclomatic 69) · ×1
  • internal-tabs.updateInternalTabs (cyclomatic 69) src/public/internal-tabs.js:372 — internal-tabs.updateInternalTabs has cyclomatic complexity 69 (threshold 15). Of this number, 64 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.fillSettings (cyclomatic 68) · ×1
  • index.html.fillSettings (cyclomatic 68) src/public/index.html:11371 — index.html.fillSettings has cyclomatic complexity 68 (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 · index.html.paintRemoteSettings (cyclomatic 66) · ×1
  • index.html.paintRemoteSettings (cyclomatic 66) src/public/index.html:6130 — index.html.paintRemoteSettings has cyclomatic complexity 66 (threshold 15). Of this number, 26 points are the body's own statements and 40 belong to 10 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cancelTabDrag · ×1
  • cancelTabDrag::updateInternalTabs (cyclomatic 65) src/public/internal-tabs.js:372 — cancelTabDrag::updateInternalTabs has cyclomatic complexity 65 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.prepareGuidedLaunch (cyclomatic 64) · ×1
  • index.html.prepareGuidedLaunch (cyclomatic 64) src/public/index.html:8028 — index.html.prepareGuidedLaunch has cyclomatic complexity 64 (threshold 15). Of this number, 56 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.listenEvents (cyclomatic 61) · ×1
  • index.html.listenEvents (cyclomatic 61) src/public/index.html:10254 — index.html.listenEvents has cyclomatic complexity 61 (threshold 15). Most of this is not in the body itself: 1 of the 61 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 10316, 10370, 10267, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · safeLaunchPresets (cyclomatic 60) · ×1
  • safeLaunchPresets (cyclomatic 60) src/settings.js:816 — safeLaunchPresets has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 5 of the 60 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 818, 894, 897). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · apply (cyclomatic 60) · ×1
  • apply (cyclomatic 60) plugins/dsh-x-memory/lib/index.js:195 — apply has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 2 of the 60 points are its own statements and the rest belongs to 36 function items inside it that branch ((anonymous)::text, storeForPanel, handler, …). 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 · launch-list.sortable (cyclomatic 59) · ×1
  • launch-list.sortable (cyclomatic 59) src/public/launch-list.js:30 — launch-list.sortable has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 1 of the 59 points is its own statement and the rest belongs to 17 function items inside it that branch (a function literal at line 118, a function literal at line 152, a function literal at line 104, …). 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 · DiagnosticRepairs.rollback (cyclomatic 59) · ×1
  • DiagnosticRepairs.rollback (cyclomatic 59) src/repair-actions.js:526 — DiagnosticRepairs.rollback has cyclomatic complexity 59 (threshold 15). Of this number, 25 points are the body's own statements and 34 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.paintGuideTarget (cyclomatic 57) · ×1
  • index.html.paintGuideTarget (cyclomatic 57) src/public/index.html:6698 — index.html.paintGuideTarget has cyclomatic complexity 57 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · factory.MemoryPanel (cyclomatic 55) · ×1
  • factory.MemoryPanel (cyclomatic 55) plugins/dsh-x-memory/lib/client.js:151 — factory.MemoryPanel has cyclomatic complexity 55 (threshold 15). Of this number, 19 points are the body's own statements and 36 belong to 30 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 · DiagnosticRepairs.execute (cyclomatic 54) · ×1
  • DiagnosticRepairs.execute (cyclomatic 54) src/repair-actions.js:360 — DiagnosticRepairs.execute has cyclomatic complexity 54 (threshold 15). Of this number, 16 points are the body's own statements and 38 belong to 5 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 · snapshot (cyclomatic 54) · ×1
  • snapshot (cyclomatic 54) src/runtime-diagnostics.mjs:359 — snapshot has cyclomatic complexity 54 (threshold 15). Of this number, 25 points are the body's own statements and 29 belong to 17 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.renderPackView (cyclomatic 53) · ×1
  • index.html.renderPackView (cyclomatic 53) src/public/index.html:12696 — index.html.renderPackView has cyclomatic complexity 53 (threshold 15). Of this number, 31 points are the body's own statements and 22 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.prepareGuidedLaunchRemote (cyclomatic 52) · ×1
  • index.html.prepareGuidedLaunchRemote (cyclomatic 52) src/public/index.html:7947 — index.html.prepareGuidedLaunchRemote has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent 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.html.render (cyclomatic 51) · ×1
  • index.html.render (cyclomatic 51) src/public/index.html:9860 — index.html.render has cyclomatic complexity 51 (threshold 15). Of this number, 47 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.renderRepairActionGroups (cyclomatic 50) · ×1
  • index.html.renderRepairActionGroups (cyclomatic 50) src/public/index.html:3965 — index.html.renderRepairActionGroups has cyclomatic complexity 50 (threshold 15). Of this number, 41 points are the body's own statements and 9 belong to 5 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 · index.html.paintVersionManager (cyclomatic 48) · ×1
  • index.html.paintVersionManager (cyclomatic 48) src/public/index.html:9421 — index.html.paintVersionManager has cyclomatic complexity 48 (threshold 15). Of this number, 38 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · startServer · ×1
  • startServer::handler (cyclomatic 46) src/server.js:11660 — startServer::handler has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent 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 · selfcheck.buildContext (cyclomatic 44) · ×1
  • selfcheck.buildContext (cyclomatic 44) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:460 — selfcheck.buildContext has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.renderPackInspect (cyclomatic 44) · ×1
  • index.html.renderPackInspect (cyclomatic 44) src/public/index.html:12987 — index.html.renderPackInspect has cyclomatic complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · DiagnosticRepairs.inspect (cyclomatic 44) · ×1
  • DiagnosticRepairs.inspect (cyclomatic 44) src/repair-actions.js:186 — DiagnosticRepairs.inspect has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 12 of the 44 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 199, 228, 243, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · runConnectionPrepare (cyclomatic 44) · ×1
  • runConnectionPrepare (cyclomatic 44) src/server.js:9657 — runConnectionPrepare has cyclomatic complexity 44 (threshold 15). Of this number, 41 points are the body's own statements and 3 belong to 9 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · buildConfig (cyclomatic 44) · ×1
  • buildConfig (cyclomatic 44) src/mcp.js:80 — buildConfig has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parseActivation (cyclomatic 43) · ×1
  • parseActivation (cyclomatic 43) src/startup-diagnosis.js:142 — parseActivation has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selfcheck.validateSettings (cyclomatic 42) · ×1
  • selfcheck.validateSettings (cyclomatic 42) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:605 — selfcheck.validateSettings has cyclomatic complexity 42 (threshold 15). Of this number, 40 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.showRepairHistory (cyclomatic 42) · ×1
  • index.html.showRepairHistory (cyclomatic 42) src/public/index.html:4293 — index.html.showRepairHistory has cyclomatic complexity 42 (threshold 15). Of this number, 35 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · factory.pageSnapshot (cyclomatic 41) · ×1
  • factory.pageSnapshot (cyclomatic 41) plugins/dsh-x-sidebar-browser/client.js:40 — factory.pageSnapshot has cyclomatic complexity 41 (threshold 15). Of this number, 28 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.paintPickerHomes (cyclomatic 40) · ×1
  • index.html.paintPickerHomes (cyclomatic 40) src/public/index.html:7173 — index.html.paintPickerHomes has cyclomatic complexity 40 (threshold 15). Of this number, 25 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · index.html.renderLaunchReport (cyclomatic 40) · ×1
  • index.html.renderLaunchReport (cyclomatic 40) src/public/index.html:8480 — index.html.renderLaunchReport has cyclomatic complexity 40 (threshold 15). Of this number, 16 points are the body's own statements and 24 belong to 13 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.launchFormEl.onsubmit (cyclomatic 40) · ×1
  • index.html.launchFormEl.onsubmit (cyclomatic 40) src/public/index.html:9765 — index.html.launchFormEl.onsubmit has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createTools (cyclomatic 40) · ×1
  • createTools (cyclomatic 40) plugins/dsh-x-memory/lib/tools.js:16 — createTools has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 23 function items inside it that branch (a function literal at line 209, a function literal at line 245, a function literal at line 282, …). 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.html.renderConnectionProgress (cyclomatic 39) · ×1
  • index.html.renderConnectionProgress (cyclomatic 39) src/public/index.html:5595 — index.html.renderConnectionProgress has cyclomatic complexity 39 (threshold 15). Of this number, 32 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · selfcheck.checkInstances (cyclomatic 38) · ×1
  • selfcheck.checkInstances (cyclomatic 38) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1165 — selfcheck.checkInstances has cyclomatic complexity 38 (threshold 15). Of this number, 30 points are the body's own statements and 8 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 · DiagnosticRepairs.preview (cyclomatic 37) · ×1
  • DiagnosticRepairs.preview (cyclomatic 37) src/repair-actions.js:252 — DiagnosticRepairs.preview has cyclomatic complexity 37 (threshold 15). Of this number, 28 points are the body's own statements and 9 belong to 3 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 · server.startRemoteViaCore (cyclomatic 36) · ×1
  • server.startRemoteViaCore (cyclomatic 36) src/server.js:8226 — server.startRemoteViaCore has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bootWslOnce (cyclomatic 36) · ×1
  • bootWslOnce (cyclomatic 36) src/server.js:7899 — bootWslOnce has cyclomatic complexity 36 (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 · saveSettingsNow (cyclomatic 36) · ×1
  • saveSettingsNow (cyclomatic 36) src/settings.js:1146 — saveSettingsNow has cyclomatic complexity 36 (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 · selfcheck.checkData (cyclomatic 35) · ×1
  • selfcheck.checkData (cyclomatic 35) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:881 — selfcheck.checkData has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.showAsk (cyclomatic 35) · ×1
  • index.html.showAsk (cyclomatic 35) src/public/index.html:10853 — index.html.showAsk has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 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 · mascot.tick (cyclomatic 35) · ×1
  • mascot.tick (cyclomatic 35) src/public/mascot.js:158 — mascot.tick has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · startup-diagnosis.createStartupDiagnosis.report (cyclomatic 35) · ×1
  • startup-diagnosis.createStartupDiagnosis.report (cyclomatic 35) src/startup-diagnosis.js:364 — startup-diagnosis.createStartupDiagnosis.report has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 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 · configuration-evidence.declaredService (cyclomatic 34) · ×1
  • configuration-evidence.declaredService (cyclomatic 34) src/configuration-evidence.js:92 — configuration-evidence.declaredService has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · startTabDrag (cyclomatic 34) · ×1
  • startTabDrag (cyclomatic 34) REDACTED:981 — startTabDrag has cyclomatic complexity 34 (threshold 15). Of this number, 17 points are the body's own statements and 17 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mascot-part.startMascot · ×1
  • mascot-part.startMascot::tick (cyclomatic 33) plugins/dsh-x-aquarium/lib/mascot-part.js:98 — mascot-part.startMascot::tick has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.validate (cyclomatic 33) · ×1
  • index.validate (cyclomatic 33) plugins/dsh-x-sidebar-browser/index.js:184 — index.validate has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · packs.parseManifest (cyclomatic 33) · ×1
  • packs.parseManifest (cyclomatic 33) src/packs.js:178 — packs.parseManifest has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selfcheck.checkPlugins (cyclomatic 33) · ×1
  • selfcheck.checkPlugins (cyclomatic 33) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1255 — selfcheck.checkPlugins has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.showRepairCards (cyclomatic 33) · ×1
  • index.html.showRepairCards (cyclomatic 33) src/public/index.html:4097 — index.html.showRepairCards has cyclomatic complexity 33 (threshold 15). Of this number, 30 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 · index.html.handlePrepareUpdate (cyclomatic 33) · ×1
  • index.html.handlePrepareUpdate (cyclomatic 33) src/public/index.html:5694 — index.html.handlePrepareUpdate has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.selectPickerHome (cyclomatic 33) · ×1
  • index.html.selectPickerHome (cyclomatic 33) src/public/index.html:7462 — index.html.selectPickerHome has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · server.stop (cyclomatic 33) · ×1
  • server.stop (cyclomatic 33) src/server.js:9203 — server.stop has cyclomatic complexity 33 (threshold 15). Of this number, 25 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · saveConnectionFromBody (cyclomatic 33) · ×1
  • saveConnectionFromBody (cyclomatic 33) src/server.js:9421 — saveConnectionFromBody has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.recommendedVersion (cyclomatic 32) · ×1
  • index.html.recommendedVersion (cyclomatic 32) src/public/index.html:8849 — index.html.recommendedVersion has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · repair-dependencies.dependencyRemovalScope (cyclomatic 32) · ×1
  • repair-dependencies.dependencyRemovalScope (cyclomatic 32) src/repair-dependencies.js:246 — repair-dependencies.dependencyRemovalScope has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · optional-analytics-proof.optionalAnalyticsProof (cyclomatic 31) · ×1
  • optional-analytics-proof.optionalAnalyticsProof (cyclomatic 31) src/optional-analytics-proof.js:14 — optional-analytics-proof.optionalAnalyticsProof has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 14 of the 31 points are its own statements and the rest belongs to 2 function items inside it that branch (addFile, visit). 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 · index.html.openProfileDialog (cyclomatic 31) · ×1
  • index.html.openProfileDialog (cyclomatic 31) src/public/index.html:12310 — index.html.openProfileDialog has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bootOnce (cyclomatic 31) · ×1
  • bootOnce (cyclomatic 31) src/server.js:7773 — bootOnce has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 belong to 5 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 · settings.safeConnection (cyclomatic 30) · ×1
  • settings.safeConnection (cyclomatic 30) src/settings.js:441 — settings.safeConnection 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 · index.html.paintPickerProfiles (cyclomatic 30) · ×1
  • index.html.paintPickerProfiles (cyclomatic 30) src/public/index.html:7322 — index.html.paintPickerProfiles has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.openLaunchEditor (cyclomatic 30) · ×1
  • index.html.openLaunchEditor (cyclomatic 30) src/public/index.html:9659 — index.html.openLaunchEditor has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · wsl.inspectWslDistro (cyclomatic 30) · ×1
  • wsl.inspectWslDistro (cyclomatic 30) src/wsl.js:553 — wsl.inspectWslDistro 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 · server.trayAction (cyclomatic 30) · ×1
  • server.trayAction (cyclomatic 30) src/server.js:2485 — server.trayAction has cyclomatic complexity 30 (threshold 15). Of this number, 22 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · startServer (cyclomatic 30) · ×1
  • startServer (cyclomatic 30) src/server.js:11599 — startServer has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · start (cyclomatic 30) · ×1
  • start (cyclomatic 30) REDACTED:594 — start has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 25 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 · classify (cyclomatic 30) · ×1
  • classify (cyclomatic 30) src/packs.js:264 — classify has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · repair-plan.profileFingerprint (cyclomatic 29) · ×1
  • repair-plan.profileFingerprint (cyclomatic 29) src/repair-plan.js:9 — repair-plan.profileFingerprint has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · RuntimeDiagnostics.earlyImportSnapshot (cyclomatic 29) · ×1
  • RuntimeDiagnostics.earlyImportSnapshot (cyclomatic 29) src/runtime-diagnostics.mjs:179 — RuntimeDiagnostics.earlyImportSnapshot has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.exportEnvironmentNow (cyclomatic 29) · ×1
  • server.exportEnvironmentNow (cyclomatic 29) src/server.js:4085 — server.exportEnvironmentNow has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · server.createProfile (cyclomatic 29) · ×1
  • server.createProfile (cyclomatic 29) src/server.js:8871 — server.createProfile has cyclomatic complexity 29 (threshold 15). Of this number, 15 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · megabytes · ×1
  • megabytes::exportEnvironmentNow (cyclomatic 29) src/server.js:4085 — megabytes::exportEnvironmentNow has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bind (cyclomatic 29) · ×1
  • bind (cyclomatic 29) shell/browser-guests.mjs:84 — bind has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 12 function items inside it that branch (a function literal at line 85, a function literal at line 124, a function literal at line 111, …). 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 · main.handleTabMessage (cyclomatic 28) · ×1
  • main.handleTabMessage (cyclomatic 28) REDACTED:1193 — main.handleTabMessage 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 · selfcheck.checkEnvironment (cyclomatic 28) · ×1
  • selfcheck.checkEnvironment (cyclomatic 28) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:643 — selfcheck.checkEnvironment 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 · selfcheck.checkManager (cyclomatic 28) · ×1
  • selfcheck.checkManager (cyclomatic 28) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:744 — selfcheck.checkManager has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selfcheck.checkSkills (cyclomatic 28) · ×1
  • selfcheck.checkSkills (cyclomatic 28) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1456 — selfcheck.checkSkills has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · instance-link.createInstanceLink.server (cyclomatic 28) · ×1
  • instance-link.createInstanceLink.server (cyclomatic 28) src/instance-link.js:56 — instance-link.createInstanceLink.server has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 65, 86, 102). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · attachProcess (cyclomatic 28) · ×1
  • attachProcess (cyclomatic 28) src/server.js:7478 — attachProcess has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 10 function items inside it that branch (onLine, a function literal at line 7506, a function literal at line 7571, …). 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 · migrateLegacyWslPresets (cyclomatic 28) · ×1
  • migrateLegacyWslPresets (cyclomatic 28) src/settings.js:522 — migrateLegacyWslPresets has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 532, a function literal at line 543, uniqueName, …). 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 · execute · ×1
  • execute::(anonymous)::(anonymous)::mutate (cyclomatic 28) src/repair-actions.js:385 — execute::(anonymous)::(anonymous)::mutate 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 · probeStdio (cyclomatic 28) · ×1
  • probeStdio (cyclomatic 28) src/mcp.js:599 — probeStdio has cyclomatic complexity 28 (threshold 15). Of this number, 26 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · update (cyclomatic 28) · ×1
  • update (cyclomatic 28) src/public/launch-list.js:171 — update has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · configurationSources (cyclomatic 28) · ×1
  • configurationSources (cyclomatic 28) src/configuration-evidence.js:146 — configurationSources has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 5 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 · createInstanceLink (cyclomatic 28) · ×1
  • createInstanceLink (cyclomatic 28) src/instance-link.js:47 — createInstanceLink has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 65, (anonymous)::(anonymous)::adopt, a function literal at line 102, …). 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 · core-fetch.compareVersions (cyclomatic 27) · ×1
  • core-fetch.compareVersions (cyclomatic 27) shell/core-fetch.mjs:78 — core-fetch.compareVersions has cyclomatic complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selfcheck.parseArgs (cyclomatic 27) · ×1
  • selfcheck.parseArgs (cyclomatic 27) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:296 — selfcheck.parseArgs has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · proxy.requestOnce (cyclomatic 27) · ×1
  • proxy.requestOnce (cyclomatic 27) src/proxy.js:340 — proxy.requestOnce has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 375, 341, 362, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.html.paintLaunchProfiles (cyclomatic 27) · ×1
  • index.html.paintLaunchProfiles (cyclomatic 27) src/public/index.html:4941 — index.html.paintLaunchProfiles has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to 3 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 · index.html.setLaunchBackend (cyclomatic 27) · ×1
  • index.html.setLaunchBackend (cyclomatic 27) src/public/index.html:5186 — index.html.setLaunchBackend has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RuntimeDiagnostics.unloadedImplementation (cyclomatic 27) · ×1
  • RuntimeDiagnostics.unloadedImplementation (cyclomatic 27) src/runtime-diagnostics.mjs:139 — RuntimeDiagnostics.unloadedImplementation has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · RuntimeDiagnostics.declarationEvidence (cyclomatic 27) · ×1
  • RuntimeDiagnostics.declarationEvidence (cyclomatic 27) src/runtime-diagnostics.mjs:495 — RuntimeDiagnostics.declarationEvidence has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · skills.prepareSkillImport (cyclomatic 27) · ×1
  • skills.prepareSkillImport (cyclomatic 27) src/skills.js:413 — skills.prepareSkillImport has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runPluginCommand (cyclomatic 27) · ×1
  • runPluginCommand (cyclomatic 27) src/server.js:6306 — runPluginCommand has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 6315, (anonymous)::keepLine, a function literal at line 6343, …). 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 · connectionDraftFromBody (cyclomatic 27) · ×1
  • connectionDraftFromBody (cyclomatic 27) src/server.js:9901 — connectionDraftFromBody has cyclomatic complexity 27 (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 · desktop.dialogOptions (cyclomatic 26) · ×1
  • desktop.dialogOptions (cyclomatic 26) shell/desktop.mjs:58 — desktop.dialogOptions has cyclomatic complexity 26 (threshold 15). Of this number, 23 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 · selfcheck.checkNetworkConfig (cyclomatic 26) · ×1
  • selfcheck.checkNetworkConfig (cyclomatic 26) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1576 — selfcheck.checkNetworkConfig 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 · index.html.showPane (cyclomatic 26) · ×1
  • index.html.showPane (cyclomatic 26) src/public/index.html:4579 — index.html.showPane has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.runningInfo (cyclomatic 26) · ×1
  • index.html.runningInfo (cyclomatic 26) src/public/index.html:4747 — index.html.runningInfo has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.document.getElementById('profileForm').onsubmit (cyclomatic 26) · ×1
  • index.html.document.getElementById('profileForm').onsubmit (cyclomatic 26) src/public/index.html:12359 — index.html.document.getElementById('profileForm').onsubmit 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 · scanNodeModules (cyclomatic 26) · ×1
  • scanNodeModules (cyclomatic 26) src/server.js:1026 — scanNodeModules 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 25 function items inside it that branch (virtual, addGraph, manifestOf, …). 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.html.confirmationText (cyclomatic 25) · ×1
  • index.html.confirmationText (cyclomatic 25) src/public/index.html:3917 — index.html.confirmationText has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.compareVersion (cyclomatic 25) · ×1
  • index.html.compareVersion (cyclomatic 25) src/public/index.html:8111 — index.html.compareVersion 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 2 function items inside it that branch (comparePre, split). 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 · server.normalizeMarketEntry (cyclomatic 25) · ×1
  • server.normalizeMarketEntry (cyclomatic 25) src/server.js:7141 — server.normalizeMarketEntry has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · factory.installViewport (cyclomatic 25) · ×1
  • factory.installViewport (cyclomatic 25) plugins/dsh-x-sidebar-browser/client.js:1185 — factory.installViewport has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 14 function items inside it that branch (applyFrame, syncViewportBar, ensureViewportBar, …). 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 · factory.apply · ×1
  • factory.apply::loop (cyclomatic 25) plugins/dsh-x-sidebar-browser/client.js:1368 — factory.apply::loop has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · expandComparator (cyclomatic 25) · ×1
  • expandComparator (cyclomatic 25) src/version.js:73 — expandComparator has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · zip.readZip (cyclomatic 24) · ×1
  • zip.readZip (cyclomatic 24) src/zip.js:58 — zip.readZip has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · packs.applyInstall (cyclomatic 24) · ×1
  • packs.applyInstall (cyclomatic 24) src/packs.js:493 — packs.applyInstall has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · selfcheck.checkHome (cyclomatic 24) · ×1
  • selfcheck.checkHome (cyclomatic 24) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1069 — selfcheck.checkHome has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · settings.migrateLegacyWslPresets.presets (cyclomatic 24) · ×1
  • settings.migrateLegacyWslPresets.presets (cyclomatic 24) src/settings.js:532 — settings.migrateLegacyWslPresets.presets has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.applySelfUpdate (cyclomatic 24) · ×1
  • index.html.applySelfUpdate (cyclomatic 24) src/public/index.html:10545 — index.html.applySelfUpdate has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · applyLaunchEnvironment (cyclomatic 24) · ×1
  • applyLaunchEnvironment (cyclomatic 24) src/server.js:3211 — applyLaunchEnvironment has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · stopTabDrag (cyclomatic 24) · ×1
  • stopTabDrag (cyclomatic 24) REDACTED:920 — stopTabDrag has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.apply · ×1
  • index.apply::captureGuest (cyclomatic 23) plugins/dsh-x-sidebar-browser/index.js:449 — index.apply::captureGuest has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.removePickerProfile (cyclomatic 23) · ×1
  • index.html.removePickerProfile (cyclomatic 23) src/public/index.html:7794 — index.html.removePickerProfile has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · repair-evidence.recordedChanges (cyclomatic 23) · ×1
  • repair-evidence.recordedChanges (cyclomatic 23) src/repair-evidence.js:184 — repair-evidence.recordedChanges has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.addPlugin (cyclomatic 23) · ×1
  • server.addPlugin (cyclomatic 23) src/server.js:6458 — server.addPlugin has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · setInstancePortNow (cyclomatic 23) · ×1
  • setInstancePortNow (cyclomatic 23) src/server.js:2326 — setInstancePortNow has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 10 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 · probeHttp (cyclomatic 23) · ×1
  • probeHttp (cyclomatic 23) src/mcp.js:684 — probeHttp has cyclomatic complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.renderDiagnosis (cyclomatic 22) · ×1
  • index.html.renderDiagnosis (cyclomatic 22) src/public/index.html:3586 — index.html.renderDiagnosis has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 4 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.html.paintProjectDevices (cyclomatic 22) · ×1
  • index.html.paintProjectDevices (cyclomatic 22) src/public/index.html:5994 — index.html.paintProjectDevices 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 · index.html.paintPickerDetails (cyclomatic 22) · ×1
  • index.html.paintPickerDetails (cyclomatic 22) src/public/index.html:7403 — index.html.paintPickerDetails has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · internal-tabs.document.addEventListener("keydown") (cyclomatic 22) · ×1
  • internal-tabs.document.addEventListener("keydown") (cyclomatic 22) src/public/internal-tabs.js:341 — internal-tabs.document.addEventListener("keydown") 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 · repair-dependencies.dependencyRemovalScope.reachable (cyclomatic 22) · ×1
  • repair-dependencies.dependencyRemovalScope.reachable (cyclomatic 22) src/repair-dependencies.js:255 — repair-dependencies.dependencyRemovalScope.reachable has cyclomatic complexity 22 (threshold 15). Of this number, 19 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 · skills.parseSkillGithub (cyclomatic 22) · ×1
  • skills.parseSkillGithub (cyclomatic 22) src/skills.js:393 — skills.parseSkillGithub has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.presetScope (cyclomatic 22) · ×1
  • server.presetScope (cyclomatic 22) src/server.js:728 — server.presetScope has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.autoDisableFailedPlugins (cyclomatic 22) · ×1
  • server.autoDisableFailedPlugins (cyclomatic 22) src/server.js:8456 — server.autoDisableFailedPlugins has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · flushCoreSetupPaint (cyclomatic 22) · ×1
  • flushCoreSetupPaint (cyclomatic 22) REDACTED:420 — flushCoreSetupPaint 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 · action (cyclomatic 22) · ×1
  • action (cyclomatic 22) shell/tabs.mjs:239 — action 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 · selfcheck.checkNetworkProbe (cyclomatic 21) · ×1
  • selfcheck.checkNetworkProbe (cyclomatic 21) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1641 — selfcheck.checkNetworkProbe 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 · diagnostic-repair.packageFingerprint · ×1
  • diagnostic-repair.packageFingerprint::visit (cyclomatic 21) src/diagnostic-repair.js:68 — diagnostic-repair.packageFingerprint::visit 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 · index.html.createUiSelect (cyclomatic 21) · ×1
  • index.html.createUiSelect (cyclomatic 21) src/public/index.html:3284 — index.html.createUiSelect has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 3316, label, a function literal at line 3315). 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.html.executeRepair (cyclomatic 21) · ×1
  • index.html.executeRepair (cyclomatic 21) src/public/index.html:4188 — index.html.executeRepair has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.refreshLaunchHomeProfiles (cyclomatic 21) · ×1
  • index.html.refreshLaunchHomeProfiles (cyclomatic 21) src/public/index.html:5287 — index.html.refreshLaunchHomeProfiles 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 · index.html.openProfilePicker (cyclomatic 21) · ×1
  • index.html.openProfilePicker (cyclomatic 21) src/public/index.html:7539 — index.html.openProfilePicker has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · internal-tabs.finishDrag (cyclomatic 21) · ×1
  • internal-tabs.finishDrag (cyclomatic 21) src/public/internal-tabs.js:228 — internal-tabs.finishDrag 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 · repair-dependencies.installedPackageState (cyclomatic 21) · ×1
  • repair-dependencies.installedPackageState (cyclomatic 21) src/repair-dependencies.js:108 — repair-dependencies.installedPackageState has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (scan, read). 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 · RuntimeDiagnostics.beforeUnload (cyclomatic 21) · ×1
  • RuntimeDiagnostics.beforeUnload (cyclomatic 21) src/runtime-diagnostics.mjs:82 — RuntimeDiagnostics.beforeUnload 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 · slice-layer-sheet.main (cyclomatic 21) · ×1
  • slice-layer-sheet.main (cyclomatic 21) docs/mascot-design/slice-layer-sheet.py:10 — slice-layer-sheet.main 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 · openExternal (cyclomatic 21) · ×1
  • openExternal (cyclomatic 21) src/server.js:9138 — openExternal has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · factory.revealFrame (cyclomatic 21) · ×1
  • factory.revealFrame (cyclomatic 21) plugins/dsh-x-sidebar-browser/client.js:421 — factory.revealFrame has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · tabDropTarget (cyclomatic 21) · ×1
  • tabDropTarget (cyclomatic 21) shell/tab-detach.mjs:53 — tabDropTarget has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.refreshWslProfiles (cyclomatic 20) · ×1
  • index.html.refreshWslProfiles (cyclomatic 20) src/public/index.html:5095 — index.html.refreshWslProfiles 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 · index.html.refreshLaunchLog (cyclomatic 20) · ×1
  • index.html.refreshLaunchLog (cyclomatic 20) src/public/index.html:8673 — index.html.refreshLaunchLog 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 · index.html.checkVersions (cyclomatic 20) · ×1
  • index.html.checkVersions (cyclomatic 20) src/public/index.html:9324 — index.html.checkVersions has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.skillRow (cyclomatic 20) · ×1
  • index.html.skillRow (cyclomatic 20) src/public/index.html:13702 — index.html.skillRow has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · skills.previewSkillFiles (cyclomatic 20) · ×1
  • skills.previewSkillFiles (cyclomatic 20) src/skills.js:364 — skills.previewSkillFiles 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 · server.trayLaunches (cyclomatic 20) · ×1
  • server.trayLaunches (cyclomatic 20) src/server.js:2451 — server.trayLaunches has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2472, 2455, 2459, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · server.removeLaunchPresetNow (cyclomatic 20) · ×1
  • server.removeLaunchPresetNow (cyclomatic 20) src/server.js:2826 — server.removeLaunchPresetNow 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 · server.refreshShortcuts (cyclomatic 20) · ×1
  • server.refreshShortcuts (cyclomatic 20) src/server.js:5942 — server.refreshShortcuts has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · startWithRepair (cyclomatic 20) · ×1
  • startWithRepair (cyclomatic 20) src/server.js:8518 — startWithRepair has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to 3 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 · factory.formatSnapshot (cyclomatic 20) · ×1
  • factory.formatSnapshot (cyclomatic 20) plugins/dsh-x-sidebar-browser/client.js:545 — factory.formatSnapshot has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · factory.pickElement (cyclomatic 20) · ×1
  • factory.pickElement (cyclomatic 20) plugins/dsh-x-sidebar-browser/client.js:1123 — factory.pickElement 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 · listMcpServers (cyclomatic 20) · ×1
  • listMcpServers (cyclomatic 20) src/mcp.js:263 — listMcpServers has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 270). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · parseMemory (cyclomatic 20) · ×1
  • parseMemory (cyclomatic 20) plugins/dsh-x-memory/lib/store.js:72 — parseMemory 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 · createSshBackend.connect (cyclomatic 20) · ×1
  • createSshBackend.connect (cyclomatic 20) src/ssh.js:56 — createSshBackend.connect has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 59, (anonymous)::(anonymous)::finish, (anonymous)::(anonymous)::hostVerifier, …). 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 · detach (cyclomatic 20) · ×1
  • detach (cyclomatic 20) shell/tab-detach.mjs:120 — detach 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 · mcp.listMcpServers.servers (cyclomatic 19) · ×1
  • mcp.listMcpServers.servers (cyclomatic 19) src/mcp.js:270 — mcp.listMcpServers.servers has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · booting.html.render (cyclomatic 19) · ×1
  • booting.html.render (cyclomatic 19) src/public/booting.html:309 — booting.html.render 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.
D1 · Cyclomatic Complexity · registry.installSpec (cyclomatic 19) · ×1
  • registry.installSpec (cyclomatic 19) src/registry.js:485 — registry.installSpec has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 526, 498). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · repair-dependencies.dependencyOrigins (cyclomatic 19) · ×1
  • repair-dependencies.dependencyOrigins (cyclomatic 19) src/repair-dependencies.js:206 — repair-dependencies.dependencyOrigins has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ssh-core.ensureRemoteNode (cyclomatic 19) · ×1
  • ssh-core.ensureRemoteNode (cyclomatic 19) src/ssh-core.js:56 — ssh-core.ensureRemoteNode has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.openPackSource (cyclomatic 19) · ×1
  • server.openPackSource (cyclomatic 19) src/server.js:7201 — server.openPackSource 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.
D1 · Cyclomatic Complexity · factory.pagePress (cyclomatic 19) · ×1
  • factory.pagePress (cyclomatic 19) plugins/dsh-x-sidebar-browser/client.js:192 — factory.pagePress 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.
D1 · Cyclomatic Complexity · readWslProfile (cyclomatic 19) · ×1
  • readWslProfile (cyclomatic 19) src/wsl.js:828 — readWslProfile has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · restoreProfileBackup (cyclomatic 19) · ×1
  • restoreProfileBackup (cyclomatic 19) src/recovery.js:195 — restoreProfileBackup has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 198, 209). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · mascot.tick (cyclomatic 18) · ×1
  • mascot.tick (cyclomatic 18) docs/mascot.js:108 — mascot.tick 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 · selfcheck.analyzeLogs (cyclomatic 18) · ×1
  • selfcheck.analyzeLogs (cyclomatic 18) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1714 — selfcheck.analyzeLogs 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 · environments-page.updateReportHtml (cyclomatic 18) · ×1
  • environments-page.updateReportHtml (cyclomatic 18) src/public/environments-page.js:488 — environments-page.updateReportHtml has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · index.html.transitionDialog (cyclomatic 18) · ×1
  • index.html.transitionDialog (cyclomatic 18) src/public/index.html:3420 — index.html.transitionDialog has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.html.diagnosisIssueRows (cyclomatic 18) · ×1
  • index.html.diagnosisIssueRows (cyclomatic 18) src/public/index.html:8418 — index.html.diagnosisIssueRows has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.updateToLatest (cyclomatic 18) · ×1
  • index.html.updateToLatest (cyclomatic 18) src/public/index.html:10018 — index.html.updateToLatest 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 · server.findSystemNode (cyclomatic 18) · ×1
  • server.findSystemNode (cyclomatic 18) src/server.js:4885 — server.findSystemNode 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 · server.releaseFeed (cyclomatic 18) · ×1
  • server.releaseFeed (cyclomatic 18) src/server.js:6216 — server.releaseFeed has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.describeFetchError (cyclomatic 18) · ×1
  • server.describeFetchError (cyclomatic 18) src/server.js:6978 — server.describeFetchError has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · instanceInfo (cyclomatic 18) · ×1
  • instanceInfo (cyclomatic 18) src/server.js:1945 — instanceInfo has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · runSyncJob (cyclomatic 18) · ×1
  • runSyncJob (cyclomatic 18) src/server.js:5271 — runSyncJob 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 · resolveWslAutoVersion (cyclomatic 18) · ×1
  • resolveWslAutoVersion (cyclomatic 18) src/server.js:8211 — resolveWslAutoVersion has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 8216, 8219, 8220, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · createWslBackend.resolveIdentity (cyclomatic 18) · ×1
  • createWslBackend.resolveIdentity (cyclomatic 18) src/wsl.js:339 — createWslBackend.resolveIdentity has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 342, 369). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · resolveCommandPath (cyclomatic 18) · ×1
  • resolveCommandPath (cyclomatic 18) src/mcp.js:452 — resolveCommandPath 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 · dependencyRemovalScope · ×1
  • dependencyRemovalScope::reachable (cyclomatic 18) src/repair-dependencies.js:255 — dependencyRemovalScope::reachable 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 · parseDialog (cyclomatic 18) · ×1
  • parseDialog (cyclomatic 18) src/desktop.js:141 — parseDialog 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 · readRemoteProfile (cyclomatic 18) · ×1
  • readRemoteProfile (cyclomatic 18) src/remote-profile.js:11 — readRemoteProfile has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · InstanceViews.transferView (cyclomatic 17) · ×1
  • InstanceViews.transferView (cyclomatic 17) shell/instance-views.mjs:101 — InstanceViews.transferView 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 · main.installPermissionHandlers (cyclomatic 17) · ×1
  • main.installPermissionHandlers (cyclomatic 17) REDACTED:1532 — main.installPermissionHandlers has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 1534). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · environments.linkPresets (cyclomatic 17) · ×1
  • environments.linkPresets (cyclomatic 17) src/environments.js:704 — environments.linkPresets has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 716, a function literal at line 712, a function literal at line 709, …). 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 · ManagerAuth.isAuthenticated (cyclomatic 17) · ×1
  • ManagerAuth.isAuthenticated (cyclomatic 17) REDACTED:201 — ManagerAuth.isAuthenticated has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.recordedChangeText (cyclomatic 17) · ×1
  • index.html.recordedChangeText (cyclomatic 17) src/public/index.html:3943 — index.html.recordedChangeText has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.openConnectionDialog (cyclomatic 17) · ×1
  • index.html.openConnectionDialog (cyclomatic 17) src/public/index.html:5516 — index.html.openConnectionDialog has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.syncGuideWslFields (cyclomatic 17) · ×1
  • index.html.syncGuideWslFields (cyclomatic 17) src/public/index.html:6687 — index.html.syncGuideWslFields has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.paintLaunchHint (cyclomatic 17) · ×1
  • index.html.paintLaunchHint (cyclomatic 17) src/public/index.html:6924 — index.html.paintLaunchHint has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.paintSelfPill (cyclomatic 17) · ×1
  • index.html.paintSelfPill (cyclomatic 17) src/public/index.html:10517 — index.html.paintSelfPill 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 · index.html.showNodeRuntimeSettings (cyclomatic 17) · ×1
  • index.html.showNodeRuntimeSettings (cyclomatic 17) src/public/index.html:11253 — index.html.showNodeRuntimeSettings has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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.html.pluginRowHtml (cyclomatic 17) · ×1
  • index.html.pluginRowHtml (cyclomatic 17) src/public/index.html:11956 — index.html.pluginRowHtml has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.restartEnvironment (cyclomatic 17) · ×1
  • index.html.restartEnvironment (cyclomatic 17) src/public/index.html:12095 — index.html.restartEnvironment has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.html.hidePackDialog (cyclomatic 17) · ×1
  • index.html.hidePackDialog (cyclomatic 17) src/public/index.html:12846 — index.html.hidePackDialog has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.mcpRow (cyclomatic 17) · ×1
  • index.html.mcpRow (cyclomatic 17) src/public/index.html:13313 — index.html.mcpRow has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · internal-tabs.arrange (cyclomatic 17) · ×1
  • internal-tabs.arrange (cyclomatic 17) src/public/internal-tabs.js:62 — internal-tabs.arrange 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 · skills.createSkill (cyclomatic 17) · ×1
  • skills.createSkill (cyclomatic 17) src/skills.js:240 — skills.createSkill has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SshRemoteCore.streamLogs (cyclomatic 17) · ×1
  • SshRemoteCore.streamLogs (cyclomatic 17) src/ssh-core.js:344 — SshRemoteCore.streamLogs has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 374, 349, 364). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ssh-config.parseConfigFile (cyclomatic 17) · ×1
  • ssh-config.parseConfigFile (cyclomatic 17) REDACTED:51 — ssh-config.parseConfigFile has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · server.attributePlugins (cyclomatic 17) · ×1
  • server.attributePlugins (cyclomatic 17) src/server.js:1172 — server.attributePlugins has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · server.instanceTargetFromUrl (cyclomatic 17) · ×1
  • server.instanceTargetFromUrl (cyclomatic 17) src/server.js:9104 — server.instanceTargetFromUrl has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · parseScutilProxy (cyclomatic 17) · ×1
  • parseScutilProxy (cyclomatic 17) src/proxy.js:91 — parseScutilProxy 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 · core-fetch.pickCoreRelease (cyclomatic 16) · ×1
  • core-fetch.pickCoreRelease (cyclomatic 16) shell/core-fetch.mjs:154 — core-fetch.pickCoreRelease has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 165, ceilingOf). 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 · updater.createUpdater (cyclomatic 16) · ×1
  • updater.createUpdater (cyclomatic 16) shell/updater.mjs:36 — updater.createUpdater has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · apply-update.main (cyclomatic 16) · ×1
  • apply-update.main (cyclomatic 16) src/apply-update.mjs:104 — apply-update.main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · environment-pack.tarballFiles (cyclomatic 16) · ×1
  • environment-pack.tarballFiles (cyclomatic 16) src/environment-pack.js:263 — environment-pack.tarballFiles 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 · mcp.parseMcpCommand (cyclomatic 16) · ×1
  • mcp.parseMcpCommand (cyclomatic 16) src/mcp.js:47 — mcp.parseMcpCommand 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 · environments-page.renderView (cyclomatic 16) · ×1
  • environments-page.renderView (cyclomatic 16) src/public/environments-page.js:277 — environments-page.renderView has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.diagnosisText (cyclomatic 16) · ×1
  • index.html.diagnosisText (cyclomatic 16) src/public/index.html:3735 — index.html.diagnosisText has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.html.paintSshImportList (cyclomatic 16) · ×1
  • index.html.paintSshImportList (cyclomatic 16) src/public/index.html:5430 — index.html.paintSshImportList has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.paintLaunchEnvTrigger (cyclomatic 16) · ×1
  • index.html.paintLaunchEnvTrigger (cyclomatic 16) src/public/index.html:7152 — index.html.paintLaunchEnvTrigger 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 · index.html.openLaunchLog (cyclomatic 16) · ×1
  • index.html.openLaunchLog (cyclomatic 16) src/public/index.html:8722 — index.html.openLaunchLog has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.homeOptions (cyclomatic 16) · ×1
  • index.html.homeOptions (cyclomatic 16) src/public/index.html:11048 — index.html.homeOptions has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.describeProxy (cyclomatic 16) · ×1
  • index.html.describeProxy (cyclomatic 16) src/public/index.html:11292 — index.html.describeProxy has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.html.saveMcp (cyclomatic 16) · ×1
  • index.html.saveMcp (cyclomatic 16) src/public/index.html:13428 — index.html.saveMcp has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · wsl.createWslBackend.resolveIdentity (cyclomatic 16) · ×1
  • wsl.createWslBackend.resolveIdentity (cyclomatic 16) src/wsl.js:339 — wsl.createWslBackend.resolveIdentity has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, 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 · startup-diagnosis.createStartupDiagnosis.addLine (cyclomatic 16) · ×1
  • startup-diagnosis.createStartupDiagnosis.addLine (cyclomatic 16) src/startup-diagnosis.js:328 — startup-diagnosis.createStartupDiagnosis.addLine has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.downloadSelfUpdateOnce (cyclomatic 16) · ×1
  • server.downloadSelfUpdateOnce (cyclomatic 16) src/server.js:1562 — server.downloadSelfUpdateOnce 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 · server.diagnosticForAttempt (cyclomatic 16) · ×1
  • server.diagnosticForAttempt (cyclomatic 16) src/server.js:1996 — server.diagnosticForAttempt has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.checkAppUpdate (cyclomatic 16) · ×1
  • server.checkAppUpdate (cyclomatic 16) src/server.js:5982 — server.checkAppUpdate has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · server.packPluginSelection (cyclomatic 16) · ×1
  • server.packPluginSelection (cyclomatic 16) src/server.js:6944 — server.packPluginSelection has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · publicFailure (cyclomatic 16) · ×1
  • publicFailure (cyclomatic 16) src/server.js:611 — publicFailure has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · remoteCoreForTarget (cyclomatic 16) · ×1
  • remoteCoreForTarget (cyclomatic 16) src/server.js:8086 — remoteCoreForTarget has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · createStdioInspector (cyclomatic 16) · ×1
  • createStdioInspector (cyclomatic 16) src/mcp.js:491 — createStdioInspector has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 11 function items inside it that branch (a function literal at line 509, a function literal at line 535, failAll, …). 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 · apply (cyclomatic 16) · ×1
  • apply (cyclomatic 16) plugins/dsh-x-context-menu/lib/index.js:178 — apply has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 7 function items inside it that branch (handler, handler, (anonymous)::(anonymous)::handler, …). 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.
D10 · Test Quality · No assertions · ×1
  • No assertions: 已存在的目录同样要能写才算通过 test/writable-dir.test.mjs:20 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · handleApi (cognitive 1185) · ×1
  • handleApi (cognitive 1185) src/server.js:9940 — handleApi has cognitive complexity 1185 (threshold 15). Drivers by points: ternaries 145 (362 pts), if/else 238 (361 pts), boolean chains 274, error handling 79 (165 pts), loops 8 (17 pts), other 6 (nesting depth added 435). Of this number, 1116 points are the body's own statements and 69 belong to 61 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main (cognitive 214) · ×1
  • main (cognitive 214) src/repair-probe.mjs:23 — main has cognitive complexity 214 (threshold 15). Drivers by points: if/else 37 (89 pts), boolean chains 52, ternaries 18 (41 pts), loops 14 (23 pts), error handling 4 (8 pts), other 1 (nesting depth added 88). Of this number, 193 points are the body's own statements and 21 belong to 33 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · saveLaunchPresetNow (cognitive 170) · ×1
  • saveLaunchPresetNow (cognitive 170) src/server.js:2586 — saveLaunchPresetNow has cognitive complexity 170 (threshold 15). Drivers by points: if/else 47 (72 pts), boolean chains 55, ternaries 36 (37 pts), other 6 (nesting depth added 26). Of this number, 134 points are the body's own statements and 36 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · factory.apply (cognitive 162) · ×1
  • factory.apply (cognitive 162) plugins/dsh-x-context-menu/lib/client.js:310 — factory.apply has cognitive complexity 162 (threshold 15). Drivers by points: if/else 82 (86 pts), boolean chains 29, ternaries 20 (22 pts), error handling 12 (14 pts), other 11 (nesting depth added 8). None of this is in the body itself: all 162 points belong to 116 function items inside it that branch (renameSession, buildSessionItems, buildMenu, …). 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 · repair-evidence.buildRepairPresentation (cognitive 150) · ×1
  • repair-evidence.buildRepairPresentation (cognitive 150) src/repair-evidence.js:48 — repair-evidence.buildRepairPresentation has cognitive complexity 150 (threshold 15). Drivers by points: if/else 26 (62 pts), ternaries 14 (44 pts), boolean chains 29, loops 9 (15 pts) (nesting depth added 72). Of this number, 147 points are the body's own statements and 3 belong to 5 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 · server.saveManagerSettings (cognitive 143) · ×1
  • server.saveManagerSettings (cognitive 143) src/server.js:4403 — server.saveManagerSettings has cognitive complexity 143 (threshold 15). Drivers by points: ternaries 55 (90 pts), if/else 29 (42 pts), boolean chains 9, error handling 1 (2 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent 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.html.paintLaunchHome (cognitive 110) · ×1
  • index.html.paintLaunchHome (cognitive 110) src/public/index.html:8966 — index.html.paintLaunchHome has cognitive complexity 110 (threshold 15). Drivers by points: ternaries 38 (57 pts), boolean chains 45, if/else 6 (8 pts) (nesting depth added 21). Most of this is not in the body itself: 11 of the 110 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 8971, 9042, 9109, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · renameProfile (cognitive 94) · ×1
  • renameProfile (cognitive 94) src/server.js:8697 — renameProfile has cognitive complexity 94 (threshold 15). Drivers by points: if/else 26 (39 pts), ternaries 13 (20 pts), boolean chains 13, error handling 5 (11 pts), loops 8 (11 pts) (nesting depth added 29). Most of this is not in the body itself: 14 of the 94 points are its own statements and the rest belongs to 20 function items inside it that branch (a function literal at line 8713, (anonymous)::scan, (anonymous)::rebase, …). 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 · parseTabAction (cognitive 92) · ×1
  • parseTabAction (cognitive 92) shell/model.mjs:205 — parseTabAction has cognitive complexity 92 (threshold 15). Drivers by points: boolean chains 35, ternaries 15 (30 pts), if/else 13 (25 pts), error handling 1, match/switch 1 (nesting depth added 27). Of this number, 79 points are the body's own statements and 13 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.flushSettings (cognitive 86) · ×1
  • index.html.flushSettings (cognitive 86) src/public/index.html:11523 — index.html.flushSettings has cognitive complexity 86 (threshold 15). Drivers by points: if/else 37 (56 pts), boolean chains 22, loops 4 (7 pts), error handling 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · factory.executeCommand (cognitive 86) · ×1
  • factory.executeCommand (cognitive 86) plugins/dsh-x-sidebar-browser/client.js:619 — factory.executeCommand has cognitive complexity 86 (threshold 15). Drivers by points: if/else 17 (32 pts), ternaries 13 (27 pts), boolean chains 15, error handling 4 (11 pts), match/switch 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.checkData (cognitive 84) · ×1
  • selfcheck.checkData (cognitive 84) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:881 — selfcheck.checkData has cognitive complexity 84 (threshold 15). Drivers by points: if/else 24 (53 pts), ternaries 10 (24 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 44). 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 · startServer · ×1
  • startServer::handler (cognitive 80) src/server.js:11660 — startServer::handler has cognitive complexity 80 (threshold 15). Drivers by points: if/else 19 (33 pts), ternaries 7 (21 pts), boolean chains 14, error handling 4 (11 pts), other 1 (nesting depth added 35). 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 · index.html.renderRepairActionGroups (cognitive 77) · ×1
  • index.html.renderRepairActionGroups (cognitive 77) src/public/index.html:3965 — index.html.renderRepairActionGroups has cognitive complexity 77 (threshold 15). Drivers by points: if/else 10 (25 pts), ternaries 7 (22 pts), boolean chains 16, loops 8 (14 pts) (nesting depth added 36). Of this number, 70 points are the body's own statements and 7 belong to 5 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 · RuntimeDiagnostics.snapshot (cognitive 76) · ×1
  • RuntimeDiagnostics.snapshot (cognitive 76) src/runtime-diagnostics.mjs:359 — RuntimeDiagnostics.snapshot has cognitive complexity 76 (threshold 15). Drivers by points: if/else 11 (33 pts), boolean chains 18, loops 8 (13 pts), ternaries 8 (12 pts) (nesting depth added 31). Of this number, 51 points are the body's own statements and 25 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rollback (cognitive 75) · ×1
  • rollback (cognitive 75) src/repair-actions.js:526 — rollback has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 23, ternaries 3, error handling 1 (nesting depth added 19). Of this number, 27 points are the body's own statements and 48 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 · factory.SyncPanel (cognitive 74) · ×1
  • factory.SyncPanel (cognitive 74) plugins/dsh-x-sync/lib/client.js:225 — factory.SyncPanel has cognitive complexity 74 (threshold 15). Drivers by points: if/else 20 (24 pts), ternaries 20 (21 pts), boolean chains 18, error handling 8, other 3 (nesting depth added 5). Of this number, 40 points are the body's own statements and 34 belong to 27 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · parseActivation (cognitive 74) · ×1
  • parseActivation (cognitive 74) src/startup-diagnosis.js:142 — parseActivation has cognitive complexity 74 (threshold 15). Drivers by points: if/else 21 (52 pts), boolean chains 10, loops 5 (7 pts), ternaries 2 (4 pts), other 1 (nesting depth added 35). Of this number, 70 points are the body's own statements and 4 belong to 5 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · apply (cognitive 71) · ×1
  • apply (cognitive 71) plugins/dsh-x-memory/lib/index.js:195 — apply has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 16 (25 pts), if/else 18 (21 pts), error handling 11, other 7, boolean chains 5, loops 2 (nesting depth added 12). Most of this is not in the body itself: 1 of the 71 points is its own statement and the rest belongs to 36 function items inside it that branch ((anonymous)::text, storeForPanel, handler, …). 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 · cancelTabDrag · ×1
  • cancelTabDrag::updateInternalTabs (cognitive 68) src/public/internal-tabs.js:372 — cancelTabDrag::updateInternalTabs has cognitive complexity 68 (threshold 15). Drivers by points: boolean chains 30, if/else 21 (26 pts), ternaries 6 (9 pts), loops 2, other 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.html.fillSettings (cognitive 66) · ×1
  • index.html.fillSettings (cognitive 66) src/public/index.html:11371 — index.html.fillSettings has cognitive complexity 66 (threshold 15). Drivers by points: if/else 28 (35 pts), boolean chains 20, ternaries 5 (10 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiagnosticRepairs.execute (cognitive 66) · ×1
  • DiagnosticRepairs.execute (cognitive 66) src/repair-actions.js:360 — DiagnosticRepairs.execute has cognitive complexity 66 (threshold 15). Drivers by points: if/else 22 (35 pts), boolean chains 18, error handling 4 (7 pts), ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 19). Of this number, 19 points are the body's own statements and 47 belong to 5 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 · buildConfig (cognitive 65) · ×1
  • buildConfig (cognitive 65) src/mcp.js:80 — buildConfig has cognitive complexity 65 (threshold 15). Drivers by points: if/else 26 (42 pts), boolean chains 7, other 7, ternaries 3 (6 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.applyState (cognitive 63) · ×1
  • index.html.applyState (cognitive 63) src/public/index.html:10149 — index.html.applyState has cognitive complexity 63 (threshold 15). Drivers by points: boolean chains 37, if/else 19 (24 pts), loops 1 (2 pts) (nesting depth added 6). Of this number, 61 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · internal-tabs.updateInternalTabs (cognitive 63) · ×1
  • internal-tabs.updateInternalTabs (cognitive 63) src/public/internal-tabs.js:372 — internal-tabs.updateInternalTabs has cognitive complexity 63 (threshold 15). Drivers by points: boolean chains 29, if/else 22 (28 pts), ternaries 3 (4 pts), loops 2 (nesting depth added 7). Of this number, 60 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · readRuntimeEvidence (cognitive 63) · ×1
  • readRuntimeEvidence (cognitive 63) src/runtime-diagnostics.mjs:618 — readRuntimeEvidence has cognitive complexity 63 (threshold 15). Drivers by points: boolean chains 33, if/else 10 (16 pts), ternaries 6 (10 pts), loops 2 (3 pts), error handling 1 (nesting depth added 11). Of this number, 53 points are the body's own statements and 10 belong to 7 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.prepareGuidedLaunchRemote (cognitive 62) · ×1
  • index.html.prepareGuidedLaunchRemote (cognitive 62) src/public/index.html:7947 — index.html.prepareGuidedLaunchRemote has cognitive complexity 62 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 20, ternaries 7 (9 pts), error handling 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runConnectionPrepare (cognitive 61) · ×1
  • runConnectionPrepare (cognitive 61) src/server.js:9657 — runConnectionPrepare has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 13, error handling 5 (9 pts), ternaries 7 (9 pts), loops 1 (3 pts) (nesting depth added 18). Of this number, 56 points are the body's own statements and 5 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safeLaunchPresets (cognitive 61) · ×1
  • safeLaunchPresets (cognitive 61) src/settings.js:816 — safeLaunchPresets has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 21, error handling 7 (12 pts), if/else 9 (12 pts), boolean chains 8, other 8 (nesting depth added 8). Most of this is not in the body itself: 4 of the 61 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 818, 894, 897). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.html.prepareGuidedLaunch (cognitive 60) · ×1
  • index.html.prepareGuidedLaunch (cognitive 60) src/public/index.html:8028 — index.html.prepareGuidedLaunch has cognitive complexity 60 (threshold 15). Drivers by points: boolean chains 29, if/else 16 (22 pts), ternaries 7 (9 pts) (nesting depth added 8). Of this number, 52 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · launch-list.sortable (cognitive 60) · ×1
  • launch-list.sortable (cognitive 60) src/public/launch-list.js:30 — launch-list.sortable has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (29 pts), boolean chains 17, loops 6 (9 pts), ternaries 4 (5 pts) (nesting depth added 8). None of this is in the body itself: all 60 points belong to 17 function items inside it that branch (a function literal at line 118, moveRows, tick, …). 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 · classify (cognitive 58) · ×1
  • classify (cognitive 58) src/packs.js:264 — classify has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (50 pts), boolean chains 3, ternaries 1 (3 pts), loops 1, other 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.checkInstances (cognitive 57) · ×1
  • selfcheck.checkInstances (cognitive 57) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1165 — selfcheck.checkInstances has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 13 (26 pts), boolean chains 16, if/else 13 (15 pts) (nesting depth added 15). Of this number, 45 points are the body's own statements and 12 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 · factory.MemoryPanel (cognitive 56) · ×1
  • factory.MemoryPanel (cognitive 56) plugins/dsh-x-memory/lib/client.js:151 — factory.MemoryPanel has cognitive complexity 56 (threshold 15). Drivers by points: other 14, boolean chains 11, if/else 11, ternaries 11, error handling 8 (9 pts) (nesting depth added 1). Of this number, 17 points are the body's own statements and 39 belong to 30 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.html.showAsk (cognitive 55) · ×1
  • index.html.showAsk (cognitive 55) src/public/index.html:10853 — index.html.showAsk has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 8 (23 pts), if/else 10 (16 pts), boolean chains 12, loops 3 (4 pts) (nesting depth added 22). Of this number, 51 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.html.listenEvents (cognitive 54) · ×1
  • index.html.listenEvents (cognitive 54) src/public/index.html:10254 — index.html.listenEvents has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 19, error handling 5, ternaries 1 (2 pts), loops 1 (nesting depth added 6). None of this is in the body itself: all 54 points belong to 7 function literals inside it that branch (lines 10316, 10370, 10267, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · factory.pageSnapshot (cognitive 54) · ×1
  • factory.pageSnapshot (cognitive 54) plugins/dsh-x-sidebar-browser/client.js:40 — factory.pageSnapshot has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 11, ternaries 5 (8 pts), loops 1 (nesting depth added 23). Of this number, 49 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseManifest (cognitive 54) · ×1
  • parseManifest (cognitive 54) src/packs.js:178 — parseManifest has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 10, loops 2 (6 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startWithRepair (cognitive 52) · ×1
  • startWithRepair (cognitive 52) src/server.js:8518 — startWithRepair has cognitive complexity 52 (threshold 15). Drivers by points: if/else 6 (21 pts), error handling 5 (12 pts), ternaries 3 (11 pts), loops 1 (4 pts), boolean chains 3, other 1 (nesting depth added 33). Of this number, 48 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createInstanceLink (cognitive 52) · ×1
  • createInstanceLink (cognitive 52) src/instance-link.js:47 — createInstanceLink has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 9, error handling 1 (2 pts), loops 1 (nesting depth added 27). None of this is in the body itself: all 52 points belong to 9 function items inside it that branch (a function literal at line 65, (anonymous)::(anonymous)::adopt, a function literal at line 102, …). 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 · selfcheck.checkPlugins (cognitive 51) · ×1
  • selfcheck.checkPlugins (cognitive 51) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1255 — selfcheck.checkPlugins has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 10 (22 pts), if/else 15 (20 pts), boolean chains 9 (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 · selfcheck.validateSettings (cognitive 50) · ×1
  • selfcheck.validateSettings (cognitive 50) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:605 — selfcheck.validateSettings has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 15, loops 3 (6 pts) (nesting depth added 14). Of this number, 49 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · instance-link.createInstanceLink.server (cognitive 50) · ×1
  • instance-link.createInstanceLink.server (cognitive 50) src/instance-link.js:56 — instance-link.createInstanceLink.server has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 27). None of this is in the body itself: all 50 points belong to 3 function literals inside it that branch (lines 65, 86, 102). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.html.showRepairHistory (cognitive 50) · ×1
  • index.html.showRepairHistory (cognitive 50) src/public/index.html:4293 — index.html.showRepairHistory has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 7 (17 pts), boolean chains 16, if/else 6 (12 pts), loops 3 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.paintGuideTarget (cognitive 49) · ×1
  • index.html.paintGuideTarget (cognitive 49) src/public/index.html:6698 — index.html.paintGuideTarget has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 21, ternaries 10 (17 pts), if/else 7 (8 pts), loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · factory.apply · ×1
  • factory.apply::loop (cognitive 49) plugins/dsh-x-sidebar-browser/client.js:1368 — factory.apply::loop has cognitive complexity 49 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 4 (14 pts), boolean chains 9, ternaries 2 (7 pts), loops 2 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.showRepairCards (cognitive 48) · ×1
  • index.html.showRepairCards (cognitive 48) src/public/index.html:4097 — index.html.showRepairCards has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (14 pts), loops 6 (9 pts), ternaries 2 (9 pts), error handling 1 (nesting depth added 15). Of this number, 45 points are the body's own statements and 3 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 · index.html.paintRemoteSettings (cognitive 48) · ×1
  • index.html.paintRemoteSettings (cognitive 48) src/public/index.html:6130 — index.html.paintRemoteSettings has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 18, if/else 9 (15 pts), loops 10 (11 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 9). Of this number, 24 points are the body's own statements and 24 belong to 10 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 · selfcheck.checkSkills (cognitive 47) · ×1
  • selfcheck.checkSkills (cognitive 47) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1456 — selfcheck.checkSkills has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 7, ternaries 3 (7 pts), loops 2 (5 pts) (nesting depth added 18). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startServer (cognitive 47) · ×1
  • startServer (cognitive 47) src/server.js:11599 — startServer has cognitive complexity 47 (threshold 15). Drivers by points: if/else 33 (57 pts), ternaries 13 (33 pts), error handling 10 (23 pts), boolean chains 17, other 2, loops 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent 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 · createTools (cognitive 46) · ×1
  • createTools (cognitive 46) plugins/dsh-x-memory/lib/tools.js:16 — createTools has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 16 (23 pts), if/else 8, other 8, error handling 7 (nesting depth added 7). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to 23 function items inside it that branch (a function literal at line 209, a function literal at line 245, a function literal at line 282, …). 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.html.launchFormEl.onsubmit (cognitive 45) · ×1
  • index.html.launchFormEl.onsubmit (cognitive 45) src/public/index.html:9765 — index.html.launchFormEl.onsubmit has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 13 (19 pts), boolean chains 15, if/else 7 (10 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · core-fetch.compareVersions (cognitive 44) · ×1
  • core-fetch.compareVersions (cognitive 44) shell/core-fetch.mjs:78 — core-fetch.compareVersions has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 7 (16 pts), boolean chains 6, loops 2 (nesting depth added 18). Of this number, 40 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · slice-layer-sheet.main (cognitive 43) · ×1
  • slice-layer-sheet.main (cognitive 43) docs/mascot-design/slice-layer-sheet.py:10 — slice-layer-sheet.main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 7 (11 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.checkManager (cognitive 42) · ×1
  • selfcheck.checkManager (cognitive 42) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:744 — selfcheck.checkManager has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 5 (14 pts), boolean chains 11 (nesting depth added 13). Of this number, 38 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.checkNetworkConfig (cognitive 42) · ×1
  • selfcheck.checkNetworkConfig (cognitive 42) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1576 — selfcheck.checkNetworkConfig has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 5 (14 pts), boolean chains 10 (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 · DiagnosticRepairs.preview (cognitive 42) · ×1
  • DiagnosticRepairs.preview (cognitive 42) src/repair-actions.js:252 — DiagnosticRepairs.preview has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 17, ternaries 8 (13 pts), if/else 5 (8 pts), loops 3, error handling 1 (nesting depth added 8). Of this number, 33 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startup-diagnosis.createStartupDiagnosis.report (cognitive 42) · ×1
  • startup-diagnosis.createStartupDiagnosis.report (cognitive 42) src/startup-diagnosis.js:364 — startup-diagnosis.createStartupDiagnosis.report has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 16, loops 3 (5 pts), ternaries 3 (nesting depth added 11). Of this number, 40 points are the body's own statements and 2 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 · configuration-evidence.configurationSources (cognitive 41) · ×1
  • configuration-evidence.configurationSources (cognitive 41) src/configuration-evidence.js:146 — configuration-evidence.configurationSources has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 13, loops 3 (6 pts), ternaries 1 (4 pts) (nesting depth added 17). Of this number, 38 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.confirmationText (cognitive 41) · ×1
  • index.html.confirmationText (cognitive 41) src/public/index.html:3917 — index.html.confirmationText has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 13 (30 pts), if/else 6, boolean chains 5 (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.html.render (cognitive 41) · ×1
  • index.html.render (cognitive 41) src/public/index.html:9860 — index.html.render has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 19, if/else 12, ternaries 6 (9 pts), loops 1 (nesting depth added 3). Of this number, 39 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · execute · ×1
  • execute::(anonymous)::(anonymous)::mutate (cognitive 41) src/repair-actions.js:385 — execute::(anonymous)::(anonymous)::mutate has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 9, error handling 3 (6 pts), ternaries 2 (5 pts), loops 1 (2 pts), other 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 · tick (cognitive 41) · ×1
  • tick (cognitive 41) src/public/mascot.js:158 — tick has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 15 (27 pts), if/else 6 (7 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills.prepareSkillImport (cognitive 40) · ×1
  • skills.prepareSkillImport (cognitive 40) src/skills.js:413 — skills.prepareSkillImport has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (nesting depth added 15). Of this number, 37 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · saveSettingsNow (cognitive 40) · ×1
  • saveSettingsNow (cognitive 40) src/settings.js:1146 — saveSettingsNow has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 15, if/else 11 (13 pts), error handling 7 (9 pts), loops 2, boolean chains 1 (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 · main.flushCoreSetupPaint (cognitive 39) · ×1
  • main.flushCoreSetupPaint (cognitive 39) REDACTED:420 — main.flushCoreSetupPaint has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 16 (36 pts), boolean chains 2, if/else 1 (nesting depth added 20). 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 · server.startRemoteViaCore (cognitive 39) · ×1
  • server.startRemoteViaCore (cognitive 39) src/server.js:8226 — server.startRemoteViaCore has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (11 pts), ternaries 8 (11 pts), error handling 2 (4 pts), loops 1 (nesting depth added 7). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · bootWslOnce (cognitive 39) · ×1
  • bootWslOnce (cognitive 39) src/server.js:7899 — bootWslOnce has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 14, ternaries 9 (11 pts), if/else 8, error handling 4 (6 pts) (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.
D2 · Cognitive Complexity · createStartupDiagnosis · ×1
  • createStartupDiagnosis::report (cognitive 39) src/startup-diagnosis.js:364 — createStartupDiagnosis::report has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 13, loops 3 (5 pts), ternaries 2, other 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.
D2 · Cognitive Complexity · optional-analytics-proof.optionalAnalyticsProof (cognitive 38) · ×1
  • optional-analytics-proof.optionalAnalyticsProof (cognitive 38) src/optional-analytics-proof.js:14 — optional-analytics-proof.optionalAnalyticsProof has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 6, loops 4 (6 pts), ternaries 1 (4 pts) (nesting depth added 14). Of this number, 22 points are the body's own statements and 16 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.document.getElementById('profileForm').onsubmit (cognitive 38) · ×1
  • index.html.document.getElementById('profileForm').onsubmit (cognitive 38) src/public/index.html:12359 — index.html.document.getElementById('profileForm').onsubmit has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (23 pts), ternaries 6 (10 pts), boolean chains 4, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · repair-dependencies.dependencyRemovalScope.reachable (cognitive 38) · ×1
  • repair-dependencies.dependencyRemovalScope.reachable (cognitive 38) src/repair-dependencies.js:255 — repair-dependencies.dependencyRemovalScope.reachable has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 18). Of this number, 36 points are the body's own statements and 2 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 · update (cognitive 38) · ×1
  • update (cognitive 38) src/public/launch-list.js:171 — update has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 6 (9 pts), boolean chains 4 (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 · selfcheck.analyzeLogs (cognitive 37) · ×1
  • selfcheck.analyzeLogs (cognitive 37) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1714 — selfcheck.analyzeLogs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (25 pts), boolean chains 7, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · internal-tabs.finishDrag (cognitive 37) · ×1
  • internal-tabs.finishDrag (cognitive 37) src/public/internal-tabs.js:228 — internal-tabs.finishDrag has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 6, error handling 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 · start (cognitive 37) · ×1
  • start (cognitive 37) REDACTED:594 — start has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 8, error handling 5 (7 pts), ternaries 2 (nesting depth added 7). Of this number, 31 points are the body's own statements and 6 belong to 25 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · applyInstall (cognitive 37) · ×1
  • applyInstall (cognitive 37) src/packs.js:493 — applyInstall has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 4 (8 pts), boolean chains 6, loops 2 (3 pts), error handling 1 (nesting depth added 14). Of this number, 36 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dependencyRemovalScope (cognitive 37) · ×1
  • dependencyRemovalScope (cognitive 37) src/repair-dependencies.js:246 — dependencyRemovalScope has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (46 pts), boolean chains 17, loops 4 (6 pts), ternaries 2 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.checkHome (cognitive 36) · ×1
  • selfcheck.checkHome (cognitive 36) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1069 — selfcheck.checkHome has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (20 pts), ternaries 6 (13 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.paintPickerHomes (cognitive 36) · ×1
  • index.html.paintPickerHomes (cognitive 36) src/public/index.html:7173 — index.html.paintPickerHomes has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 14, ternaries 12 (13 pts), loops 7 (8 pts), if/else 1 (nesting depth added 2). Of this number, 23 points are the body's own statements and 13 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safeConnection (cognitive 36) · ×1
  • safeConnection (cognitive 36) src/settings.js:441 — safeConnection has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 11 (14 pts), if/else 10 (13 pts), boolean chains 5, error handling 3 (4 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · startMascot · ×1
  • startMascot::tick (cognitive 36) plugins/dsh-x-aquarium/lib/mascot-part.js:98 — startMascot::tick has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 15 (26 pts), boolean chains 4, if/else 4, loops 1, match/switch 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.
D2 · Cognitive Complexity · bootOnce (cognitive 35) · ×1
  • bootOnce (cognitive 35) src/server.js:7773 — bootOnce has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 9 (12 pts), if/else 10 (11 pts), boolean chains 7, error handling 4 (5 pts) (nesting depth added 5). Of this number, 30 points are the body's own statements and 5 belong to 5 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 · saveConnectionFromBody (cognitive 35) · ×1
  • saveConnectionFromBody (cognitive 35) src/server.js:9421 — saveConnectionFromBody has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 9 (14 pts), boolean chains 13, if/else 7, other 1 (nesting depth added 5). Of this number, 32 points are the body's own statements and 3 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · dependencyRemovalScope · ×1
  • dependencyRemovalScope::reachable (cognitive 35) src/repair-dependencies.js:255 — dependencyRemovalScope::reachable has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply (cognitive 35) · ×1
  • apply (cognitive 35) plugins/dsh-x-sync/lib/index.js:339 — apply has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 10 (16 pts), if/else 7 (9 pts), error handling 6, loops 2, boolean chains 1, other 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 19 function items inside it that branch (runJob, handler, handler, …). 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 · selfcheck.checkEnvironment (cognitive 34) · ×1
  • selfcheck.checkEnvironment (cognitive 34) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:643 — selfcheck.checkEnvironment has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (14 pts), ternaries 6 (12 pts), boolean chains 8 (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 · server.trayAction (cognitive 34) · ×1
  • server.trayAction (cognitive 34) src/server.js:2485 — server.trayAction has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 13, ternaries 3 (4 pts) (nesting depth added 5). Of this number, 22 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · server.removeLaunchPresetNow (cognitive 34) · ×1
  • server.removeLaunchPresetNow (cognitive 34) src/server.js:2826 — server.removeLaunchPresetNow has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (10 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dialogOptions (cognitive 34) · ×1
  • dialogOptions (cognitive 34) shell/desktop.mjs:58 — dialogOptions has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 8 (17 pts), boolean chains 8, if/else 6 (8 pts), match/switch 1 (nesting depth added 11). Of this number, 31 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stop (cognitive 33) · ×1
  • stop (cognitive 33) src/server.js:9203 — stop has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 12, ternaries 9, if/else 5 (7 pts), loops 3 (5 pts) (nesting depth added 4). Of this number, 25 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · stopTabDrag (cognitive 33) · ×1
  • stopTabDrag (cognitive 33) REDACTED:920 — stopTabDrag has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 4 (9 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inspectWslDistro (cognitive 33) · ×1
  • inspectWslDistro (cognitive 33) src/wsl.js:553 — inspectWslDistro has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 9, ternaries 2 (4 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · declaredService (cognitive 33) · ×1
  • declaredService (cognitive 33) src/configuration-evidence.js:92 — declaredService has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 11, loops 2 (nesting depth added 8). Of this number, 32 points are the body's own statements and 1 belongs 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 · main.handleTabMessage (cognitive 32) · ×1
  • main.handleTabMessage (cognitive 32) REDACTED:1193 — main.handleTabMessage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 8, 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.
D2 · Cognitive Complexity · selfcheck.parseArgs (cognitive 32) · ×1
  • selfcheck.parseArgs (cognitive 32) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:296 — selfcheck.parseArgs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 7, loops 1 (nesting depth added 9). Of this number, 30 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.checkNetworkProbe (cognitive 32) · ×1
  • selfcheck.checkNetworkProbe (cognitive 32) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1641 — selfcheck.checkNetworkProbe has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 12 (22 pts), if/else 4 (6 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.handlePrepareUpdate (cognitive 32) · ×1
  • index.html.handlePrepareUpdate (cognitive 32) src/public/index.html:5694 — index.html.handlePrepareUpdate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 11 (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 · index.html.selectPickerHome (cognitive 32) · ×1
  • index.html.selectPickerHome (cognitive 32) src/public/index.html:7462 — index.html.selectPickerHome has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 14, error handling 1 (2 pts) (nesting depth added 7). Of this number, 30 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.removePickerProfile (cognitive 32) · ×1
  • index.html.removePickerProfile (cognitive 32) src/public/index.html:7794 — index.html.removePickerProfile has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 8, ternaries 4 (6 pts), loops 1 (2 pts), error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.renderLaunchReport (cognitive 32) · ×1
  • index.html.renderLaunchReport (cognitive 32) src/public/index.html:8480 — index.html.renderLaunchReport has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 22, ternaries 9, if/else 1. Most of this is not in the body itself: 11 of the 32 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 8487, packageTitle, splitTitle, …). 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 · recovery.restoreProfileBackup (cognitive 32) · ×1
  • recovery.restoreProfileBackup (cognitive 32) src/recovery.js:195 — recovery.restoreProfileBackup has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (7 pts), error handling 2 (4 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 16). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 198, 209). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · repair-plan.profileFingerprint (cognitive 32) · ×1
  • repair-plan.profileFingerprint (cognitive 32) src/repair-plan.js:9 — repair-plan.profileFingerprint has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiagnosticRepairs.inspect (cognitive 32) · ×1
  • DiagnosticRepairs.inspect (cognitive 32) src/repair-actions.js:186 — DiagnosticRepairs.inspect has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, if/else 8, ternaries 5 (6 pts), error handling 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 199, 228, 243, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · server.addPlugin (cognitive 32) · ×1
  • server.addPlugin (cognitive 32) src/server.js:6458 — server.addPlugin has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 4 (8 pts), boolean chains 5, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · declarationEvidence (cognitive 32) · ×1
  • declarationEvidence (cognitive 32) src/runtime-diagnostics.mjs:495 — declarationEvidence has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 10, loops 2 (5 pts), error handling 1 (nesting depth added 12). Of this number, 31 points are the body's own statements and 1 belongs to 5 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 · readZip (cognitive 32) · ×1
  • readZip (cognitive 32) src/zip.js:58 — readZip has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 5, ternaries 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply (cognitive 32) · ×1
  • apply (cognitive 32) plugins/dsh-x-desktop-notify/lib/index.js:79 — apply has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 4 (7 pts), error handling 6, boolean chains 3, other 3 (nesting depth added 5). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 121, a function literal at line 154, send, …). 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.validate (cognitive 31) · ×1
  • index.validate (cognitive 31) plugins/dsh-x-sidebar-browser/index.js:184 — index.validate has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 11, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.showPane (cognitive 31) · ×1
  • index.html.showPane (cognitive 31) src/public/index.html:4579 — index.html.showPane has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 6 (7 pts), boolean chains 6, error handling 1 (3 pts) (nesting depth added 7). Of this number, 25 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · index.html.renderPackView (cognitive 31) · ×1
  • index.html.renderPackView (cognitive 31) src/public/index.html:12696 — index.html.renderPackView has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 15, ternaries 6 (10 pts), if/else 6 (nesting depth added 4). Of this number, 21 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.findSystemNode (cognitive 31) · ×1
  • server.findSystemNode (cognitive 31) src/server.js:4885 — server.findSystemNode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (8 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.buildContext (cognitive 30) · ×1
  • selfcheck.buildContext (cognitive 30) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:460 — selfcheck.buildContext has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, ternaries 6 (8 pts), if/else 6 (7 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.openProfileDialog (cognitive 30) · ×1
  • index.html.openProfileDialog (cognitive 30) src/public/index.html:12310 — index.html.openProfileDialog has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (19 pts), boolean chains 7, if/else 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.renderPackInspect (cognitive 30) · ×1
  • index.html.renderPackInspect (cognitive 30) src/public/index.html:12987 — index.html.renderPackInspect has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 17, if/else 6 (7 pts), ternaries 6 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SshRemoteCore.streamLogs (cognitive 30) · ×1
  • SshRemoteCore.streamLogs (cognitive 30) src/ssh-core.js:344 — SshRemoteCore.streamLogs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (6 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 374, 349, 364). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · server.exportEnvironmentNow (cognitive 30) · ×1
  • server.exportEnvironmentNow (cognitive 30) src/server.js:4085 — server.exportEnvironmentNow has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 9, ternaries 7, loops 1 (nesting depth added 3). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · factory.formatSnapshot (cognitive 30) · ×1
  • factory.formatSnapshot (cognitive 30) plugins/dsh-x-sidebar-browser/client.js:545 — factory.formatSnapshot has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 5 (9 pts), boolean chains 4, loops 1 (nesting depth added 11). Of this number, 27 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent 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.html.paintLaunchProfiles (cognitive 29) · ×1
  • index.html.paintLaunchProfiles (cognitive 29) src/public/index.html:4941 — index.html.paintLaunchProfiles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, loops 2 (5 pts), ternaries 2 (3 pts) (nesting depth added 9). Of this number, 26 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · megabytes · ×1
  • megabytes::exportEnvironmentNow (cognitive 29) src/server.js:4085 — megabytes::exportEnvironmentNow has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 8, boolean chains 7, loops 1, other 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.html.renderDiagnosis (cognitive 28) · ×1
  • index.html.renderDiagnosis (cognitive 28) src/public/index.html:3586 — index.html.renderDiagnosis has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 3 (6 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 22 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.html.paintPickerDetails (cognitive 28) · ×1
  • index.html.paintPickerDetails (cognitive 28) src/public/index.html:7403 — index.html.paintPickerDetails has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 7 (11 pts), boolean chains 5 (nesting depth added 7). Of this number, 19 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.attributePlugins (cognitive 28) · ×1
  • server.attributePlugins (cognitive 28) src/server.js:1172 — server.attributePlugins has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 4 (11 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 · server.createProfile (cognitive 28) · ×1
  • server.createProfile (cognitive 28) src/server.js:8871 — server.createProfile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 7 (8 pts), boolean chains 6, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 8889, 8897). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · probeStdio (cognitive 28) · ×1
  • probeStdio (cognitive 28) src/mcp.js:599 — probeStdio has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 7, other 6, if/else 4, error handling 2 (nesting depth added 3). Of this number, 26 points are the body's own statements and 2 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · expandComparator (cognitive 28) · ×1
  • expandComparator (cognitive 28) src/version.js:73 — expandComparator has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 6 (9 pts), boolean chains 7, other 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.html.setLaunchBackend (cognitive 27) · ×1
  • index.html.setLaunchBackend (cognitive 27) src/public/index.html:5186 — index.html.setLaunchBackend has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 9 (nesting depth added 6). Of this number, 23 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.autoDisableFailedPlugins (cognitive 27) · ×1
  • server.autoDisableFailedPlugins (cognitive 27) src/server.js:8456 — server.autoDisableFailedPlugins has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, loops 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). Of this number, 21 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent 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 · runPluginCommand (cognitive 27) · ×1
  • runPluginCommand (cognitive 27) src/server.js:6306 — runPluginCommand has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, loops 3 (4 pts), ternaries 3 (4 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 6315, a function literal at line 6355, (anonymous)::keepLine, …). 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 · attachProcess (cognitive 27) · ×1
  • attachProcess (cognitive 27) src/server.js:7478 — attachProcess has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, ternaries 2 (4 pts), loops 1, other 1 (nesting depth added 6). None of this is in the body itself: all 27 points belong to 10 function items inside it that branch (onLine, a function literal at line 7506, a function literal at line 7571, …). 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 · connectionDraftFromBody (cognitive 27) · ×1
  • connectionDraftFromBody (cognitive 27) src/server.js:9901 — connectionDraftFromBody has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 9, other 7, if/else 5 (6 pts), ternaries 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · factory.pickElement (cognitive 27) · ×1
  • factory.pickElement (cognitive 27) plugins/dsh-x-sidebar-browser/client.js:1123 — factory.pickElement has cognitive complexity 27 (threshold 15). Drivers by points: error handling 6 (11 pts), if/else 8 (10 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · factory.installViewport (cognitive 27) · ×1
  • factory.installViewport (cognitive 27) plugins/dsh-x-sidebar-browser/client.js:1185 — factory.installViewport has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (16 pts), loops 4, ternaries 3 (4 pts), boolean chains 3 (nesting depth added 2). None of this is in the body itself: all 27 points belong to 14 function items inside it that branch (applyFrame, syncViewportBar, ensureViewportBar, …). 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 · migrateLegacyWslPresets (cognitive 27) · ×1
  • migrateLegacyWslPresets (cognitive 27) src/settings.js:522 — migrateLegacyWslPresets has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (8 pts), if/else 6 (7 pts), error handling 1, loops 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 532, uniqueName, a function literal at line 543, …). 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 · parseMemory (cognitive 27) · ×1
  • parseMemory (cognitive 27) plugins/dsh-x-memory/lib/store.js:72 — parseMemory has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, loops 2, other 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 · env.findSystemNode (cognitive 26) · ×1
  • env.findSystemNode (cognitive 26) shell/env.mjs:50 — env.findSystemNode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (8 pts), ternaries 2 (4 pts), boolean chains 2 (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 · main.startTabDrag (cognitive 26) · ×1
  • main.startTabDrag (cognitive 26) REDACTED:981 — main.startTabDrag has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8, ternaries 4 (6 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 2 function items inside it that branch (update, a function literal at line 985). 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.html.recommendedVersion (cognitive 26) · ×1
  • index.html.recommendedVersion (cognitive 26) src/public/index.html:8849 — index.html.recommendedVersion has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 17, if/else 4 (6 pts), ternaries 2 (3 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · compose-v7.remove_specks (cognitive 26) · ×1
  • compose-v7.remove_specks (cognitive 26) docs/mascot-design/compose-v7.py:46 — compose-v7.remove_specks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (7 pts), boolean chains 4 (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 · applyLaunchEnvironment (cognitive 26) · ×1
  • applyLaunchEnvironment (cognitive 26) src/server.js:3211 — applyLaunchEnvironment has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, ternaries 2 (3 pts), error handling 2 (nesting depth added 3). Of this number, 17 points are the body's own statements and 9 belong to 7 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · factory.revealFrame (cognitive 26) · ×1
  • factory.revealFrame (cognitive 26) plugins/dsh-x-sidebar-browser/client.js:421 — factory.revealFrame has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 2 (5 pts), error handling 2 (4 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · apply · ×1
  • apply::captureGuest (cognitive 26) plugins/dsh-x-sidebar-browser/index.js:449 — apply::captureGuest has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 3 (6 pts), error handling 4 (5 pts) (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.
D2 · Cognitive Complexity · search (cognitive 26) · ×1
  • search (cognitive 26) plugins/dsh-x-memory/lib/store.js:308 — search has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), other 4, loops 2 (3 pts), boolean chains 1 (nesting depth added 12). Of this number, 25 points are the body's own statements and 1 belongs 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 · index.pickPath (cognitive 25) · ×1
  • index.pickPath (cognitive 25) plugins/dsh-x-sync/lib/index.js:303 — index.pickPath has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 5 (11 pts), boolean chains 3 (nesting depth added 10). Of this number, 13 points are the body's own statements and 12 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 · proxy.requestOnce (cognitive 25) · ×1
  • proxy.requestOnce (cognitive 25) src/proxy.js:340 — proxy.requestOnce has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, ternaries 6 (8 pts), if/else 7 (nesting depth added 2). None of this is in the body itself: all 25 points belong to 5 function literals inside it that branch (lines 375, 341, 362, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · bind (cognitive 25) · ×1
  • bind (cognitive 25) shell/browser-guests.mjs:84 — bind has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, error handling 1 (3 pts), ternaries 3, loops 2 (nesting depth added 4). None of this is in the body itself: all 25 points belong to 12 function items inside it that branch (a function literal at line 85, releaseAll, a function literal at line 111, …). 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.html.runningInfo (cognitive 24) · ×1
  • index.html.runningInfo (cognitive 24) src/public/index.html:4747 — index.html.runningInfo has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (8 pts), ternaries 2 (3 pts) (nesting depth added 4). Of this number, 16 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.paintVersionManager (cognitive 24) · ×1
  • index.html.paintVersionManager (cognitive 24) src/public/index.html:9421 — index.html.paintVersionManager has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 20, if/else 3, ternaries 1. Of this number, 23 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.paintSelfPill (cognitive 24) · ×1
  • index.html.paintSelfPill (cognitive 24) src/public/index.html:10517 — index.html.paintSelfPill has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 8 (9 pts), boolean chains 5 (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 · openExternal (cognitive 24) · ×1
  • openExternal (cognitive 24) src/server.js:9138 — openExternal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 10, error handling 1, ternaries 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · probeHttp (cognitive 24) · ×1
  • probeHttp (cognitive 24) src/mcp.js:684 — probeHttp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), other 6, boolean chains 3, error handling 3, ternaries 1 (2 pts), loops 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · parseScutilProxy (cognitive 24) · ×1
  • parseScutilProxy (cognitive 24) src/proxy.js:91 — parseScutilProxy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, ternaries 2 (4 pts), loops 2, other 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 · createSshBackend.connect (cognitive 24) · ×1
  • createSshBackend.connect (cognitive 24) src/ssh.js:56 — createSshBackend.connect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), error handling 4 (6 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 59, (anonymous)::(anonymous)::finish, (anonymous)::(anonymous)::hostVerifier, …). 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 · tokens (cognitive 24) · ×1
  • tokens (cognitive 24) src/configuration-evidence.js:45 — tokens has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.refreshLaunchLog (cognitive 23) · ×1
  • index.html.refreshLaunchLog (cognitive 23) src/public/index.html:8673 — index.html.refreshLaunchLog has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (7 pts), boolean chains 4, error handling 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 · index.html.openLaunchEditor (cognitive 23) · ×1
  • index.html.openLaunchEditor (cognitive 23) src/public/index.html:9659 — index.html.openLaunchEditor has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (8 pts), ternaries 1 (nesting depth added 1). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RuntimeDiagnostics.beforeUnload (cognitive 23) · ×1
  • RuntimeDiagnostics.beforeUnload (cognitive 23) src/runtime-diagnostics.mjs:82 — RuntimeDiagnostics.beforeUnload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills.listSkills (cognitive 23) · ×1
  • skills.listSkills (cognitive 23) src/skills.js:175 — skills.listSkills has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills.previewSkillFiles (cognitive 23) · ×1
  • skills.previewSkillFiles (cognitive 23) src/skills.js:364 — skills.previewSkillFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7, loops 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ssh-config.parseConfigFile (cognitive 23) · ×1
  • ssh-config.parseConfigFile (cognitive 23) REDACTED:51 — ssh-config.parseConfigFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (8 pts), boolean chains 3, error handling 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent 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 · server.scanNodeModules (cognitive 23) · ×1
  • server.scanNodeModules (cognitive 23) src/server.js:1026 — server.scanNodeModules has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 6 (12 pts), boolean chains 2, ternaries 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (server.scanNodeModules::virtual) 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 · server.downloadToFile (cognitive 23) · ×1
  • server.downloadToFile (cognitive 23) src/server.js:7043 — server.downloadToFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts), ternaries 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolveCommandPath (cognitive 23) · ×1
  • resolveCommandPath (cognitive 23) src/mcp.js:452 — resolveCommandPath has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (7 pts), boolean chains 3, loops 2 (3 pts), other 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 · index.html.executeRepair (cognitive 22) · ×1
  • index.html.executeRepair (cognitive 22) src/public/index.html:4188 — index.html.executeRepair has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 2 (4 pts), ternaries 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.refreshLaunchHomeProfiles (cognitive 22) · ×1
  • index.html.refreshLaunchHomeProfiles (cognitive 22) src/public/index.html:5287 — index.html.refreshLaunchHomeProfiles has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (8 pts), ternaries 1 (3 pts), error handling 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 · index.html.renderConnectionProgress (cognitive 22) · ×1
  • index.html.renderConnectionProgress (cognitive 22) src/public/index.html:5595 — index.html.renderConnectionProgress has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (7 pts), ternaries 2 (nesting depth added 2). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.showNodeRuntimeSettings (cognitive 22) · ×1
  • index.html.showNodeRuntimeSettings (cognitive 22) src/public/index.html:11253 — index.html.showNodeRuntimeSettings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, ternaries 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent 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 · internal-tabs.arrange (cognitive 22) · ×1
  • internal-tabs.arrange (cognitive 22) src/public/internal-tabs.js:62 — internal-tabs.arrange has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · repair-dependencies.dependencyOrigins (cognitive 22) · ×1
  • repair-dependencies.dependencyOrigins (cognitive 22) src/repair-dependencies.js:206 — repair-dependencies.dependencyOrigins has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (7 pts), loops 2 (3 pts) (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · startup-diagnosis.parseSkippedBundles (cognitive 22) · ×1
  • startup-diagnosis.parseSkippedBundles (cognitive 22) src/startup-diagnosis.js:92 — startup-diagnosis.parseSkippedBundles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, error handling 1 (2 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 · server.downloadSelfUpdateOnce (cognitive 22) · ×1
  • server.downloadSelfUpdateOnce (cognitive 22) src/server.js:1562 — server.downloadSelfUpdateOnce has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 2 (3 pts), error handling 1 (2 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.setInstancePortNow (cognitive 22) · ×1
  • server.setInstancePortNow (cognitive 22) src/server.js:2326 — server.setInstancePortNow has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (6 pts), if/else 5, error handling 1, loops 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · presentInstance (cognitive 22) · ×1
  • presentInstance (cognitive 22) shell/instance-views.mjs:53 — presentInstance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, error handling 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · desktop.parseDialog (cognitive 21) · ×1
  • desktop.parseDialog (cognitive 21) src/desktop.js:141 — desktop.parseDialog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · environment-pack.tarballFiles (cognitive 21) · ×1
  • environment-pack.tarballFiles (cognitive 21) src/environment-pack.js:263 — environment-pack.tarballFiles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp.parseMcpCommand (cognitive 21) · ×1
  • mcp.parseMcpCommand (cognitive 21) src/mcp.js:47 — mcp.parseMcpCommand has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp.scanBlocks (cognitive 21) · ×1
  • mcp.scanBlocks (cognitive 21) src/mcp.js:214 — mcp.scanBlocks has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 2 (4 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.diagnosisText (cognitive 21) · ×1
  • index.html.diagnosisText (cognitive 21) src/public/index.html:3735 — index.html.diagnosisText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (6 pts), boolean chains 2, ternaries 2 (nesting depth added 6). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · RuntimeDiagnostics.earlyImportSnapshot (cognitive 21) · ×1
  • RuntimeDiagnostics.earlyImportSnapshot (cognitive 21) src/runtime-diagnostics.mjs:179 — RuntimeDiagnostics.earlyImportSnapshot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.normalizeMarketEntry (cognitive 21) · ×1
  • server.normalizeMarketEntry (cognitive 21) src/server.js:7141 — server.normalizeMarketEntry has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 21. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · runSyncJob (cognitive 21) · ×1
  • runSyncJob (cognitive 21) src/server.js:5271 — runSyncJob has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (7 pts), if/else 5, boolean chains 3, error handling 2 (3 pts), other 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openPackSource (cognitive 21) · ×1
  • openPackSource (cognitive 21) src/server.js:7201 — openPackSource has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 4 (6 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · stopAll (cognitive 21) · ×1
  • stopAll (cognitive 21) src/server.js:11831 — stopAll has cognitive complexity 21 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 6 (8 pts), loops 4 (5 pts) (nesting depth added 8). Of this number, 19 points are the body's own statements and 2 belong to 6 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 · apply (cognitive 21) · ×1
  • apply (cognitive 21) plugins/dsh-x-context-menu/lib/index.js:178 — apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3 (5 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 6). None of this is in the body itself: all 21 points belong to 7 function items inside it that branch (handler, handler, a function literal at line 247, …). 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 · settings.migrateLegacyWslPresets.presets (cognitive 20) · ×1
  • settings.migrateLegacyWslPresets.presets (cognitive 20) src/settings.js:532 — settings.migrateLegacyWslPresets.presets has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), ternaries 2, error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.openProfilePicker (cognitive 20) · ×1
  • index.html.openProfilePicker (cognitive 20) src/public/index.html:7539 — index.html.openProfilePicker has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (8 pts), ternaries 2 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.compareVersion · ×1
  • index.html.compareVersion::comparePre (cognitive 20) src/public/index.html:8117 — index.html.compareVersion::comparePre has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.html.compareVersion) 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 · index.html.applySelfUpdate (cognitive 20) · ×1
  • index.html.applySelfUpdate (cognitive 20) src/public/index.html:10545 — index.html.applySelfUpdate has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · internal-tabs.document.addEventListener("pointermove") (cognitive 20) · ×1
  • internal-tabs.document.addEventListener("pointermove") (cognitive 20) src/public/internal-tabs.js:298 — internal-tabs.document.addEventListener("pointermove") has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (6 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registry.parseInstallProgress (cognitive 20) · ×1
  • registry.parseInstallProgress (cognitive 20) src/registry.js:416 — registry.parseInstallProgress has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 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 · repair-evidence.waitingServiceEvidence (cognitive 20) · ×1
  • repair-evidence.waitingServiceEvidence (cognitive 20) src/repair-evidence.js:33 — repair-evidence.waitingServiceEvidence has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 3 (10 pts), boolean chains 4, if/else 1 (3 pts), loops 2 (3 pts) (nesting depth added 10). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent 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 · server.refreshShortcuts (cognitive 20) · ×1
  • server.refreshShortcuts (cognitive 20) src/server.js:5942 — server.refreshShortcuts has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), error handling 5, loops 1 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stringRecord (cognitive 20) · ×1
  • stringRecord (cognitive 20) src/mcp.js:172 — stringRecord has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), other 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.scanSkillRoot (cognitive 19) · ×1
  • selfcheck.scanSkillRoot (cognitive 19) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1430 — selfcheck.scanSkillRoot has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · environments.normalizePluginList (cognitive 19) · ×1
  • environments.normalizePluginList (cognitive 19) src/environments.js:146 — environments.normalizePluginList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 3 (5 pts), error handling 2 (4 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 · diagnostic-repair.packageFingerprint · ×1
  • diagnostic-repair.packageFingerprint::visit (cognitive 19) src/diagnostic-repair.js:68 — diagnostic-repair.packageFingerprint::visit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.versionRootEl.addEventListener("keydown") (cognitive 19) · ×1
  • index.html.versionRootEl.addEventListener("keydown") (cognitive 19) src/public/index.html:3146 — index.html.versionRootEl.addEventListener("keydown") has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.createUiSelect (cognitive 19) · ×1
  • index.html.createUiSelect (cognitive 19) src/public/index.html:3284 — index.html.createUiSelect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 2 (nesting depth added 3). None of this is in the body itself: all 19 points belong to 3 function items inside it that branch (a function literal at line 3316, label, a function literal at line 3315). 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.html.diagnosisIssueRows (cognitive 19) · ×1
  • index.html.diagnosisIssueRows (cognitive 19) src/public/index.html:8418 — index.html.diagnosisIssueRows has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (5 pts), loops 3, if/else 2 (nesting depth added 2). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.checkVersions (cognitive 19) · ×1
  • index.html.checkVersions (cognitive 19) src/public/index.html:9324 — index.html.checkVersions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 2, error handling 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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 · index.html.startSelfUpdate (cognitive 19) · ×1
  • index.html.startSelfUpdate (cognitive 19) src/public/index.html:10593 — index.html.startSelfUpdate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.restartEnvironment (cognitive 19) · ×1
  • index.html.restartEnvironment (cognitive 19) src/public/index.html:12095 — index.html.restartEnvironment has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (6 pts), if/else 3 (4 pts), error handling 1, loops 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 4 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 · internal-tabs.document.addEventListener("keydown") (cognitive 19) · ×1
  • internal-tabs.document.addEventListener("keydown") (cognitive 19) src/public/internal-tabs.js:341 — internal-tabs.document.addEventListener("keydown") has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2 (5 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · skills.parseSkillGithub (cognitive 19) · ×1
  • skills.parseSkillGithub (cognitive 19) src/skills.js:393 — skills.parseSkillGithub has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · server.packsPayload (cognitive 19) · ×1
  • server.packsPayload (cognitive 19) src/server.js:6874 — server.packsPayload has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 6, ternaries 3 (6 pts), if/else 3 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent 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 · server.packPluginSelection (cognitive 19) · ×1
  • server.packPluginSelection (cognitive 19) src/server.js:6944 — server.packPluginSelection has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (5 pts), loops 2 (5 pts) (nesting depth added 4). Of this number, 16 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · server.marketEntries (cognitive 19) · ×1
  • server.marketEntries (cognitive 19) src/server.js:7169 — server.marketEntries has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), boolean chains 4, if/else 2 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.rebaseLocalDeps (cognitive 19) · ×1
  • server.rebaseLocalDeps (cognitive 19) src/server.js:8846 — server.rebaseLocalDeps has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (6 pts), loops 2 (3 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.
D2 · Cognitive Complexity · start.main (cognitive 19) · ×1
  • start.main (cognitive 19) src/start.js:117 — start.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · factory.pageWait (cognitive 19) · ×1
  • factory.pageWait (cognitive 19) plugins/dsh-x-sidebar-browser/client.js:247 — factory.pageWait has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseArgs (cognitive 19) · ×1
  • parseArgs (cognitive 19) src/settings.js:904 — parseArgs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1, other 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · listMcpServers (cognitive 19) · ×1
  • listMcpServers (cognitive 19) src/mcp.js:263 — listMcpServers has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, ternaries 6, error handling 1, if/else 1. Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 270). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · createStdioInspector (cognitive 19) · ×1
  • createStdioInspector (cognitive 19) src/mcp.js:491 — createStdioInspector has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), error handling 4 (5 pts), ternaries 3 (4 pts), loops 2, boolean chains 1 (nesting depth added 4). None of this is in the body itself: all 19 points belong to 11 function items inside it that branch (a function literal at line 509, a function literal at line 535, failAll, …). 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 · recordedChanges (cognitive 19) · ×1
  • recordedChanges (cognitive 19) src/repair-evidence.js:184 — recordedChanges has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · action (cognitive 19) · ×1
  • action (cognitive 19) shell/tabs.mjs:239 — action has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1, other 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · InstanceViews.transferView (cognitive 18) · ×1
  • InstanceViews.transferView (cognitive 18) shell/instance-views.mjs:101 — InstanceViews.transferView has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tab-detach.tabDropTarget (cognitive 18) · ×1
  • tab-detach.tabDropTarget (cognitive 18) shell/tab-detach.mjs:53 — tab-detach.tabDropTarget has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, ternaries 1 (2 pts), loops 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · selfcheck.renderHuman (cognitive 18) · ×1
  • selfcheck.renderHuman (cognitive 18) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1852 — selfcheck.renderHuman has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (12 pts), if/else 5 (6 pts) (nesting depth added 6). Of this number, 9 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · session-events.load (cognitive 18) · ×1
  • session-events.load (cognitive 18) src/compat/session-events.mjs:92 — session-events.load has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · environments.linkPresets (cognitive 18) · ×1
  • environments.linkPresets (cognitive 18) src/environments.js:704 — environments.linkPresets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 2 (nesting depth added 2). None of this is in the body itself: all 18 points belong to 5 function items inside it that branch (a function literal at line 716, a function literal at line 712, a function literal at line 709, …). 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 · proxy.proxyFetch (cognitive 18) · ×1
  • proxy.proxyFetch (cognitive 18) src/proxy.js:456 — proxy.proxyFetch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plugins.setPluginEnabled (cognitive 18) · ×1
  • plugins.setPluginEnabled (cognitive 18) src/plugins.js:375 — plugins.setPluginEnabled has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mcp.listMcpServers.servers (cognitive 18) · ×1
  • mcp.listMcpServers.servers (cognitive 18) src/mcp.js:270 — mcp.listMcpServers.servers has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 6, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · booting.html.render (cognitive 18) · ×1
  • booting.html.render (cognitive 18) src/public/booting.html:309 — booting.html.render has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.updateToLatest (cognitive 18) · ×1
  • index.html.updateToLatest (cognitive 18) src/public/index.html:10018 — index.html.updateToLatest has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 6, error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.html.startShellUpdate (cognitive 18) · ×1
  • index.html.startShellUpdate (cognitive 18) src/public/index.html:10632 — index.html.startShellUpdate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 2 (3 pts), boolean chains 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 · skills.installSkillPackages (cognitive 18) · ×1
  • skills.installSkillPackages (cognitive 18) src/skills.js:469 — skills.installSkillPackages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (6 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ssh-config.queryOpenSsh (cognitive 18) · ×1
  • ssh-config.queryOpenSsh (cognitive 18) REDACTED:102 — ssh-config.queryOpenSsh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.presetScope (cognitive 18) · ×1
  • server.presetScope (cognitive 18) src/server.js:728 — server.presetScope has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (6 pts), if/else 2 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · server.trayLaunches (cognitive 18) · ×1
  • server.trayLaunches (cognitive 18) src/server.js:2451 — server.trayLaunches has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (5 pts), ternaries 4, loops 2 (nesting depth added 2). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 2455, 2472, 2459, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · server.exportDependency (cognitive 18) · ×1
  • server.exportDependency (cognitive 18) src/server.js:4000 — server.exportDependency has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · startTabDrag · ×1
  • startTabDrag::update (cognitive 18) REDACTED:990 — startTabDrag::update has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 4, error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · factory.pagePress (cognitive 18) · ×1
  • factory.pagePress (cognitive 18) plugins/dsh-x-sidebar-browser/client.js:192 — factory.pagePress has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10, boolean chains 5, error handling 1 (2 pts), if/else 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · createWslBackend.resolveIdentity (cognitive 18) · ×1
  • createWslBackend.resolveIdentity (cognitive 18) src/wsl.js:339 — createWslBackend.resolveIdentity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, error handling 1, other 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 342, 369). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · normalizeReconnect (cognitive 18) · ×1
  • normalizeReconnect (cognitive 18) src/mcp.js:150 — normalizeReconnect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · downloadCoreTarball (cognitive 18) · ×1
  • downloadCoreTarball (cognitive 18) src/core-npm.js:107 — downloadCoreTarball has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · detach (cognitive 18) · ×1
  • detach (cognitive 18) shell/tab-detach.mjs:120 — detach has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 1, other 1, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.describeSummary (cognitive 17) · ×1
  • index.describeSummary (cognitive 17) plugins/dsh-x-sync/lib/index.js:165 — index.describeSummary has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 3, if/else 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · InstanceViews.follow (cognitive 17) · ×1
  • InstanceViews.follow (cognitive 17) shell/instance-views.mjs:211 — InstanceViews.follow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BrowserTabs.present (cognitive 17) · ×1
  • BrowserTabs.present (cognitive 17) shell/tabs.mjs:117 — BrowserTabs.present has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · main.installPermissionHandlers (cognitive 17) · ×1
  • main.installPermissionHandlers (cognitive 17) REDACTED:1532 — main.installPermissionHandlers has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 6, if/else 3 (nesting depth added 2). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 1534). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · environments.recordPackSources (cognitive 17) · ×1
  • environments.recordPackSources (cognitive 17) src/environments.js:790 — environments.recordPackSources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, ternaries 2 (4 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · environments-page.updateReportHtml (cognitive 17) · ×1
  • environments-page.updateReportHtml (cognitive 17) src/public/environments-page.js:488 — environments-page.updateReportHtml has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, loops 5, if/else 4, ternaries 1. Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.transitionDialog (cognitive 17) · ×1
  • index.html.transitionDialog (cognitive 17) src/public/index.html:3420 — index.html.transitionDialog has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (6 pts), if/else 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.html.diagnosisAdviceLines (cognitive 17) · ×1
  • index.html.diagnosisAdviceLines (cognitive 17) src/public/index.html:3709 — index.html.diagnosisAdviceLines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.paintProjectDevices (cognitive 17) · ×1
  • index.html.paintProjectDevices (cognitive 17) src/public/index.html:5994 — index.html.paintProjectDevices has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 4, if/else 3, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.html.describePackProgress (cognitive 17) · ×1
  • index.html.describePackProgress (cognitive 17) src/public/index.html:13231 — index.html.describePackProgress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registry.fetchToFile (cognitive 17) · ×1
  • registry.fetchToFile (cognitive 17) src/registry.js:128 — registry.fetchToFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · repair-dependencies.installedPackageState · ×1
  • repair-dependencies.installedPackageState::scan (cognitive 17) src/repair-dependencies.js:128 — repair-dependencies.installedPackageState::scan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ssh-core.ensureRemoteNode (cognitive 17) · ×1
  • ssh-core.ensureRemoteNode (cognitive 17) src/ssh-core.js:56 — ssh-core.ensureRemoteNode has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts) (nesting depth added 1). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · server.upgradeEnvironmentPluginsNow (cognitive 17) · ×1
  • server.upgradeEnvironmentPluginsNow (cognitive 17) src/server.js:3507 — server.upgradeEnvironmentPluginsNow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (4 pts), ternaries 2 (4 pts), error handling 1 (2 pts), loops 2 (nesting depth added 4). Of this number, 12 points are the body's own statements and 5 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 · server.releaseFeed (cognitive 17) · ×1
  • server.releaseFeed (cognitive 17) src/server.js:6216 — server.releaseFeed has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (5 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · pruneVersions (cognitive 17) · ×1
  • pruneVersions (cognitive 17) src/server.js:1326 — pruneVersions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 2 (4 pts), loops 2 (3 pts), error handling 1 (2 pts), other 1 (nesting depth added 6). Of this number, 16 points are the body's own statements and 1 belongs 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 · instanceInfo (cognitive 17) · ×1
  • instanceInfo (cognitive 17) src/server.js:1945 — instanceInfo has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, ternaries 5, other 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · factory.pageType (cognitive 17) · ×1
  • factory.pageType (cognitive 17) plugins/dsh-x-sidebar-browser/client.js:164 — factory.pageType has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · installSpecs (cognitive 17) · ×1
  • installSpecs (cognitive 17) src/packs.js:143 — installSpecs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.showTabMenu (cognitive 16) · ×1
  • main.showTabMenu (cognitive 16) REDACTED:867 — main.showTabMenu has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 5). Of this number, 9 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent 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 · proxy.followRedirects (cognitive 16) · ×1
  • proxy.followRedirects (cognitive 16) src/proxy.js:424 — proxy.followRedirects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · environment-upstream.upstreamUpdateReport (cognitive 16) · ×1
  • environment-upstream.upstreamUpdateReport (cognitive 16) src/environment-upstream.js:94 — environment-upstream.upstreamUpdateReport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 2 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 · pre-update.checkPluginCompatibility (cognitive 16) · ×1
  • pre-update.checkPluginCompatibility (cognitive 16) src/pre-update.js:35 — pre-update.checkPluginCompatibility has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.html.recordedChangeText (cognitive 16) · ×1
  • index.html.recordedChangeText (cognitive 16) src/public/index.html:3943 — index.html.recordedChangeText has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.refreshWslProfiles (cognitive 16) · ×1
  • index.html.refreshWslProfiles (cognitive 16) src/public/index.html:5095 — index.html.refreshWslProfiles has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), error handling 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.launchGuideDirListEl.addEventListener("click") (cognitive 16) · ×1
  • index.html.launchGuideDirListEl.addEventListener("click") (cognitive 16) src/public/index.html:6814 — index.html.launchGuideDirListEl.addEventListener("click") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 6827). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.html.paintLaunchEnvTrigger (cognitive 16) · ×1
  • index.html.paintLaunchEnvTrigger (cognitive 16) src/public/index.html:7152 — index.html.paintLaunchEnvTrigger has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 6, if/else 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 · index.html.paintPickerProfiles (cognitive 16) · ×1
  • index.html.paintPickerProfiles (cognitive 16) src/public/index.html:7322 — index.html.paintPickerProfiles has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (4 pts), loops 3, ternaries 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.html.compareVersion (cognitive 16) · ×1
  • index.html.compareVersion (cognitive 16) src/public/index.html:8111 — index.html.compareVersion has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 10 (16 pts), boolean chains 5, loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index.html.compareVersion::comparePre) 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 · index.html.skillInspectEl.onclick (cognitive 16) · ×1
  • index.html.skillInspectEl.onclick (cognitive 16) src/public/index.html:13619 — index.html.skillInspectEl.onclick has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 1 (2 pts), error handling 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 · registry.installSpec (cognitive 16) · ×1
  • registry.installSpec (cognitive 16) src/registry.js:485 — registry.installSpec has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 1. None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 526, 498). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · wsl.parseWslDistroList (cognitive 16) · ×1
  • wsl.parseWslDistroList (cognitive 16) src/wsl.js:149 — wsl.parseWslDistroList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, 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 · wsl.readWslProfile (cognitive 16) · ×1
  • wsl.readWslProfile (cognitive 16) src/wsl.js:828 — wsl.readWslProfile has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4, ternaries 2, error handling 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · server.scanNodeModules · ×1
  • server.scanNodeModules::virtual (cognitive 16) src/server.js:1052 — server.scanNodeModules::virtual has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 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. This shape REPEATS in the file: one other method here (server.scanNodeModules) 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 · server.fetchLatestTag (cognitive 16) · ×1
  • server.fetchLatestTag (cognitive 16) src/server.js:6016 — server.fetchLatestTag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 2 (4 pts), loops 2, boolean chains 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 · server.latestRemoteFor (cognitive 16) · ×1
  • server.latestRemoteFor (cognitive 16) src/server.js:6054 — server.latestRemoteFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 3, loops 3, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.checkWebPage (cognitive 16) · ×1
  • server.checkWebPage (cognitive 16) src/server.js:7678 — server.checkWebPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), loops 2 (4 pts), ternaries 2 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · server.remoteCoreForTarget (cognitive 16) · ×1
  • server.remoteCoreForTarget (cognitive 16) src/server.js:8086 — server.remoteCoreForTarget has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 3). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · publicFailure (cognitive 16) · ×1
  • publicFailure (cognitive 16) src/server.js:611 — publicFailure has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 4, boolean chains 3, other 2 (nesting depth added 1). Of this number, 9 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · killTree (cognitive 16) · ×1
  • killTree (cognitive 16) src/server.js:7390 — killTree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), error handling 3 (5 pts), ternaries 3 (5 pts) (nesting depth added 6). Of this number, 10 points are the body's own statements and 6 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · safeRelPath (cognitive 16) · ×1
  • safeRelPath (cognitive 16) src/packs.js:76 — safeRelPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1, other 1 (nesting depth added 5). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: DiagnosticRepairs src/repair-actions.js:79 — ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 54 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
P12 · CI test-gate honesty · Test suite runs only after the merge · ×1
  • Test suite runs only after the merge — `REDACTED` run(s) the test suite, but no workflow that runs tests is triggered by a pull request (or a merge queue) — so the suite reports on code that is already on the default branch. A red build there blocks nothing and the only remedy is a revert. Add the pull-request trigger to the workflow that runs your suite so the gate applies before the merge, not after it.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 126 Python, JavaScript/TypeScript production file(s) this check read across 10 module(s). Each was searched for its ecosystem's logging libraries (Python: logging, structlog, loguru; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience REDACTED:172 — `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 363 plain JS — the untyped files are npm-package/lib/core.mjs, plugins/dsh-x-aquarium/index.js, plugins/dsh-x-aquarium/lib/mascot-part.js, plugins/dsh-x-aquarium/lib/panels-block.js, plugins/dsh-x-context-menu/lib/client.js, plugins/dsh-x-context-menu/lib/index.js (+357 more).
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (23 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (23 clone groups) plugins/dsh-x-sync/lib/engine/sync.js:21 — 23 duplicated blocks under the repository root have copies in at least two of the sibling directories plugins, scripts, shell, skills, src — 20 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 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 23 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 · Duplication concentrated across 4 sibling directories (10 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (10 clone groups) plugins/dsh-x-context-menu/lib/index.js:144 — 10 duplicated blocks under plugins/ have copies in at least two of the sibling directories dsh-x-context-menu, dsh-x-memory, dsh-x-sidebar-browser, dsh-x-sync — 9 of them are reported below, and 1 is 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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 · Wholesale file copy (1185 identical lines × 2 files) · ×1
  • Wholesale file copy (1185 identical lines × 2 files) plugins/dsh-x-sync/lib/engine/sync.js:21 — plugins/dsh-x-sync/lib/engine/sync.js:21 · src/sync.js:19 — these 2 files are line-for-line copies of one another — 1185 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (254 identical lines × 2 files) · ×1
  • Wholesale file copy (254 identical lines × 2 files) plugins/dsh-x-sync/lib/engine/zipfile.js:14 — plugins/dsh-x-sync/lib/engine/zipfile.js:14 · src/zipfile.js:12 — these 2 files are line-for-line copies of one another — 254 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (39 lines × 2 locations) · ×1
  • Duplicated block (39 lines × 2 locations) plugins/dsh-x-sync/lib/engine/version.js:11 — plugins/dsh-x-sync/lib/engine/version.js:11 · src/version.js:16 — 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.
R10 · Code Duplication · Duplicated block (28 lines × 2 locations) · ×1
  • Duplicated block (28 lines × 2 locations) plugins/dsh-x-context-menu/lib/index.js:144 — plugins/dsh-x-context-menu/lib/index.js:144 · plugins/dsh-x-memory/lib/index.js:165 — 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.
R10 · Code Duplication · Duplicated block (25 lines × 2 locations) · ×1
  • Duplicated block (25 lines × 2 locations) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1373 — skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1373 · src/skills.js:78 — 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.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) shell/env.mjs:53 — shell/env.mjs:53 · src/server.js:4894 — 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.
R10 · Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (21 matched lines × 2 locations) REDACTED:1067 — REDACTED:1067 · REDACTED:1117 — the two spans are one implementation copied and then locally edited — 141 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 (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) src/wsl.js:821 — src/wsl.js:821 · src/wsl.js:856 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (16 matched lines × 2 locations) src/mcp.js:629 — src/mcp.js:629 · src/mcp.js:723 — the two spans are one implementation copied and then locally edited — 102 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 (15 lines × 2 locations) · ×1
  • Duplicated block (15 lines × 2 locations) src/remote-core.js:216 — src/remote-core.js:216 · src/ssh-core.js:202 — 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 with local edits (15 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (15 matched lines × 2 locations) src/repair-actions.js:499 — src/repair-actions.js:499 · src/repair-actions.js:643 — the two spans are one implementation copied and then locally edited — 93 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 (12 lines × 2 locations) · ×1
  • Duplicated block (12 lines × 2 locations) src/server.js:10337 — src/server.js:10337 · src/server.js:10909 — 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 (11 lines × 3 locations) · ×1
  • Duplicated block (11 lines × 3 locations) plugins/dsh-x-memory/lib/index.js:368 — plugins/dsh-x-memory/lib/index.js:368 · plugins/dsh-x-memory/lib/index.js:392 · plugins/dsh-x-memory/lib/index.js:414 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function handleApi (cyclomatic 719, cognitive 1116) · ×1
  • Complex function handleApi (cyclomatic 719, cognitive 1116) src/server.js:9940 — handleApi has cyclomatic complexity 719 and cognitive complexity 1116; 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 saveLaunchPresetNow (cyclomatic 124, cognitive 134) · ×1
  • Complex function saveLaunchPresetNow (cyclomatic 124, cognitive 134) src/server.js:2586 — saveLaunchPresetNow has cyclomatic complexity 124 and cognitive complexity 134; 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 main (cyclomatic 122, cognitive 193) · ×1
  • Complex function main (cyclomatic 122, cognitive 193) src/repair-probe.mjs:23 — main has cyclomatic complexity 122 and cognitive complexity 193; 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 saveManagerSettings (cyclomatic 95, cognitive 129) · ×1
  • Complex function saveManagerSettings (cyclomatic 95, cognitive 129) src/server.js:4403 — saveManagerSettings has cyclomatic complexity 95 and cognitive complexity 129; 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 parseTabAction (cyclomatic 83, cognitive 79) · ×1
  • Complex function parseTabAction (cyclomatic 83, cognitive 79) shell/model.mjs:205 — parseTabAction has cyclomatic complexity 83 and cognitive complexity 79; 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 buildRepairPresentation (cyclomatic 73, cognitive 138) · ×1
  • Complex function buildRepairPresentation (cyclomatic 73, cognitive 138) src/repair-evidence.js:48 — buildRepairPresentation has cyclomatic complexity 73 and cognitive complexity 138; 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 executeCommand (cyclomatic 71, cognitive 86) · ×1
  • Complex function executeCommand (cyclomatic 71, cognitive 86) plugins/dsh-x-sidebar-browser/client.js:619 — executeCommand has cyclomatic complexity 71 and cognitive complexity 86; 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 updateInternalTabs (cyclomatic 65, cognitive 68) · ×1
  • Complex function updateInternalTabs (cyclomatic 65, cognitive 68) src/public/internal-tabs.js:372 — updateInternalTabs has cyclomatic complexity 65 and cognitive complexity 68; 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 (anonymous) (cyclomatic 56, cognitive 57) · ×1
  • Complex function (anonymous) (cyclomatic 56, cognitive 57) src/settings.js:818 — (anonymous) has cyclomatic complexity 56 and cognitive complexity 57; 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 readRuntimeEvidence (cyclomatic 56, cognitive 53) · ×1
  • Complex function readRuntimeEvidence (cyclomatic 56, cognitive 53) src/runtime-diagnostics.mjs:618 — readRuntimeEvidence has cyclomatic complexity 56 and cognitive complexity 53; 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 summarize (cyclomatic 52, cognitive 77) · ×1
  • Complex function summarize (cyclomatic 52, cognitive 77) src/perf/plugin-profile.mjs:112 — summarize has cyclomatic complexity 52 and cognitive complexity 77; 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 handler (cyclomatic 46, cognitive 80) · ×1
  • Complex function handler (cyclomatic 46, cognitive 80) src/server.js:11660 — handler has cyclomatic complexity 46 and cognitive complexity 80; 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 buildConfig (cyclomatic 44, cognitive 65) · ×1
  • Complex function buildConfig (cyclomatic 44, cognitive 65) src/mcp.js:80 — buildConfig has cyclomatic complexity 44 and cognitive complexity 65; 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 buildContext (cyclomatic 44, cognitive 48) · ×1
  • Complex function buildContext (cyclomatic 44, cognitive 48) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:460 — buildContext has cyclomatic complexity 44 and cognitive complexity 48; 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 runConnectionPrepare (cyclomatic 41, cognitive 56) · ×1
  • Complex function runConnectionPrepare (cyclomatic 41, cognitive 56) src/server.js:9657 — runConnectionPrepare has cyclomatic complexity 41 and cognitive complexity 56; 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 parseActivation (cyclomatic 40, cognitive 70) · ×1
  • Complex function parseActivation (cyclomatic 40, cognitive 70) src/startup-diagnosis.js:142 — parseActivation has cyclomatic complexity 40 and cognitive complexity 70; 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 validateSettings (cyclomatic 40, cognitive 52) · ×1
  • Complex function validateSettings (cyclomatic 40, cognitive 52) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:605 — validateSettings has cyclomatic complexity 40 and cognitive complexity 52; 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 SyncPanel (cyclomatic 36, cognitive 40) · ×1
  • Complex function SyncPanel (cyclomatic 36, cognitive 40) plugins/dsh-x-sync/lib/client.js:225 — SyncPanel has cyclomatic complexity 36 and cognitive complexity 40; 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 saveSettingsNow (cyclomatic 36, cognitive 40) · ×1
  • Complex function saveSettingsNow (cyclomatic 36, cognitive 40) src/settings.js:1146 — saveSettingsNow has cyclomatic complexity 36 and cognitive complexity 40; 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 bootWslOnce (cyclomatic 36, cognitive 39) · ×1
  • Complex function bootWslOnce (cyclomatic 36, cognitive 39) src/server.js:7899 — bootWslOnce has cyclomatic complexity 36 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 (anonymous) (cyclomatic 35, cognitive 48) · ×1
  • Complex function (anonymous) (cyclomatic 35, cognitive 48) src/repair-actions.js:569 — (anonymous) has cyclomatic complexity 35 and cognitive complexity 48; 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 tick (cyclomatic 35, cognitive 41) · ×1
  • Complex function tick (cyclomatic 35, cognitive 41) src/public/mascot.js:158 — tick has cyclomatic complexity 35 and cognitive complexity 41; 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 startRemoteViaCore (cyclomatic 35, cognitive 38) · ×1
  • Complex function startRemoteViaCore (cyclomatic 35, cognitive 38) src/server.js:8226 — startRemoteViaCore has cyclomatic complexity 35 and cognitive complexity 38; 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 checkData (cyclomatic 34, cognitive 83) · ×1
  • Complex function checkData (cyclomatic 34, cognitive 83) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:881 — checkData has cyclomatic complexity 34 and cognitive complexity 83; 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 parseManifest (cyclomatic 33, cognitive 54) · ×1
  • Complex function parseManifest (cyclomatic 33, cognitive 54) src/packs.js:178 — parseManifest has cyclomatic complexity 33 and cognitive complexity 54; 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 tick (cyclomatic 33, cognitive 36) · ×1
  • Complex function tick (cyclomatic 33, cognitive 36) plugins/dsh-x-aquarium/lib/mascot-part.js:98 — tick has cyclomatic complexity 33 and cognitive complexity 36; 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 declaredService (cyclomatic 33, cognitive 32) · ×1
  • Complex function declaredService (cyclomatic 33, cognitive 32) src/configuration-evidence.js:92 — declaredService has cyclomatic complexity 33 and cognitive complexity 32; 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 validate (cyclomatic 33, cognitive 31) · ×1
  • Complex function validate (cyclomatic 33, cognitive 31) plugins/dsh-x-sidebar-browser/index.js:184 — validate has cyclomatic complexity 33 and cognitive complexity 31; 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 report (cyclomatic 32, cognitive 39) · ×1
  • Complex function report (cyclomatic 32, cognitive 39) src/startup-diagnosis.js:364 — report 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 checkPlugins (cyclomatic 31, cognitive 49) · ×1
  • Complex function checkPlugins (cyclomatic 31, cognitive 49) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1255 — checkPlugins has cyclomatic complexity 31 and cognitive complexity 49; 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 dependencyRemovalScope (cyclomatic 31, cognitive 37) · ×1
  • Complex function dependencyRemovalScope (cyclomatic 31, cognitive 37) src/repair-dependencies.js:246 — dependencyRemovalScope has cyclomatic complexity 31 and cognitive complexity 37; 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 startServer (cyclomatic 30, cognitive 47) · ×1
  • Complex function startServer (cyclomatic 30, cognitive 47) src/server.js:11599 — startServer has cyclomatic complexity 30 and cognitive complexity 47; 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 safeConnection (cyclomatic 30, cognitive 36) · ×1
  • Complex function safeConnection (cyclomatic 30, cognitive 36) src/settings.js:441 — safeConnection has cyclomatic complexity 30 and cognitive complexity 36; 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 inspectWslDistro (cyclomatic 30, cognitive 33) · ×1
  • Complex function inspectWslDistro (cyclomatic 30, cognitive 33) src/wsl.js:553 — inspectWslDistro has cyclomatic complexity 30 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function classify (cyclomatic 29, cognitive 58) · ×1
  • Complex function classify (cyclomatic 29, cognitive 58) src/packs.js:264 — classify has cyclomatic complexity 29 and cognitive complexity 58; 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 checkInstances (cyclomatic 29, cognitive 43) · ×1
  • Complex function checkInstances (cyclomatic 29, cognitive 43) skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1165 — checkInstances has cyclomatic complexity 29 and cognitive complexity 43; 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 saveConnectionFromBody (cyclomatic 29, cognitive 32) · ×1
  • Complex function saveConnectionFromBody (cyclomatic 29, cognitive 32) src/server.js:9421 — saveConnectionFromBody has cyclomatic complexity 29 and cognitive complexity 32; 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 exportEnvironmentNow (cyclomatic 29, cognitive 29) · ×1
  • Complex function exportEnvironmentNow (cyclomatic 29, cognitive 29) src/server.js:4085 — exportEnvironmentNow has cyclomatic complexity 29 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · src/server.js · ×1
  • src/server.js: 11383 lines of code src/server.js:1 — src/server.js has 11383 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 · plugins/dsh-x-sync/lib/engine/sync.js · ×1
  • plugins/dsh-x-sync/lib/engine/sync.js: 1899 lines of code plugins/dsh-x-sync/lib/engine/sync.js:1 — plugins/dsh-x-sync/lib/engine/sync.js has 1899 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/sync.js · ×1
  • src/sync.js: 1897 lines of code src/sync.js:1 — src/sync.js has 1897 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 · REDACTED · ×1
  • REDACTED: 1649 lines of code REDACTED:1 — REDACTED has 1649 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 · plugins/dsh-x-sidebar-browser/client.js · ×1
  • plugins/dsh-x-sidebar-browser/client.js: 1370 lines of code plugins/dsh-x-sidebar-browser/client.js:1 — plugins/dsh-x-sidebar-browser/client.js has 1370 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/settings.js · ×1
  • src/settings.js: 1198 lines of code src/settings.js:1 — src/settings.js has 1198 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 · plugins/dsh-x-context-menu/lib/client.js · ×1
  • plugins/dsh-x-context-menu/lib/client.js: 932 lines of code plugins/dsh-x-context-menu/lib/client.js:1 — plugins/dsh-x-context-menu/lib/client.js has 932 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/environments.js · ×1
  • src/environments.js: 898 lines of code src/environments.js:1 — src/environments.js has 898 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/wsl.js · ×1
  • src/wsl.js: 830 lines of code src/wsl.js:1 — src/wsl.js has 830 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/mcp.js · ×1
  • src/mcp.js: 721 lines of code src/mcp.js:1 — src/mcp.js has 721 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/packs.js · ×1
  • src/packs.js: 651 lines of code src/packs.js:1 — src/packs.js has 651 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/runtime-diagnostics.mjs · ×1
  • src/runtime-diagnostics.mjs: 635 lines of code src/runtime-diagnostics.mjs:1 — src/runtime-diagnostics.mjs has 635 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/repair-actions.js · ×1
  • src/repair-actions.js: 634 lines of code src/repair-actions.js:1 — src/repair-actions.js has 634 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/public/environments-page.js · ×1
  • src/public/environments-page.js: 620 lines of code src/public/environments-page.js:1 — src/public/environments-page.js has 620 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 · plugins/dsh-x-sidebar-browser/index.js · ×1
  • plugins/dsh-x-sidebar-browser/index.js: 558 lines of code plugins/dsh-x-sidebar-browser/index.js:1 — plugins/dsh-x-sidebar-browser/index.js has 558 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/registry.js · ×1
  • src/registry.js: 541 lines of code src/registry.js:1 — src/registry.js has 541 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/public/internal-tabs.js · ×1
  • src/public/internal-tabs.js: 514 lines of code src/public/internal-tabs.js:1 — src/public/internal-tabs.js has 514 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/plugins.js · ×1
  • src/plugins.js: 483 lines of code src/plugins.js:1 — src/plugins.js 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.
R3 · Large Files · src/skills.js · ×1
  • src/skills.js: 466 lines of code src/skills.js:1 — src/skills.js has 466 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 · plugins/dsh-x-sync/lib/index.js · ×1
  • plugins/dsh-x-sync/lib/index.js: 462 lines of code plugins/dsh-x-sync/lib/index.js:1 — plugins/dsh-x-sync/lib/index.js has 462 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/proxy.js · ×1
  • src/proxy.js: 462 lines of code src/proxy.js:1 — src/proxy.js has 462 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 · plugins/dsh-x-sync/lib/client.js · ×1
  • plugins/dsh-x-sync/lib/client.js: 455 lines of code plugins/dsh-x-sync/lib/client.js:1 — plugins/dsh-x-sync/lib/client.js has 455 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/environment-pack.js · ×1
  • src/environment-pack.js: 452 lines of code src/environment-pack.js:1 — src/environment-pack.js has 452 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 · plugins/dsh-x-memory/lib/index.js · ×1
  • plugins/dsh-x-memory/lib/index.js: 430 lines of code plugins/dsh-x-memory/lib/index.js:1 — plugins/dsh-x-memory/lib/index.js has 430 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/ssh-core.js · ×1
  • src/ssh-core.js: 429 lines of code src/ssh-core.js:1 — src/ssh-core.js has 429 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/startup-diagnosis.js · ×1
  • src/startup-diagnosis.js: 424 lines of code src/startup-diagnosis.js:1 — src/startup-diagnosis.js has 424 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No lint or typecheck script · ×1
  • No lint or typecheck script — test ✓ · lint ✗ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~339 LoC) · ×1
  • Dead file (~339 LoC) scripts/pack-mac.mjs — no import path from any entry point (115 application, 29 tooling, 228 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
R7 · Dead Code · Dead file (~193 LoC) · ×1
  • Dead file (~193 LoC) scripts/verify-tab-detach.mjs — no import path from any entry point (115 application, 29 tooling, 228 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
R7 · Dead Code · Dead file (~186 LoC) · ×1
  • Dead file (~186 LoC) plugins/dsh-x-aquarium/lib/mascot-part.js — no import path from any entry point (115 application, 29 tooling, 228 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
R7 · Dead Code · Dead file (~17 LoC) · ×1
  • Dead file (~17 LoC) plugins/dsh-x-aquarium/lib/panels-block.js — no import path from any entry point (115 application, 29 tooling, 228 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 'electron-updater' · ×1
  • Unused dependency 'electron-updater' REDACTED:28 — Declared in REDACTED 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 'dsh-x-desktop-notify' · ×1
  • Unused dependency 'dsh-x-desktop-notify' plugins/dsh-x-desktop-bundle/REDACTED:34 — Declared in plugins/dsh-x-desktop-bundle/REDACTED 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.
Minor — 109 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1422 — `!BOOL_TRUE.has(value) && !BOOL_FALSE.has(value)` appears character-identically in 2 files — skills/dsh-x-selfcheck/scripts/selfcheck.mjs, src/skills.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 plugins/dsh-x-aquarium/lib/mascot-part.js:91 — `!active() || event.pointerType === 'touch'` appears character-identically in 2 files — plugins/dsh-x-aquarium/lib/mascot-part.js, src/public/mascot.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 docs/water.js:100 — `!active()||e.button!==0||time-lastRipple<.08||e.target.closest('button,a,input,select,textarea,.card,nav')` appears character-identically in 2 files — docs/water.js, src/public/water.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 shell/core-fetch.mjs:201 — `!existsSync(join(dest, 'server.js')) || !existsSync(join(dest, 'REDACTED'))` appears character-identically in 2 files — shell/core-fetch.mjs, src/core-npm.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/packs.js:189 — `!manifest || typeof manifest !== 'object' || Array.isArray(manifest)` appears character-identically in 2 files — src/packs.js, src/repair-dependencies.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 plugins/dsh-x-sync/lib/engine/sync.js:1804 — `!manifest.dsh?.profile || !Array.isArray(manifest.dsh.profile.bundles)` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-aquarium/lib/mascot-part.js:164 — `!second && state !== 'drowsy' && Math.random() < .18` appears character-identically in 2 files — plugins/dsh-x-aquarium/lib/mascot-part.js, src/public/mascot.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/pre-update.js:12 — `!value || typeof value !== 'object' || Array.isArray(value)` appears character-identically in 2 files — src/pre-update.js, src/settings.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 plugins/dsh-x-sync/lib/engine/sync.js:435 — `(/<NextContinuationToken>([\s\S]*?)<\/NextContinuationToken>/.exec(text) || [])[1] || ''` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1447 — `(entry.isFile() || followed?.isFile() === true) && /\.md$/i.test(entry.name)` appears character-identically in 2 files — skills/dsh-x-selfcheck/scripts/selfcheck.mjs, src/skills.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 plugins/dsh-x-sync/lib/engine/sync.js:1287 — `(status >= 500 && status < 600) || status === 429 || status === 408` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1401 — `(text.startsWith('"') && text.endsWith('"')) || (text.startsWith("'") && text.endsWith("'"))` appears character-identically in 2 files — skills/dsh-x-selfcheck/scripts/selfcheck.mjs, src/skills.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 skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1020 — `/^\S/.test(line) && !line.startsWith('- ')` appears character-identically in 2 files — skills/dsh-x-selfcheck/scripts/selfcheck.mjs, src/plugins.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 plugins/dsh-x-sync/lib/engine/sync.js:466 — `/^\d{1,3}(?:\.\d{1,3}){3}$/.test(host) || host.includes(':') || /^\[/.test(host)` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-sync/lib/engine/sync.js:1357 — `Date.parse(pick('getlastmodified')) || 0` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-sync/lib/engine/sync.js:619 — `Date.parse(result.headers['last-modified'] || '') || 0` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 shell/core-fetch.mjs:213 — `Number(res.headers.get('content-length')) || 0` appears character-identically in 4 files — shell/core-fetch.mjs, src/core-npm.js, src/registry.js, src/server.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 shell/model.mjs:199 — `Number.isSafeInteger(value) && value >= 0` appears character-identically in 2 files — shell/model.mjs, src/pack-market.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 plugins/dsh-x-context-menu/lib/index.js:147 — `address === '127.0.0.1' || address === '::1' || address === '::ffff:127.0.0.1'` appears character-identically in 3 files — plugins/dsh-x-context-menu/lib/index.js, plugins/dsh-x-memory/lib/index.js, plugins/dsh-x-sync/lib/index.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 plugins/dsh-x-sync/lib/engine/sync.js:564 — `attempt < RETRIES && retryableError(error)` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-sync/lib/engine/sync.js:100 — `bucket && !/^[A-Za-z0-9._-]{1,255}$/.test(bucket)` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-sync/lib/engine/sync.js:104 — `config.endpoint && !/^https?:\/\/[^\s]+$/i.test(config.endpoint)` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-sync/lib/engine/sync.js:115 — `config.endpoint && config.bucket && config.accessKeyId && config.secretAccessKey` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-sync/lib/engine/sync.js:107 — `config.endpoint && config.endpoint.includes('://') && !URL.canParse(config.endpoint)` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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 plugins/dsh-x-sync/lib/engine/sync.js:207 — `config.url && config.username && config.password` appears character-identically in 2 files — plugins/dsh-x-sync/lib/engine/sync.js, src/sync.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.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×40
  • Silent fallback default in catch shell/core-fetch.mjs:315 — `cachedVersions` 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 plugins/dsh-x-context-menu/lib/index.js:38 — `allowedUrl` 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 plugins/dsh-x-desktop-notify/lib/desktop.js:31 — `managerOrigin` 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 plugins/dsh-x-desktop-notify/lib/notify.js:54 — `urlOrEmpty` 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 plugins/dsh-x-desktop-notify/lib/index.js:95 — `originOf` (in `apply`) 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 plugins/dsh-x-desktop-notify/lib/index.js:104 — `titleOf` (in `apply`) 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 plugins/dsh-x-memory/lib/store.js:209 — `scan` 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 plugins/dsh-x-memory/lib/store.js:341 — `readIndex` 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 plugins/dsh-x-memory/lib/index.js:119 — `loadOverrides` 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 plugins/dsh-x-sync/lib/engine/sync.js:1249 — `safeSize` swallows every exception into `return 0` — 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 scripts/pack-common.mjs:199 — `pnpmVersionOf` 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 scripts/mac-signing.mjs:27 — `nestedCode` 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 src/packs.js:649 — `installedVersion` 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 src/electron-bin.js:42 — `writeElectronBinMarker` 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 scripts/release-manifest.mjs:56 — `verifySignature` swallows every exception into `return false` — 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 shell/model.mjs:126 — `parseJsonList` 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 shell/core-recovery.mjs:37 — `createCoreRecovery.failedCoreVersions` 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 skills/dsh-x-selfcheck/scripts/selfcheck.mjs:1064 — `listPatchBackups` 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 src/sync.js:1247 — `safeSize` swallows every exception into `return 0` — 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 src/environments.js:937 — `history` 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 src/settings.js:182 — `normalizeProxyUrl` 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 src/settings.js:824 — `safeLaunchPresets` 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 src/proxy.js:139 — `runCommand` 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 src/proxy.js:160 — `query` (in `detectSystemProxy`) 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 src/desktop.js:72 — `httpUrl` 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.
  • + 15 more in this group — see findings.md.
D12 · Dependency Hygiene · Deprecated · ×7
  • Deprecated: glob REDACTED:883 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: boolean REDACTED:1137 — boolean 3.2.0 is resolved in REDACTED and is marked deprecated by its publisher: "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:1944 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: inflight REDACTED:2607 — inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: lodash.isequal REDACTED:2806 — lodash.isequal 4.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: rimraf REDACTED:3476 — rimraf 2.6.3 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:3511 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 11 significant file(s) lose their only recent owner: src/sync.js, src/public/launch-list.js, plugins/dsh-x-aquarium/lib/mascot-part.js, scripts/make-icons.py, src/compat/session-events.mjs, wallpaper/wallpaper.js, scripts/make-hero.py, src/perf/patch-hooks.mjs (+3 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (12 single-owned of 102 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 102 of the 124 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: scripts/make-dmg-background.swift.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:13 — 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 `REDACTED` makes this repository a deployable product (line 13).
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation REDACTED:44 — `REDACTED` 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 'crc32' · ×1
  • Unused export 'crc32' plugins/dsh-x-sync/lib/engine/zipfile.js:42 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'readWholeFile' · ×1
  • Unused export 'readWholeFile' plugins/dsh-x-sync/lib/engine/zipfile.js:382 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'PAGE_TITLE_MAX' · ×1
  • Unused export 'PAGE_TITLE_MAX' shell/model.mjs:15 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused module-local declaration 'SKILL_NAME_RE' · ×1
  • Unused module-local declaration 'SKILL_NAME_RE' skills/dsh-x-selfcheck/scripts/selfcheck.mjs:30 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'SECRET_MASK' · ×1
  • Unused module-local declaration 'SECRET_MASK' skills/dsh-x-selfcheck/scripts/selfcheck.mjs:49 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'joinParts' · ×1
  • Unused module-local declaration 'joinParts' skills/dsh-x-selfcheck/scripts/selfcheck.mjs:349 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'packageVersion' · ×1
  • Unused module-local declaration 'packageVersion' src/plugins.js:141 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'macIncrementalReadiness' · ×1
  • Unused module-local declaration 'macIncrementalReadiness' src/server.js:1530 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'readPackageVersion' · ×1
  • Unused module-local declaration 'readPackageVersion' src/server.js:6829 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'bootWslOnce' · ×1
  • Unused module-local declaration 'bootWslOnce' src/server.js:7899 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code · Unused module-local declaration 'envDir' · ×1
  • Unused module-local declaration 'envDir' test/environment-import.test.mjs:102 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
Minor — 6 finding(s)
D10 · Test Quality · Skipped (documented) · ×6
  • Skipped (documented): R10 auto 的环境、本机一个能用的 DSH 都没有:导出报错,不写文件 test/environment-export.test.mjs:389 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): R10 auto(正式版档)的环境、本机只有 RC:没有「此刻会用的」版本,导出报错,不写文件 test/environment-export.test.mjs:399 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): 真实官方市场 schema:缺省、已有源和主动清空相互独立 test/plugin-market.test.mjs:50 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): 代理不通就回落直连:代理不是单点 test/proxy.test.mjs:320 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): /api/pending:一个版本都没装时不提示 dsh 更新 test/update-channel-api.test.mjs:230 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): T2 什么版本都不认得:类型保持选的那个 test/update-channel-plans.test.mjs:98 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call

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 --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-c8eb6c3131a54dcdb687e18c940a8d23/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=284" --report-format json --report-path /tmp/watchdog-gitleaks-c8eb6c3131a54dcdb687e18c940a8d23/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.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-c8eb6c3131a54dcdb687e18c940a8d23/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/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 .27artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .5artifacts/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 1 file(s) — `scripts/make-icon-sprite.mjs` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.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 01a1e92c-bcde-78cb-8d2c-e05cad547fc2 · 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