Public report of jackwener/OpenCLI, published 24 October 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.10.5). Watchdog 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, 24 October 2026, 18:22 UTC · Survey ID cd_98835ac61b9549bc869785778b2ff842

jackwener/OpenCLI

Measured 24 October 2026, 17:53 UTC, at code version aeaff2b

No regression since the last survey Code coverage: not measured

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 42out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 3 since the last survey

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

A large codebase: 174,976 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Code Health, 38

Findings by how serious they are

50 critical 1164 serious 358 minor

4 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 17:53 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 Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸

75of 80 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
1545of 1572 findings point to an exact file and line, so you can open each one in the code. The other 27 concern the repository as a whole, such as missing documentation.
80dimensions across 7 lenses, read from 174,976 lines of product code in 1 project.
Chapters

Executive summary

jackwener/OpenCLI scores 42 out of 100 and is rated Weak, while four of its seven lenses score higher still: Architecture at 87, Performance at 60 and Production Readiness at 54, all rated Adequate, and Maturity at 75, rated Strong.

The score is lower than those four because the weakest lens counts most, and here that is Code Health, which scores 38 and is rated Weak. Its Type Safety dimension scores 1.2 out of 10, and until that reaches 4, Code Health can't be rated higher than Adequate. The first actions are to load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production and to resolve the 7 High CVE finding(s) in Dependency Vulnerabilities. The weakest lenses score close to each other, so improving any of them moves the score.

50 findings are critical: 30 in Static Analysis (SAST), eight in Dependency Vulnerabilities, four in Knowledge Freshness, two in Forms & labels, two in Secrets (history), one in Dependency Hygiene, one in Page structure, one in Text alternatives and one in Web-Security Posture.

Watchdog couldn't measure Navigability, Structured logging and Runtime accessibility in this code, so those dimensions are left out of the score. The product code is 174,976 lines, which would take an estimated 1.5 person-years, around €230,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.
Code Health 38 · counts for 46%Security and Compliance 39 · counts for 25%Accessibility 41 · counts for 14%Production Readiness 54 · counts for 8%Performance 60 · counts for 4%Maturity 75 · counts for 2%Architecture 87 · counts for 1%

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

Code composition: what the lines of code are
Product code 67%Tests 33%
New since the last survey: 278 findings

These 278 critical or serious findings weren't in the previous survey, on 10 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

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

Fixed since the last survey: 1753 findings

These 1753 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · cli.createProgram (cyclomatic 452) src/cli.ts
  • Cyclomatic Complexity · func (cyclomatic 72) clis/twitter/likes.js
  • Cyclomatic Complexity · func (cyclomatic 60) clis/twitter/bookmarks.js
  • Cyclomatic Complexity · analyze.scoreEndpointEvidence (cyclomatic 26) src/browser/analyze.ts
  • Cyclomatic Complexity · feed.parseItem (cyclomatic 18) clis/bilibili/feed.js
  • Cyclomatic Complexity · item.normalizeItemPayload (cyclomatic 17) clis/1688/item.js
  • Cyclomatic Complexity · cli.captureNetworkItems (cyclomatic 16) src/cli.ts
  • Cognitive Complexity · cli.createProgram (cognitive 589) src/cli.ts
  • Cognitive Complexity · func (cognitive 94) clis/twitter/likes.js
  • Cognitive Complexity · func (cognitive 74) clis/twitter/bookmarks.js
  • Cognitive Complexity · analyze.scoreEndpointEvidence (cognitive 39) src/browser/analyze.ts
  • Cognitive Complexity · cli.captureNetworkItems (cognitive 31) src/cli.ts
  • Cognitive Complexity · analyze.detectAntiBot (cognitive 20) src/browser/analyze.ts
  • Cognitive Complexity · cli.normalizeVerifyRows (cognitive 16) src/cli.ts
  • God Classes · FileTooLong: src/cli.ts src/cli.ts
  • God Classes · FunctionTooLong: utils.exportGeminiDeepResearchReportScript clis/gemini/utils.js
  • Churn × Complexity Hotspots · Hotspot: src/cli.ts src/cli.ts
  • Explicit Debt · TodoComment src/cli.ts
  • Explicit Debt · TodoComment src/cli.ts
  • Explicit Debt · TodoComment src/cli.ts
  • Explicit Debt · TodoComment src/cli.ts
  • Explicit Debt · TodoComment src/cli.ts
  • Explicit Debt · TodoComment src/cli.ts
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED clis/dianping/shop.js
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · High CVE: REDACTED bun.lock
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · High CVE: REDACTED bun.lock
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · High vulnerability: REDACTED bun.lock
  • Dependency Vulnerabilities · High CVE: REDACTED extension/bun.lock
  • Dependency Vulnerabilities · High CVE: REDACTED extension/bun.lock
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] extension/bun.lock
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · Medium vulnerability: [GHSA redacted] bun.lock
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Code Duplication · Duplication concentrated across 160 sibling directories (374 clone groups) clis/claude/utils.js
  • Code Duplication · Duplicated block with local edits (241 matched lines × 2 locations) clis/twitter/bookmarks.js
  • Code Duplication · Duplicated block with local edits (124 matched lines × 2 locations) clis/claude/utils.js
  • Code Duplication · Duplicated block with local edits (97 matched lines × 2 locations) clis/twitter/followers.js
  • Code Duplication · Duplicated block with local edits (76 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (56 matched lines × 2 locations) clis/twitter/bookmark-folder.js
  • Code Duplication · Duplicated block with local edits (55 matched lines × 2 locations) clis/chatgpt/image.js
  • Code Duplication · Duplicated block (34 lines × 12 locations) clis/crates/utils.js
  • Code Duplication · Duplicated block (34 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (34 lines × 2 locations) clis/rest-countries/country.js
  • Code Duplication · Duplicated block (34 lines × 2 locations) clis/twitter/list-delete.js
  • Code Duplication · Duplicated block (33 lines × 2 locations) clis/tiktok/follow.js
  • Code Duplication · Duplicated block (33 lines × 6 locations) clis/twitter/list-add-core.js
  • Code Duplication · Duplicated block (32 lines × 2 locations) clis/endoflife/utils.js
  • Code Duplication · Duplicated block (32 lines × 2 locations) clis/flathub/utils.js
  • Code Duplication · Duplicated block (32 lines × 2 locations) clis/grok/detail.js
  • Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) clis/jike/notifications.js
  • Code Duplication · Duplicated block (32 lines × 2 locations) clis/packagist/utils.js
  • Code Duplication · Duplicated block (32 lines × 2 locations) clis/rednote/comments.js
  • Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) clis/doubao/utils.js
  • Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) clis/twitter/quote.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) clis/goproxy/utils.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) clis/notebooklm/generate-audio.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) clis/reddit/read.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (29 lines × 2 locations) clis/imdb/top.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) clis/nuget/utils.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) clis/zhihu/collection.js
  • Code Duplication · Duplicated block (28 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) clis/goproxy/utils.js
  • Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) clis/stackoverflow/related.js
  • Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) clis/zhihu/question.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) clis/coingecko/derivatives.js
  • Code Duplication · Duplicated block (27 lines × 5 locations) clis/ctrip/cruise.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) clis/facebook/notifications.js
  • Code Duplication · Duplicated block (26 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (26 lines × 2 locations) clis/maven/utils.js
  • Code Duplication · Duplicated block (26 lines × 2 locations) clis/toutiao/hot.js
  • Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) clis/twitter/post.js
  • Code Duplication · Duplicated block (25 lines × 2 locations) clis/dockerhub/utils.js
  • Code Duplication · Duplicated block (25 lines × 2 locations) clis/grok/read.js
  • Code Duplication · Duplicated block (25 lines × 2 locations) clis/mdn/search.js
  • Code Duplication · Duplicated block (25 lines × 2 locations) clis/pubmed/author.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) clis/defillama/utils.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) clis/indeed/utils.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) clis/midjourney/describe.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) clis/twitter/download.js
  • Code Duplication · Duplicated block (24 lines × 2 locations) src/convention-audit.ts
  • Code Duplication · Duplicated block (23 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (23 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (23 lines × 2 locations) clis/dongchedi/utils.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) clis/grok/status.js
  • Code Duplication · Duplicated block (23 lines × 3 locations) clis/hupu/hot.js
Rebuild cost: about €230,000 · Estimate
Cost to rebuild€75,000 to €380,000, for 1,245 to 3,951 hours of work, about 1.5 person-years for 1 to 3 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 42. 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.
SizeLarge: 174,976 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

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

1
Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production.
Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.
Raises the score by about 3 points · Medium effort · Web-Security Posture
2
Resolve the 7 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED.
Raises the score by about 1 point · Low effort · Dependency Vulnerabilities
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 2 points · Medium effort · Forms & labels

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €230,000 to build again, about 1.5 person-years of work. Its weakest lens is Code Health, at 38 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.7 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 8% to 19% on every change. The history of the code shows how much it changes: about 80,490 lines over the last 90 days, which is about 326,432 lines a year. At that pace, the extra work comes to an estimated 68 to 408 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 Watchdog's 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; 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.

270 modules, with 112 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; 230 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 autoresearch.config2 autoresearch.eval-browse3 extension.src.protocol4 src.browser.ax-snapshot5 src.browser.compound6 src.browser.network-request7 src.browser.target-resolver8 src.download9 src.errors10 src.observation.events11 src.observation.retention12 src.pipeline.template13 src.registry14 src.types15 src.validate16 autoresearch.eval-publish17 autoresearch.eval-save18 autoresearch.logger19 extension.src20 src.browser.base-page21 src.browser.discover22 src.browser.find23 src.browser.html-tree24 src.browser.network-cache25 src.observation.artifact26 src.observation.session27 src.pipeline28 src.pipeline.steps29 src.runtime30 autoresearch31 autoresearch.engine32 src33 src.browser.bridge34 src.browser.cdp35 src.browser.page36 src.commands37 src.observation38 src.observation.manager39 autoresearch.commands40 src.browser
1 autoresearch.config
2 autoresearch.eval-browse
3 extension.src.protocol
4 src.browser.ax-snapshot
5 src.browser.compound
6 src.browser.network-request
7 src.browser.target-resolver
8 src.download
9 src.errors
10 src.observation.events
11 src.observation.retention
12 src.pipeline.template
13 src.registry
14 src.types
15 src.validate
16 autoresearch.eval-publish1
17 autoresearch.eval-save1
18 autoresearch.logger2
19 extension.src4
20 src.browser.base-page1314
21 src.browser.discover1
22 src.browser.find1
23 src.browser.html-tree1
24 src.browser.network-cache1
25 src.observation.artifact11
26 src.observation.session4
27 src.pipeline1
28 src.pipeline.steps12
29 src.runtime1
30 autoresearch1111
31 autoresearch.engine11
32 src3322142211
33 src.browser.bridge11
34 src.browser.cdp211
35 src.browser.page21
36 src.commands6111
37 src.observation5411
38 src.observation.manager12
39 autoresearch.commands11
40 src.browser31211112131
Uses a module listed above itPart of a loopThe module itself
1 autoresearch.config2 autoresearch.eval-browse3 extension.src.protocol4 src.browser.ax-snapshot5 src.browser.compound6 src.browser.network-request7 src.browser.target-resolver8 src.download9 src.errors10 src.observation.events11 src.observation.retention12 src.pipeline.template13 src.registry14 src.types15 src.validate16 autoresearch.eval-publish17 autoresearch.eval-save18 autoresearch.logger19 extension.src20 src.browser.base-page21 src.browser.discover22 src.browser.find23 src.browser.html-tree24 src.browser.network-cache25 src.observation.artifact26 src.observation.session27 src.pipeline28 src.pipeline.steps29 src.runtime30 autoresearch31 autoresearch.engine32 src33 src.browser.bridge34 src.browser.cdp35 src.browser.page36 src.commands37 src.observation38 src.observation.manager39 autoresearch.commands40 src.browserautoresearch.config1autoresearch.eval-browse2extension.src.protocol3src.browser.ax-snapshot4src.browser.compound5src.browser.network-request6src.browser.target-resolver7src.download8src.errors9src.observation.events10src.observation.retention11src.pipeline.template12src.registry13src.types14src.validate15autoresearch.eval-publish16autoresearch.eval-save17autoresearch.logger18extension.src19src.browser.base-page20src.browser.discover21src.browser.find22src.browser.html-tree23src.browser.network-cache24src.observation.artifact25src.observation.session26src.pipeline27src.pipeline.steps28src.runtime29autoresearch30autoresearch.engine31src32src.browser.bridge33src.browser.cdp34src.browser.page35src.commands36src.observation37src.observation.manager38autoresearch.commands39src.browser4011241314111111411211111113322142211112112161115411121131211112131+230 more modules (most-connected shown)

At a glance — Code Health · 38% · Weak · gated by D1, D2, R1, R7 ·

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

At a glance — Maturity · 75% · Strong ·

At a glance — Readiness · 54% · Adequate · gated by P3 ·

At a glance — Security · 39% · Weak · gated by D29, S1 ·

At a glance — Accessibility · 41% · Weak · gated by AC1, AC2 ·

At a glance — Performance · 60% · 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 — Injection86High / Critical
A03:2025 — Software Supply Chain Failures17High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

Immediately remediate critical security risks by externalizing cryptographic keys, enforcing strict startup validation, and rotating any committed secrets, while also addressing the single plain-HTTP listener. Enhance accessibility by ensuring all form controls and buttons have programmatic labels and adding appropriate text alternatives for images, media, and canvas elements. Improve long-term maintainability by migrating the remaining JavaScript files to TypeScript and deleting the significant volume of dead code and unused exports to reduce maintenance overhead.

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

Do thisHelpsEffortDimension
Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.+3.5 ptsMediumWeb-Security Posture
Resolve the 7 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED.+1.2 ptsLowDependency Vulnerabilities
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
Migrate the remaining .js/.jsx files to TypeScript.+1.7 ptsMediumType Safety
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED.+0.7 ptsLowSecrets (history)
Resolve the 1 REDACTED finding(s) charged to Static Analysis (SAST) — the other 26 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once.+0.7 ptsLowStatic Analysis (SAST)
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED.+0.7 ptsLowStatic Analysis (SAST)
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED.+0.7 ptsLowDependency Vulnerabilities

File quality

Per-file score 0–10 — a quality signature. Of 301 files carrying findings, judged against the Production bar: 2% slop · 73% mixed · 25% near-clean.

FileScoreBandWorst signal
REDACTED1.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopDependency Vulnerabilities: High vulnerability: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedSecrets (history): REDACTED: REDACTED
REDACTED4.6MixedDependency Vulnerabilities: High CVE: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
src/browser/discover.ts5.6MixedCyclomatic Complexity: discover.analyzeScript (cyclomatic 29)
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED

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

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

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

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

Could not be resolved — 4

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

Watchdog 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. 75 of 80 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 1.0 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 80 dimensions across the health lenses
D1D2D3D6D7D9D10D11D12D13D14D15D16D17D19D20D21D22D26D28D29D30D34D35D36D43D44AC1AC2AC3AC6AC7AX10AX3AX4AX6GD1IC1M1M2M3M4P1P10P2P3P4P6PF3R1R10R2R3R4R5R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X28X29X3X30X5

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, 1545 of 1572 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16f0c-1834-7203-8240-5ddec5b82e23.

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.

  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog 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. `src/browser/cdp.ts`, `src/commands/browser.ts`, `src/observation/retention.ts` 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.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 74 further occurrence(s) are not listed individually; the score already reflects all 114.
  • P2 Observability — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • 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 none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 40 further occurrence(s) are not listed individually; the score already reflects all 80.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 659 further occurrence(s) are not listed individually; the score already reflects all 699.
  • R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 25 further occurrence(s) are not listed individually; the score already reflects all 65.
  • R4 Test Coverage — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 582 further occurrence(s) are not listed individually; the score already reflects all 622.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 670 further occurrence(s) are not listed individually; the score already reflects all 710.
  • X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 94 further occurrence(s) are not listed individually; the score already reflects all 134.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 218 further occurrence(s) are not listed individually; the score already reflects all 258.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X6 Hand-rolled structured-format parsing — not measured this run — Watchdog 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. 62 further occurrence(s) are not listed individually; the score already reflects all 102.
  • X7 Silent fallback defaults — not measured this run — Watchdog 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. 16 further occurrence(s) are not listed individually; the score already reflects all 56.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • 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.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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.

The LLM boundary

LLM-set scores this run (5): D19, D20, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

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

453 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was browser.registerBrowserCommands at 324. A further 6 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 network-request.isSensitiveName at 30 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: clis/xiaohongshu/draft-utils.js (draft-utils.normalizeDraftRecord at 19), clis/douyin/_shared/tos-upload.js (extractUploadId at 16), clis/douyin/_shared/tos-upload.js (tos-upload.extractUploadId at 16). 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.

func (cyclomatic 16) · ×5clis/reddit/read.js:129
func (cyclomatic 22) · ×4clis/kimi/ui.js:191
images.extractGoogleImageRows::add (cyclomatic 39) · ×3clis/google/images.js:149
func (cyclomatic 33) · ×3clis/coupang/search.js:415
func (cyclomatic 28) · ×3clis/weibo/publish.js:95

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with browser.registerBrowserCommands (cyclomatic 324). — Refactoring it lifts Cyclomatic Complexity from 2.0 to about 2.6/10.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

570 method(s) exceeded the cognitive complexity threshold of 15; the worst was browser.registerBrowserCommands at 396.

func (cognitive 19) · ×6clis/instagram/reel.js:736
func (cognitive 23) · ×5clis/web/read.js:423
func (cognitive 34) · ×4clis/booking/search.js:239
func (cognitive 31) · ×4clis/wechat-channels/publish.js:576
func (cognitive 35) · ×3clis/weibo/publish.js:95

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

What to do

  1. Bring the 18 bodies over 60 down to 60 or less in Cognitive Complexity — start with browser.registerBrowserCommands (cognitive 396), snapshotFormatter.formatSnapshot (cognitive 139), getChatGPTDeepResearchResult (cognitive 129). — 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 18 together lifts Cognitive Complexity from 2.0 to about 3.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes8.5 / 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.5 / 10 · rule-coverage 100% · ceiling Prevented

60 god class(es) detected.

FunctionTooLong: browser.registerBrowserCommands · ×38src/commands/browser.ts:424
FileTooLong: chatgpt/utils.js · ×20clis/chatgpt/utils.js
ClassTooLong: BasePagesrc/browser/base-page.ts:167
TooManyMethods: BasePagesrc/browser/base-page.ts:167

What to do

  1. Resolve the 38 FunctionTooLong finding(s) in God Classes — start with REDACTED (6), REDACTED (5), download.js (2). — One of this dimension's main actionable groups (38 warning-level).
  2. Resolve the 20 FileTooLong finding(s) in God Classes — start with REDACTED (9), REDACTED (2), browser.ts. — One of this dimension's main actionable groups (20 warning-level).
  3. Resolve the 1 ClassTooLong finding(s) in God Classes — start with base-page.ts. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

0 of 15 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

What to do

  1. Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d7_recommendation.md.

D9 · Test Distribution9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

5942 test methods: 5859 unit, 0 integration, 0 BDD, 83 e2e. The JavaScript/TypeScript suite contributes 5942 `it`/`test` case(s) across 545 test file(s) declaring at least one; its tier split is read from package names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

8 skipped (8 with a documented reason), 2 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 5942 tests.

No assertions: all 5 enum values are accepted pre-network · ×2clis/slock/task-status.test.js:48
Mock-dominated test: selects the correct radio for each model · ×16clis/deepseek/utils.test.js:208
Skipped (documented): (unnamed test) · ×8src/browser/network-cache.test.ts:77

What to do

  1. Resolve the 16 Mock-dominated test finding(s) in Test Quality — start with execution.test.ts (6), utils.test.js (2), private-api-regression.test.js (2). — One of this dimension's main actionable groups (16 recommendation-level).
  2. Resolve the 2 No assertions finding(s) in Test Quality — start with task-status.test.js, hooks.test.ts. — One of this dimension's main actionable groups (2 warning-level).
  3. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). JavaScript/TypeScript (vitest via `npm ci --ignore-scripts` in the repository root (1797 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

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

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

5 outdated direct production npm dependency(ies) of 9 graded, 0 pinning defect(s), across 2 REDACTED (2 of them the product) and 2 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.

Outdated (npm): commander · ×5

✓ On the Gold path — maintain.

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 9 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 9 production dependency(ies) this repository's committed lockfile resolves, across 2 product REDACTED manifest(s). Its 13 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ 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. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: src/browser/daemon-client.ts (8×38=304); src/execution.ts (5×50=250); src/browser/cdp.ts (10×22=220) Repeated repair below the complexity floor: src/output.ts (3 of 5 changes were fixes); clis/xiaohongshu/comments.js (3 of 3 changes were fixes); clis/twitter/block.js (3 of 3 changes were fixes)

Hotspot: src/browser/daemon-client.ts · ×13src/browser/daemon-client.ts:352
Repeated repair: src/output.ts · ×5src/output.ts:74

What to do

  1. Resolve the 13 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), daemon-client.ts, execution.ts. — One of this dimension's main actionable groups (13 warning-level).
  2. Resolve the 5 Repeated repair finding(s) in Churn × Complexity Hotspots — start with output.ts, comments.js, block.js. — One of this dimension's main actionable groups (5 warning-level).

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

D16 · Bus Factor8.7 / 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.7 / 10 · rule-coverage 100% · ceiling Documented

115 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is REDACTED. Counted over 878 of the 1456 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 · ×3
Further sole-owners (lower concentration)

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 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 / 10Stronggated by 6 serious findings✓ Tool-verified

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

6 deducted task-comment markers across 26830 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.

TodoComment · ×6src/commands/adapter.ts:247

What to do

  1. Resolve the 6 TodoComment finding(s) in Explicit Debt — start with adapter.ts (6). — One of this dimension's main actionable groups (6 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

OpenCLI's documentation is clear and complete: the root README (with overview, comparison guide, usage examples, a full architecture doc set, and an extensive adapter index) gives the project purpose and how to run it. The cases/README documents only its own directory (use cases + contributing), which is internal-focused and not the repository's overview; the comparison guide compares opencli with agent-browser alternatives side-by-side, showing where each tool excels. All visible content is well-structured with a consistent heading outline. The documentation is comprehensive and well-structured for a CLI project: it contains two READMEs (one on conventions with usage examples, one on building adapters), architecture/development docs covering subsystems, runtime shape, adapter creation, and contributing steps; the audit document reviews stale counts across entry points. The visible content is clear and complete for its scope. The documentation is comprehensive and well-structured: the READMEs for testing, TypeScript adapters, authentication audit, OpenCLI vs agent-browser comparison, and browser bridge are each focused on their own tier (testing, adapter API reference, source/audit, workflow migration) with clear headings, tables of contents, and runnable examples. The architecture/design docs (218 files) cover the broader project scope, but the summary does not flag any missing section for a clipped document.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR QualityExemplary◐ Sampled · advisory

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

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

Evaluated 1 ADR(s) individually; mean quality 9.0/10 (consistently complete and clear). 0 flagged with a specific gap.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyAdequate◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

5 API inconsistencies across 56 exposed types.

Redundant and confusingly named evaluation methods. `evaluate` has two overloads (string vs function), `evaluateOnce` is a variant of string evaluation, and `evaluateWithArgs` duplicates the functionality of passing args to `evaluate` but with a different signature (Record vs spread args). This forces users to choose between inconsistent APIs for the same core browser capability.
Duplicate intent with different names. `annotatedScreenshot` appears to be a specific mode of `screenshot` (likely adding visual annotations), but it is exposed as a separate top-level method rather than an option on the main `screenshot` method.
Redundant waiting mechanisms. `sleep` is a simple wrapper around `wait` with a numeric argument. Exposing both creates confusion about which to use for simple delays.
Inconsistent action naming and return types. Actions like `click`, `dblClick`, `hover` return match metadata, while `setChecked` returns state changes, and `scrollTo` returns `any`. `typeText` and `fillText` are semantically similar but have different signatures and return types. `uploadFiles` and `setFileInput` are also semantically overlapping.
Fragmented cookie handling. `getCookies` retrieves cookies, but formatting/exporting them is split between utility functions in `index` and potentially other places. This scatters cookie-related logic.

What to do

  1. Resolve the 1 Redundant and confusingly named evaluation methods. `evaluate` has two… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Duplicate intent with different names. `annotatedScreenshot` appears to… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Redundant waiting mechanisms. `sleep` is a simple wrapper around `wait`… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

1 of 1 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

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

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

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

86 finding(s): 0 critical, 30 high, 38 medium, 18 low. 26 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 4 file(s) — `src/browser/cdp.ts`, `src/browser/daemon-client.test.ts` (line 452, line 474, line 572, …), `src/commands/browser.ts` (line 90, line 213, line 254, …), `src/observation/retention.ts` (line 37) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 26 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (14), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (26 warning-level).
  2. Resolve the 1 REDACTED finding(s) charged to Static Analysis (SAST) — the other 26 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (27 issue-level, 1 of them charged here).
  3. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).

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

D30 · Dependency Vulnerabilities4.8 / 10Weak✓ 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.

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

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 7 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness8.7 / 10Adequategated by 4 critical findings✓ 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 8.7 / 10 · rule-coverage 100% · ceiling Documented

115 of 878 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 878 of the 1456 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×4REDACTED:1
Orphaned file · ×111clis/gemini/models.js:1
Further orphaned files (smaller)

What to do

  1. Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with publish.js (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 111 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (11), REDACTED (11), models.js (2). — One of this dimension's main actionable groups (111 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Stronggated by 7 serious findings✓ 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 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: discover.ts↔doctor.ts 62%; daemon.ts↔doctor.ts 54%; cli.ts↔types.ts 50%

Change coupling: discover.ts ↔ doctor.ts · ×7src/browser/discover.ts:1

What to do

  1. Resolve the 7 Change coupling finding(s) in Change Coupling — start with discover.ts, daemon.ts, cli.ts. — One of this dimension's main actionable groups (7 warning-level).

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

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored 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. SCORED, not informational.

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 9 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 alternatives3.5 / 10Weak✓ 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. — clis/chatgpt/utils.js:2915

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 & labels2.7 / 10Weak✓ Tool-verified

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

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

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

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — REDACTED:448, src/commands/browser.ts:1633

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 structure4.1 / 10Weak✓ Tool-verified

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

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

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

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — extension/idle.html:2, extension/popup.html:2
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — extension/popup.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.
AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

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.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 6 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.9 / 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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.

AX6 · Interface segregation9.6 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `IPage` declares 24 required operations: `goto`, `evaluate`, `evaluate`, `fetchJson`, `getCookies`, `snapshot`, `click`, `typeText`, `fillText`, `pressKey`, `scrollTo`, `getFormState`, `wait`, `sleep`, `tabs`, `selectTab`, `networkRequests`, `consoleMessages`, `scroll`, `autoScroll`, `installInterceptor`, `getInterceptedRequests`, `waitForCapture`, `screenshot`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. Those 24 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/types.ts:72

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of 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.

IC1 · Incompleteness & stubs8.0 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — autoresearch/commands/debug.ts:50
  • Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — clis/douyin/_shared/tos-upload.js:151
  • The guard above `return '0';` also returns `'0'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — clis/eastmoney/_secid.js:13
  • `stepSnapshot` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/pipeline/steps/browser.ts:65

What to do

  • Remove the dead code that still moves this score: delete dead if(false) branches and either do the real async work or drop the async keyword from fake-async functions.
M1 · Documentation (README)10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

M2 · Architecture documentation4.0 / 10Weak✓ 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.

What to do

  • Grow the ADR log (currently 1) — reach 8 to raise the maturity tier; document significant decisions as they're made.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy8.4 / 10Strong◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_RATE_MIN`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/advanced/rate-limiter-plugin.md:21
  • docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_RATE_MAX`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/advanced/rate-limiter-plugin.md:22
  • docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_NO_RATE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/advanced/rate-limiter-plugin.md:23
  • docs/developer/architecture.md names `src/pipeline/transform.ts`, but no file or folder `src/pipeline/transform.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/developer/architecture.md:58
  • docs/developer/contributing.md links to `./ts-adapter`, but `docs/developer/ts-adapter` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/developer/contributing.md:72
  • docs/developer/documentation-audit-2026-05.md names `clis/twitter/timeline.test.ts`, but no file or folder `clis/twitter/timeline.test.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/developer/documentation-audit-2026-05.md:74
  • docs/developer/documentation-audit-2026-05.md names `clis/reddit/read.test.ts`, but no file or folder `clis/reddit/read.test.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/developer/documentation-audit-2026-05.md:75
  • docs/developer/documentation-audit-2026-05.md names `clis/bilibili/dynamic.test.ts`, but no file or folder `clis/bilibili/dynamic.test.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/developer/documentation-audit-2026-05.md:76
  • docs/developer/documentation-audit-2026-05.md names `src/clis/`, but no file or folder `src/clis` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/developer/documentation-audit-2026-05.md:116
  • docs/developer/ts-adapter.md links to `/developer/ai-workflow`, but `developer/ai-workflow` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/developer/ts-adapter.md:257
  • docs/guide/agent-browser-alternative.md links to `./browser-bridge`, but `docs/guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/agent-browser-alternative.md:31
  • docs/guide/agent-browser-alternative.md links to `./getting-started`, but `docs/guide/getting-started` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/agent-browser-alternative.md:80
  • docs/guide/agent-browser-alternative.md links to `../comparison`, but `docs/comparison` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/agent-browser-alternative.md:80
  • docs/guide/agent-browser-alternative.md links to `./extending-opencli`, but `docs/guide/extending-opencli` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/agent-browser-alternative.md:80
  • docs/guide/browser-bridge.md links to `/guide/remote-orchestration`, but `guide/remote-orchestration` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/browser-bridge.md:140
  • docs/guide/getting-started.md links to `/adapters/`, but `adapters` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/getting-started.md:10
  • docs/guide/getting-started.md links to `./browser-bridge`, but `docs/guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/getting-started.md:33
  • docs/guide/getting-started.md links to `/guide/installation`, but `guide/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/getting-started.md:94
  • docs/guide/getting-started.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/getting-started.md:95
  • docs/guide/getting-started.md links to `/guide/extending-opencli`, but `guide/extending-opencli` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/getting-started.md:96
  • docs/guide/getting-started.md links to `/guide/plugins`, but `guide/plugins` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/getting-started.md:97
  • docs/guide/getting-started.md links to `/developer/contributing`, but `developer/contributing` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/getting-started.md:99
  • docs/guide/installation.md links to `./browser-bridge`, but `docs/guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/guide/installation.md:16
  • docs/zh/comparison.md links to `./guide/agent-browser-alternative`, but `docs/zh/guide/agent-browser-alternative` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/zh/comparison.md:10
  • docs/zh/comparison.md links to `../comparison`, but `docs/comparison` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/zh/comparison.md:10
  • docs/zh/comparison.md links to `./guide/getting-started`, but `docs/zh/guide/getting-started` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/zh/comparison.md:32
  • docs/zh/comparison.md links to `./guide/browser-bridge`, but `docs/zh/guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/zh/comparison.md:33
  • docs/zh/comparison.md links to `./guide/extending-opencli`, but `docs/zh/guide/extending-opencli` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/zh/comparison.md:34
  • docs/adapters/browser/1688.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/1688.md:46
  • docs/adapters/browser/1point3acres.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/1point3acres.md:69
  • docs/adapters/browser/36kr.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/36kr.md:48
  • docs/adapters/browser/amazon.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/amazon.md:42
  • docs/adapters/browser/band.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/band.md:56
  • docs/adapters/browser/barchart.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/barchart.md:33
  • docs/adapters/browser/bilibili.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/bilibili.md:99
  • docs/adapters/browser/bloomberg.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/bloomberg.md:71
  • docs/adapters/browser/boss.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/boss.md:28
  • docs/adapters/browser/brave.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/brave.md:42
  • docs/adapters/browser/chaoxing.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/chaoxing.md:39
  • docs/adapters/browser/chatgpt.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/adapters/browser/chatgpt.md:105

What to do

  • Reconcile the README with reality: docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_RATE_MIN`, but no code, script or configuration file names it; docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_RATE_MAX`, but no code, script or configuration file names it; docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_NO_RATE`, but no code, script or configuration file names it; docs/developer/architecture.md names `src/pipeline/transform.ts`, but no file or folder `src/pipeline/transform.ts` exists; docs/developer/contributing.md links to `./ts-adapter`, but `docs/developer/ts-adapter` does not exist.
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 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 · Observability8.0 / 10Strong✓ Tool-verified

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

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

  • `clis/boss/utils.js` reports through `console.*` at line 294 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/boss/utils.js:294
  • `clis/chatgpt/utils.js` reports through `console.*` at line 72 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/chatgpt/utils.js:72
  • `clis/instagram/download.js` reports through `console.*` at line 366 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/instagram/download.js:366
  • `clis/linkedin/search.js` reports through `console.*` at line 331 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/linkedin/search.js:331
  • `clis/linkedin/search.js` reports through `console.*` at line 334 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/linkedin/search.js:334
  • `clis/linkedin/search.js` reports through `console.*` at line 389 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/linkedin/search.js:389
  • `clis/notebooklm/open.js` reports through `console.*` at line 34 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/notebooklm/open.js:34
  • `clis/ones/login.js` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/ones/login.js:64
  • `clis/spotify/spotify.js` reports through `console.*` at line 170 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/spotify/spotify.js:170
  • `clis/spotify/spotify.js` reports through `console.*` at line 171 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/spotify/spotify.js:171
  • `clis/twitter/utils.js` reports through `console.*` at line 155 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/twitter/utils.js:155
  • `clis/v2ex/notifications.js` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/notifications.js:22
  • `clis/v2ex/me.js` reports through `console.*` at line 20 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/me.js:20
  • `clis/v2ex/me.js` reports through `console.*` at line 30 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/me.js:30
  • `clis/v2ex/me.js` reports through `console.*` at line 93 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/me.js:93
  • `clis/v2ex/me.js` reports through `console.*` at line 94 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/me.js:94
  • `clis/v2ex/daily.js` reports through `console.*` at line 20 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/daily.js:20
  • `clis/v2ex/daily.js` reports through `console.*` at line 30 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/daily.js:30
  • `clis/v2ex/daily.js` reports through `console.*` at line 58 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/daily.js:58
  • `clis/v2ex/daily.js` reports through `console.*` at line 59 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/daily.js:59
  • `clis/v2ex/daily.js` reports through `console.*` at line 68 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/v2ex/daily.js:68
  • `clis/xiaohongshu/publish.js` reports through `console.*` at line 189 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/xiaohongshu/publish.js:189
  • `clis/youtube/transcript.js` reports through `console.*` at line 460 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — clis/youtube/transcript.js:460
  • `src/output.ts` reports through `console.*` at line 45 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:45
  • `src/output.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:63
  • `src/output.ts` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:64
  • `src/output.ts` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:65
  • `src/output.ts` reports through `console.*` at line 71 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:71
  • `src/output.ts` reports through `console.*` at line 85 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:85
  • `src/output.ts` reports through `console.*` at line 94 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:94
  • `src/output.ts` reports through `console.*` at line 96 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:96
  • `src/output.ts` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:109
  • `src/output.ts` reports through `console.*` at line 115 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:115
  • `src/output.ts` reports through `console.*` at line 116 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:116
  • `src/output.ts` reports through `console.*` at line 118 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:118
  • `src/output.ts` reports through `console.*` at line 129 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:129
  • `src/output.ts` reports through `console.*` at line 131 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:131
  • `src/output.ts` reports through `console.*` at line 140 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/output.ts:140
  • `src/command-output.ts` reports through `console.*` at line 19 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/command-output.ts:19
  • `src/command-output.ts` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/command-output.ts:47

What to do

  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
  • Add OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) so requests are traceable across the system, not just health-probable.
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 CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 17493 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.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — 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 & Rollback5.0 / 10Adequate✓ 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.

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download 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.

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 the language 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.

  • `existsSync` in `prepareChatGPTImagePaths` 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. — clis/chatgpt/utils.js:2472
  • `statSync` in `prepareChatGPTImagePaths` 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. — clis/chatgpt/utils.js:2475
  • `statSync` in `callback to paths.some` 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. — clis/chatgpt/utils.js:2546
  • `readFileSync` in `callback to paths.map` 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. — clis/chatgpt/utils.js:2555
  • `readFileSync` in `callback to absPaths.map` 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. — clis/chatgpt/utils.js:3422
  • `existsSync` in `prepareChatGPTFilePaths` 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. — clis/chatgpt/utils.js:3537
  • `statSync` in `prepareChatGPTFilePaths` 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. — clis/chatgpt/utils.js:3540
  • `existsSync` in `sendWithFile` 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) — clis/claude/utils.js:372, clis/deepseek/utils.js:383
  • `statSync` in `sendWithFile` 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) — clis/claude/utils.js:376, clis/deepseek/utils.js:387
  • `readFileSync` in `sendWithFile` 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) — clis/claude/utils.js:412, clis/deepseek/utils.js:417
  • `fs.existsSync` in `imagexUpload` 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. — clis/douyin/_shared/imagex-upload.js:35
  • `fs.readFileSync` in `imagexUpload` 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. — clis/douyin/_shared/imagex-upload.js:38
  • `fs.existsSync` in `tosUpload` 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. — clis/douyin/_shared/tos-upload.js:268
  • `fs.statSync` in `tosUpload` 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. — clis/douyin/_shared/tos-upload.js:271
  • `fs.openSync` in `tosUpload` 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. — clis/douyin/_shared/tos-upload.js:301
  • `fs.closeSync` in `tosUpload` 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. — clis/douyin/_shared/tos-upload.js:324
  • `fs.existsSync` in `func` 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. (×6) — clis/douyin/draft.js:308, clis/douyin/draft.js:325, clis/twitter/bookmarks.js:223, …
  • `fs.mkdirSync` in `saveImages` 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. — clis/grok/image.js:204
  • `fs.writeFileSync` in `saveImages` 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. — clis/grok/image.js:220
  • `fs.writeFileSync` in `dumpInstagramProtocolCaptureIfEnabled` 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. — clis/instagram/_shared/protocol-capture.js:241
  • `fs.mkdirSync` in `downloadInstagramMedia` 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. — clis/instagram/download.js:325
  • `fs.readFileSync` in `callback to imagePaths.map` 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. — clis/instagram/post.js:489
  • `fs.writeFileSync` in `func` 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. — clis/instagram/post.js:1479
  • `fs.writeFileSync` in `writeFromDataUrl` 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. — clis/suno/utils.js:496
  • `fs.statSync` in `writeFromDataUrl` 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. — clis/suno/utils.js:497
  • `fs.writeFileSync` in `downloadSunoClip` 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. — clis/suno/utils.js:510
  • `fs.rmSync` in `func` 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) — clis/twitter/quote.js:174, clis/twitter/reply.js:306
  • `fs.mkdtempSync` in `downloadRemoteImage` 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. — clis/twitter/utils.js:104
  • `fs.rmSync` in `downloadRemoteImage` 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. — clis/twitter/utils.js:108
  • `fs.writeFileSync` in `downloadRemoteImage` 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. — clis/twitter/utils.js:111
  • `fs.readFileSync` in `attachComposerImage` 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. — clis/twitter/utils.js:153

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 Safety1.2 / 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.

  • 243 typed · 1760 plain JS — the untyped files are clis/12306/auth.js, clis/12306/me.js, clis/12306/orders.js, clis/12306/passengers.js, clis/12306/price.js, clis/12306/stations.js (+1754 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.1 / 10Strong✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): 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. Deterministic.

  • 383 duplicated blocks under clis/ have copies in at least two of the sibling directories 12306, 1688, 1point3acres, 36kr, 51job, _atlassian (+155 more sibling(s) not listed) — 230 of them are reported below, and 153 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 383 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 383 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 383 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. — clis/claude/utils.js:15
  • clis/twitter/bookmarks.js:48 · clis/twitter/likes.js:64 — the two spans are one implementation copied and then locally edited — 1806 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/twitter/bookmarks.js:48
  • clis/instagram/post.js:851 · clis/instagram/reel.js:222 — the two spans are one implementation copied and then locally edited — 746 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/instagram/post.js:851
  • REDACTED:15 · REDACTED:15 — these 2 files are line-for-line copies of one another — 124 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. — REDACTED:15
  • clis/claude/utils.js:15 · clis/deepseek/utils.js:32 — the two spans are one implementation copied and then locally edited — 791 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/claude/utils.js:15
  • clis/hackernews/read.js:20 · clis/lobsters/read.js:32 — the two spans are one implementation copied and then locally edited — 785 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/hackernews/read.js:20
  • clis/twitter/followers.js:8 · clis/twitter/following.js:67 — the two spans are one implementation copied and then locally edited — 681 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/twitter/followers.js:8
  • clis/xiaohongshu/follow.js:23 · clis/xiaohongshu/unfollow.js:19 — the two spans are one implementation copied and then locally edited — 544 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/xiaohongshu/follow.js:23
  • clis/xiaohongshu/comment-delete.js:96 · clis/xiaohongshu/comment.js:96 — the two spans are one implementation copied and then locally edited — 511 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/xiaohongshu/comment-delete.js:96
  • clis/hltv/player-form.js:4 · clis/hltv/player-map-pool.js:4 — the two spans are one implementation copied and then locally edited — 647 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/hltv/player-form.js:4
  • clis/weread/book.js:8 · clis/weread/search.js:23 — the two spans are one implementation copied and then locally edited — 542 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/weread/book.js:8
  • clis/twitter/bookmark-folder.js:50 · clis/twitter/list-tweets.js:46 — the two spans are one implementation copied and then locally edited — 428 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/twitter/bookmark-folder.js:50
  • REDACTED:108 · REDACTED:179 — the two spans are one implementation copied and then locally edited — 613 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:108
  • clis/chatgpt/image.js:15 · clis/gemini/image.js:20 — the two spans are one implementation copied and then locally edited — 444 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/chatgpt/image.js:15
  • clis/twitter/thread.js:66 · clis/twitter/timeline.js:90 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/twitter/thread.js:66
  • clis/trip/flight-round.js:9 · clis/trip/flight.js:9 — these 2 files are line-for-line copies of one another — 53 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. — clis/trip/flight-round.js:9
  • clis/chaoxing/assignments.js:24 · clis/chaoxing/exams.js:23 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — clis/chaoxing/assignments.js:24
  • clis/claude/ask.js:40 · clis/deepseek/ask.js:46 — the two spans are one implementation copied and then locally edited — 382 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/claude/ask.js:40
  • clis/bilibili/follow.js:20 · clis/bilibili/unfollow.js:12 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — clis/bilibili/follow.js:20
  • clis/autohome/utils.js:79 · clis/guazi/utils.js:66 — the two spans are one implementation copied and then locally edited — 309 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/autohome/utils.js:79
  • clis/hf/datasets.js:25 · clis/hf/models.js:26 — 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. — clis/hf/datasets.js:25
  • clis/twitter/download.js:99 · clis/twitter/user-timeline.js:82 — the two spans are one implementation copied and then locally edited — 269 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/twitter/download.js:99
  • clis/facebook/feed.js:4 · clis/facebook/search.js:4 — the two spans are one implementation copied and then locally edited — 251 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/facebook/feed.js:4
  • clis/hupu/like.js:32 · clis/hupu/unlike.js:32 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — clis/hupu/like.js:32
  • clis/chatgpt/utils.js:520 · clis/chatgpt/utils.js:1756 — 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. — clis/chatgpt/utils.js:520
  • clis/weixin/download.js:101 · clis/weixin/download.js:167 — the two spans are one implementation copied and then locally edited — 351 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. — clis/weixin/download.js:101
  • scripts/check-silent-column-drop.mjs:20 · scripts/check-typed-error-lint.mjs:14 — the two spans are one implementation copied and then locally edited — 447 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — scripts/check-silent-column-drop.mjs:20
  • clis/ctrip/bus.js:39 · clis/ctrip/ferry.js:40 · clis/ctrip/train.js:39 — the 3 copies are spread across 3 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. — clis/ctrip/bus.js:39
  • clis/linkedin/profile-experience.js:609 · clis/linkedin/profile-projects.js:252 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — clis/linkedin/profile-experience.js:609
  • clis/linkedin-learning/auth.js:9 · clis/linkedin/auth.js:9 — 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. — clis/linkedin-learning/auth.js:9
  • clis/rubygems/utils.js:18 · clis/steam/utils.js:25 — 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. — clis/rubygems/utils.js:18
  • clis/twitter/following.js:8 · clis/twitter/likes.js:9 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — clis/twitter/following.js:8
  • clis/aibase/news.js:4 · clis/uisdc/news.js:4 — the two spans are one implementation copied and then locally edited — 297 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/aibase/news.js:4
  • clis/twitter/search.js:50 · clis/twitter/user-timeline.js:16 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — clis/twitter/search.js:50
  • clis/youtube/history.js:23 · clis/youtube/search.js:47 — the two spans are one implementation copied and then locally edited — 221 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/youtube/history.js:23
  • clis/zhihu/answer-comments.js:6 · clis/zhihu/answer-detail.js:9 — the two spans are one implementation copied and then locally edited — 232 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/zhihu/answer-comments.js:6
  • clis/ctrip/package.js:39 · clis/ctrip/tour.js:39 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — clis/ctrip/package.js:39
  • clis/rednote/note.js:25 · clis/xiaohongshu/note.js:77 — the two spans are one implementation copied and then locally edited — 279 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — clis/rednote/note.js:25
  • clis/twitter/list-tweets.js:9 · clis/twitter/lists.js:7 · clis/twitter/timeline.js:13 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — clis/twitter/list-tweets.js:9
  • clis/coingecko/categories.js:38 · clis/coingecko/exchanges.js:36 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — clis/coingecko/categories.js:38

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity4.0 / 10Weak✓ 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.

  • func has cyclomatic complexity 100 and cognitive complexity 125; 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. — clis/midjourney/action.js:147
  • getChatGPTDeepResearchResult has cyclomatic complexity 80 and cognitive complexity 119; 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. — clis/chatgpt/utils.js:1920
  • func has cyclomatic complexity 74 and cognitive complexity 96; 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. — clis/twitter/likes.js:207
  • formatSnapshot has cyclomatic complexity 70 and cognitive complexity 140; 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/snapshotFormatter.ts:197
  • (anonymous) has cyclomatic complexity 66 and cognitive complexity 99; 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/commands/browser.ts:1891
  • resolveGenerationPlan has cyclomatic complexity 66 and cognitive complexity 67; 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. — REDACTED:137
  • fetchRankedRedditSearch has cyclomatic complexity 62 and cognitive complexity 105; 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. — clis/reddit/web-search.js:2
  • func has cyclomatic complexity 62 and cognitive complexity 76; 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. — clis/twitter/bookmarks.js:188
  • handleRequest has cyclomatic complexity 60 and cognitive complexity 93; 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/daemon.ts:262
  • func has cyclomatic complexity 56 and cognitive complexity 72; 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. — clis/xiaohongshu/publish.js:1180
  • fetchAdapters has cyclomatic complexity 53 and cognitive complexity 87; 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. — scripts/fetch-adapters.js:101
  • applyFilter has cyclomatic complexity 52 and cognitive complexity 55; 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/pipeline/template.ts:75
  • extractAnswer has cyclomatic complexity 51 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 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. — clis/zhihu/download-helpers.js:145
  • requestInPage has cyclomatic complexity 47 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. — clis/proton/helpers.js:15
  • sendCommandRaw has cyclomatic complexity 45 and cognitive complexity 61; 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/browser/daemon-client.ts:352
  • func has cyclomatic complexity 44 and cognitive complexity 69; 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. — clis/gemini/ask.js:97
  • func has cyclomatic complexity 43 and cognitive complexity 59; 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. — clis/douyin/publish.js:111
  • func has cyclomatic complexity 43 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. — clis/bilibili/video.js:43
  • executeUiInstagramPost has cyclomatic complexity 42 and cognitive complexity 118; 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. — clis/instagram/post.js:163
  • func has cyclomatic complexity 40 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. — clis/deepseek/ask.js:30

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.2 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • clis/chatgpt/utils.js has 3477 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/chatgpt/utils.js:1
  • clis/gemini/utils.js has 2596 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/gemini/utils.js:1
  • src/commands/browser.ts has 2022 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/commands/browser.ts:1
  • clis/instagram/post.js has 1444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/instagram/post.js:1
  • clis/xiaohongshu/publish.js has 1440 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/xiaohongshu/publish.js:1
  • clis/midjourney/utils.js has 1406 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/midjourney/utils.js:1
  • REDACTED has 1353 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
  • src/browser/base-page.ts has 1250 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/browser/base-page.ts:1
  • clis/doubao/utils.js has 1089 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/doubao/utils.js:1
  • clis/ctrip/utils.js has 1032 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/ctrip/utils.js:1
  • REDACTED has 1027 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
  • clis/xiaohongshu/search.js has 1027 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/xiaohongshu/search.js:1
  • clis/trip/utils.js has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/trip/utils.js:1
  • clis/notebooklm/utils.js has 866 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/notebooklm/utils.js:1
  • src/browser/dom-snapshot.ts has 840 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/browser/dom-snapshot.ts:1
  • clis/instagram/reel.js has 802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/instagram/reel.js:1
  • REDACTED has 785 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
  • REDACTED has 725 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
  • src/execution.ts has 658 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/execution.ts:1
  • clis/wechat-channels/publish.js has 656 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/wechat-channels/publish.js:1
  • src/browser/target-resolver.ts has 650 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/browser/target-resolver.ts:1
  • clis/linkedin/profile-experience.js has 643 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/linkedin/profile-experience.js:1
  • REDACTED has 642 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
  • clis/douban/utils.js has 636 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/douban/utils.js:1
  • src/daemon.ts has 636 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/daemon.ts:1
  • REDACTED 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. — REDACTED:1
  • clis/youtube/transcript.js has 612 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/youtube/transcript.js:1
  • clis/twitter/shared.js has 591 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/twitter/shared.js:1
  • clis/gmail/utils.js has 578 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/gmail/utils.js:1
  • src/browser/cdp.ts has 569 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/browser/cdp.ts:1
  • src/convention-audit.ts has 567 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/convention-audit.ts:1
  • REDACTED has 557 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
  • src/help.ts has 557 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/help.ts:1
  • clis/reddit/read.js has 546 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/reddit/read.js:1
  • clis/gitee/trending.js has 542 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/gitee/trending.js:1
  • clis/_atlassian/shared.js has 528 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/_atlassian/shared.js:1
  • clis/suno/utils.js has 501 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/suno/utils.js:1
  • src/browser/daemon-client.ts has 495 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/browser/daemon-client.ts:1
  • clis/linkedin/timeline.js has 494 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/linkedin/timeline.js:1
  • clis/linkedin/connect.js has 493 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — clis/linkedin/connect.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 Coverage5.6 / 10Adequate✓ 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. (×40) — clis/youtube/transcript.js:1, clis/gitee/trending.js:1, clis/hltv/player-duel.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness8.8 / 10Strong✓ 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.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ 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.

R7 · Dead Code2.6 / 10Weak✓ Tool-verified

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

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

  • 5 file(s) (~3851 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — extension
  • Unreachable from the 73 application, 22 tooling and 590 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (73 application, 22 tooling, 590 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 (×30) — clis/youtube/transcript.js, clis/hltv/player-duel.js, clis/spotify/spotify.js, …
  • no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (clis/gitee/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×2) — clis/gitee/trending.js, clis/gitee/user.js
  • no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 6 in-repo import(s) from 6 other file(s) do name it (clis/hupu/detail.js, clis/hupu/like.js, clis/hupu/mentions.js and 3 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — clis/hupu/utils.js
  • no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (clis/mubu/doc.js, clis/mubu/docs.js, clis/mubu/notes.js and 2 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — clis/mubu/utils.js
  • no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 9 in-repo import(s) from 9 other file(s) do name it (clis/1point3acres/digest.js, clis/1point3acres/forum.js, clis/1point3acres/forums.js and 6 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — clis/1point3acres/utils.js
  • no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (clis/sinablog/article.js, clis/sinablog/hot.js, clis/sinablog/user.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — clis/sinablog/utils.js
  • no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 12 in-repo import(s) from 12 other file(s) do name it (clis/yollomi/background.js, clis/yollomi/edit.js, clis/yollomi/face-swap.js and 9 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — clis/yollomi/utils.js
  • no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (clis/openalex/search.js, clis/openalex/work.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — clis/openalex/utils.js

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 Hygiene8.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. — scripts/postinstall.js:84

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.

S1 · Web-Security Posture2.0 / 10Critical✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `INSTAGRAM_STORY_SIG_KEY` is the MAC key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — REDACTED:22
  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×4) — REDACTED:216, clis/flomo/memos.js:76, clis/grok/image.js:48, …
  • `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — clis/spotify/spotify.js:168

What to do

  • Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.
  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 4 sites, not one: `REDACTED:216` (createHash("md5")), `clis/flomo/memos.js:76` (createHash("md5")), `clis/grok/image.js:48` (createHash("sha1")), `clis/tieba/utils.js:28` (createHash("md5")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

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

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

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

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.8 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 19/152 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `queryLeftTickets` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/12306/trains.js:55
  • `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×25) — clis/36kr/news.js:16, clis/archive/wayback.js:32, REDACTED:37, …
  • `atlassianRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/_atlassian/shared.js:161
  • `itunesFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/apple-podcasts/utils.js:9
  • `arxivFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:10
  • `ahFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/autohome/utils.js:126
  • `bbcFetchRss` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:55
  • `fetchBloombergFeed` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/bloomberg/utils.js:21
  • `cratesFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/crates/utils.js:40
  • `fetchSuggest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/ctrip/utils.js:48
  • `llamaFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/defillama/utils.js:48
  • `fetchArticle` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/devto/read.js:16
  • `hubFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/dockerhub/utils.js:69
  • `dcdFetchPageProps` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/dongchedi/utils.js:73
  • `imagexUpload` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — clis/douyin/_shared/imagex-upload.js:34

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped4.5 / 10Weak✓ 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.

  • `src` carries text this program read out of a document — an attribute or a text node, which the DOM hands back already decoded, so an entity its author wrote is a live character again — and it is written straight into the `src` attribute of markup built here with nothing escaping it on the way. The value is chosen by whoever authored that document, not by this program, so it can close the attribute or element it sits in and open another — a crafted document becomes markup in what this code renders. Escape `src` at this site, or validate it against the shape the position accepts before interpolating it. (×2) — src/download/article-download.ts:176, src/download/article-download.ts:186
  • `entity` 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. — clis/dblp/browser.js:33
  • `typeof contentHtml==='string'?contentHtml:''` 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. — clis/zhihu/download-helpers.js:64

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.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

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

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

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

X3 · Exception handling5.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×35) — REDACTED:86, REDACTED:181, REDACTED:186, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — clis/1688/assets.js:249, clis/boss/search.js:115
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×2) — clis/amazon/product.js:38, clis/amazon/offer.js:75
  • `.catch(function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — clis/brave/search.js:63

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X5 · Nullable reference types9.3 / 10Exemplary✓ Tool-verified

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

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

  • ~1.8 `!` null assertions per 1k TypeScript source lines — 53 assertion(s) across the 29369 source line(s) of the 138 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/pipeline/steps/browser.ts (14), src/site-slots.ts (8), src/pipeline/steps/intercept.ts (7). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

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

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 42 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.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 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 Health38%Weak — gated by D1, D2, R1, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture87%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity75%StrongStrongest area.
Readiness54%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security39%Weak — gated by D29, S1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility41%Weak — gated by AC1, AC2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
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 — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 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 — 47 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.

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • 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 did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • 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.
  • 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+ projects each declaring an entity of their own. 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 — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — none of 1 ADRs are conformance-checkable — unverifiable.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.js,.ts), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D4 Code Duplication — This repository's production source (.js, .mjs, .mts, .ts) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • 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.
  • D5 Coupling — Not applicable — this npm build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (1 domain event(s); its domain events are published by services or handlers — no domain entity raises one)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • 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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `vitest --coverage --coverage.reporter=lcovonly`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 — 50 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 2 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×4
  • Orphaned knowledge REDACTED:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge clis/wechat-channels/publish.js:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge clis/_atlassian/shared.js:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge clis/xianyu/publish.js:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative clis/chatgpt/utils.js:2915 — 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 · <input> without a programmatic label · ×1
  • <input> without a programmatic label REDACTED:448 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels · <select> without a programmatic label · ×1
  • <select> without a programmatic label src/commands/browser.ts:1633 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> extension/popup.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@mixmark-io/domino' · ×1
  • Unlisted import '@mixmark-io/domino' scripts/postinstall.js:84 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
S1 · Web-Security Posture · Cryptographic key material is a compile-time constant · ×1
  • Cryptographic key material is a compile-time constant REDACTED:22 — `INSTAGRAM_STORY_SIG_KEY` is the MAC key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
Serious — 1164 finding(s)
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking clis/chatgpt/utils.js:2472 — `existsSync` in `prepareChatGPTImagePaths` 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 clis/chatgpt/utils.js:2475 — `statSync` in `prepareChatGPTImagePaths` 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 clis/chatgpt/utils.js:2546 — `statSync` in `callback to paths.some` 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 clis/chatgpt/utils.js:2555 — `readFileSync` in `callback to paths.map` 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 clis/chatgpt/utils.js:3422 — `readFileSync` in `callback to absPaths.map` 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 clis/chatgpt/utils.js:3537 — `existsSync` in `prepareChatGPTFilePaths` 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 clis/chatgpt/utils.js:3540 — `statSync` in `prepareChatGPTFilePaths` 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 clis/claude/utils.js:372 — `existsSync` in `sendWithFile` 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 clis/claude/utils.js:376 — `statSync` in `sendWithFile` 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 clis/claude/utils.js:412 — `readFileSync` in `sendWithFile` 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 clis/deepseek/utils.js:383 — `existsSync` in `sendWithFile` 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 clis/deepseek/utils.js:387 — `statSync` in `sendWithFile` 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 clis/deepseek/utils.js:417 — `readFileSync` in `sendWithFile` 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 clis/douyin/_shared/imagex-upload.js:35 — `fs.existsSync` in `imagexUpload` 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 clis/douyin/_shared/imagex-upload.js:38 — `fs.readFileSync` in `imagexUpload` 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 clis/douyin/_shared/tos-upload.js:268 — `fs.existsSync` in `tosUpload` 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 clis/douyin/_shared/tos-upload.js:271 — `fs.statSync` in `tosUpload` 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 clis/douyin/_shared/tos-upload.js:301 — `fs.openSync` in `tosUpload` 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 clis/douyin/_shared/tos-upload.js:324 — `fs.closeSync` in `tosUpload` 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 clis/douyin/draft.js:308 — `fs.existsSync` in `func` 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 clis/douyin/draft.js:325 — `fs.existsSync` in `func` 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 clis/grok/image.js:204 — `fs.mkdirSync` in `saveImages` 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 clis/grok/image.js:220 — `fs.writeFileSync` in `saveImages` 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 clis/instagram/_shared/protocol-capture.js:241 — `fs.writeFileSync` in `dumpInstagramProtocolCaptureIfEnabled` 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 clis/instagram/download.js:325 — `fs.mkdirSync` in `downloadInstagramMedia` 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.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file clis/youtube/transcript.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 clis/gitee/trending.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 clis/hltv/player-duel.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 clis/spotify/spotify.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 clis/hupu/utils.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 clis/mubu/utils.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 clis/bilibili/feed.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 autoresearch/eval-skill.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED: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 clis/1point3acres/utils.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 clis/mubu/notes.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 REDACTED: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 clis/deepseek/usage.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 REDACTED: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 REDACTED: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 clis/barchart/greeks.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 clis/youtube/video.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 clis/imdb/person.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 clis/twitter/accept.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 clis/gitee/user.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 clis/lobsters/read.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 scripts/postinstall.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 scripts/check-listing-id-pairing.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 clis/maimai/search-talents.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 clis/hackernews/read.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.
  • + 15 more in this group — see findings.md.
X2 · Cancellation propagation · Async function without AbortSignal · ×39
  • Async function without AbortSignal: queryLeftTickets clis/12306/trains.js:55 — `queryLeftTickets` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/36kr/news.js:16 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: atlassianRequest clis/_atlassian/shared.js:161 — `atlassianRequest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: itunesFetch clis/apple-podcasts/utils.js:9 — `itunesFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/archive/wayback.js:32 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func REDACTED:37 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/archive/search.js:29 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/archive/item.js:23 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: arxivFetch REDACTED:10 — `arxivFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: ahFetch clis/autohome/utils.js:126 — `ahFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: bbcFetchRss REDACTED:55 — `bbcFetchRss` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/bbc/news.js:16 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchBloombergFeed clis/bloomberg/utils.js:21 — `fetchBloombergFeed` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/chess/game.js:86 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/coingecko/trending.js:18 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/coingecko/top.js:18 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/coingecko/global.js:18 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/coingecko/exchanges.js:22 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/coingecko/derivatives.js:27 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/coingecko/coin.js:26 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: func clis/coingecko/categories.js:23 — `func` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: cratesFetch clis/crates/utils.js:40 — `cratesFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchSuggest clis/ctrip/utils.js:48 — `fetchSuggest` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: llamaFetch clis/defillama/utils.js:48 — `llamaFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchArticle clis/devto/read.js:16 — `fetchArticle` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • + 14 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×38
  • FunctionTooLong: browser.registerBrowserCommands src/commands/browser.ts:424 — FunctionTooLong — registerBrowserCommands runs 1275 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1175 over it, 12.75× 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: timeline.extractVisiblePosts clis/linkedin/timeline.js:61 — FunctionTooLong — extractVisiblePosts runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: search.buildSearchEvaluate clis/coupang/search.js:53 — FunctionTooLong — buildSearchEvaluate runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.90× 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: utils.getChatGPTDeepResearchResult clis/chatgpt/utils.js:1920 — FunctionTooLong — getChatGPTDeepResearchResult runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53× 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: images.extractGoogleImageRows clis/google/images.js:55 — FunctionTooLong — extractGoogleImageRows runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: profile-experience.buildExperienceExtractionScript clis/linkedin/profile-experience.js:139 — FunctionTooLong — buildExperienceExtractionScript runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97× 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: feed.buildFeedExtractScript clis/facebook/feed.js:22 — FunctionTooLong — buildFeedExtractScript runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: read.buildRenderAwareExtractorJs clis/web/read.js:144 — FunctionTooLong — buildRenderAwareExtractorJs runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× 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: daemon.handleRequest src/daemon.ts:262 — FunctionTooLong — handleRequest runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× 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: find.buildSemanticFindJs src/browser/find.ts:232 — FunctionTooLong — buildSemanticFindJs runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× 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: utils.selectChatGPTModel clis/chatgpt/utils.js:669 — FunctionTooLong — selectChatGPTModel runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: list-remove-core.listRemoveUser clis/twitter/list-remove-core.js:52 — FunctionTooLong — listRemoveUser runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× 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: search.buildScrollHarvestJs clis/xiaohongshu/search.js:707 — FunctionTooLong — buildScrollHarvestJs runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× 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: download.stepDownload src/pipeline/steps/download.ts:118 — FunctionTooLong — stepDownload runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: export-all.readConversation clis/grok/export-all.js:165 — FunctionTooLong — readConversation runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: protocol-capture.buildInstallInstagramProtocolCaptureJs clis/instagram/_shared/protocol-capture.js:15 — FunctionTooLong — buildInstallInstagramProtocolCaptureJs runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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: note.buildPublishInstagramNoteJs clis/instagram/note.js:34 — FunctionTooLong — buildPublishInstagramNoteJs runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: publish.fillField clis/xiaohongshu/publish.js:256 — FunctionTooLong — fillField 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: ask.buildAskEvaluateJs clis/xiaohongshu/ask.js:225 — FunctionTooLong — buildAskEvaluateJs 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: utils.getTurnsScript clis/doubao/utils.js:129 — FunctionTooLong — getTurnsScript runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: download.buildInstagramFetchScript clis/instagram/download.js:115 — FunctionTooLong — buildInstagramFetchScript runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: posts-core.buildPostsScript clis/linkedin/posts-core.js:73 — FunctionTooLong — buildPostsScript runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: reel.fillCaption clis/instagram/reel.js:419 — FunctionTooLong — fillCaption runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: product.buildProductDetailEvaluate clis/coupang/product.js:27 — FunctionTooLong — buildProductDetailEvaluate runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: download.buildDownloadExtractJs clis/xiaohongshu/download.js:22 — FunctionTooLong — buildDownloadExtractJs runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 13 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×38
  • Swallowed exception (empty catch) REDACTED:86 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:181 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:186 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:76 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:171 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:176 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) autoresearch/eval-skill.ts:174 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:62 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:110 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:65 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:182 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:187 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:54 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:140 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:145 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) autoresearch/commands/debug.ts:61 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) autoresearch/commands/debug.ts:86 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) autoresearch/commands/debug.ts:155 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) autoresearch/commands/debug.ts:159 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) clis/12306/trains.js:40 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) clis/1688/download.js:13 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) clis/1point3acres/utils.js:81 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) clis/amazon/product.js:38 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) clis/amazon/offer.js:75 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:53 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 13 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 1 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×20
  • FileTooLong: chatgpt/utils.js clis/chatgpt/utils.js — FileTooLong — 2710 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 2210 over it, 5.42× 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: gemini/utils.js clis/gemini/utils.js — FileTooLong — 2059 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 1559 over it, 4.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: commands/browser.ts src/commands/browser.ts — FileTooLong — 1573 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: registerBrowserCommands (424-2174). The bar is 500 significant lines; this is 1073 over it, 3.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: instagram/post.js clis/instagram/post.js — FileTooLong — 1168 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 668 over it, 2.34× 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: midjourney/utils.js clis/midjourney/utils.js — FileTooLong — 1132 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 632 over it, 2.26× 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: xiaohongshu/publish.js clis/xiaohongshu/publish.js — FileTooLong — 1022 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 522 over it, 2.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 966 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 466 over it, 1.93× 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: browser/base-page.ts src/browser/base-page.ts — FileTooLong — 954 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: BasePage (167-1257). The bar is 500 significant lines; this is 454 over it, 1.91× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: doubao/utils.js clis/doubao/utils.js — FileTooLong — 899 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 399 over it, 1.80× 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 — 828 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 328 over it, 1.66× 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: xiaohongshu/search.js clis/xiaohongshu/search.js — FileTooLong — 760 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 260 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: notebooklm/utils.js clis/notebooklm/utils.js — FileTooLong — 730 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 230 over it, 1.46× 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 — 682 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 182 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ctrip/utils.js clis/ctrip/utils.js — FileTooLong — 673 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 173 over it, 1.35× 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: trip/utils.js clis/trip/utils.js — FileTooLong — 662 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 162 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: instagram/reel.js clis/instagram/reel.js — FileTooLong — 651 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 151 over it, 1.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 596 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 96 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: linkedin/profile-experience.js clis/linkedin/profile-experience.js — FileTooLong — 556 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 56 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: douban/utils.js clis/douban/utils.js — FileTooLong — 532 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 32 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: REDACTED REDACTED — 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×13
  • Hotspot: src/browser/daemon-client.ts src/browser/daemon-client.ts:352 — src/browser/daemon-client.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in daemon-client.sendCommandRaw at line 352. 2 of those changes were fix/bug commits, and the other 6 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/browser/daemon-client.ts`: 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/execution.ts src/execution.ts:199 — src/execution.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in execution.executeCommand at line 199. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/execution.ts`: 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/browser/cdp.ts src/browser/cdp.ts:334 — src/browser/cdp.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in CDPPage.startNetworkCapture at line 334. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/browser/cdp.ts`: 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: clis/chatgpt/utils.js clis/chatgpt/utils.js:2973 — clis/chatgpt/utils.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in utils.waitForChatGPTImages at line 2973. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/chatgpt/utils.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: clis/xiaohongshu/search.js clis/xiaohongshu/search.js:317 — clis/xiaohongshu/search.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in search.requireHarvestPayload at line 317. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/xiaohongshu/search.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/daemon.ts src/daemon.ts:262 — src/daemon.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in daemon.handleRequest at line 262. 1 of those changes was a fix/bug commit, and the other 1 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/daemon.ts`: 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/doctor.ts src/doctor.ts:102 — src/doctor.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in doctor.runBrowserDoctor at line 102. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/doctor.ts`: 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/browser/daemon-lifecycle.ts src/browser/daemon-lifecycle.ts:91 — src/browser/daemon-lifecycle.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in daemon-lifecycle.ensureBrowserBridgeReady at line 91. 1 of those changes was a fix/bug commit, and the other 1 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/browser/daemon-lifecycle.ts`: 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: clis/ctrip/flight.js clis/ctrip/flight.js:43 — clis/ctrip/flight.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in flight.parseBatchSearchCaptures at line 43. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/ctrip/flight.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: clis/twitter/list-remove-core.js clis/twitter/list-remove-core.js:52 — clis/twitter/list-remove-core.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in list-remove-core.listRemoveUser at line 52. 1 of those changes was a fix/bug commit, and the other 1 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/twitter/list-remove-core.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/pipeline/steps/fetch.ts src/pipeline/steps/fetch.ts:124 — src/pipeline/steps/fetch.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in fetch.stepFetch at line 124. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/pipeline/steps/fetch.ts`: 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: clis/notebooklm/utils.js clis/notebooklm/utils.js:641 — clis/notebooklm/utils.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in utils.getNotebooklmPageState at line 641. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/notebooklm/utils.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: clis/twitter/thread.js clis/twitter/thread.js:41 — clis/twitter/thread.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in thread.extractTweet at line 41. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/twitter/thread.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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×7
  • Change coupling: discover.ts ↔ doctor.ts src/browser/discover.ts:1 — `src/browser/discover.ts` and `src/doctor.ts` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `85d73b5b` refactor(doctor/status): unify daemon health checks into getDaemonHea…; `f88e7569` refactor: src cleanup — deduplicate errors, cache VM, extract BasePag…; `0f3021a0` fix: relax extension version check, enable all adapter tests (#520) — run `git show` on any of them.
  • Change coupling: daemon.ts ↔ doctor.ts src/commands/daemon.ts:1 — `src/commands/daemon.ts` and `src/doctor.ts` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `01022d9c` chore(daemon): read status through transport layer (#2040); `f481585b` chore: drop util.styleText to support Node v20+ (#1524); `765eb56c` feat(daemon): surface stale versions and restart (#1261) — run `git show` on any of them.
  • Change coupling: cli.ts ↔ types.ts src/cli.ts:1 — `src/cli.ts` and `src/types.ts` change together 50% of the time (20 of the 40 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 20 shared commits counted here, the most recent 3 are `b0f84c99` fix: click hit-testing + facebook feed/search DOM drift (#2076 #2071 …; `987d9cba` refactor(doctor): drop --no-live and --sessions flags + dead protocol…; `a92f382c` refactor(browser): split interactive and automation windows — run `git show` on any of them.
  • Change coupling: daemon-client.ts ↔ daemon.ts src/browser/daemon-client.ts:1 — `src/browser/daemon-client.ts` and `src/daemon.ts` change together 50% of the time (19 of the 38 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `7966cb6a` feat(daemon): per-site slot pool — exclusive per-run tabs and run-lev…; `50565efd` fix(browser): thread the preferred profile through readiness and stat…; `189462c0` feat(daemon): fail fast when a write command already holds the site s… — run `git show` on any of them.
  • Change coupling: base-page.ts ↔ cli.ts src/browser/base-page.ts:1 — `src/browser/base-page.ts` and `src/cli.ts` change together 50% of the time (17 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `b0f84c99` fix: click hit-testing + facebook feed/search DOM drift (#2076 #2071 …; `aa6696f6` feat(browser): add annotated screenshot refs (#1433); `4e4bef64` feat(browser): add drag command (#1439) — run `git show` on any of them.
  • Change coupling: bridge.ts ↔ daemon-client.ts src/browser/bridge.ts:1 — `src/browser/bridge.ts` and `src/browser/daemon-client.ts` change together 50% of the time (16 of the 32 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `ff1d59ff` chore(core): remove dead internal symbols (#2323); `50565efd` fix(browser): thread the preferred profile through readiness and stat…; `9387cd92` fix(browser): stale default profile must not veto live connections (#… — run `git show` on any of them.
  • Change coupling: discovery.ts ↔ validate.ts src/discovery.ts:1 — `src/discovery.ts` and `src/validate.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `dcaae370` refactor(registry): remove dead adapter metadata (#1369); `7c9caa81` refactor: extract shared utilities and simplify codebase (#348); `b4d64cad` feat: refine error handling with semantic error types (#312) — run `git show` on any of them.
D17 · Explicit Debt · TodoComment · ×6
  • TodoComment src/commands/adapter.ts:247 — // TODO: describe what this command does — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/commands/adapter.ts:248 — // TODO: 'read' for queries, 'write' for remote/account state changes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/commands/adapter.ts:251 — // TODO: PUBLIC (no auth), COOKIE (needs login), UI (DOM interaction) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/commands/adapter.ts:252 — // TODO: set true if needs browser — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/commands/adapter.ts:256 — // TODO: field names for table output (e.g. ['title', 'score', 'url']) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment src/commands/adapter.ts:258 — // TODO: implement data fetching — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · func (cognitive 19) · ×6
  • func (cognitive 19) clis/instagram/reel.js:736 — func has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), ternaries 1 (2 pts), boolean chains 1, loops 1, other 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (run, runIsolated). 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.
  • func (cognitive 19) clis/weixin/create-draft.js:292 — func has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 4 (5 pts), 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.
  • func (cognitive 19) clis/youtube/comment.js:202 — func has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 pts), boolean chains 3, other 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.
  • func (cognitive 19) clis/xiaohongshu/delete-note.js:161 — func has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), other 2, boolean chains 1, error handling 1, 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.
  • func (cognitive 19) clis/linkedin/people-search.js:190 — func has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, error handling 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • func (cognitive 19) clis/xiaohongshu/unfollow.js:199 — func has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), other 4, boolean chains 3, error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · func (cyclomatic 16) · ×5
  • func (cyclomatic 16) clis/reddit/read.js:129 — func 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.
  • func (cyclomatic 16) clis/twitter/post.js:306 — func 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.
  • func (cyclomatic 16) clis/xiaohongshu/delete-note.js:161 — func 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.
  • func (cyclomatic 16) clis/notebooklm/add-source.js:206 — func 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.
  • func (cyclomatic 16) clis/twitter/profile.js:84 — func 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×5
  • Repeated repair: src/output.ts src/output.ts:74 — src/output.ts changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is output.renderPlain at line 74), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: preserve auth hints, reject invalid formats, and follow Zhihu pagination (#2612)”; “fix(output): keep markdown rows intact for multi-line cells (#2375)”; “fix: escape pipes in markdown output and fix contributing docs (#2059)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- src/output.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: clis/xiaohongshu/comments.js clis/xiaohongshu/comments.js:131 — clis/xiaohongshu/comments.js changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is comments.normalizeCommentImages at line 131), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(xiaohongshu): fail typed when a note's comments never load instead of returning [] (#2629)”; “fix(xiaohongshu): retry once through a cooldown on risk-control soft blocks (#1825) (#2207)”; “fix(xiaohongshu): extract direct comment reply target (#2175)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/xiaohongshu/comments.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.
  • Repeated repair: clis/twitter/block.js clis/twitter/block.js:15 — clis/twitter/block.js changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is func at line 15), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(twitter): 轮询 More 菜单与菜单项,修复冷启动首次调用必失败 (#2617)”; “fix(twitter): repair block and hide reply flows”; “fix(twitter): fail typed when a write command does not go through (#2256)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/twitter/block.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.
  • Repeated repair: clis/twitter/hide-reply.js clis/twitter/hide-reply.js:17 — clis/twitter/hide-reply.js changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is func at line 17), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(twitter): 轮询 More 菜单与菜单项,修复冷启动首次调用必失败 (#2617)”; “fix(twitter): repair block and hide reply flows”; “fix(twitter): fail typed when a write command does not go through (#2256)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/twitter/hide-reply.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.
  • Repeated repair: clis/twitter/post.js clis/twitter/post.js:58 — clis/twitter/post.js changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is post.validateSubmitStatusPair at line 58), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: integrate 18 reviewed browser, adapter, and pipeline contributions (#2615)”; “fix(twitter): fail typed when a write command does not go through (#2256)”; “fix(twitter): stop reporting another tweet as the posted permalink (#2251)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 17:33:15 +08:00' --until='2026-10-23 17:33:15 +08:00' --full-history --no-merges -- clis/twitter/post.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.
D2 · Cognitive Complexity · func (cognitive 23) · ×5
  • func (cognitive 23) clis/web/read.js:423 — func has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 3, error handling 1, other 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.
  • func (cognitive 23) clis/twitter/post.js:306 — func has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 1 (3 pts), other 3, ternaries 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 23) clis/linkedin/thread-snapshot.js:312 — func has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (11 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.
  • func (cognitive 23) clis/linkedin/safe-send.js:214 — func has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 10, if/else 9, ternaries 2 (3 pts), loops 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.
  • func (cognitive 23) clis/imdb/person.js:20 — func has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, ternaries 3 (7 pts), if/else 6, loops 1 (2 pts) (nesting depth added 5). Of this number, 22 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.
D1 · Cyclomatic Complexity · func (cyclomatic 22) · ×4
  • func (cyclomatic 22) clis/kimi/ui.js:191 — func has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 6 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.
  • func (cyclomatic 22) clis/ones/worklog.js:149 — func 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.
  • func (cyclomatic 22) clis/boss/search.js:149 — func 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.
  • func (cyclomatic 22) clis/pixiv/bookmark-download.js:157 — func 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.
D2 · Cognitive Complexity · func (cognitive 34) · ×4
  • func (cognitive 34) clis/booking/search.js:239 — func has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 15, if/else 11 (12 pts), ternaries 3 (4 pts), error handling 3 (nesting depth added 2). 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.
  • func (cognitive 34) clis/midjourney/generate.js:107 — func has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (14 pts), error handling 6 (9 pts), boolean chains 6, loops 3, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 33 points are the body's own statements and 1 belongs 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.
  • func (cognitive 34) clis/xiaohongshu/comment.js:122 — func has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 4 (6 pts), boolean chains 4, other 4, error handling 2 (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.
  • func (cognitive 34) clis/bilibili/feed.js:184 — func has cognitive complexity 34 (threshold 15). Drivers by points: other 20, if/else 9 (10 pts), ternaries 2 (4 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 · func (cognitive 31) · ×4
  • func (cognitive 31) clis/wechat-channels/publish.js:576 — func has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, ternaries 5 (7 pts), loops 1 (2 pts), other 2, error handling 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.
  • func (cognitive 31) clis/kimi/ui.js:191 — func has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, error handling 3 (7 pts), ternaries 3 (5 pts), other 1 (nesting depth added 10). Of this number, 29 points are the body's own statements and 2 belong to 6 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.
  • func (cognitive 31) clis/xiaohongshu/user.js:108 — func has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, other 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 7). Of this number, 30 points are the body's own statements and 1 belongs 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.
  • func (cognitive 31) clis/pixiv/bookmark-download.js:157 — func has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (6 pts), error handling 3 (5 pts), loops 4 (5 pts), boolean chains 3, other 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.
S1 · Web-Security Posture · Weak hash algorithm · ×4
  • Weak hash algorithm REDACTED:216 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm clis/flomo/memos.js:76 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm clis/grok/image.js:48 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm clis/tieba/utils.js:28 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D1 · Cyclomatic Complexity · images.extractGoogleImageRows · ×3
  • images.extractGoogleImageRows::add (cyclomatic 39) clis/google/images.js:149 — images.extractGoogleImageRows::add has cyclomatic complexity 39 (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. This shape REPEATS in the file: 2 other methods here (images.extractGoogleImageRows::parseImgresLink, images.extractGoogleImageRows::resolveOriginalFor) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
  • images.extractGoogleImageRows::parseImgresLink (cyclomatic 21) clis/google/images.js:233 — images.extractGoogleImageRows::parseImgresLink 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. This shape REPEATS in the file: 2 other methods here (images.extractGoogleImageRows::add, images.extractGoogleImageRows::resolveOriginalFor) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
  • images.extractGoogleImageRows::resolveOriginalFor (cyclomatic 16) clis/google/images.js:276 — images.extractGoogleImageRows::resolveOriginalFor has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (images.extractGoogleImageRows::add, images.extractGoogleImageRows::parseImgresLink) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
D1 · Cyclomatic Complexity · func (cyclomatic 33) · ×3
  • func (cyclomatic 33) clis/coupang/search.js:415 — func has cyclomatic complexity 33 (threshold 15). Of this number, 26 points are the body's own statements and 7 belong to 9 function literals 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.
  • func (cyclomatic 33) clis/coupang/product.js:208 — func has cyclomatic complexity 33 (threshold 15). Of this number, 30 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.
  • func (cyclomatic 33) clis/bilibili/feed.js:184 — func has cyclomatic complexity 33 (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 · func (cyclomatic 28) · ×3
  • func (cyclomatic 28) clis/weibo/publish.js:95 — func 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.
  • func (cyclomatic 28) clis/weibo/user-posts.js:95 — func has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 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.
  • func (cyclomatic 28) clis/barchart/greeks.js:64 — func has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 176). 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 · func (cyclomatic 27) · ×3
  • func (cyclomatic 27) clis/wechat-channels/publish.js:576 — func has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • func (cyclomatic 27) clis/linkedin/thread-snapshot.js:312 — func has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • func (cyclomatic 27) clis/xiaohongshu/user.js:108 — func has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs 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 · func (cyclomatic 21) · ×3
  • func (cyclomatic 21) clis/web/read.js:423 — func 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.
  • func (cyclomatic 21) clis/xianyu/search.js:208 — func 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.
  • func (cyclomatic 21) clis/imdb/person.js:20 — func has cyclomatic complexity 21 (threshold 15). Of this number, 18 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 · func (cyclomatic 20) · ×3
  • func (cyclomatic 20) clis/ctrip/flight.js:164 — func has cyclomatic complexity 20 (threshold 15). Of this number, 17 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.
  • func (cyclomatic 20) clis/linkedin/people-search.js:190 — func 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.
  • func (cyclomatic 20) clis/twitter/accept.js:17 — func 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 · func (cyclomatic 19) · ×3
  • func (cyclomatic 19) clis/xiaohongshu/unfollow.js:199 — func 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.
  • func (cyclomatic 19) clis/twitter/list-tweets.js:133 — func has cyclomatic complexity 19 (threshold 15). Of this number, 15 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.
  • func (cyclomatic 19) clis/slock/message-read.js:43 — func has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · func (cognitive 35) · ×3
  • func (cognitive 35) clis/weibo/publish.js:95 — func has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 3 (4 pts), other 4, boolean chains 3, 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.
  • func (cognitive 35) clis/bilibili/feed.js:106 — func has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 5, other 4, loops 2 (3 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 35) clis/twitter/accept.js:17 — func has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, loops 2 (3 pts), other 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · func (cognitive 28) · ×3
  • func (cognitive 28) clis/xianyu/publish.js:387 — func has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 9, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 28) clis/ones/worklog.js:149 — func has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, ternaries 2 (5 pts), other 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.
  • func (cognitive 28) clis/xiaohongshu/comment-delete.js:122 — func has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 3 (5 pts), boolean chains 3, other 3, error handling 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 · func (cognitive 24) · ×3
  • func (cognitive 24) clis/ctrip/flight.js:164 — func has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 24) clis/linkedin/inbox.js:155 — func has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 11 (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.
  • func (cognitive 24) clis/weibo/user-posts.js:95 — func has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 5, other 4, ternaries 4. Of this number, 14 points are the body's own statements and 10 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 · func (cognitive 21) · ×3
  • func (cognitive 21) clis/weread/book.js:191 — func has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, other 5, error handling 1, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 21) clis/twitter/list-tweets.js:133 — func has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (9 pts), loops 1, ternaries 1 (nesting depth added 4). Of this number, 17 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.
  • func (cognitive 21) clis/twitter/profile.js:84 — func has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (4 pts), boolean chains 3, other 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 · func (cognitive 17) · ×3
  • func (cognitive 17) clis/twitter/article.js:23 — func has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (2 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.
  • func (cognitive 17) clis/slock/message-read.js:43 — func has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, other 5, ternaries 3, boolean chains 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.
  • func (cognitive 17) clis/twitter/reply-dm.js:18 — func has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 1 (2 pts), loops 1, other 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block (39 lines × 2 locations) · ×3
  • Duplicated block (39 lines × 2 locations) clis/linkedin-learning/auth.js:9 — clis/linkedin-learning/auth.js:9 · clis/linkedin/auth.js:9 — 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 (39 lines × 2 locations) clis/rubygems/utils.js:18 — clis/rubygems/utils.js:18 · clis/steam/utils.js:25 — 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 (39 lines × 2 locations) clis/twitter/following.js:8 — clis/twitter/following.js:8 · clis/twitter/likes.js:9 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
R7 · Dead Code · Dead file (~162 LoC) · ×3
  • Dead file (~162 LoC) clis/bilibili/video.js — no import path from any entry point (73 application, 22 tooling, 590 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
  • Dead file (~162 LoC) clis/imdb/search.js — no import path from any entry point (73 application, 22 tooling, 590 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
  • Dead file (~162 LoC) clis/zhihu/answer-detail.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~160 LoC) · ×3
  • Dead file (~160 LoC) clis/bilibili/comments.js — no import path from any entry point (73 application, 22 tooling, 590 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
  • Dead file (~160 LoC) clis/hupu/mentions.js — no import path from any entry point (73 application, 22 tooling, 590 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
  • Dead file (~160 LoC) clis/openalex/utils.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (clis/openalex/search.js, clis/openalex/work.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark extension/idle.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 extension/popup.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · func (cyclomatic 26) · ×2
  • func (cyclomatic 26) clis/linkedin/safe-send.js:214 — func has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • func (cyclomatic 26) clis/band/post.js:34 — func has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to 7 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 · func (cyclomatic 25) · ×2
  • func (cyclomatic 25) clis/stackoverflow/read.js:225 — func 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.
  • func (cyclomatic 25) clis/linkedin/inbox.js:155 — func 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 · func (cyclomatic 23) · ×2
  • func (cyclomatic 23) clis/xianyu/publish.js:387 — func 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.
  • func (cyclomatic 23) clis/bilibili/feed.js:106 — func 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 · func (cyclomatic 18) · ×2
  • func (cyclomatic 18) clis/youtube/comment.js:202 — func 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.
  • func (cyclomatic 18) clis/weread/book.js:191 — func has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality · No assertions · ×2
  • No assertions: all 5 enum values are accepted pre-network clis/slock/task-status.test.js:48 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: emitHook with no registered hooks does nothing src/hooks.test.ts:102 — 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* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, 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 · func (cognitive 47) · ×2
  • func (cognitive 47) clis/youtube/transcript.js:139 — func has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 9, ternaries 4 (8 pts), error handling 3 (6 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.
  • func (cognitive 47) clis/suno/generate.js:75 — func has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 12 (16 pts), boolean chains 11, loops 1 (nesting depth added 7). Of this number, 43 points are the body's own statements and 4 belong to 8 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 · extractGoogleImageRows · ×2
  • extractGoogleImageRows::add (cognitive 34) clis/google/images.js:149 — extractGoogleImageRows::add has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 24, if/else 6, error handling 1 (2 pts), ternaries 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
  • extractGoogleImageRows::resolveOriginalFor (cognitive 16) clis/google/images.js:276 — extractGoogleImageRows::resolveOriginalFor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 1, loops 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 · func (cognitive 32) · ×2
  • func (cognitive 32) clis/coupang/product.js:208 — func has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, other 6, if/else 4, error handling 3, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 29 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.
  • func (cognitive 32) clis/barchart/greeks.js:64 — func has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 9 (13 pts), if/else 8 (11 pts), boolean chains 8 (nesting depth added 7). Of this number, 17 points are the body's own statements and 15 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 · func (cognitive 25) · ×2
  • func (cognitive 25) REDACTED:565 — func has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 3 (5 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 25) clis/grok/image.js:247 — func has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 3, loops 1 (nesting depth added 11). 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 · func (cognitive 20) · ×2
  • func (cognitive 20) clis/instagram/post.js:1401 — func has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 3 (5 pts), boolean chains 1, other 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 20) clis/xianyu/search.js:208 — func has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 9. 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 · func (cognitive 18) · ×2
  • func (cognitive 18) clis/kimi/chat.js:446 — func has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 18) clis/twitter/bookmark-folder.js:133 — func has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1, other 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 · func (cognitive 16) · ×2
  • func (cognitive 16) clis/xiaohongshu/comments.js:376 — func has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3, loops 1 (2 pts), boolean chains 1, other 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • func (cognitive 16) clis/notebooklm/add-source.js:206 — func has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, if/else 5 (6 pts), boolean chains 2, other 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Fake-async · ×2
  • Fake-async — async method never awaits autoresearch/commands/debug.ts:50 — `main` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits src/pipeline/steps/browser.ts:65 — `stepSnapshot` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
R10 · Code Duplication · Duplicated block with local edits (72 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (72 matched lines × 2 locations) clis/hltv/player-form.js:4 — clis/hltv/player-form.js:4 · clis/hltv/player-map-pool.js:4 — the two spans are one implementation copied and then locally edited — 647 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (72 matched lines × 2 locations) clis/weread/book.js:8 — clis/weread/book.js:8 · clis/weread/search.js:23 — the two spans are one implementation copied and then locally edited — 542 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (55 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (55 matched lines × 2 locations) REDACTED:108 — REDACTED:108 · REDACTED:179 — the two spans are one implementation copied and then locally edited — 613 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (55 matched lines × 2 locations) clis/chatgpt/image.js:15 — clis/chatgpt/image.js:15 · clis/gemini/image.js:20 — the two spans are one implementation copied and then locally edited — 444 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (43 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (43 matched lines × 2 locations) clis/weixin/download.js:101 — clis/weixin/download.js:101 · clis/weixin/download.js:167 — the two spans are one implementation copied and then locally edited — 351 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 (43 matched lines × 2 locations) scripts/check-silent-column-drop.mjs:20 — scripts/check-silent-column-drop.mjs:20 · scripts/check-typed-error-lint.mjs:14 — the two spans are one implementation copied and then locally edited — 447 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (36 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (36 matched lines × 2 locations) clis/youtube/history.js:23 — clis/youtube/history.js:23 · clis/youtube/search.js:47 — the two spans are one implementation copied and then locally edited — 221 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (36 matched lines × 2 locations) clis/zhihu/answer-comments.js:6 — clis/zhihu/answer-comments.js:6 · clis/zhihu/answer-detail.js:9 — the two spans are one implementation copied and then locally edited — 232 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R7 · Dead Code · Dead file (~204 LoC) · ×2
  • Dead file (~204 LoC) clis/imdb/person.js — no import path from any entry point (73 application, 22 tooling, 590 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
  • Dead file (~204 LoC) clis/twitter/accept.js — no import path from any entry point (73 application, 22 tooling, 590 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) · ×2
  • Dead file (~186 LoC) clis/sinablog/utils.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (clis/sinablog/article.js, clis/sinablog/hot.js, clis/sinablog/user.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
  • Dead file (~186 LoC) clis/weread/search.js — no import path from any entry point (73 application, 22 tooling, 590 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
X24 · Document value interpolated into markup unescaped · Document value reaches a markup attribute unescaped · ×2
  • Document value reaches a markup attribute unescaped src/download/article-download.ts:176 — `src` carries text this program read out of a document — an attribute or a text node, which the DOM hands back already decoded, so an entity its author wrote is a live character again — and it is written straight into the `src` attribute of markup built here with nothing escaping it on the way. The value is chosen by whoever authored that document, not by this program, so it can close the attribute or element it sits in and open another — a crafted document becomes markup in what this code renders. Escape `src` at this site, or validate it against the shape the position accepts before interpolating it.
  • Document value reaches a markup attribute unescaped src/download/article-download.ts:186 — `src` carries text this program read out of a document — an attribute or a text node, which the DOM hands back already decoded, so an entity its author wrote is a live character again — and it is written straight into the `src` attribute of markup built here with nothing escaping it on the way. The value is chosen by whoever authored that document, not by this program, so it can close the attribute or element it sits in and open another — a crafted document becomes markup in what this code renders. Escape `src` at this site, or validate it against the shape the position accepts before interpolating it.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×2
  • Untrusted text written into markup unescaped clis/dblp/browser.js:33 — `entity` 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 clis/zhihu/download-helpers.js:64 — `typeof contentHtml==='string'?contentHtml:''` 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) clis/1688/assets.js:249 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) clis/boss/search.js:115 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (an a11y linter that can read your UI — no component framework was detected, so the JSX/Vue ESLint plugins would have nothing to lint; use an HTML-template a11y linter (html-eslint, htmlhint) or run axe/pa11y over the rendered pages) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 6 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · browser.registerBrowserCommands (cyclomatic 324) · ×1
  • browser.registerBrowserCommands (cyclomatic 324) src/commands/browser.ts:424 — browser.registerBrowserCommands has cyclomatic complexity 324 (threshold 15). Most of this is not in the body itself: 1 of the 324 points is its own statement and the rest belongs to 56 function items inside it that branch (a function literal at line 1891, a function literal at line 1190, a function literal at line 1711, …). 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 · func (cyclomatic 102) · ×1
  • func (cyclomatic 102) clis/midjourney/action.js:147 — func has cyclomatic complexity 102 (threshold 15). Of this number, 100 points are the body's own statements and 2 belong to 7 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 · getChatGPTDeepResearchResult (cyclomatic 93) · ×1
  • getChatGPTDeepResearchResult (cyclomatic 93) clis/chatgpt/utils.js:1920 — getChatGPTDeepResearchResult has cyclomatic complexity 93 (threshold 15). Of this number, 80 points are the body's own statements and 13 belong to 8 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 · func (cyclomatic 74) · ×1
  • func (cyclomatic 74) clis/twitter/likes.js:207 — func has cyclomatic complexity 74 (threshold 15). To reduce it, separate the cases: extract each independent 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 · web-search.fetchRankedRedditSearch (cyclomatic 69) · ×1
  • web-search.fetchRankedRedditSearch (cyclomatic 69) clis/reddit/web-search.js:2 — web-search.fetchRankedRedditSearch has cyclomatic complexity 69 (threshold 15). Of this number, 62 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · snapshotFormatter.formatSnapshot (cyclomatic 69) · ×1
  • snapshotFormatter.formatSnapshot (cyclomatic 69) src/snapshotFormatter.ts:197 — snapshotFormatter.formatSnapshot has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent 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 · daemon.handleRequest (cyclomatic 69) · ×1
  • daemon.handleRequest (cyclomatic 69) src/daemon.ts:262 — daemon.handleRequest has cyclomatic complexity 69 (threshold 15). Of this number, 54 points are the body's own statements and 15 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 · resolveGenerationPlan (cyclomatic 66) · ×1
  • resolveGenerationPlan (cyclomatic 66) REDACTED:137 — resolveGenerationPlan has cyclomatic complexity 66 (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 · func (cyclomatic 62) · ×1
  • func (cyclomatic 62) clis/twitter/bookmarks.js:188 — func has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · func (cyclomatic 56) · ×1
  • func (cyclomatic 56) clis/xiaohongshu/publish.js:1180 — func has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent 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 · adapter.registerAdapterCommands (cyclomatic 55) · ×1
  • adapter.registerAdapterCommands (cyclomatic 55) src/commands/adapter.ts:105 — adapter.registerAdapterCommands has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 1 of the 55 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 293, 169, 216, …). 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 · extractAnswer (cyclomatic 52) · ×1
  • extractAnswer (cyclomatic 52) clis/zhihu/download-helpers.js:145 — extractAnswer has cyclomatic complexity 52 (threshold 15). Of this number, 51 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.
D1 · Cyclomatic Complexity · helpers.requestInPage (cyclomatic 51) · ×1
  • helpers.requestInPage (cyclomatic 51) clis/proton/helpers.js:15 — helpers.requestInPage has cyclomatic complexity 51 (threshold 15). Of this number, 47 points are the body's own statements and 4 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 · fetch-adapters.fetchAdapters (cyclomatic 51) · ×1
  • fetch-adapters.fetchAdapters (cyclomatic 51) scripts/fetch-adapters.js:101 — fetch-adapters.fetchAdapters has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent 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 · execution.executeCommand (cyclomatic 50) · ×1
  • execution.executeCommand (cyclomatic 50) src/execution.ts:199 — execution.executeCommand has cyclomatic complexity 50 (threshold 15). Of this number, 29 points are the body's own statements and 21 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 · template.applyFilter (cyclomatic 49) · ×1
  • template.applyFilter (cyclomatic 49) src/pipeline/template.ts:75 — template.applyFilter has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent 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 · download.stepDownload (cyclomatic 49) · ×1
  • download.stepDownload (cyclomatic 49) src/pipeline/steps/download.ts:118 — download.stepDownload has cyclomatic complexity 49 (threshold 15). Of this number, 18 points are the body's own statements and 31 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · thread-snapshot.parseThreadPages (cyclomatic 44) · ×1
  • thread-snapshot.parseThreadPages (cyclomatic 44) clis/linkedin/thread-snapshot.js:199 — thread-snapshot.parseThreadPages has cyclomatic complexity 44 (threshold 15). Of this number, 38 points are the body's own statements and 6 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 · commanderAdapter.registerCommandToProgram (cyclomatic 44) · ×1
  • commanderAdapter.registerCommandToProgram (cyclomatic 44) src/commanderAdapter.ts:34 — commanderAdapter.registerCommandToProgram has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 11 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 76, 67). 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 · func (cyclomatic 44) · ×1
  • func (cyclomatic 44) clis/gemini/ask.js:97 — func 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 · func (cyclomatic 43) · ×1
  • func (cyclomatic 43) clis/douyin/publish.js:111 — func has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · extractRenderedJob (cyclomatic 43) · ×1
  • extractRenderedJob (cyclomatic 43) clis/boss/detail.js:44 — extractRenderedJob has cyclomatic complexity 43 (threshold 15). Of this number, 27 points are the body's own statements and 16 belong to 19 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 · post.executeUiInstagramPost (cyclomatic 42) · ×1
  • post.executeUiInstagramPost (cyclomatic 42) clis/instagram/post.js:163 — post.executeUiInstagramPost has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · inbox.parseConversations (cyclomatic 42) · ×1
  • inbox.parseConversations (cyclomatic 42) clis/linkedin/inbox.js:63 — inbox.parseConversations has cyclomatic complexity 42 (threshold 15). Of this number, 32 points are the body's own statements and 10 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 · func (cyclomatic 41) · ×1
  • func (cyclomatic 41) clis/suno/generate.js:75 — func has cyclomatic complexity 41 (threshold 15). Of this number, 38 points are the body's own statements and 3 belong to 8 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 · extractShotRows (cyclomatic 39) · ×1
  • extractShotRows (cyclomatic 39) clis/dribbble/utils.js:110 — extractShotRows has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 136, a function literal at line 175, count, …). 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 · fetchCommentPage (cyclomatic 39) · ×1
  • fetchCommentPage (cyclomatic 39) clis/zhihu/answer-comments-helpers.js:37 — fetchCommentPage has cyclomatic complexity 39 (threshold 15). Of this number, 25 points are the body's own statements and 14 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 · daemon-client.sendCommandRaw (cyclomatic 38) · ×1
  • daemon-client.sendCommandRaw (cyclomatic 38) src/browser/daemon-client.ts:352 — daemon-client.sendCommandRaw has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · func (cyclomatic 38) · ×1
  • func (cyclomatic 38) clis/linkedin/connect.js:413 — func has cyclomatic complexity 38 (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 · parseItem (cyclomatic 38) · ×1
  • parseItem (cyclomatic 38) clis/bilibili/feed.js:15 — parseItem has cyclomatic complexity 38 (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 · func (cyclomatic 37) · ×1
  • func (cyclomatic 37) clis/booking/search.js:239 — func has cyclomatic complexity 37 (threshold 15). Of this number, 22 points are the body's own statements and 15 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 · user.listUserVideos (cyclomatic 36) · ×1
  • user.listUserVideos (cyclomatic 36) clis/tiktok/user.js:71 — user.listUserVideos has cyclomatic complexity 36 (threshold 15). Of this number, 29 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 · readMatchSeries (cyclomatic 35) · ×1
  • readMatchSeries (cyclomatic 35) REDACTED:661 — readMatchSeries has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to 9 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 · func (cyclomatic 35) · ×1
  • func (cyclomatic 35) clis/youtube/transcript.js:139 — func 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 · extractProfileRow (cyclomatic 35) · ×1
  • extractProfileRow (cyclomatic 35) clis/dribbble/utils.js:239 — extractProfileRow has cyclomatic complexity 35 (threshold 15). Of this number, 27 points are the body's own statements and 8 belong to 16 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 · capabilities.buildEffectivePrompt (cyclomatic 34) · ×1
  • capabilities.buildEffectivePrompt (cyclomatic 34) REDACTED:325 — capabilities.buildEffectivePrompt has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · likes.readResumeFile (cyclomatic 34) · ×1
  • likes.readResumeFile (cyclomatic 34) clis/twitter/likes.js:124 — likes.readResumeFile has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · func (cyclomatic 34) · ×1
  • func (cyclomatic 34) clis/twitter/following.js:141 — func has cyclomatic complexity 34 (threshold 15). 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, separate the cases: extract each independent 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 · shop.extractShopFields (cyclomatic 33) · ×1
  • shop.extractShopFields (cyclomatic 33) clis/dianping/shop.js:36 — shop.extractShopFields has cyclomatic complexity 33 (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 · normalizeJiraIssue (cyclomatic 33) · ×1
  • normalizeJiraIssue (cyclomatic 33) clis/jira/shared.js:192 — normalizeJiraIssue has cyclomatic complexity 33 (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 · mapCollectionNote (cyclomatic 33) · ×1
  • mapCollectionNote (cyclomatic 33) clis/xiaohongshu/collection-helpers.js:51 — mapCollectionNote has cyclomatic complexity 33 (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 · search.extractSearchRows (cyclomatic 32) · ×1
  • search.extractSearchRows (cyclomatic 32) clis/xiaohongshu/search.js:201 — search.extractSearchRows has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 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 · doctor.renderBrowserDoctorReport (cyclomatic 32) · ×1
  • doctor.renderBrowserDoctorReport (cyclomatic 32) src/doctor.ts:237 — doctor.renderBrowserDoctorReport has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · func (cyclomatic 32) · ×1
  • func (cyclomatic 32) clis/twitter/followers.js:94 — func has cyclomatic complexity 32 (threshold 15). Of this number, 27 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · search.extractSearchRows (cyclomatic 31) · ×1
  • search.extractSearchRows (cyclomatic 31) clis/dianping/search.js:33 — search.extractSearchRows has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 45). 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 · utils.readSiteSettings (cyclomatic 31) · ×1
  • utils.readSiteSettings (cyclomatic 31) clis/midjourney/utils.js:1386 — utils.readSiteSettings has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1391, 1403, 1399, …). 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 · doctor.runBrowserDoctor (cyclomatic 31) · ×1
  • doctor.runBrowserDoctor (cyclomatic 31) src/doctor.ts:102 — doctor.runBrowserDoctor has cyclomatic complexity 31 (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 · buildDeepResearchProgressResult (cyclomatic 31) · ×1
  • buildDeepResearchProgressResult (cyclomatic 31) clis/chatgpt/utils.js:1569 — buildDeepResearchProgressResult has cyclomatic complexity 31 (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 · pickGeminiDeepResearchExportUrl (cyclomatic 31) · ×1
  • pickGeminiDeepResearchExportUrl (cyclomatic 31) clis/gemini/utils.js:1378 — pickGeminiDeepResearchExportUrl 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 · parseProfileCapture (cyclomatic 31) · ×1
  • parseProfileCapture (cyclomatic 31) clis/tiktok/user.js:42 — parseProfileCapture has cyclomatic complexity 31 (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 · bookmarks.readResumeFile (cyclomatic 30) · ×1
  • bookmarks.readResumeFile (cyclomatic 30) clis/twitter/bookmarks.js:109 — bookmarks.readResumeFile 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 · daemon-lifecycle.ensureBrowserBridgeReady (cyclomatic 30) · ×1
  • daemon-lifecycle.ensureBrowserBridgeReady (cyclomatic 30) src/browser/daemon-lifecycle.ts:91 — daemon-lifecycle.ensureBrowserBridgeReady 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 · extractEventRowsPayload (cyclomatic 30) · ×1
  • extractEventRowsPayload (cyclomatic 30) clis/huodongxing/events.js:171 — extractEventRowsPayload has cyclomatic complexity 30 (threshold 15). Of this number, 23 points are the body's own statements and 7 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 · func (cyclomatic 30) · ×1
  • func (cyclomatic 30) clis/xiaohongshu/comment.js:122 — func 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 · summarizeOnesMutationBody (cyclomatic 30) · ×1
  • summarizeOnesMutationBody (cyclomatic 30) clis/ones/worklog.js:9 — summarizeOnesMutationBody 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 · businessweek.extractBusinessweekStoriesFromNextData (cyclomatic 29) · ×1
  • businessweek.extractBusinessweekStoriesFromNextData (cyclomatic 29) clis/bloomberg/businessweek.js:32 — businessweek.extractBusinessweekStoriesFromNextData has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.extractDeepResearchSourcesFromReportMessage (cyclomatic 29) · ×1
  • utils.extractDeepResearchSourcesFromReportMessage (cyclomatic 29) clis/chatgpt/utils.js:1469 — utils.extractDeepResearchSourcesFromReportMessage has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (utils.extractDeepResearchSourcesFromReportMessage::addSource) 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.
D1 · Cyclomatic Complexity · feed.resolveFeedRequest (cyclomatic 29) · ×1
  • feed.resolveFeedRequest (cyclomatic 29) clis/linux-do/feed.js:265 — feed.resolveFeedRequest has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · collection.mapCollectionItem (cyclomatic 29) · ×1
  • collection.mapCollectionItem (cyclomatic 29) clis/zhihu/collection.js:50 — collection.mapCollectionItem 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 · discover.analyzeScript (cyclomatic 29) · ×1
  • discover.analyzeScript (cyclomatic 29) src/browser/discover.ts:67 — discover.analyzeScript has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · renderAdfNode (cyclomatic 29) · ×1
  • renderAdfNode (cyclomatic 29) clis/_atlassian/shared.js:341 — renderAdfNode has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · func (cyclomatic 29) · ×1
  • func (cyclomatic 29) clis/midjourney/generate.js:107 — func has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to 6 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 · createRankingCliOptions.func (cyclomatic 29) · ×1
  • createRankingCliOptions.func (cyclomatic 29) clis/amazon/rankings.js:164 — createRankingCliOptions.func has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shared.extractCard (cyclomatic 28) · ×1
  • shared.extractCard (cyclomatic 28) clis/twitter/shared.js:434 — shared.extractCard has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 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 · collection.extractRelationship (cyclomatic 28) · ×1
  • collection.extractRelationship (cyclomatic 28) clis/twitter/collection.js:118 — collection.extractRelationship has cyclomatic complexity 28 (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 · media-download.downloadMedia (cyclomatic 28) · ×1
  • media-download.downloadMedia (cyclomatic 28) src/download/media-download.ts:74 — media-download.downloadMedia has cyclomatic complexity 28 (threshold 15). Of this number, 25 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 · fetchMediaThroughPage (cyclomatic 28) · ×1
  • fetchMediaThroughPage (cyclomatic 28) clis/midjourney/utils.js:553 — fetchMediaThroughPage has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mapHotelRow (cyclomatic 28) · ×1
  • mapHotelRow (cyclomatic 28) clis/ctrip/utils.js:297 — mapHotelRow has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · normalizePixivUserData (cyclomatic 28) · ×1
  • normalizePixivUserData (cyclomatic 28) clis/pixiv/utils.js:152 — normalizePixivUserData has cyclomatic complexity 28 (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 · utils.extractDeepResearchFromConversationPayload (cyclomatic 27) · ×1
  • utils.extractDeepResearchFromConversationPayload (cyclomatic 27) clis/chatgpt/utils.js:1666 — utils.extractDeepResearchFromConversationPayload has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · utils.mimeFromFilePath (cyclomatic 27) · ×1
  • utils.mimeFromFilePath (cyclomatic 27) clis/chatgpt/utils.js:3552 — utils.mimeFromFilePath 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 · utils.mapGameRow (cyclomatic 27) · ×1
  • utils.mapGameRow (cyclomatic 27) clis/chess/utils.js:119 — utils.mapGameRow has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · flight.parseBatchSearchCaptures (cyclomatic 27) · ×1
  • flight.parseBatchSearchCaptures (cyclomatic 27) clis/ctrip/flight.js:43 — flight.parseBatchSearchCaptures 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, separate the cases: extract each independent 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 · channel.parseVideoItem (cyclomatic 27) · ×1
  • channel.parseVideoItem (cyclomatic 27) clis/youtube/channel.js:21 — channel.parseVideoItem 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, 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 · extractShotDetailRow (cyclomatic 27) · ×1
  • extractShotDetailRow (cyclomatic 27) clis/dribbble/utils.js:360 — extractShotDetailRow has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 belong to 11 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 · resolveSearchReaderUrl (cyclomatic 27) · ×1
  • resolveSearchReaderUrl (cyclomatic 27) clis/weread/book.js:99 — resolveSearchReaderUrl has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 10 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 · Engine.run (cyclomatic 26) · ×1
  • Engine.run (cyclomatic 26) autoresearch/engine.ts:170 — Engine.run has cyclomatic complexity 26 (threshold 15). Of this number, 25 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 · game.summarizeGame (cyclomatic 26) · ×1
  • game.summarizeGame (cyclomatic 26) clis/chess/game.js:20 — game.summarizeGame has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · list-create.requireCreateListResult (cyclomatic 26) · ×1
  • list-create.requireCreateListResult (cyclomatic 26) clis/twitter/list-create.js:40 — list-create.requireCreateListResult has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ax-snapshot.renderAxTree · ×1
  • ax-snapshot.renderAxTree::render (cyclomatic 26) src/browser/ax-snapshot.ts:151 — ax-snapshot.renderAxTree::render 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 · downloadRenderedVideo (cyclomatic 26) · ×1
  • downloadRenderedVideo (cyclomatic 26) clis/midjourney/utils.js:776 — downloadRenderedVideo has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 6 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 · readMatchMap (cyclomatic 26) · ×1
  • readMatchMap (cyclomatic 26) REDACTED:518 — readMatchMap has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 527, (anonymous)::numberFrom, (anonymous)::splitMainParen, …). 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 · extractQuotedTweet (cyclomatic 26) · ×1
  • extractQuotedTweet (cyclomatic 26) clis/twitter/shared.js:508 — extractQuotedTweet has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · extractDesignerRows (cyclomatic 26) · ×1
  • extractDesignerRows (cyclomatic 26) clis/dribbble/utils.js:188 — extractDesignerRows has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 203, a function literal at line 210, a function literal at line 232, …). 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 · extractServiceRows (cyclomatic 26) · ×1
  • extractServiceRows (cyclomatic 26) clis/dribbble/utils.js:317 — extractServiceRows has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 331, a function literal at line 353, clean, …). 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 · markdownToConfluenceStorage (cyclomatic 26) · ×1
  • markdownToConfluenceStorage (cyclomatic 26) clis/_atlassian/shared.js:461 — markdownToConfluenceStorage has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 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 · getSessionListFromApi (cyclomatic 26) · ×1
  • getSessionListFromApi (cyclomatic 26) clis/qwen/utils.js:411 — getSessionListFromApi has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 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 · renderBlock (cyclomatic 26) · ×1
  • renderBlock (cyclomatic 26) clis/bloomberg/utils.js:113 — renderBlock has cyclomatic complexity 26 (threshold 15). 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, separate the cases: extract each independent 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 · mapJobItem (cyclomatic 26) · ×1
  • mapJobItem (cyclomatic 26) clis/51job/utils.js:241 — mapJobItem has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · normalizeItemPayload (cyclomatic 26) · ×1
  • normalizeItemPayload (cyclomatic 26) clis/1688/item.js:5 — normalizeItemPayload has cyclomatic complexity 26 (threshold 15). 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, 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 · utils.parseReferenceArgument (cyclomatic 25) · ×1
  • utils.parseReferenceArgument (cyclomatic 25) clis/midjourney/utils.js:909 — utils.parseReferenceArgument 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 one function literal inside it that branches (line 926). 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 · utils.submitSunoGeneration (cyclomatic 25) · ×1
  • utils.submitSunoGeneration (cyclomatic 25) clis/suno/utils.js:274 — utils.submitSunoGeneration 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 · list-remove-core.listRemoveUser (cyclomatic 25) · ×1
  • list-remove-core.listRemoveUser (cyclomatic 25) clis/twitter/list-remove-core.js:52 — list-remove-core.listRemoveUser 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 · commitVideoUploadInner (cyclomatic 25) · ×1
  • commitVideoUploadInner (cyclomatic 25) clis/douyin/_shared/vod-upload.js:171 — commitVideoUploadInner has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · rankings.createRankingCliOptions.func (cyclomatic 24) · ×1
  • rankings.createRankingCliOptions.func (cyclomatic 24) clis/amazon/rankings.js:164 — rankings.createRankingCliOptions.func 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 · notifications.extractNotificationRowsFromDoc (cyclomatic 24) · ×1
  • notifications.extractNotificationRowsFromDoc (cyclomatic 24) clis/facebook/notifications.js:167 — notifications.extractNotificationRowsFromDoc 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 · item.collectImageUrlsFrom (cyclomatic 24) · ×1
  • item.collectImageUrlsFrom (cyclomatic 24) REDACTED:49 — item.collectImageUrlsFrom has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 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 · download.parseUserMedia · ×1
  • download.parseUserMedia::visit (cyclomatic 24) clis/twitter/download.js:263 — download.parseUserMedia::visit 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 · CDPPage.screenshot (cyclomatic 24) · ×1
  • CDPPage.screenshot (cyclomatic 24) src/browser/cdp.ts:279 — CDPPage.screenshot 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 · execution.coerceAndValidateArgs (cyclomatic 24) · ×1
  • execution.coerceAndValidateArgs (cyclomatic 24) src/execution.ts:53 — execution.coerceAndValidateArgs 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 · fetchHistory (cyclomatic 24) · ×1
  • fetchHistory (cyclomatic 24) clis/xiaoyuzhou/history.js:147 — fetchHistory 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 · func (cyclomatic 24) · ×1
  • func (cyclomatic 24) clis/xiaohongshu/comment-delete.js:122 — func 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 · parseSalesnavThreads (cyclomatic 24) · ×1
  • parseSalesnavThreads (cyclomatic 24) clis/linkedin/salesnav-inbox.js:59 — parseSalesnavThreads has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 63, 85). 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 · utils.parseTrainRecord (cyclomatic 23) · ×1
  • utils.parseTrainRecord (cyclomatic 23) clis/12306/utils.js:162 — utils.parseTrainRecord 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 · profile-experience.clickOverlayAndExtract (cyclomatic 23) · ×1
  • profile-experience.clickOverlayAndExtract (cyclomatic 23) clis/linkedin/profile-experience.js:461 — profile-experience.clickOverlayAndExtract has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · salesnav-thread.parseSalesnavThreadMessages (cyclomatic 23) · ×1
  • salesnav-thread.parseSalesnavThreadMessages (cyclomatic 23) clis/linkedin/salesnav-thread.js:85 — salesnav-thread.parseSalesnavThreadMessages has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 98, 115, 116). 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 · utils.selectSiteSetting (cyclomatic 23) · ×1
  • utils.selectSiteSetting (cyclomatic 23) clis/midjourney/utils.js:1447 — utils.selectSiteSetting has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1449, 1450, 1456). 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 · utils.parseCompletedMusic (cyclomatic 23) · ×1
  • utils.parseCompletedMusic (cyclomatic 23) clis/minimax/utils.js:82 — utils.parseCompletedMusic 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 · favorites.parseFavoriteCard (cyclomatic 23) · ×1
  • favorites.parseFavoriteCard (cyclomatic 23) clis/weibo/favorites.js:20 — favorites.parseFavoriteCard 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 · network-request.sanitizeCapturedRequest (cyclomatic 23) · ×1
  • network-request.sanitizeCapturedRequest (cyclomatic 23) src/browser/network-request.ts:143 — network-request.sanitizeCapturedRequest 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. This is NOT this file's highest cyclomatic complexity: network-request.isSensitiveName (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · fetch.stepFetch (cyclomatic 23) · ×1
  • fetch.stepFetch (cyclomatic 23) src/pipeline/steps/fetch.ts:124 — fetch.stepFetch has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · selectChatGPTModel (cyclomatic 23) · ×1
  • selectChatGPTModel (cyclomatic 23) clis/chatgpt/utils.js:669 — selectChatGPTModel 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 · resolveInstagramPrivatePublishConfig (cyclomatic 23) · ×1
  • resolveInstagramPrivatePublishConfig (cyclomatic 23) REDACTED:87 — resolveInstagramPrivatePublishConfig 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 · utils.fetchChatGPTConversationPayload (cyclomatic 22) · ×1
  • utils.fetchChatGPTConversationPayload (cyclomatic 22) clis/chatgpt/utils.js:1814 — utils.fetchChatGPTConversationPayload 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 · subscribed.mapSubredditRow (cyclomatic 22) · ×1
  • subscribed.mapSubredditRow (cyclomatic 22) clis/reddit/subscribed.js:26 — subscribed.mapSubredditRow 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 · utils.parseToutiaoArticlesText (cyclomatic 22) · ×1
  • utils.parseToutiaoArticlesText (cyclomatic 22) clis/toutiao/utils.js:73 — utils.parseToutiaoArticlesText 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 · profile.mapTwitterProfileResult (cyclomatic 22) · ×1
  • profile.mapTwitterProfileResult (cyclomatic 22) clis/twitter/profile.js:41 — profile.mapTwitterProfileResult 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 · CDPPage.startNetworkCapture (cyclomatic 22) · ×1
  • CDPPage.startNetworkCapture (cyclomatic 22) src/browser/cdp.ts:334 — CDPPage.startNetworkCapture has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 346, 425, 388, …). 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 · waitForChatGPTImages (cyclomatic 22) · ×1
  • waitForChatGPTImages (cyclomatic 22) clis/chatgpt/utils.js:2973 — waitForChatGPTImages 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 · fetchJobCards (cyclomatic 22) · ×1
  • fetchJobCards (cyclomatic 22) clis/linkedin/search.js:244 — fetchJobCards has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.parseThreadRow (cyclomatic 21) · ×1
  • utils.parseThreadRow (cyclomatic 21) clis/1point3acres/utils.js:146 — utils.parseThreadRow has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 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 · export-all.readConversation (cyclomatic 21) · ×1
  • export-all.readConversation (cyclomatic 21) clis/grok/export-all.js:165 — export-all.readConversation 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 · utils.getNotebooklmPageState (cyclomatic 21) · ×1
  • utils.getNotebooklmPageState (cyclomatic 21) clis/notebooklm/utils.js:641 — utils.getNotebooklmPageState 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 · utils.projectCountry (cyclomatic 21) · ×1
  • utils.projectCountry (cyclomatic 21) clis/rest-countries/utils.js:100 — utils.projectCountry has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bookmark-folders.parseBookmarkFolders (cyclomatic 21) · ×1
  • bookmark-folders.parseBookmarkFolders (cyclomatic 21) clis/twitter/bookmark-folders.js:40 — bookmark-folders.parseBookmarkFolders 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 · read.formatDiagnostics (cyclomatic 21) · ×1
  • read.formatDiagnostics (cyclomatic 21) clis/web/read.js:380 — read.formatDiagnostics 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 · transcript.extractSegmentsFromNetworkCapture (cyclomatic 21) · ×1
  • transcript.extractSegmentsFromNetworkCapture (cyclomatic 21) clis/youtube/transcript.js:76 — transcript.extractSegmentsFromNetworkCapture has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 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 · download-helpers.normalizeContentImages (cyclomatic 21) · ×1
  • download-helpers.normalizeContentImages (cyclomatic 21) clis/zhihu/download-helpers.js:62 — download-helpers.normalizeContentImages has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 91, normalizeUrl, a function literal at line 85, …). 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 · CDPBridge.connect (cyclomatic 21) · ×1
  • CDPBridge.connect (cyclomatic 21) src/browser/cdp.ts:58 — CDPBridge.connect has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 111, 90). 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 · shape.inferShape · ×1
  • shape.inferShape::walk (cyclomatic 21) src/browser/shape.ts:50 — shape.inferShape::walk 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 · command-output.emitFailure (cyclomatic 21) · ×1
  • command-output.emitFailure (cyclomatic 21) src/command-output.ts:22 — command-output.emitFailure 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 · redaction.redactValue (cyclomatic 21) · ×1
  • redaction.redactValue (cyclomatic 21) src/observation/redaction.ts:54 — redaction.redactValue 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 · plugin-manifest.satisfiesSingleConstraint (cyclomatic 21) · ×1
  • plugin-manifest.satisfiesSingleConstraint (cyclomatic 21) src/plugin-manifest.ts:128 — plugin-manifest.satisfiesSingleConstraint 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 · plugin.installMonorepo (cyclomatic 21) · ×1
  • plugin.installMonorepo (cyclomatic 21) REDACTED:857 — plugin.installMonorepo has cyclomatic complexity 21 (threshold 15). Of this number, 19 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 · requireHarvestPayload (cyclomatic 21) · ×1
  • requireHarvestPayload (cyclomatic 21) clis/xiaohongshu/search.js:317 — requireHarvestPayload 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 · requestXiaoyuzhouJson (cyclomatic 21) · ×1
  • requestXiaoyuzhouJson (cyclomatic 21) clis/xiaoyuzhou/auth.js:209 — requestXiaoyuzhouJson 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 · mapRow (cyclomatic 21) · ×1
  • mapRow (cyclomatic 21) clis/slock/message-read.js:9 — mapRow has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · eval-publish.main (cyclomatic 20) · ×1
  • eval-publish.main (cyclomatic 20) REDACTED:141 — eval-publish.main has cyclomatic complexity 20 (threshold 15). Of this number, 18 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 · chatlist.buildGeekRows (cyclomatic 20) · ×1
  • chatlist.buildGeekRows (cyclomatic 20) clis/boss/chatlist.js:28 — chatlist.buildGeekRows 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 38). 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 · car.parseCarDetail (cyclomatic 20) · ×1
  • car.parseCarDetail (cyclomatic 20) clis/guazi/car.js:37 — car.parseCarDetail has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · notifications.mapNotification (cyclomatic 20) · ×1
  • notifications.mapNotification (cyclomatic 20) clis/jike/notifications.js:48 — notifications.mapNotification has cyclomatic complexity 20 (threshold 15). Of this number, 17 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 · utils.pixivFetch (cyclomatic 20) · ×1
  • utils.pixivFetch (cyclomatic 20) clis/pixiv/utils.js:42 — utils.pixivFetch 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 · shared.extractMedia (cyclomatic 20) · ×1
  • shared.extractMedia (cyclomatic 20) clis/twitter/shared.js:369 — shared.extractMedia 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 · tweets.extractTweet (cyclomatic 20) · ×1
  • tweets.extractTweet (cyclomatic 20) clis/twitter/tweets.js:19 — tweets.extractTweet has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · cli-argv-preprocess.escapeLeadingDashPositional (cyclomatic 20) · ×1
  • cli-argv-preprocess.escapeLeadingDashPositional (cyclomatic 20) src/cli-argv-preprocess.ts:78 — cli-argv-preprocess.escapeLeadingDashPositional 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 · validate.validateCommand (cyclomatic 20) · ×1
  • validate.validateCommand (cyclomatic 20) src/validate.ts:81 — validate.validateCommand 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 · article-download.createTurndown (cyclomatic 20) · ×1
  • article-download.createTurndown (cyclomatic 20) src/download/article-download.ts:117 — article-download.createTurndown has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 169, 181, 193, …). 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 · readPlayerMatches (cyclomatic 20) · ×1
  • readPlayerMatches (cyclomatic 20) REDACTED:294 — readPlayerMatches has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 299, (anonymous)::numberFrom, (anonymous)::clean, …). 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 · parseSunoBillingInfo (cyclomatic 20) · ×1
  • parseSunoBillingInfo (cyclomatic 20) clis/suno/utils.js:143 — parseSunoBillingInfo has cyclomatic complexity 20 (threshold 15). Of this number, 18 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 · extractMemberRows (cyclomatic 20) · ×1
  • extractMemberRows (cyclomatic 20) clis/dribbble/utils.js:455 — extractMemberRows has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 465, a function literal at line 466, a function literal at line 486, …). 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 · getFacebookFeed (cyclomatic 20) · ×1
  • getFacebookFeed (cyclomatic 20) clis/facebook/feed.js:344 — getFacebookFeed has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · toSummaryRow (cyclomatic 20) · ×1
  • toSummaryRow (cyclomatic 20) clis/hltv/player-duel.js:104 — toSummaryRow has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 11 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 · parseEventTimeRange (cyclomatic 20) · ×1
  • parseEventTimeRange (cyclomatic 20) clis/huodongxing/events.js:100 — parseEventTimeRange 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 · normalizeStorePayload (cyclomatic 20) · ×1
  • normalizeStorePayload (cyclomatic 20) clis/1688/store.js:4 — normalizeStorePayload has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · brand.parseBrandSeries (cyclomatic 19) · ×1
  • brand.parseBrandSeries (cyclomatic 19) clis/autohome/brand.js:31 — brand.parseBrandSeries has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.renderInlineNode (cyclomatic 19) · ×1
  • utils.renderInlineNode (cyclomatic 19) clis/bloomberg/utils.js:159 — utils.renderInlineNode has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · search.captureJobList (cyclomatic 19) · ×1
  • search.captureJobList (cyclomatic 19) clis/boss/search.js:94 — search.captureJobList has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · post-like.setInstagramPostLike (cyclomatic 19) · ×1
  • post-like.setInstagramPostLike (cyclomatic 19) clis/instagram/_shared/post-like.js:174 — post-like.setInstagramPostLike has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · salesnav-search.parseLeads (cyclomatic 19) · ×1
  • salesnav-search.parseLeads (cyclomatic 19) clis/linkedin/salesnav-search.js:76 — salesnav-search.parseLeads 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 · utils.pinterestResourceFetch (cyclomatic 19) · ×1
  • utils.pinterestResourceFetch (cyclomatic 19) clis/pinterest/utils.js:193 — utils.pinterestResourceFetch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · search.mapRedditSearchRow (cyclomatic 19) · ×1
  • search.mapRedditSearchRow (cyclomatic 19) clis/reddit/search.js:46 — search.mapRedditSearchRow 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 · utils.seFetch (cyclomatic 19) · ×1
  • utils.seFetch (cyclomatic 19) clis/stackoverflow/utils.js:40 — utils.seFetch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bookmark-folder.parseBookmarkFolderTimeline (cyclomatic 19) · ×1
  • bookmark-folder.parseBookmarkFolderTimeline (cyclomatic 19) clis/twitter/bookmark-folder.js:86 — bookmark-folder.parseBookmarkFolderTimeline has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · collection.relationshipTarget (cyclomatic 19) · ×1
  • collection.relationshipTarget (cyclomatic 19) clis/twitter/collection.js:94 — collection.relationshipTarget 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 · followers.parseFollowers (cyclomatic 19) · ×1
  • followers.parseFollowers (cyclomatic 19) clis/twitter/followers.js:25 — followers.parseFollowers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.extractPlaylistVideos (cyclomatic 19) · ×1
  • utils.extractPlaylistVideos (cyclomatic 19) clis/youtube/utils.js:113 — utils.extractPlaylistVideos has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 116, 115, 134). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · article-download.downloadImages (cyclomatic 19) · ×1
  • article-download.downloadImages (cyclomatic 19) src/download/article-download.ts:285 — article-download.downloadImages has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 308, 299). 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 · article-download.downloadArticle (cyclomatic 19) · ×1
  • article-download.downloadArticle (cyclomatic 19) src/download/article-download.ts:370 — article-download.downloadArticle 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 · waitForSubmittedJobsAfter (cyclomatic 19) · ×1
  • waitForSubmittedJobsAfter (cyclomatic 19) clis/midjourney/utils.js:409 — waitForSubmittedJobsAfter has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 6 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 · normalizeSearchCandidate (cyclomatic 19) · ×1
  • normalizeSearchCandidate (cyclomatic 19) clis/1688/search.js:9 — normalizeSearchCandidate 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 · mergeSearchItems (cyclomatic 19) · ×1
  • mergeSearchItems (cyclomatic 19) clis/coupang/utils.js:281 — mergeSearchItems 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 3 function literals inside it that branch (lines 288, 311, 310). 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 · htmlToMarkdown (cyclomatic 19) · ×1
  • htmlToMarkdown (cyclomatic 19) clis/mubu/utils.js:127 — htmlToMarkdown 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 4 function literals inside it that branch (lines 153, 174, 137, …). 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 · parseExamsFromDom (cyclomatic 19) · ×1
  • parseExamsFromDom (cyclomatic 19) clis/chaoxing/utils.js:174 — parseExamsFromDom has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.selectModernChatGPTIntelligence (cyclomatic 18) · ×1
  • utils.selectModernChatGPTIntelligence (cyclomatic 18) clis/chatgpt/utils.js:617 — utils.selectModernChatGPTIntelligence 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 · utils.waitForResponse (cyclomatic 18) · ×1
  • utils.waitForResponse (cyclomatic 18) clis/deepseek/utils.js:171 — utils.waitForResponse 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 · utils.parseFetchData (cyclomatic 18) · ×1
  • utils.parseFetchData (cyclomatic 18) clis/gmail/utils.js:241 — utils.parseFetchData 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 · utils.nodesToMarkdown (cyclomatic 18) · ×1
  • utils.nodesToMarkdown (cyclomatic 18) clis/mubu/utils.js:268 — utils.nodesToMarkdown 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. This is NOT this file's highest cyclomatic complexity: utils.htmlToMarkdown (cyclomatic 19) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · bookmarks.parseBookmarks (cyclomatic 18) · ×1
  • bookmarks.parseBookmarks (cyclomatic 18) clis/twitter/bookmarks.js:73 — bookmarks.parseBookmarks 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 · collection.extractCollectionPost (cyclomatic 18) · ×1
  • collection.extractCollectionPost (cyclomatic 18) clis/twitter/collection.js:158 — collection.extractCollectionPost 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 · likes.parseLikes (cyclomatic 18) · ×1
  • likes.parseLikes (cyclomatic 18) clis/twitter/likes.js:88 — likes.parseLikes 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 · list-tweets.extractTimelineTweet (cyclomatic 18) · ×1
  • list-tweets.extractTimelineTweet (cyclomatic 18) clis/twitter/list-tweets.js:54 — list-tweets.extractTimelineTweet 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 · thread.parseTweetDetail (cyclomatic 18) · ×1
  • thread.parseTweetDetail (cyclomatic 18) clis/twitter/thread.js:73 — thread.parseTweetDetail 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 · timeline.parseHomeTimeline (cyclomatic 18) · ×1
  • timeline.parseHomeTimeline (cyclomatic 18) clis/twitter/timeline.js:97 — timeline.parseHomeTimeline 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 · utils.extractSubscriptionChannel (cyclomatic 18) · ×1
  • utils.extractSubscriptionChannel (cyclomatic 18) clis/youtube/utils.js:151 — utils.extractSubscriptionChannel has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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 · answer-comments-helpers.normalizePageUrl (cyclomatic 18) · ×1
  • answer-comments-helpers.normalizePageUrl (cyclomatic 18) clis/zhihu/answer-comments-helpers.js:18 — answer-comments-helpers.normalizePageUrl 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 · search.normalizeResultItem (cyclomatic 18) · ×1
  • search.normalizeResultItem (cyclomatic 18) clis/zhihu/search.js:99 — search.normalizeResultItem 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 · index.httpDownload (cyclomatic 18) · ×1
  • index.httpDownload (cyclomatic 18) src/download/index.ts:115 — index.httpDownload has cyclomatic complexity 18 (threshold 15). Of this number, 17 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 · buildChatGPTBackendHeaders (cyclomatic 18) · ×1
  • buildChatGPTBackendHeaders (cyclomatic 18) clis/chatgpt/utils.js:523 — buildChatGPTBackendHeaders has cyclomatic complexity 18 (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 · downloadOne (cyclomatic 18) · ×1
  • downloadOne (cyclomatic 18) clis/midjourney/utils.js:667 — downloadOne 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 · injectImagesFallback (cyclomatic 18) · ×1
  • injectImagesFallback (cyclomatic 18) clis/midjourney/utils.js:1029 — injectImagesFallback has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 7 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 · readTeamMatches (cyclomatic 18) · ×1
  • readTeamMatches (cyclomatic 18) REDACTED:378 — readTeamMatches has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 383, (anonymous)::clean, a function literal at line 425, …). 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 · normalizeUntil (cyclomatic 18) · ×1
  • normalizeUntil (cyclomatic 18) clis/twitter/collection.js:24 — normalizeUntil 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 · buildSearchUrl (cyclomatic 18) · ×1
  • buildSearchUrl (cyclomatic 18) clis/51job/utils.js:210 — buildSearchUrl has cyclomatic complexity 18 (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 · mapItinerary (cyclomatic 18) · ×1
  • mapItinerary (cyclomatic 18) clis/ctrip/flight.js:102 — mapItinerary has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to 5 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 · normalizeExtractionResult (cyclomatic 18) · ×1
  • normalizeExtractionResult (cyclomatic 18) clis/youdao/note.js:172 — normalizeExtractionResult 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 · debug.main (cyclomatic 17) · ×1
  • debug.main (cyclomatic 17) autoresearch/commands/debug.ts:50 — debug.main 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 · utils.parseCompanyJobCard (cyclomatic 17) · ×1
  • utils.parseCompanyJobCard (cyclomatic 17) clis/51job/utils.js:279 — utils.parseCompanyJobCard 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 · download.assertNotPaidContent (cyclomatic 17) · ×1
  • download.assertNotPaidContent (cyclomatic 17) clis/bilibili/download.js:34 — download.assertNotPaidContent 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 · utils.extractDeepResearchSourcesFromReportMessage · ×1
  • utils.extractDeepResearchSourcesFromReportMessage::addSource (cyclomatic 17) clis/chatgpt/utils.js:1478 — utils.extractDeepResearchSourcesFromReportMessage::addSource 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. This shape REPEATS in the file: one other method here (utils.extractDeepResearchSourcesFromReportMessage) 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.
D1 · Cyclomatic Complexity · utils.waitForGeminiResponse (cyclomatic 17) · ×1
  • utils.waitForGeminiResponse (cyclomatic 17) clis/gemini/utils.js:2540 — utils.waitForGeminiResponse has cyclomatic complexity 17 (threshold 15). Of this number, 12 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 · safe-send.assessThreadSafety (cyclomatic 17) · ×1
  • safe-send.assessThreadSafety (cyclomatic 17) clis/linkedin/safe-send.js:33 — safe-send.assessThreadSafety 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 · salesnav-thread.fetchThreadWithPagination (cyclomatic 17) · ×1
  • salesnav-thread.fetchThreadWithPagination (cyclomatic 17) clis/linkedin/salesnav-thread.js:148 — salesnav-thread.fetchThreadWithPagination 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 · rpc.extractNotebooklmRpcResult (cyclomatic 17) · ×1
  • rpc.extractNotebooklmRpcResult (cyclomatic 17) clis/notebooklm/rpc.js:142 — rpc.extractNotebooklmRpcResult 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 · novel.novelRowFromBody (cyclomatic 17) · ×1
  • novel.novelRowFromBody (cyclomatic 17) clis/pixiv/novel.js:28 — novel.novelRowFromBody 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 · page-state.taobaoPageState (cyclomatic 17) · ×1
  • page-state.taobaoPageState (cyclomatic 17) clis/taobao/page-state.js:3 — page-state.taobaoPageState has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 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 · list-add-core.listAddUser (cyclomatic 17) · ×1
  • list-add-core.listAddUser (cyclomatic 17) clis/twitter/list-add-core.js:104 — list-add-core.listAddUser 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 · list-tweets.parseListTimeline (cyclomatic 17) · ×1
  • list-tweets.parseListTimeline (cyclomatic 17) clis/twitter/list-tweets.js:88 — list-tweets.parseListTimeline 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 · timeline.extractTweet (cyclomatic 17) · ×1
  • timeline.extractTweet (cyclomatic 17) clis/twitter/timeline.js:67 — timeline.extractTweet 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 · cdp.scoreCDPTarget (cyclomatic 17) · ×1
  • cdp.scoreCDPTarget (cyclomatic 17) src/browser/cdp.ts:559 — cdp.scoreCDPTarget 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 · discover.mergeEvidence (cyclomatic 17) · ×1
  • discover.mergeEvidence (cyclomatic 17) src/browser/discover.ts:126 — discover.mergeEvidence has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 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 · build-manifest.main (cyclomatic 17) · ×1
  • build-manifest.main (cyclomatic 17) src/build-manifest.ts:347 — build-manifest.main 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 · cli-argv-preprocess.consumeKnownOption (cyclomatic 17) · ×1
  • cli-argv-preprocess.consumeKnownOption (cyclomatic 17) src/cli-argv-preprocess.ts:42 — cli-argv-preprocess.consumeKnownOption 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 · execution.collectObservationEvidence (cyclomatic 17) · ×1
  • execution.collectObservationEvidence (cyclomatic 17) src/execution.ts:505 — execution.collectObservationEvidence 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 · plugin.resolveEsbuildBin (cyclomatic 17) · ×1
  • plugin.resolveEsbuildBin (cyclomatic 17) REDACTED:1424 — plugin.resolveEsbuildBin 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 · convention-audit.splitTopLevel (cyclomatic 17) · ×1
  • convention-audit.splitTopLevel (cyclomatic 17) src/convention-audit.ts:534 — convention-audit.splitTopLevel has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (convention-audit.findTopLevelChar) 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.
D1 · Cyclomatic Complexity · convention-audit.findTopLevelChar (cyclomatic 17) · ×1
  • convention-audit.findTopLevelChar (cyclomatic 17) src/convention-audit.ts:563 — convention-audit.findTopLevelChar has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (convention-audit.splitTopLevel) 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.
D1 · Cyclomatic Complexity · buildChatGPTConversationHeaders (cyclomatic 17) · ×1
  • buildChatGPTConversationHeaders (cyclomatic 17) clis/chatgpt/utils.js:1759 — buildChatGPTConversationHeaders 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 · waitForDerivedJob (cyclomatic 17) · ×1
  • waitForDerivedJob (cyclomatic 17) clis/midjourney/utils.js:474 — waitForDerivedJob has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · replaceCollapsedTab (cyclomatic 17) · ×1
  • replaceCollapsedTab (cyclomatic 17) clis/xiaohongshu/search.js:937 — replaceCollapsedTab 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 · buildUrl (cyclomatic 17) · ×1
  • buildUrl (cyclomatic 17) clis/ctrip/utils.js:139 — buildUrl 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 · publishStoryViaPrivateApi (cyclomatic 17) · ×1
  • publishStoryViaPrivateApi (cyclomatic 17) REDACTED:945 — publishStoryViaPrivateApi has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · func (cyclomatic 17) · ×1
  • func (cyclomatic 17) REDACTED:565 — func 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 · toCaptureProject (cyclomatic 17) · ×1
  • toCaptureProject (cyclomatic 17) clis/gitee/trending.js:97 — toCaptureProject has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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 · fetchCreatorNotes (cyclomatic 17) · ×1
  • fetchCreatorNotes (cyclomatic 17) clis/xiaohongshu/creator-notes.js:379 — fetchCreatorNotes 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, separate the cases: extract each independent 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 · parseArticleXml (cyclomatic 17) · ×1
  • parseArticleXml (cyclomatic 17) REDACTED:268 — parseArticleXml has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 4 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 · normalizeNoteId (cyclomatic 17) · ×1
  • normalizeNoteId (cyclomatic 17) clis/xiaohongshu/delete-note.js:57 — normalizeNoteId 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 · normalizeAssets (cyclomatic 17) · ×1
  • normalizeAssets (cyclomatic 17) clis/1688/assets.js:167 — normalizeAssets has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 14 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 · callGateway (cyclomatic 17) · ×1
  • callGateway (cyclomatic 17) clis/weread-official/utils.js:74 — callGateway 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 · eval-v2ex.main (cyclomatic 16) · ×1
  • eval-v2ex.main (cyclomatic 16) REDACTED:134 — eval-v2ex.main has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · eval-zhihu.main (cyclomatic 16) · ×1
  • eval-zhihu.main (cyclomatic 16) REDACTED:144 — eval-zhihu.main has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.sendWithFile (cyclomatic 16) · ×1
  • utils.sendWithFile (cyclomatic 16) clis/deepseek/utils.js:378 — utils.sendWithFile 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 · utils.sendDoubaoMessage (cyclomatic 16) · ×1
  • utils.sendDoubaoMessage (cyclomatic 16) clis/doubao/utils.js:674 — utils.sendDoubaoMessage 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 · utils.waitGmailCaptures (cyclomatic 16) · ×1
  • utils.waitGmailCaptures (cyclomatic 16) clis/gmail/utils.js:302 — utils.waitGmailCaptures has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · events.requireExtractionRows (cyclomatic 16) · ×1
  • events.requireExtractionRows (cyclomatic 16) clis/huodongxing/events.js:275 — events.requireExtractionRows 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 · item.extractSpecs (cyclomatic 16) · ×1
  • item.extractSpecs (cyclomatic 16) REDACTED:487 — item.extractSpecs has cyclomatic complexity 16 (threshold 15). Of this number, 8 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 · post-roots.locatePostCards (cyclomatic 16) · ×1
  • post-roots.locatePostCards (cyclomatic 16) clis/linkedin/post-roots.js:2 — post-roots.locatePostCards 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 · capabilities.estimateAction (cyclomatic 16) · ×1
  • capabilities.estimateAction (cyclomatic 16) REDACTED:291 — capabilities.estimateAction 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 · utils.uploadReferenceLibrary (cyclomatic 16) · ×1
  • utils.uploadReferenceLibrary (cyclomatic 16) clis/midjourney/utils.js:1139 — utils.uploadReferenceLibrary 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 · utils.parseNotebooklmListResult (cyclomatic 16) · ×1
  • utils.parseNotebooklmListResult (cyclomatic 16) clis/notebooklm/utils.js:299 — utils.parseNotebooklmListResult has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 308). 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 · add-source.parseAddSourceResult (cyclomatic 16) · ×1
  • add-source.parseAddSourceResult (cyclomatic 16) clis/notebooklm/add-source.js:108 — add-source.parseAddSourceResult 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 · search.isLikelyNavigationUrl (cyclomatic 16) · ×1
  • search.isLikelyNavigationUrl (cyclomatic 16) clis/powerchina/search.js:49 — search.isLikelyNavigationUrl 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 · helpers.listMessages (cyclomatic 16) · ×1
  • helpers.listMessages (cyclomatic 16) clis/proton/helpers.js:109 — helpers.listMessages 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 · utils.pollSunoClips (cyclomatic 16) · ×1
  • utils.pollSunoClips (cyclomatic 16) clis/suno/utils.js:354 — utils.pollSunoClips has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.downloadSunoClip (cyclomatic 16) · ×1
  • utils.downloadSunoClip (cyclomatic 16) clis/suno/utils.js:503 — utils.downloadSunoClip 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 · bookmarks.extractBookmarkTweet (cyclomatic 16) · ×1
  • bookmarks.extractBookmarkTweet (cyclomatic 16) clis/twitter/bookmarks.js:48 — bookmarks.extractBookmarkTweet 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 · collection.parseCollectionPage · ×1
  • collection.parseCollectionPage::visit (cyclomatic 16) clis/twitter/collection.js:211 — collection.parseCollectionPage::visit 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 · following.parseFollowing (cyclomatic 16) · ×1
  • following.parseFollowing (cyclomatic 16) clis/twitter/following.js:88 — following.parseFollowing 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 · search.parseSearchTimeline (cyclomatic 16) · ×1
  • search.parseSearchTimeline (cyclomatic 16) clis/twitter/search.js:233 — search.parseSearchTimeline has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (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 · thread.extractTweet (cyclomatic 16) · ×1
  • thread.extractTweet (cyclomatic 16) clis/twitter/thread.js:41 — thread.extractTweet 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 · tweets.parseUserTweets · ×1
  • tweets.parseUserTweets::visit (cyclomatic 16) clis/twitter/tweets.js:58 — tweets.parseUserTweets::visit 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 · notes.listBookNotes (cyclomatic 16) · ×1
  • notes.listBookNotes (cyclomatic 16) clis/weread-official/notes.js:96 — notes.listBookNotes 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 · book-search.searchWithinBook (cyclomatic 16) · ×1
  • book-search.searchWithinBook (cyclomatic 16) clis/weread/book-search.js:274 — book-search.searchWithinBook has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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 · book.extractReaderFallbackMetadata (cyclomatic 16) · ×1
  • book.extractReaderFallbackMetadata (cyclomatic 16) clis/weread/book.js:50 — book.extractReaderFallbackMetadata has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 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 · pinia-helpers.parseXhsCount (cyclomatic 16) · ×1
  • pinia-helpers.parseXhsCount (cyclomatic 16) clis/xiaohongshu/pinia-helpers.js:66 — pinia-helpers.parseXhsCount 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 · utils.fetchXueqiuJson (cyclomatic 16) · ×1
  • utils.fetchXueqiuJson (cyclomatic 16) clis/xueqiu/utils.js:44 — utils.fetchXueqiuJson 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 · comments.classifyXueqiuCommentsResponse (cyclomatic 16) · ×1
  • comments.classifyXueqiuCommentsResponse (cyclomatic 16) clis/xueqiu/comments.js:74 — comments.classifyXueqiuCommentsResponse 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 · utils.extractJsonAssignmentFromHtml (cyclomatic 16) · ×1
  • utils.extractJsonAssignmentFromHtml (cyclomatic 16) clis/youtube/utils.js:29 — utils.extractJsonAssignmentFromHtml 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 · target.parseTarget (cyclomatic 16) · ×1
  • target.parseTarget (cyclomatic 16) clis/zhihu/target.js:14 — target.parseTarget 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 · errors.toEnvelope (cyclomatic 16) · ×1
  • errors.toEnvelope (cyclomatic 16) src/errors.ts:250 — errors.toEnvelope 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 · intercept.stepIntercept (cyclomatic 16) · ×1
  • intercept.stepIntercept (cyclomatic 16) src/pipeline/steps/intercept.ts:15 — intercept.stepIntercept 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 · browser.captureNetworkItems (cyclomatic 16) · ×1
  • browser.captureNetworkItems (cyclomatic 16) src/commands/browser.ts:90 — browser.captureNetworkItems has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 94). 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 · normalizeTwitterScreenName (cyclomatic 16) · ×1
  • normalizeTwitterScreenName (cyclomatic 16) clis/twitter/shared.js:127 — normalizeTwitterScreenName 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 · extractCollectionRows (cyclomatic 16) · ×1
  • extractCollectionRows (cyclomatic 16) clis/dribbble/utils.js:415 — extractCollectionRows has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 427, clean, a function literal at line 425, …). 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 · atlassianRequest (cyclomatic 16) · ×1
  • atlassianRequest (cyclomatic 16) clis/_atlassian/shared.js:161 — atlassianRequest 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 · extractRemainingCredits (cyclomatic 16) · ×1
  • extractRemainingCredits (cyclomatic 16) clis/linkedin/salesnav-message.js:107 — extractRemainingCredits 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 3 function items inside it that branch (visit, a function literal at line 109, a function literal at line 124). 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 · collectCommentRows (cyclomatic 16) · ×1
  • collectCommentRows (cyclomatic 16) clis/xueqiu/comments.js:245 — collectCommentRows 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 · projectCard (cyclomatic 16) · ×1
  • projectCard (cyclomatic 16) clis/douyin/search.js:136 — projectCard has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · normalizeXiaoyuzhouCredentials (cyclomatic 16) · ×1
  • normalizeXiaoyuzhouCredentials (cyclomatic 16) clis/xiaoyuzhou/auth.js:30 — normalizeXiaoyuzhouCredentials 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 · extractUser (cyclomatic 16) · ×1
  • extractUser (cyclomatic 16) clis/twitter/following.js:67 — extractUser 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 · instagramPrivateApiFetch (cyclomatic 16) · ×1
  • instagramPrivateApiFetch (cyclomatic 16) clis/instagram/_shared/protocol-capture.js:249 — instagramPrivateApiFetch 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 · buildListAddMemberRow (cyclomatic 16) · ×1
  • buildListAddMemberRow (cyclomatic 16) clis/twitter/list-add-core.js:54 — buildListAddMemberRow has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · callNotebooklmRpc (cyclomatic 16) · ×1
  • callNotebooklmRpc (cyclomatic 16) clis/notebooklm/rpc.js:224 — callNotebooklmRpc 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 · searchFacebook (cyclomatic 16) · ×1
  • searchFacebook (cyclomatic 16) clis/facebook/search.js:140 — searchFacebook 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 · getUploadAuthV5Credentials (cyclomatic 16) · ×1
  • getUploadAuthV5Credentials (cyclomatic 16) clis/douyin/_shared/vod-upload.js:97 — getUploadAuthV5Credentials has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · browser.registerBrowserCommands (cognitive 396) · ×1
  • browser.registerBrowserCommands (cognitive 396) src/commands/browser.ts:424 — browser.registerBrowserCommands has cognitive complexity 396 (threshold 15). Drivers by points: if/else 164 (206 pts), ternaries 57 (84 pts), boolean chains 66, error handling 13 (21 pts), loops 11 (19 pts) (nesting depth added 85). None of this is in the body itself: all 396 points belong to 56 function items inside it that branch (a function literal at line 1891, a function literal at line 1711, a function literal at line 1190, …). 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 · snapshotFormatter.formatSnapshot (cognitive 139) · ×1
  • snapshotFormatter.formatSnapshot (cognitive 139) src/snapshotFormatter.ts:197 — snapshotFormatter.formatSnapshot has cognitive complexity 139 (threshold 15). Drivers by points: if/else 35 (104 pts), loops 9 (20 pts), boolean chains 15 (nesting depth added 80). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getChatGPTDeepResearchResult (cognitive 129) · ×1
  • getChatGPTDeepResearchResult (cognitive 129) clis/chatgpt/utils.js:1920 — getChatGPTDeepResearchResult has cognitive complexity 129 (threshold 15). Drivers by points: if/else 23 (44 pts), boolean chains 40, ternaries 10 (18 pts), error handling 7 (14 pts), loops 4 (9 pts), other 4 (nesting depth added 41). Of this number, 119 points are the body's own statements and 10 belong to 8 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 · func (cognitive 127) · ×1
  • func (cognitive 127) clis/midjourney/action.js:147 — func has cognitive complexity 127 (threshold 15). Drivers by points: if/else 41 (62 pts), boolean chains 39, ternaries 10 (17 pts), error handling 5 (7 pts), loops 1 (2 pts) (nesting depth added 31). Of this number, 125 points are the body's own statements and 2 belong to 7 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 · post.executeUiInstagramPost (cognitive 118) · ×1
  • post.executeUiInstagramPost (cognitive 118) clis/instagram/post.js:163 — post.executeUiInstagramPost has cognitive complexity 118 (threshold 15). Drivers by points: if/else 24 (84 pts), error handling 5 (16 pts), loops 4 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 78). To reduce it, split the body into named stages: move each independent 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 · web-search.fetchRankedRedditSearch (cognitive 110) · ×1
  • web-search.fetchRankedRedditSearch (cognitive 110) clis/reddit/web-search.js:2 — web-search.fetchRankedRedditSearch has cognitive complexity 110 (threshold 15). Drivers by points: if/else 27 (62 pts), boolean chains 26, loops 6 (11 pts), error handling 2 (7 pts), ternaries 2 (4 pts) (nesting depth added 47). Of this number, 103 points are the body's own statements and 7 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 · daemon.handleRequest (cognitive 109) · ×1
  • daemon.handleRequest (cognitive 109) src/daemon.ts:262 — daemon.handleRequest has cognitive complexity 109 (threshold 15). Drivers by points: if/else 24 (43 pts), ternaries 17 (43 pts), boolean chains 19, error handling 2 (4 pts) (nesting depth added 47). Of this number, 84 points are the body's own statements and 25 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 · func (cognitive 96) · ×1
  • func (cognitive 96) clis/twitter/likes.js:207 — func has cognitive complexity 96 (threshold 15). Drivers by points: if/else 26 (38 pts), ternaries 20 (34 pts), boolean chains 22, loops 1, other 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetch-adapters.fetchAdapters (cognitive 84) · ×1
  • fetch-adapters.fetchAdapters (cognitive 84) scripts/fetch-adapters.js:101 — fetch-adapters.fetchAdapters has cognitive complexity 84 (threshold 15). Drivers by points: if/else 19 (37 pts), error handling 8 (21 pts), loops 11 (13 pts), ternaries 3 (7 pts), boolean chains 6 (nesting depth added 37). To reduce it, split the body into named stages: move each independent 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 · download.stepDownload (cognitive 78) · ×1
  • download.stepDownload (cognitive 78) src/pipeline/steps/download.ts:118 — download.stepDownload has cognitive complexity 78 (threshold 15). Drivers by points: if/else 19 (31 pts), ternaries 16 (27 pts), error handling 5 (12 pts), boolean chains 8 (nesting depth added 30). Of this number, 24 points are the body's own statements and 54 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · func (cognitive 76) · ×1
  • func (cognitive 76) clis/twitter/bookmarks.js:188 — func has cognitive complexity 76 (threshold 15). Drivers by points: ternaries 19 (30 pts), if/else 19 (26 pts), boolean chains 19, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · func (cognitive 72) · ×1
  • func (cognitive 72) clis/xiaohongshu/publish.js:1180 — func has cognitive complexity 72 (threshold 15). Drivers by points: if/else 25 (38 pts), ternaries 18 (23 pts), boolean chains 7, other 4 (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 · func (cognitive 69) · ×1
  • func (cognitive 69) clis/gemini/ask.js:97 — func has cognitive complexity 69 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 15, loops 2 (7 pts), ternaries 2 (6 pts), other 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adapter.registerAdapterCommands (cognitive 67) · ×1
  • adapter.registerAdapterCommands (cognitive 67) src/commands/adapter.ts:105 — adapter.registerAdapterCommands has cognitive complexity 67 (threshold 15). Drivers by points: if/else 22 (30 pts), error handling 10 (13 pts), boolean chains 11, ternaries 9 (11 pts), loops 1 (2 pts) (nesting depth added 14). None of this is in the body itself: all 67 points belong to 7 function literals inside it that branch (lines 293, 169, 216, …). 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 · resolveGenerationPlan (cognitive 67) · ×1
  • resolveGenerationPlan (cognitive 67) REDACTED:137 — resolveGenerationPlan has cognitive complexity 67 (threshold 15). Drivers by points: if/else 28 (31 pts), boolean chains 30, ternaries 5, 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.
D2 · Cognitive Complexity · user.listUserVideos (cognitive 60) · ×1
  • user.listUserVideos (cognitive 60) clis/tiktok/user.js:71 — user.listUserVideos has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (39 pts), boolean chains 12, loops 4 (8 pts), error handling 1 (nesting depth added 26). Of this number, 53 points are the body's own statements and 7 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 · func (cognitive 59) · ×1
  • func (cognitive 59) clis/douyin/publish.js:111 — func has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 10, ternaries 7, loops 2 (3 pts), other 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseThreadPages (cognitive 58) · ×1
  • parseThreadPages (cognitive 58) clis/linkedin/thread-snapshot.js:199 — parseThreadPages has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 18, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 19). Of this number, 54 points are the body's own statements and 4 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 · inbox.parseConversations (cognitive 57) · ×1
  • inbox.parseConversations (cognitive 57) clis/linkedin/inbox.js:63 — inbox.parseConversations has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 18, ternaries 5 (9 pts), loops 3 (4 pts) (nesting depth added 18). Of this number, 47 points are the body's own statements and 10 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 · commanderAdapter.registerCommandToProgram (cognitive 57) · ×1
  • commanderAdapter.registerCommandToProgram (cognitive 57) src/commanderAdapter.ts:34 — commanderAdapter.registerCommandToProgram has cognitive complexity 57 (threshold 15). Drivers by points: if/else 18 (27 pts), ternaries 10 (14 pts), boolean chains 11, loops 4, error handling 1 (nesting depth added 13). Of this number, 19 points are the body's own statements and 38 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 · daemon-client.sendCommandRaw (cognitive 53) · ×1
  • daemon-client.sendCommandRaw (cognitive 53) src/browser/daemon-client.ts:352 — daemon-client.sendCommandRaw has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 17, ternaries 3, error handling 1 (2 pts), loops 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 · template.applyFilter (cognitive 53) · ×1
  • template.applyFilter (cognitive 53) src/pipeline/template.ts:75 — template.applyFilter has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 16 (33 pts), if/else 6 (12 pts), boolean chains 7, match/switch 1 (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 · pickGeminiDeepResearchExportUrl (cognitive 53) · ×1
  • pickGeminiDeepResearchExportUrl (cognitive 53) clis/gemini/utils.js:1378 — pickGeminiDeepResearchExportUrl has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (40 pts), error handling 2 (6 pts), boolean chains 3, other 3, loops 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 · readMatchSeries (cognitive 50) · ×1
  • readMatchSeries (cognitive 50) REDACTED:661 — readMatchSeries has cognitive complexity 50 (threshold 15). Drivers by points: other 20, ternaries 6 (14 pts), if/else 3 (8 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 16). Of this number, 47 points are the body's own statements and 3 belong to 9 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 · requestInPage (cognitive 50) · ×1
  • requestInPage (cognitive 50) clis/proton/helpers.js:15 — requestInPage has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 16, ternaries 3 (6 pts), error handling 3, loops 2 (nesting depth added 7). Of this number, 47 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.
D2 · Cognitive Complexity · execution.executeCommand (cognitive 49) · ×1
  • execution.executeCommand (cognitive 49) src/execution.ts:199 — execution.executeCommand has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 9, ternaries 5 (8 pts), error handling 4 (7 pts) (nesting depth added 18). Of this number, 45 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 · doctor.renderBrowserDoctorReport (cognitive 48) · ×1
  • doctor.renderBrowserDoctorReport (cognitive 48) src/doctor.ts:237 — doctor.renderBrowserDoctorReport has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 18 (35 pts), boolean chains 5, if/else 4, loops 2 (4 pts) (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 · extractDeepResearchSourcesFromReportMessage (cognitive 48) · ×1
  • extractDeepResearchSourcesFromReportMessage (cognitive 48) clis/chatgpt/utils.js:1469 — extractDeepResearchSourcesFromReportMessage has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 10 (15 pts), boolean chains 10, loops 5 (6 pts) (nesting depth added 14). Of this number, 36 points are the body's own statements and 12 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 · utils.extractJsonAssignmentFromHtml (cognitive 47) · ×1
  • utils.extractJsonAssignmentFromHtml (cognitive 47) clis/youtube/utils.js:29 — utils.extractJsonAssignmentFromHtml has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (34 pts), error handling 1 (6 pts), loops 3 (6 pts), ternaries 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · timeline.parseHomeTimeline (cognitive 46) · ×1
  • timeline.parseHomeTimeline (cognitive 46) clis/twitter/timeline.js:97 — timeline.parseHomeTimeline has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (35 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · execution.coerceAndValidateArgs (cognitive 46) · ×1
  • execution.coerceAndValidateArgs (cognitive 46) src/execution.ts:53 — execution.coerceAndValidateArgs has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 9, loops 1 (nesting depth added 22). 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 · rpc.extractNotebooklmRpcResult (cognitive 45) · ×1
  • rpc.extractNotebooklmRpcResult (cognitive 45) clis/notebooklm/rpc.js:142 — rpc.extractNotebooklmRpcResult has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (19 pts), ternaries 4 (15 pts), error handling 1 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CDPPage.startNetworkCapture (cognitive 45) · ×1
  • CDPPage.startNetworkCapture (cognitive 45) src/browser/cdp.ts:334 — CDPPage.startNetworkCapture has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 5 (17 pts), boolean chains 4 (nesting depth added 26). Most of this is not in the body itself: 1 of the 45 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 346, 425, 435, …). 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 · func (cognitive 44) · ×1
  • func (cognitive 44) clis/twitter/following.js:141 — func has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 11, loops 2 (3 pts), ternaries 2 (3 pts), other 1 (nesting depth added 11). Of this number, 40 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 · extractAnswer (cognitive 43) · ×1
  • extractAnswer (cognitive 43) clis/zhihu/download-helpers.js:145 — extractAnswer has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 17, if/else 12, ternaries 8 (11 pts), error handling 3 (nesting depth added 3). Of this number, 41 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 · func (cognitive 41) · ×1
  • func (cognitive 41) clis/coupang/search.js:415 — func has cognitive complexity 41 (threshold 15). Drivers by points: error handling 7 (13 pts), boolean chains 12, if/else 7 (10 pts), ternaries 5, other 1 (nesting depth added 9). Of this number, 34 points are the body's own statements and 7 belong to 9 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 · createRankingCliOptions.func (cognitive 41) · ×1
  • createRankingCliOptions.func (cognitive 41) clis/amazon/rankings.js:164 — createRankingCliOptions.func has cognitive complexity 41 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 10, loops 3 (5 pts), other 5, ternaries 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Engine.run (cognitive 40) · ×1
  • Engine.run (cognitive 40) autoresearch/engine.ts:170 — Engine.run has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 8 (18 pts), if/else 9 (15 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 17). Of this number, 39 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 · notifications.extractNotificationRowsFromDoc (cognitive 39) · ×1
  • notifications.extractNotificationRowsFromDoc (cognitive 39) clis/facebook/notifications.js:167 — notifications.extractNotificationRowsFromDoc has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 9, loops 4 (8 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · func (cognitive 39) · ×1
  • func (cognitive 39) clis/linkedin/connect.js:413 — func has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 12, ternaries 3 (4 pts), loops 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · parseItem (cognitive 39) · ×1
  • parseItem (cognitive 39) clis/bilibili/feed.js:15 — parseItem has cognitive complexity 39 (threshold 15). Drivers by points: other 18, boolean chains 7, if/else 7, ternaries 4 (7 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 · daemon-lifecycle.ensureBrowserBridgeReady (cognitive 38) · ×1
  • daemon-lifecycle.ensureBrowserBridgeReady (cognitive 38) src/browser/daemon-lifecycle.ts:91 — daemon-lifecycle.ensureBrowserBridgeReady has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 14, error handling 1 (4 pts), ternaries 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractSearchRows (cognitive 38) · ×1
  • extractSearchRows (cognitive 38) clis/xiaohongshu/search.js:201 — extractSearchRows has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 14, ternaries 1 (3 pts), loops 2, error handling 1 (nesting depth added 9). Of this number, 26 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetchHistory (cognitive 38) · ×1
  • fetchHistory (cognitive 38) clis/xiaoyuzhou/history.js:147 — fetchHistory has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 4 (9 pts), loops 3 (6 pts), boolean chains 4, other 3 (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 · func (cognitive 38) · ×1
  • func (cognitive 38) clis/twitter/followers.js:94 — func has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 8, loops 3 (4 pts), error handling 2 (3 pts), other 1 (nesting depth added 9). Of this number, 29 points are the body's own statements and 9 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 · flight.parseBatchSearchCaptures (cognitive 37) · ×1
  • flight.parseBatchSearchCaptures (cognitive 37) clis/ctrip/flight.js:43 — flight.parseBatchSearchCaptures has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 9, error handling 2 (3 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). Of this number, 35 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 · profile-experience.clickOverlayAndExtract (cognitive 37) · ×1
  • profile-experience.clickOverlayAndExtract (cognitive 37) clis/linkedin/profile-experience.js:461 — profile-experience.clickOverlayAndExtract has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 4 (9 pts), boolean chains 6, loops 3 (5 pts), ternaries 2 (3 pts) (nesting depth added 14). Of this number, 32 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetchMediaThroughPage (cognitive 37) · ×1
  • fetchMediaThroughPage (cognitive 37) clis/midjourney/utils.js:553 — fetchMediaThroughPage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 10, error handling 3 (4 pts), loops 3 (4 pts), ternaries 1 (3 pts), other 1 (nesting depth added 10). Of this number, 29 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readResumeFile (cognitive 36) · ×1
  • readResumeFile (cognitive 36) clis/twitter/likes.js:124 — readResumeFile has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (15 pts), ternaries 4 (5 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · func (cognitive 36) · ×1
  • func (cognitive 36) clis/boss/search.js:149 — func has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts), other 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 · businessweek.extractBusinessweekStoriesFromNextData (cognitive 35) · ×1
  • businessweek.extractBusinessweekStoriesFromNextData (cognitive 35) clis/bloomberg/businessweek.js:32 — businessweek.extractBusinessweekStoriesFromNextData has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 14, ternaries 4 (11 pts), if/else 3 (7 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · feed.resolveFeedRequest (cognitive 35) · ×1
  • feed.resolveFeedRequest (cognitive 35) clis/linux-do/feed.js:265 — feed.resolveFeedRequest has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 14 (20 pts), if/else 7 (8 pts), boolean chains 7 (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 · ax-snapshot.renderAxTree · ×1
  • ax-snapshot.renderAxTree::render (cognitive 35) src/browser/ax-snapshot.ts:151 — ax-snapshot.renderAxTree::render has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 3 (8 pts), boolean chains 7, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validate.validateCommand (cognitive 35) · ×1
  • validate.validateCommand (cognitive 35) src/validate.ts:81 — validate.validateCommand has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (8 pts), 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 · media-download.downloadMedia (cognitive 35) · ×1
  • media-download.downloadMedia (cognitive 35) src/download/media-download.ts:74 — media-download.downloadMedia has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7 (11 pts), boolean chains 9, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 34 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 · markdownToConfluenceStorage (cognitive 35) · ×1
  • markdownToConfluenceStorage (cognitive 35) clis/_atlassian/shared.js:461 — markdownToConfluenceStorage has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6, loops 3, ternaries 1 (3 pts), other 1 (nesting depth added 10). Of this number, 24 points are the body's own statements and 11 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 · fetchCommentPage (cognitive 35) · ×1
  • fetchCommentPage (cognitive 35) clis/zhihu/answer-comments-helpers.js:37 — fetchCommentPage has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (13 pts), ternaries 4 (6 pts), error handling 2, other 1 (nesting depth added 6). Of this number, 23 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 · rankings.createRankingCliOptions.func (cognitive 34) · ×1
  • rankings.createRankingCliOptions.func (cognitive 34) clis/amazon/rankings.js:164 — rankings.createRankingCliOptions.func has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 10, loops 3 (5 pts), ternaries 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 · utils.fetchChatGPTConversationPayload (cognitive 34) · ×1
  • utils.fetchChatGPTConversationPayload (cognitive 34) clis/chatgpt/utils.js:1814 — utils.fetchChatGPTConversationPayload has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 7, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.waitForResponse (cognitive 34) · ×1
  • utils.waitForResponse (cognitive 34) clis/deepseek/utils.js:171 — utils.waitForResponse has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 17). 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 · shared.extractMedia (cognitive 34) · ×1
  • shared.extractMedia (cognitive 34) clis/twitter/shared.js:369 — shared.extractMedia has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 10, loops 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 · CDPPage.screenshot (cognitive 34) · ×1
  • CDPPage.screenshot (cognitive 34) src/browser/cdp.ts:279 — CDPPage.screenshot has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 7 (13 pts), boolean chains 7 (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 · summarizeOnesMutationBody (cognitive 34) · ×1
  • summarizeOnesMutationBody (cognitive 34) clis/ones/worklog.js:9 — summarizeOnesMutationBody has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 10, other 3, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.nodesToMarkdown (cognitive 33) · ×1
  • utils.nodesToMarkdown (cognitive 33) clis/mubu/utils.js:268 — utils.nodesToMarkdown has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (11 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · discover.analyzeScript (cognitive 33) · ×1
  • discover.analyzeScript (cognitive 33) src/browser/discover.ts:67 — discover.analyzeScript has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, ternaries 2 (4 pts), 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 · article-download.downloadImages (cognitive 33) · ×1
  • article-download.downloadImages (cognitive 33) src/download/article-download.ts:285 — article-download.downloadImages has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 3 (8 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 15). Most of this is not in the body itself: 8 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 308, 299). 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 · waitForChatGPTImages (cognitive 33) · ×1
  • waitForChatGPTImages (cognitive 33) clis/chatgpt/utils.js:2973 — waitForChatGPTImages has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, error handling 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetchJobCards (cognitive 33) · ×1
  • fetchJobCards (cognitive 33) clis/linkedin/search.js:244 — fetchJobCards has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 8, ternaries 3 (8 pts), loops 2 (3 pts), other 1 (nesting depth added 13). Of this number, 32 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 · normalizeJiraIssue (cognitive 33) · ×1
  • normalizeJiraIssue (cognitive 33) clis/jira/shared.js:192 — normalizeJiraIssue has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 16, ternaries 9 (10 pts), if/else 4, other 3 (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 · utils.queryThreads (cognitive 32) · ×1
  • utils.queryThreads (cognitive 32) clis/gmail/utils.js:479 — utils.queryThreads has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.parseReferenceArgument (cognitive 32) · ×1
  • utils.parseReferenceArgument (cognitive 32) clis/midjourney/utils.js:909 — utils.parseReferenceArgument has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 8, ternaries 3 (5 pts), error handling 2 (4 pts) (nesting depth added 9). Most of this is not in the body itself: 11 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 926). 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 · utils.parseToutiaoArticlesText (cognitive 32) · ×1
  • utils.parseToutiaoArticlesText (cognitive 32) clis/toutiao/utils.js:73 — utils.parseToutiaoArticlesText has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 7, loops 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 · favorites.parseFavoriteCard (cognitive 32) · ×1
  • favorites.parseFavoriteCard (cognitive 32) clis/weibo/favorites.js:20 — favorites.parseFavoriteCard has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 7, 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 · parseVideoItem (cognitive 32) · ×1
  • parseVideoItem (cognitive 32) clis/youtube/channel.js:21 — parseVideoItem has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 5 (10 pts), loops 2 (5 pts), ternaries 2 (3 pts) (nesting depth added 9). Of this number, 30 points are the body's own statements and 2 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 · shop.extractShopFields (cognitive 31) · ×1
  • shop.extractShopFields (cognitive 31) clis/dianping/shop.js:36 — shop.extractShopFields has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 20, if/else 6 (9 pts), loops 1, ternaries 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · item.collectImageUrlsFrom (cognitive 31) · ×1
  • item.collectImageUrlsFrom (cognitive 31) REDACTED:49 — item.collectImageUrlsFrom has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, loops 5 (6 pts), error handling 2 (4 pts) (nesting depth added 8). Of this number, 25 points are the body's own statements and 6 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 · list-remove-core.listRemoveUser (cognitive 31) · ×1
  • list-remove-core.listRemoveUser (cognitive 31) clis/twitter/list-remove-core.js:52 — list-remove-core.listRemoveUser has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 8, ternaries 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 · fetch.stepFetch (cognitive 31) · ×1
  • fetch.stepFetch (cognitive 31) src/pipeline/steps/fetch.ts:124 — fetch.stepFetch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7, ternaries 4 (5 pts), loops 1 (3 pts), error handling 1 (2 pts) (nesting depth added 10). Of this number, 29 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 · browser.captureNetworkItems (cognitive 31) · ×1
  • browser.captureNetworkItems (cognitive 31) src/commands/browser.ts:90 — browser.captureNetworkItems has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 4 (13 pts), if/else 4 (8 pts), boolean chains 5, error handling 2 (5 pts) (nesting depth added 16). Most of this is not in the body itself: 10 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 94). 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 · doctor.runBrowserDoctor (cognitive 31) · ×1
  • doctor.runBrowserDoctor (cognitive 31) src/doctor.ts:102 — doctor.runBrowserDoctor has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 9, ternaries 2 (4 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, 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 · extractDeepResearchFromConversationPayload (cognitive 31) · ×1
  • extractDeepResearchFromConversationPayload (cognitive 31) clis/chatgpt/utils.js:1666 — extractDeepResearchFromConversationPayload has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 13, loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · extractShotRows (cognitive 31) · ×1
  • extractShotRows (cognitive 31) clis/dribbble/utils.js:110 — extractShotRows has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 18, if/else 7, error handling 2 (3 pts), other 2, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 136, a function literal at line 138, count, …). 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 · parseUserMedia · ×1
  • parseUserMedia::visit (cognitive 31) clis/twitter/download.js:263 — parseUserMedia::visit has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 10, loops 3 (6 pts), ternaries 2 (4 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 · readResumeFile (cognitive 31) · ×1
  • readResumeFile (cognitive 31) clis/twitter/bookmarks.js:109 — readResumeFile has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 12, ternaries 4 (5 pts), error handling 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 · extractEventRowsPayload (cognitive 31) · ×1
  • extractEventRowsPayload (cognitive 31) clis/huodongxing/events.js:171 — extractEventRowsPayload has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), other 6, boolean chains 5, ternaries 2, loops 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 7 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 · extractRenderedJob (cognitive 31) · ×1
  • extractRenderedJob (cognitive 31) clis/boss/detail.js:44 — extractRenderedJob has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 23, ternaries 5, if/else 1 (2 pts), loops 1 (nesting depth added 1). Of this number, 18 points are the body's own statements and 13 belong to 19 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 · utils.selectSiteSetting (cognitive 30) · ×1
  • utils.selectSiteSetting (cognitive 30) clis/midjourney/utils.js:1447 — utils.selectSiteSetting has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 9, ternaries 2 (5 pts), loops 1 (nesting depth added 11). Most of this is not in the body itself: 13 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1449, 1450, 1456). 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 · utils.nodesToText (cognitive 30) · ×1
  • utils.nodesToText (cognitive 30) clis/mubu/utils.js:233 — utils.nodesToText has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (11 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bookmark-folder.parseBookmarkFolderTimeline (cognitive 30) · ×1
  • bookmark-folder.parseBookmarkFolderTimeline (cognitive 30) clis/twitter/bookmark-folder.js:86 — bookmark-folder.parseBookmarkFolderTimeline has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bookmarks.parseBookmarks (cognitive 30) · ×1
  • bookmarks.parseBookmarks (cognitive 30) clis/twitter/bookmarks.js:73 — bookmarks.parseBookmarks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · followers.parseFollowers (cognitive 30) · ×1
  • followers.parseFollowers (cognitive 30) clis/twitter/followers.js:25 — followers.parseFollowers has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 7, loops 2 (3 pts), ternaries 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 · likes.parseLikes (cognitive 30) · ×1
  • likes.parseLikes (cognitive 30) clis/twitter/likes.js:88 — likes.parseLikes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · list-tweets.parseListTimeline (cognitive 30) · ×1
  • list-tweets.parseListTimeline (cognitive 30) clis/twitter/list-tweets.js:88 — list-tweets.parseListTimeline has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · thread.parseTweetDetail (cognitive 30) · ×1
  • thread.parseTweetDetail (cognitive 30) clis/twitter/thread.js:73 — thread.parseTweetDetail has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CDPBridge.connect (cognitive 30) · ×1
  • CDPBridge.connect (cognitive 30) src/browser/cdp.ts:58 — CDPBridge.connect has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 3 (6 pts), boolean chains 3, loops 1 (3 pts), error handling 2 (nesting depth added 9). Most of this is not in the body itself: 9 of the 30 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 111, 90). 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 · build-manifest.main (cognitive 30) · ×1
  • build-manifest.main (cognitive 30) src/build-manifest.ts:347 — build-manifest.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (9 pts), ternaries 2 (5 pts), error handling 1 (2 pts), boolean chains 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 · plugin-manifest.satisfiesSingleConstraint (cognitive 30) · ×1
  • plugin-manifest.satisfiesSingleConstraint (cognitive 30) src/plugin-manifest.ts:128 — plugin-manifest.satisfiesSingleConstraint has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (23 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plugin.installMonorepo (cognitive 30) · ×1
  • plugin.installMonorepo (cognitive 30) REDACTED:857 — plugin.installMonorepo has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3, ternaries 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 9). 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 · selectChatGPTModel (cognitive 30) · ×1
  • selectChatGPTModel (cognitive 30) clis/chatgpt/utils.js:669 — selectChatGPTModel has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, error handling 1, 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 · readMatchMap (cognitive 30) · ×1
  • readMatchMap (cognitive 30) REDACTED:518 — readMatchMap has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 14 (17 pts), if/else 5 (7 pts), other 4, boolean chains 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 527, (anonymous)::numberFrom, (anonymous)::splitMainParen, …). 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 · extractProfileRow (cognitive 30) · ×1
  • extractProfileRow (cognitive 30) clis/dribbble/utils.js:239 — extractProfileRow has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 26, if/else 2, other 1, ternaries 1. Of this number, 23 points are the body's own statements and 7 belong to 16 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 · fetchCreatorNotes (cognitive 30) · ×1
  • fetchCreatorNotes (cognitive 30) clis/xiaohongshu/creator-notes.js:379 — fetchCreatorNotes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 3 (9 pts), boolean chains 4, loops 1 (2 pts), error handling 1, other 1 (nesting depth added 14). Of this number, 28 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 · func (cognitive 30) · ×1
  • func (cognitive 30) clis/band/post.js:34 — func has cognitive complexity 30 (threshold 15). Drivers by points: other 10, if/else 5 (7 pts), ternaries 3 (5 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 6 belong to 7 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 · utils.waitForGeminiResponse (cognitive 29) · ×1
  • utils.waitForGeminiResponse (cognitive 29) clis/gemini/utils.js:2540 — utils.waitForGeminiResponse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 22 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.readSiteSettings (cognitive 29) · ×1
  • utils.readSiteSettings (cognitive 29) clis/midjourney/utils.js:1386 — utils.readSiteSettings has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 15, if/else 6 (8 pts), ternaries 4, loops 2 (nesting depth added 2). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1391, 1403, 1396, …). 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 · buildEffectivePrompt (cognitive 29) · ×1
  • buildEffectivePrompt (cognitive 29) REDACTED:325 — buildEffectivePrompt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 14 (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 · debug.main (cognitive 28) · ×1
  • debug.main (cognitive 28) autoresearch/commands/debug.ts:50 — debug.main has cognitive complexity 28 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 5 (9 pts), loops 5 (9 pts), ternaries 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 · collection.extractRelationship (cognitive 28) · ×1
  • collection.extractRelationship (cognitive 28) clis/twitter/collection.js:118 — collection.extractRelationship has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, ternaries 5 (9 pts), if/else 4 (5 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · network-request.sanitizeCapturedRequest (cognitive 28) · ×1
  • network-request.sanitizeCapturedRequest (cognitive 28) src/browser/network-request.ts:143 — network-request.sanitizeCapturedRequest has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 7, boolean chains 4, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cli-argv-preprocess.escapeLeadingDashPositional (cognitive 28) · ×1
  • cli-argv-preprocess.escapeLeadingDashPositional (cognitive 28) src/cli-argv-preprocess.ts:78 — cli-argv-preprocess.escapeLeadingDashPositional has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 4, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildChatGPTBackendHeaders (cognitive 28) · ×1
  • buildChatGPTBackendHeaders (cognitive 28) clis/chatgpt/utils.js:523 — buildChatGPTBackendHeaders has cognitive complexity 28 (threshold 15). Drivers by points: error handling 6 (16 pts), if/else 7 (9 pts), boolean chains 2, 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 · mapHotelRow (cognitive 28) · ×1
  • mapHotelRow (cognitive 28) clis/ctrip/utils.js:297 — mapHotelRow has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 14, other 8, boolean chains 3, if/else 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resolveInstagramPrivatePublishConfig (cognitive 28) · ×1
  • resolveInstagramPrivatePublishConfig (cognitive 28) REDACTED:87 — resolveInstagramPrivatePublishConfig has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 8, ternaries 3 (5 pts), error handling 1 (2 pts), loops 1, other 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 · collectCommentRows (cognitive 28) · ×1
  • collectCommentRows (cognitive 28) clis/xueqiu/comments.js:245 — collectCommentRows has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (3 pts), boolean chains 1, other 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 · shared.extractCard (cognitive 27) · ×1
  • shared.extractCard (cognitive 27) clis/twitter/shared.js:434 — shared.extractCard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, ternaries 6, error handling 1 (2 pts), loops 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 5 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 · read.formatDiagnostics (cognitive 27) · ×1
  • read.formatDiagnostics (cognitive 27) clis/web/read.js:380 — read.formatDiagnostics has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 10, loops 3 (4 pts), if/else 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 · collection.mapCollectionItem (cognitive 27) · ×1
  • collection.mapCollectionItem (cognitive 27) clis/zhihu/collection.js:50 — collection.mapCollectionItem has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 22, if/else 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · execution.collectObservationEvidence (cognitive 27) · ×1
  • execution.collectObservationEvidence (cognitive 27) src/execution.ts:505 — execution.collectObservationEvidence has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (17 pts), if/else 4 (5 pts), boolean chains 3, loops 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 · buildChatGPTConversationHeaders (cognitive 27) · ×1
  • buildChatGPTConversationHeaders (cognitive 27) clis/chatgpt/utils.js:1759 — buildChatGPTConversationHeaders has cognitive complexity 27 (threshold 15). Drivers by points: error handling 5 (15 pts), if/else 7 (9 pts), boolean chains 2, 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 · readPlayerMatches (cognitive 27) · ×1
  • readPlayerMatches (cognitive 27) REDACTED:294 — readPlayerMatches has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 3 (5 pts), other 4, boolean chains 2, loops 1 (nesting depth added 9). None of this is in the body itself: all 27 points belong to 6 function items inside it that branch (a function literal at line 299, (anonymous)::numberFrom, (anonymous)::clean, …). 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 · captureJobList (cognitive 27) · ×1
  • captureJobList (cognitive 27) clis/boss/search.js:94 — captureJobList has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 6, ternaries 2 (5 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · eval-publish.main (cognitive 26) · ×1
  • eval-publish.main (cognitive 26) REDACTED:141 — eval-publish.main has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 6 (7 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent 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 · utils.renderBlock (cognitive 26) · ×1
  • utils.renderBlock (cognitive 26) clis/bloomberg/utils.js:113 — utils.renderBlock has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 3 (7 pts), boolean chains 5, match/switch 1 (nesting depth added 11). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.mimeFromFilePath (cognitive 26) · ×1
  • utils.mimeFromFilePath (cognitive 26) clis/chatgpt/utils.js:3552 — utils.mimeFromFilePath has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · shared.extractQuotedTweet (cognitive 26) · ×1
  • shared.extractQuotedTweet (cognitive 26) clis/twitter/shared.js:508 — shared.extractQuotedTweet has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 8, if/else 7 (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 · following.parseFollowing (cognitive 26) · ×1
  • following.parseFollowing (cognitive 26) clis/twitter/following.js:88 — following.parseFollowing has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 6, 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 · execution.runCommand (cognitive 26) · ×1
  • execution.runCommand (cognitive 26) src/execution.ts:100 — execution.runCommand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (6 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 12). Of this number, 23 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plugin.resolveEsbuildBin (cognitive 26) · ×1
  • plugin.resolveEsbuildBin (cognitive 26) REDACTED:1424 — plugin.resolveEsbuildBin has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · injectImagesFallback (cognitive 26) · ×1
  • injectImagesFallback (cognitive 26) clis/midjourney/utils.js:1029 — injectImagesFallback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (6 pts), boolean chains 5, error handling 1 (nesting depth added 8). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1066, 1057, 1044, …). 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 · replaceCollapsedTab (cognitive 26) · ×1
  • replaceCollapsedTab (cognitive 26) clis/xiaohongshu/search.js:937 — replaceCollapsedTab has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (8 pts), boolean chains 4, other 3, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · searchWithinBook (cognitive 26) · ×1
  • searchWithinBook (cognitive 26) clis/weread/book-search.js:274 — searchWithinBook has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 19 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · func (cognitive 26) · ×1
  • func (cognitive 26) clis/stackoverflow/read.js:225 — func has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, other 7, loops 3 (4 pts), if/else 2, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · brand.parseBrandSeries (cognitive 25) · ×1
  • brand.parseBrandSeries (cognitive 25) clis/autohome/brand.js:31 — brand.parseBrandSeries has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, loops 2 (3 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 · game.summarizeGame (cognitive 25) · ×1
  • game.summarizeGame (cognitive 25) clis/chess/game.js:20 — game.summarizeGame has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 15, if/else 6 (8 pts), loops 1, 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 · search.extractSearchRows (cognitive 25) · ×1
  • search.extractSearchRows (cognitive 25) clis/dianping/search.js:33 — search.extractSearchRows has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 19, if/else 4 (5 pts), ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 45). 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 · add-source.parseAddSourceResult (cognitive 25) · ×1
  • add-source.parseAddSourceResult (cognitive 25) clis/notebooklm/add-source.js:108 — add-source.parseAddSourceResult has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (7 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · helpers.listMessages (cognitive 25) · ×1
  • helpers.listMessages (cognitive 25) clis/proton/helpers.js:109 — helpers.listMessages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collection.paginateCollection (cognitive 25) · ×1
  • collection.paginateCollection (cognitive 25) clis/twitter/collection.js:255 — collection.paginateCollection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · list-create.requireCreateListResult (cognitive 25) · ×1
  • list-create.requireCreateListResult (cognitive 25) clis/twitter/list-create.js:40 — list-create.requireCreateListResult has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 11, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · waitForSubmittedJobsAfter (cognitive 25) · ×1
  • waitForSubmittedJobsAfter (cognitive 25) clis/midjourney/utils.js:409 — waitForSubmittedJobsAfter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, error handling 1 (2 pts), loops 2 (nesting depth added 10). Of this number, 20 points are the body's own statements and 5 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 · downloadRenderedVideo (cognitive 25) · ×1
  • downloadRenderedVideo (cognitive 25) clis/midjourney/utils.js:776 — downloadRenderedVideo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10, boolean chains 6, error handling 4 (6 pts), ternaries 2, other 1 (nesting depth added 2). Of this number, 23 points are the body's own statements and 2 belong to 6 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · parseCompletedMusic (cognitive 25) · ×1
  • parseCompletedMusic (cognitive 25) clis/minimax/utils.js:82 — parseCompletedMusic has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts), ternaries 4 (7 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 · trains.queryLeftTickets (cognitive 24) · ×1
  • trains.queryLeftTickets (cognitive 24) clis/12306/trains.js:55 — trains.queryLeftTickets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, error handling 1 (2 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 · utils.mapGameRow (cognitive 24) · ×1
  • utils.mapGameRow (cognitive 24) clis/chess/utils.js:119 — utils.mapGameRow has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 14, if/else 5, ternaries 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · utils.waitGmailCaptures (cognitive 24) · ×1
  • utils.waitGmailCaptures (cognitive 24) clis/gmail/utils.js:302 — utils.waitGmailCaptures has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, ternaries 3 (6 pts), loops 1 (nesting depth added 9). Of this number, 20 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · post.advanceToCaptionEditor (cognitive 24) · ×1
  • post.advanceToCaptionEditor (cognitive 24) clis/instagram/post.js:929 — post.advanceToCaptionEditor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (21 pts), error handling 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · post-roots.locatePostCards (cognitive 24) · ×1
  • post-roots.locatePostCards (cognitive 24) clis/linkedin/post-roots.js:2 — post-roots.locatePostCards has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.downloadOne (cognitive 24) · ×1
  • utils.downloadOne (cognitive 24) clis/midjourney/utils.js:667 — utils.downloadOne has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (6 pts), error handling 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.submitSunoGeneration (cognitive 24) · ×1
  • utils.submitSunoGeneration (cognitive 24) clis/suno/utils.js:274 — utils.submitSunoGeneration has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (7 pts), ternaries 4 (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 · utils.attachComposerImage (cognitive 24) · ×1
  • utils.attachComposerImage (cognitive 24) clis/twitter/utils.js:130 — utils.attachComposerImage has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 6 (10 pts), error handling 1 (2 pts) (nesting depth added 13). 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 · check-listing-id-pairing.main (cognitive 24) · ×1
  • check-listing-id-pairing.main (cognitive 24) scripts/check-listing-id-pairing.mjs:131 — check-listing-id-pairing.main has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 10). 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 · shape.inferShape · ×1
  • shape.inferShape::walk (cognitive 24) src/browser/shape.ts:50 — shape.inferShape::walk has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · command-output.emitFailure (cognitive 24) · ×1
  • command-output.emitFailure (cognitive 24) src/command-output.ts:22 — command-output.emitFailure has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, loops 1 (2 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 · readConversation (cognitive 24) · ×1
  • readConversation (cognitive 24) clis/grok/export-all.js:165 — readConversation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, error handling 2 (3 pts), loops 2, 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 · extractTranscriptText (cognitive 24) · ×1
  • extractTranscriptText (cognitive 24) clis/xiaoyuzhou/auth.js:281 — extractTranscriptText has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts), error handling 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 · mapJobItem (cognitive 24) · ×1
  • mapJobItem (cognitive 24) clis/51job/utils.js:241 — mapJobItem has cognitive complexity 24 (threshold 15). Drivers by points: other 19, boolean chains 3, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · resolveSearchReaderUrl (cognitive 24) · ×1
  • resolveSearchReaderUrl (cognitive 24) clis/weread/book.js:99 — resolveSearchReaderUrl has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), other 3, ternaries 2, error handling 1 (nesting depth added 1). Of this number, 15 points are the body's own statements and 9 belong to 10 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 · parseProfileCapture (cognitive 24) · ×1
  • parseProfileCapture (cognitive 24) clis/tiktok/user.js:42 — parseProfileCapture has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9, error handling 2, other 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 · utils.parseThreadRow (cognitive 23) · ×1
  • utils.parseThreadRow (cognitive 23) clis/1point3acres/utils.js:146 — utils.parseThreadRow has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10, if/else 6 (9 pts), boolean chains 3, loops 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 5 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 · post-like.setInstagramPostLike (cognitive 23) · ×1
  • post-like.setInstagramPostLike (cognitive 23) clis/instagram/_shared/post-like.js:174 — post-like.setInstagramPostLike has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (6 pts), boolean chains 4, 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 · profile-experience.enrichExperienceRows (cognitive 23) · ×1
  • profile-experience.enrichExperienceRows (cognitive 23) clis/linkedin/profile-experience.js:541 — profile-experience.enrichExperienceRows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · topic-content.normalizeTopicPayload (cognitive 23) · ×1
  • topic-content.normalizeTopicPayload (cognitive 23) clis/linux-do/topic-content.js:7 — topic-content.normalizeTopicPayload has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (22 pts), if/else 1 (nesting depth added 13). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 13). 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 · utils.pinterestResourceFetch (cognitive 23) · ×1
  • utils.pinterestResourceFetch (cognitive 23) clis/pinterest/utils.js:193 — utils.pinterestResourceFetch has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (7 pts), boolean chains 6 (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 · utils.seFetch (cognitive 23) · ×1
  • utils.seFetch (cognitive 23) clis/stackoverflow/utils.js:40 — utils.seFetch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 3 (4 pts), ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transcript.extractSegmentsFromNetworkCapture (cognitive 23) · ×1
  • transcript.extractSegmentsFromNetworkCapture (cognitive 23) clis/youtube/transcript.js:76 — transcript.extractSegmentsFromNetworkCapture has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, error handling 2 (3 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 9 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 · discover.mergeEvidence (cognitive 23) · ×1
  • discover.mergeEvidence (cognitive 23) src/browser/discover.ts:126 — discover.mergeEvidence has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 3 (5 pts), ternaries 2 (4 pts) (nesting depth added 8). 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, split the body into named stages: move each independent 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 · build-manifest.scanClisDir (cognitive 23) · ×1
  • build-manifest.scanClisDir (cognitive 23) src/build-manifest.ts:205 — build-manifest.scanClisDir has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), error handling 1 (4 pts), boolean chains 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 · index.httpDownload (cognitive 23) · ×1
  • index.httpDownload (cognitive 23) src/download/index.ts:115 — index.httpDownload has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (6 pts), boolean chains 4, error handling 3 (nesting depth added 6). 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 · redaction.redactValue (cognitive 23) · ×1
  • redaction.redactValue (cognitive 23) src/observation/redaction.ts:54 — redaction.redactValue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, loops 1 (2 pts), 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 · validate.validateClisWithTarget (cognitive 23) · ×1
  • validate.validateClisWithTarget (cognitive 23) src/validate.ts:33 — validate.validateClisWithTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 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 · list.registerListCommand (cognitive 23) · ×1
  • list.registerListCommand (cognitive 23) src/commands/list.ts:13 — list.registerListCommand has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (6 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 10). None of this is in the body itself: all 23 points belong to 3 function literals inside it that branch (lines 28, 20, 25). 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 · requestXiaoyuzhouJson (cognitive 23) · ×1
  • requestXiaoyuzhouJson (cognitive 23) clis/xiaoyuzhou/auth.js:209 — requestXiaoyuzhouJson has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, ternaries 1 (2 pts), error handling 1, other 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 · parseExamsFromDom (cognitive 23) · ×1
  • parseExamsFromDom (cognitive 23) clis/chaoxing/utils.js:174 — parseExamsFromDom has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), other 6, boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · download.assertNotPaidContent (cognitive 22) · ×1
  • download.assertNotPaidContent (cognitive 22) clis/bilibili/download.js:34 — download.assertNotPaidContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (6 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.selectModernChatGPTIntelligence (cognitive 22) · ×1
  • utils.selectModernChatGPTIntelligence (cognitive 22) clis/chatgpt/utils.js:617 — utils.selectModernChatGPTIntelligence has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 2, 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 · utils.waitForChatGPTDeepResearchResult (cognitive 22) · ×1
  • utils.waitForChatGPTDeepResearchResult (cognitive 22) clis/chatgpt/utils.js:2235 — utils.waitForChatGPTDeepResearchResult has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3, 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 · utils.parseFetchData (cognitive 22) · ×1
  • utils.parseFetchData (cognitive 22) clis/gmail/utils.js:241 — utils.parseFetchData has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 10, ternaries 2 (5 pts), if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · hot.extractHupuHotRowsFromDoc (cognitive 22) · ×1
  • hot.extractHupuHotRowsFromDoc (cognitive 22) clis/hupu/hot.js:69 — hot.extractHupuHotRowsFromDoc has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (6 pts), boolean chains 5, 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 · search.searchPosts (cognitive 22) · ×1
  • search.searchPosts (cognitive 22) clis/jike/search.js:39 — search.searchPosts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), boolean chains 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 · publish.addTopics (cognitive 22) · ×1
  • publish.addTopics (cognitive 22) clis/xiaohongshu/publish.js:571 — publish.addTopics has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (7 pts), boolean chains 4, 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 · shape-filter.extractSegments (cognitive 22) · ×1
  • shape-filter.extractSegments (cognitive 22) src/browser/shape-filter.ts:60 — shape-filter.extractSegments has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (4 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · executor.executePipeline (cognitive 22) · ×1
  • executor.executePipeline (cognitive 22) src/pipeline/executor.ts:20 — executor.executePipeline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (4 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 · waitForDerivedJob (cognitive 22) · ×1
  • waitForDerivedJob (cognitive 22) clis/midjourney/utils.js:474 — waitForDerivedJob 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). Of this number, 18 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 · uploadReferenceLibrary (cognitive 22) · ×1
  • uploadReferenceLibrary (cognitive 22) clis/midjourney/utils.js:1139 — uploadReferenceLibrary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · publishSidecarWithRetry (cognitive 22) · ×1
  • publishSidecarWithRetry (cognitive 22) REDACTED:836 — publishSidecarWithRetry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (5 pts), boolean chains 4, error handling 1 (2 pts), loops 1, other 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 · readTeamMatches (cognitive 22) · ×1
  • readTeamMatches (cognitive 22) REDACTED:378 — readTeamMatches has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), ternaries 3 (6 pts), other 3, loops 1 (nesting depth added 6). None of this is in the body itself: all 22 points belong to 4 function items inside it that branch (a function literal at line 383, (anonymous)::clean, a function literal at line 425, …). 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 · pollSunoClips (cognitive 22) · ×1
  • pollSunoClips (cognitive 22) clis/suno/utils.js:354 — pollSunoClips has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 7, loops 1 (nesting depth added 7). Of this number, 21 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 · extractDesignerRows (cognitive 22) · ×1
  • extractDesignerRows (cognitive 22) clis/dribbble/utils.js:188 — extractDesignerRows has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, if/else 3, ternaries 2, other 1. Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 203, clean, numberFrom, …). 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 · findFriendByUid (cognitive 22) · ×1
  • findFriendByUid (cognitive 22) clis/boss/utils.js:182 — findFriendByUid has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (9 pts), other 2, boolean chains 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 · pixivFetch (cognitive 22) · ×1
  • pixivFetch (cognitive 22) clis/pixiv/utils.js:42 — pixivFetch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (7 pts), boolean chains 5, error handling 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 · eval-v2ex.main (cognitive 21) · ×1
  • eval-v2ex.main (cognitive 21) REDACTED:134 — eval-v2ex.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 4 (6 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · eval-zhihu.main (cognitive 21) · ×1
  • eval-zhihu.main (cognitive 21) REDACTED:144 — eval-zhihu.main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 4 (6 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.collectMediaUrls (cognitive 21) · ×1
  • utils.collectMediaUrls (cognitive 21) clis/bloomberg/utils.js:307 — utils.collectMediaUrls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.comparePrerelease (cognitive 21) · ×1
  • utils.comparePrerelease (cognitive 21) clis/goproxy/utils.js:137 — utils.comparePrerelease has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · browse.parseListings (cognitive 21) · ×1
  • browse.parseListings (cognitive 21) clis/guazi/browse.js:30 — browse.parseListings has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · salesnav-search.parseLeads (cognitive 21) · ×1
  • salesnav-search.parseLeads (cognitive 21) clis/linkedin/salesnav-search.js:76 — salesnav-search.parseLeads has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), ternaries 2 (4 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 · capabilities.estimateAction (cognitive 21) · ×1
  • capabilities.estimateAction (cognitive 21) REDACTED:291 — capabilities.estimateAction has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (4 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 · write-note.parseNoteIdFromResult (cognitive 21) · ×1
  • write-note.parseNoteIdFromResult (cognitive 21) clis/notebooklm/write-note.js:43 — write-note.parseNoteIdFromResult has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · search.mapRedditSearchRow (cognitive 21) · ×1
  • search.mapRedditSearchRow (cognitive 21) clis/reddit/search.js:46 — search.mapRedditSearchRow has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 3 (5 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · pinia-helpers.parseXhsCount (cognitive 21) · ×1
  • pinia-helpers.parseXhsCount (cognitive 21) clis/xiaohongshu/pinia-helpers.js:66 — pinia-helpers.parseXhsCount has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 5, boolean chains 4 (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 · creator-notes.fetchCreatorNotesByCapture (cognitive 21) · ×1
  • creator-notes.fetchCreatorNotesByCapture (cognitive 21) clis/xiaohongshu/creator-notes.js:277 — creator-notes.fetchCreatorNotesByCapture has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Page.goto (cognitive 21) · ×1
  • Page.goto (cognitive 21) src/browser/page.ts:92 — Page.goto has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 4 (8 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.ytdlpDownload (cognitive 21) · ×1
  • index.ytdlpDownload (cognitive 21) src/download/index.ts:282 — index.ytdlpDownload has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 354, 293, 327, …). 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 · projectCard (cognitive 21) · ×1
  • projectCard (cognitive 21) clis/douyin/search.js:136 — projectCard has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, other 3, loops 1, ternaries 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · eval-skill.extractVerdict (cognitive 20) · ×1
  • eval-skill.extractVerdict (cognitive 20) autoresearch/eval-skill.ts:161 — eval-skill.extractVerdict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.parseTrainRecord (cognitive 20) · ×1
  • utils.parseTrainRecord (cognitive 20) clis/12306/utils.js:162 — utils.parseTrainRecord has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 19, 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 · search.collectSearchRows (cognitive 20) · ×1
  • search.collectSearchRows (cognitive 20) clis/1688/search.js:241 — search.collectSearchRows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shared.summarizeApiError (cognitive 20) · ×1
  • shared.summarizeApiError (cognitive 20) clis/_atlassian/shared.js:125 — shared.summarizeApiError has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 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 · car.parseCarDetail (cognitive 20) · ×1
  • car.parseCarDetail (cognitive 20) clis/guazi/car.js:37 — car.parseCarDetail has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, ternaries 5, if/else 1 (2 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 · salesnav-thread.parseSalesnavThreadMessages (cognitive 20) · ×1
  • salesnav-thread.parseSalesnavThreadMessages (cognitive 20) clis/linkedin/salesnav-thread.js:85 — salesnav-thread.parseSalesnavThreadMessages has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, if/else 4, ternaries 1. Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 98, 116, 115). 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 · utils.getSessionListFromApi (cognitive 20) · ×1
  • utils.getSessionListFromApi (cognitive 20) clis/qwen/utils.js:411 — utils.getSessionListFromApi has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 8, if/else 2 (nesting depth added 6). Of this number, 17 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 · subscribed.mapSubredditRow (cognitive 20) · ×1
  • subscribed.mapSubredditRow (cognitive 20) clis/reddit/subscribed.js:26 — subscribed.mapSubredditRow has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 6, if/else 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 · utils.projectCountry (cognitive 20) · ×1
  • utils.projectCountry (cognitive 20) clis/rest-countries/utils.js:100 — utils.projectCountry has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 18, boolean chains 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 · notes.listBookNotes (cognitive 20) · ×1
  • notes.listBookNotes (cognitive 20) clis/weread-official/notes.js:96 — notes.listBookNotes has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 2 (3 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transcript-group.groupBySpeaker (cognitive 20) · ×1
  • transcript-group.groupBySpeaker (cognitive 20) clis/youtube/transcript-group.js:105 — transcript-group.groupBySpeaker has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · verify-release.verifyRelease (cognitive 20) · ×1
  • verify-release.verifyRelease (cognitive 20) scripts/verify-release.mjs:36 — verify-release.verifyRelease has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convention-audit.splitTopLevel (cognitive 20) · ×1
  • convention-audit.splitTopLevel (cognitive 20) src/convention-audit.ts:534 — convention-audit.splitTopLevel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 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. This shape REPEATS in the file: one other method here (convention-audit.findTopLevelChar) 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 · convention-audit.findTopLevelChar (cognitive 20) · ×1
  • convention-audit.findTopLevelChar (cognitive 20) src/convention-audit.ts:563 — convention-audit.findTopLevelChar has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 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. This shape REPEATS in the file: one other method here (convention-audit.splitTopLevel) 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 · derivePartialPrivateApiContextFromCapture (cognitive 20) · ×1
  • derivePartialPrivateApiContextFromCapture (cognitive 20) REDACTED:52 — derivePartialPrivateApiContextFromCapture has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 1, other 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 · getNotebooklmPageState (cognitive 20) · ×1
  • getNotebooklmPageState (cognitive 20) clis/notebooklm/utils.js:641 — getNotebooklmPageState has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, error handling 2 (3 pts), if/else 3, ternaries 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · extractServiceRows (cognitive 20) · ×1
  • extractServiceRows (cognitive 20) clis/dribbble/utils.js:317 — extractServiceRows has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, if/else 4, ternaries 2, other 1. Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 331, clean, a function literal at line 353, …). 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 · collectResults (cognitive 20) · ×1
  • collectResults (cognitive 20) clis/pinterest/utils.js:358 — collectResults has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 3, loops 2 (3 pts), other 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 · parseEventTimeRange (cognitive 20) · ×1
  • parseEventTimeRange (cognitive 20) clis/huodongxing/events.js:100 — parseEventTimeRange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4 (5 pts), boolean chains 2, other 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 · normalizeExtractionResult (cognitive 20) · ×1
  • normalizeExtractionResult (cognitive 20) clis/youdao/note.js:172 — normalizeExtractionResult has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), other 5, boolean chains 3, ternaries 2 (3 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 · parseSalesnavThreads (cognitive 20) · ×1
  • parseSalesnavThreads (cognitive 20) clis/linkedin/salesnav-inbox.js:59 — parseSalesnavThreads has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 3, ternaries 2, other 1. Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 63, 85). 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 · utils.extractDeepResearchFromNetworkEntries (cognitive 19) · ×1
  • utils.extractDeepResearchFromNetworkEntries (cognitive 19) clis/chatgpt/utils.js:1727 — utils.extractDeepResearchFromNetworkEntries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 2 (5 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.waitForChatGPTResponse (cognitive 19) · ×1
  • utils.waitForChatGPTResponse (cognitive 19) clis/chatgpt/utils.js:2343 — utils.waitForChatGPTResponse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.uploadChatGPTProjectFiles (cognitive 19) · ×1
  • utils.uploadChatGPTProjectFiles (cognitive 19) clis/chatgpt/utils.js:3380 — utils.uploadChatGPTProjectFiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.waitForResponse (cognitive 19) · ×1
  • utils.waitForResponse (cognitive 19) clis/claude/utils.js:293 — utils.waitForResponse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, 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 · utils.sendWithFile (cognitive 19) · ×1
  • utils.sendWithFile (cognitive 19) clis/deepseek/utils.js:378 — utils.sendWithFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 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 · utils.sendDoubaoMessage (cognitive 19) · ×1
  • utils.sendDoubaoMessage (cognitive 19) clis/doubao/utils.js:674 — utils.sendDoubaoMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 5, error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · post.uploadMedia (cognitive 19) · ×1
  • post.uploadMedia (cognitive 19) clis/instagram/post.js:612 — post.uploadMedia has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · item.collectImageUrlsFromFramesAndScripts (cognitive 19) · ×1
  • item.collectImageUrlsFromFramesAndScripts (cognitive 19) REDACTED:130 — item.collectImageUrlsFromFramesAndScripts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, loops 3 (4 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · search.fetchDuckDuckGoIndexRows (cognitive 19) · ×1
  • search.fetchDuckDuckGoIndexRows (cognitive 19) REDACTED:370 — search.fetchDuckDuckGoIndexRows has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · notifications.listNotifications (cognitive 19) · ×1
  • notifications.listNotifications (cognitive 19) clis/jike/notifications.js:94 — notifications.listNotifications has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · profile-experience.parseExperienceSectionText (cognitive 19) · ×1
  • profile-experience.parseExperienceSectionText (cognitive 19) clis/linkedin/profile-experience.js:109 — profile-experience.parseExperienceSectionText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bookmark-download.commitIllustPlan (cognitive 19) · ×1
  • bookmark-download.commitIllustPlan (cognitive 19) clis/pixiv/bookmark-download.js:92 — bookmark-download.commitIllustPlan has cognitive complexity 19 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 4 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.waitForAnswer (cognitive 19) · ×1
  • utils.waitForAnswer (cognitive 19) clis/qwen/utils.js:336 — utils.waitForAnswer has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 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 · read.normalizeRedditPostId (cognitive 19) · ×1
  • read.normalizeRedditPostId (cognitive 19) clis/reddit/read.js:30 — read.normalizeRedditPostId has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, error handling 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 · utils.downloadSunoClip (cognitive 19) · ×1
  • utils.downloadSunoClip (cognitive 19) clis/suno/utils.js:503 — utils.downloadSunoClip has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, 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 · creator-videos.listCreatorVideos (cognitive 19) · ×1
  • creator-videos.listCreatorVideos (cognitive 19) clis/tiktok/creator-videos.js:210 — creator-videos.listCreatorVideos has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · lists.parseListsManagement (cognitive 19) · ×1
  • lists.parseListsManagement (cognitive 19) clis/twitter/lists.js:89 — lists.parseListsManagement has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 3 (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 · target.parseTarget (cognitive 19) · ×1
  • target.parseTarget (cognitive 19) clis/zhihu/target.js:14 — target.parseTarget has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · intercept.stepIntercept (cognitive 19) · ×1
  • intercept.stepIntercept (cognitive 19) src/pipeline/steps/intercept.ts:15 — intercept.stepIntercept has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (2 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, 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 · article-download.createTurndown (cognitive 19) · ×1
  • article-download.createTurndown (cognitive 19) src/download/article-download.ts:117 — article-download.createTurndown has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 3, error handling 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 169, 193, 181, …). 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 · extractShotDetailRow (cognitive 19) · ×1
  • extractShotDetailRow (cognitive 19) clis/dribbble/utils.js:360 — extractShotDetailRow has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 2, other 1, ternaries 1. Of this number, 15 points are the body's own statements and 4 belong to 11 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 · parseCreatorNotesText (cognitive 19) · ×1
  • parseCreatorNotesText (cognitive 19) clis/xiaohongshu/creator-notes.js:33 — parseCreatorNotesText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), other 4, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fetchLiveCategories (cognitive 19) · ×1
  • fetchLiveCategories (cognitive 19) clis/linux-do/feed.js:185 — fetchLiveCategories has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), error handling 2 (4 pts), boolean chains 1, other 1 (nesting depth added 8). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 189, 202, 201, …). 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 · toSummaryRow (cognitive 19) · ×1
  • toSummaryRow (cognitive 19) clis/hltv/player-duel.js:104 — toSummaryRow has cognitive complexity 19 (threshold 15). Drivers by points: other 15, ternaries 3, if/else 1. Of this number, 11 points are the body's own statements and 8 belong to 11 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 · mergeSearchItems (cognitive 19) · ×1
  • mergeSearchItems (cognitive 19) clis/coupang/utils.js:281 — mergeSearchItems has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, other 5, if/else 2 (3 pts), loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 288, 311, 310). 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 · callGateway (cognitive 19) · ×1
  • callGateway (cognitive 19) clis/weread-official/utils.js:74 — callGateway has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), other 4, ternaries 2 (4 pts), boolean chains 2, error handling 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 · fetchThreadWithPagination (cognitive 19) · ×1
  • fetchThreadWithPagination (cognitive 19) clis/linkedin/salesnav-thread.js:148 — fetchThreadWithPagination has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, ternaries 2 (3 pts), 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 · utils.getCookie (cognitive 18) · ×1
  • utils.getCookie (cognitive 18) clis/1point3acres/utils.js:71 — utils.getCookie has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (5 pts), error handling 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.waitForDoubaoResponse (cognitive 18) · ×1
  • utils.waitForDoubaoResponse (cognitive 18) clis/doubao/utils.js:725 — utils.waitForDoubaoResponse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 5). Of this number, 11 points are the body's own statements and 7 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 · utils.waitForGeminiImages (cognitive 18) · ×1
  • utils.waitForGeminiImages (cognitive 18) clis/gemini/utils.js:2413 — utils.waitForGeminiImages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (2 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 · repos.parseTrendingHtml (cognitive 18) · ×1
  • repos.parseTrendingHtml (cognitive 18) clis/github-trending/repos.js:50 — repos.parseTrendingHtml has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 4 (8 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 · china-bid-search.searchRowsFromEntries (cognitive 18) · ×1
  • china-bid-search.searchRowsFromEntries (cognitive 18) clis/jianyu/shared/china-bid-search.js:53 — china-bid-search.searchRowsFromEntries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · salesnav-inbox.fetchInboxRows (cognitive 18) · ×1
  • salesnav-inbox.fetchInboxRows (cognitive 18) clis/linkedin/salesnav-inbox.js:132 — salesnav-inbox.fetchInboxRows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.extractPlaylistVideos (cognitive 18) · ×1
  • utils.extractPlaylistVideos (cognitive 18) clis/youtube/utils.js:113 — utils.extractPlaylistVideos has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, if/else 1. None of this is in the body itself: all 18 points belong to 3 function literals inside it that branch (lines 116, 115, 134). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · discover.discoverEndpoints (cognitive 18) · ×1
  • discover.discoverEndpoints (cognitive 18) src/browser/discover.ts:175 — discover.discoverEndpoints has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 2 (4 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 200). 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 · convention-audit.findBalancedBlockEnd (cognitive 18) · ×1
  • convention-audit.findBalancedBlockEnd (cognitive 18) src/convention-audit.ts:410 — convention-audit.findBalancedBlockEnd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, 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. This shape REPEATS in the file: one other method here (convention-audit.readBalancedBlock) 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 · convention-audit.readBalancedBlock (cognitive 18) · ×1
  • convention-audit.readBalancedBlock (cognitive 18) src/convention-audit.ts:443 — convention-audit.readBalancedBlock has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, 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. This shape REPEATS in the file: one other method here (convention-audit.findBalancedBlockEnd) 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 · toCaptureProject (cognitive 18) · ×1
  • toCaptureProject (cognitive 18) clis/gitee/trending.js:97 — toCaptureProject has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, loops 1, other 1, ternaries 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 5 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.
D2 · Cognitive Complexity · extractRemainingCredits (cognitive 18) · ×1
  • extractRemainingCredits (cognitive 18) clis/linkedin/salesnav-message.js:107 — extractRemainingCredits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1 (2 pts), other 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (visit, a function literal at line 109, a function literal at line 124). 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 · loadFeedPosts (cognitive 18) · ×1
  • loadFeedPosts (cognitive 18) clis/facebook/feed.js:302 — loadFeedPosts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (4 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseCollectionPage · ×1
  • parseCollectionPage::visit (cognitive 18) clis/twitter/collection.js:211 — parseCollectionPage::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · projectFeedData (cognitive 18) · ×1
  • projectFeedData (cognitive 18) clis/nowcoder/posts.js:125 — projectFeedData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7 (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 · normalizeContentImages (cognitive 18) · ×1
  • normalizeContentImages (cognitive 18) clis/zhihu/download-helpers.js:62 — normalizeContentImages has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 3, error handling 1, loops 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 91, normalizeUrl, a function literal at line 85, …). 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 · extractNotesFromResponses (cognitive 18) · ×1
  • extractNotesFromResponses (cognitive 18) clis/xiaohongshu/collection-helpers.js:85 — extractNotesFromResponses has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 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 · htmlToMarkdown (cognitive 18) · ×1
  • htmlToMarkdown (cognitive 18) clis/mubu/utils.js:127 — htmlToMarkdown has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, ternaries 3. None of this is in the body itself: all 18 points belong to 4 function literals inside it that branch (lines 153, 174, 137, …). 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 · normalizeItemPayload (cognitive 18) · ×1
  • normalizeItemPayload (cognitive 18) clis/1688/item.js:5 — normalizeItemPayload has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, other 7, ternaries 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · eval-all.runSuite (cognitive 17) · ×1
  • eval-all.runSuite (cognitive 17) autoresearch/eval-all.ts:28 — eval-all.runSuite has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (6 pts), if/else 2 (5 pts), loops 2 (3 pts), boolean chains 2, error handling 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 · site-auth.registerSiteAuthCommands (cognitive 17) · ×1
  • site-auth.registerSiteAuthCommands (cognitive 17) clis/_shared/site-auth.js:47 — site-auth.registerSiteAuthCommands has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (5 pts), error handling 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 90). 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 · utils.parseSearchList (cognitive 17) · ×1
  • utils.parseSearchList (cognitive 17) clis/1point3acres/utils.js:215 — utils.parseSearchList has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 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 · summary.readBvid (cognitive 17) · ×1
  • summary.readBvid (cognitive 17) clis/bilibili/summary.js:22 — summary.readBvid has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2, ternaries 1 (2 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 · summary.rowsFromModel (cognitive 17) · ×1
  • summary.rowsFromModel (cognitive 17) clis/bilibili/summary.js:101 — summary.rowsFromModel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.collectText (cognitive 17) · ×1
  • utils.collectText (cognitive 17) clis/bloomberg/utils.js:260 — utils.collectText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 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 · utils.waitForChatGPTDetailRows (cognitive 17) · ×1
  • utils.waitForChatGPTDetailRows (cognitive 17) clis/chatgpt/utils.js:1402 — utils.waitForChatGPTDetailRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 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 · utils.uploadChatGPTFiles (cognitive 17) · ×1
  • utils.uploadChatGPTFiles (cognitive 17) clis/chatgpt/utils.js:2674 — utils.uploadChatGPTFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, error handling 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 · utils.sendWithFile (cognitive 17) · ×1
  • utils.sendWithFile (cognitive 17) clis/claude/utils.js:367 — utils.sendWithFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 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 · cityResolver.resolveCityIdAsync (cognitive 17) · ×1
  • cityResolver.resolveCityIdAsync (cognitive 17) clis/dianping/cityResolver.js:48 — cityResolver.resolveCityIdAsync has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1, error handling 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 · feed.getFacebookFeed (cognitive 17) · ×1
  • feed.getFacebookFeed (cognitive 17) clis/facebook/feed.js:344 — feed.getFacebookFeed has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 2 (4 pts), error handling 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 · utils.sendGeminiMessage (cognitive 17) · ×1
  • utils.sendGeminiMessage (cognitive 17) clis/gemini/utils.js:1315 — utils.sendGeminiMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · utils.waitForAnswer (cognitive 17) · ×1
  • utils.waitForAnswer (cognitive 17) REDACTED:635 — utils.waitForAnswer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 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 · pin.defineToggle (cognitive 17) · ×1
  • pin.defineToggle (cognitive 17) clis/grok/pin.js:17 — pin.defineToggle has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5, boolean chains 3 (nesting depth added 3). 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 31). 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 · private-publish.readJpegDimensions (cognitive 17) · ×1
  • private-publish.readJpegDimensions (cognitive 17) REDACTED:204 — private-publish.readJpegDimensions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · procurement-detail.runProcurementDetail (cognitive 17) · ×1
  • procurement-detail.runProcurementDetail (cognitive 17) clis/jianyu/shared/procurement-detail.js:47 — procurement-detail.runProcurementDetail has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · search.collectApiRowsFromResponses (cognitive 17) · ×1
  • search.collectApiRowsFromResponses (cognitive 17) REDACTED:500 — search.collectApiRowsFromResponses has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _utils.parseChatId (cognitive 17) · ×1
  • _utils.parseChatId (cognitive 17) clis/kimi/_utils.js:43 — _utils.parseChatId has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (5 pts), ternaries 3 (5 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 5). 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, split the body into named stages: move each independent 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 · topic-content.buildTopicMarkdownDocument (cognitive 17) · ×1
  • topic-content.buildTopicMarkdownDocument (cognitive 17) clis/linux-do/topic-content.js:29 — topic-content.buildTopicMarkdownDocument has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (5 pts), ternaries 3 (5 pts), 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 · rpc.parseNotebooklmChunkedResponse (cognitive 17) · ×1
  • rpc.parseNotebooklmChunkedResponse (cognitive 17) clis/notebooklm/rpc.js:108 — rpc.parseNotebooklmChunkedResponse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · novel-download-utils.normalizePixivOutputRoot (cognitive 17) · ×1
  • novel-download-utils.normalizePixivOutputRoot (cognitive 17) clis/pixiv/novel-download-utils.js:58 — novel-download-utils.normalizePixivOutputRoot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 2 (3 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 · novel-download-utils.commitNovelFile (cognitive 17) · ×1
  • novel-download-utils.commitNovelFile (cognitive 17) clis/pixiv/novel-download-utils.js:180 — novel-download-utils.commitNovelFile has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.findAssistantAfterPrompt (cognitive 17) · ×1
  • utils.findAssistantAfterPrompt (cognitive 17) clis/qwen/utils.js:301 — utils.findAssistantAfterPrompt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · reply.normalizeRedditCommentFullname (cognitive 17) · ×1
  • reply.normalizeRedditCommentFullname (cognitive 17) clis/reddit/reply.js:17 — reply.normalizeRedditCommentFullname has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, error handling 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 · tweets.parseUserTweets · ×1
  • tweets.parseUserTweets::visit (cognitive 17) clis/twitter/tweets.js:58 — tweets.parseUserTweets::visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · book.extractReaderFallbackMetadata (cognitive 17) · ×1
  • book.extractReaderFallbackMetadata (cognitive 17) clis/weread/book.js:50 — book.extractReaderFallbackMetadata has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (4 pts), ternaries 3, loops 2 (nesting depth added 2). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (firstText, extractIntro, text, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · utils.yollomiPost (cognitive 17) · ×1
  • utils.yollomiPost (cognitive 17) clis/yollomi/utils.js:29 — utils.yollomiPost has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (9 pts), boolean chains 3, error handling 2 (3 pts), if/else 2 (nesting depth added 7). 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 · paginate.fetchZhihuList (cognitive 17) · ×1
  • paginate.fetchZhihuList (cognitive 17) clis/zhihu/paginate.js:89 — paginate.fetchZhihuList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SiteSlotScheduler.enqueue (cognitive 17) · ×1
  • SiteSlotScheduler.enqueue (cognitive 17) src/site-slots.ts:83 — SiteSlotScheduler.enqueue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SiteSlotScheduler.pump (cognitive 17) · ×1
  • SiteSlotScheduler.pump (cognitive 17) src/site-slots.ts:153 — SiteSlotScheduler.pump has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 7). 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 · retention.readTraceEntries (cognitive 17) · ×1
  • retention.readTraceEntries (cognitive 17) src/observation/retention.ts:141 — retention.readTraceEntries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (6 pts), error handling 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convention-audit.renderConventionAuditText (cognitive 17) · ×1
  • convention-audit.renderConventionAuditText (cognitive 17) src/convention-audit.ts:190 — convention-audit.renderConventionAuditText has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (5 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convention-audit.auditWriteDeletePair (cognitive 17) · ×1
  • convention-audit.auditWriteDeletePair (cognitive 17) src/convention-audit.ts:347 — convention-audit.auditWriteDeletePair has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · article-download.downloadArticle (cognitive 17) · ×1
  • article-download.downloadArticle (cognitive 17) src/download/article-download.ts:370 — article-download.downloadArticle has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · buildDeepResearchProgressResult (cognitive 17) · ×1
  • buildDeepResearchProgressResult (cognitive 17) clis/chatgpt/utils.js:1569 — buildDeepResearchProgressResult has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, ternaries 3, if/else 2, 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 · extractGoogleImageRows (cognitive 17) · ×1
  • extractGoogleImageRows (cognitive 17) clis/google/images.js:55 — extractGoogleImageRows has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 57, if/else 29 (35 pts), ternaries 11 (14 pts), loops 7 (8 pts), error handling 6 (7 pts) (nesting depth added 11). 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 · parseSearchTimeline · ×1
  • parseSearchTimeline::visit (cognitive 17) clis/twitter/search.js:237 — parseSearchTimeline::visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 2 (3 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 · buildSearchUrl (cognitive 17) · ×1
  • buildSearchUrl (cognitive 17) clis/51job/utils.js:210 — buildSearchUrl has cognitive complexity 17 (threshold 15). Drivers by points: other 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 · buildListAddMemberRow (cognitive 17) · ×1
  • buildListAddMemberRow (cognitive 17) clis/twitter/list-add-core.js:54 — buildListAddMemberRow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6, ternaries 4 (6 pts), boolean chains 4, other 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · parseProgressRows (cognitive 17) · ×1
  • parseProgressRows (cognitive 17) clis/xiaoyuzhou/history.js:106 — parseProgressRows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, 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 · utils.parseCompanyJobCard (cognitive 16) · ×1
  • utils.parseCompanyJobCard (cognitive 16) clis/51job/utils.js:279 — utils.parseCompanyJobCard has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3, 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 · utils.openProjectKnowledgeDialog (cognitive 16) · ×1
  • utils.openProjectKnowledgeDialog (cognitive 16) clis/chatgpt/utils.js:3268 — utils.openProjectKnowledgeDialog has cognitive complexity 16 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 3 (5 pts), boolean chains 2, 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 · cityResolver.extractCityIdFromPage (cognitive 16) · ×1
  • cityResolver.extractCityIdFromPage (cognitive 16) clis/dianping/cityResolver.js:166 — cityResolver.extractCityIdFromPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, error handling 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 · detail.resolveToId (cognitive 16) · ×1
  • detail.resolveToId (cognitive 16) clis/douyin/detail.js:38 — detail.resolveToId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 1 (3 pts), error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · images.extractGoogleImageRows · ×1
  • images.extractGoogleImageRows::parseImgresLink (cognitive 16) clis/google/images.js:233 — images.extractGoogleImageRows::parseImgresLink 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 · item.extractPriceFromDom (cognitive 16) · ×1
  • item.extractPriceFromDom (cognitive 16) REDACTED:408 — item.extractPriceFromDom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 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 · notifications.mapNotification (cognitive 16) · ×1
  • notifications.mapNotification (cognitive 16) clis/jike/notifications.js:48 — notifications.mapNotification has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 4 (5 pts) (nesting depth added 1). 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, 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 · generate-audio.parseAudioIdFromResult (cognitive 16) · ×1
  • generate-audio.parseAudioIdFromResult (cognitive 16) clis/notebooklm/generate-audio.js:33 — generate-audio.parseAudioIdFromResult has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (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 · generate-slides.parseSlidesIdFromResult (cognitive 16) · ×1
  • generate-slides.parseSlidesIdFromResult (cognitive 16) clis/notebooklm/generate-slides.js:35 — generate-slides.parseSlidesIdFromResult has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (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 · common.summarizeOnesError (cognitive 16) · ×1
  • common.summarizeOnesError (cognitive 16) clis/ones/common.js:44 — common.summarizeOnesError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, 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 · novel.novelRowFromBody (cognitive 16) · ×1
  • novel.novelRowFromBody (cognitive 16) clis/pixiv/novel.js:28 — novel.novelRowFromBody has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · collection.relationshipTarget (cognitive 16) · ×1
  • collection.relationshipTarget (cognitive 16) clis/twitter/collection.js:94 — collection.relationshipTarget has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (7 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 · download.downloadUserMedia (cognitive 16) · ×1
  • download.downloadUserMedia (cognitive 16) clis/twitter/download.js:345 — download.downloadUserMedia has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · list-add-core.listAddUser (cognitive 16) · ×1
  • list-add-core.listAddUser (cognitive 16) clis/twitter/list-add-core.js:104 — list-add-core.listAddUser has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6, error handling 1, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · tweets.extractTweet (cognitive 16) · ×1
  • tweets.extractTweet (cognitive 16) clis/twitter/tweets.js:19 — tweets.extractTweet has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · creator-note-detail.findMetricValue (cognitive 16) · ×1
  • creator-note-detail.findMetricValue (cognitive 16) clis/xiaohongshu/creator-note-detail.js:55 — creator-note-detail.findMetricValue 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 · answer-comments-helpers.resolveDepths (cognitive 16) · ×1
  • answer-comments-helpers.resolveDepths (cognitive 16) clis/zhihu/answer-comments-helpers.js:205 — answer-comments-helpers.resolveDepths has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 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 · cdp.scoreCDPTarget (cognitive 16) · ×1
  • cdp.scoreCDPTarget (cognitive 16) src/browser/cdp.ts:559 — cdp.scoreCDPTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. 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 · transform.stepMap (cognitive 16) · ×1
  • transform.stepMap (cognitive 16) src/pipeline/steps/transform.ts:24 — transform.stepMap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · retention.pruneTraceArtifacts (cognitive 16) · ×1
  • retention.pruneTraceArtifacts (cognitive 16) src/observation/retention.ts:80 — retention.pruneTraceArtifacts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 4, ternaries 1 (3 pts), error handling 1 (2 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 · adapter.normalizeVerifyRows (cognitive 16) · ×1
  • adapter.normalizeVerifyRows (cognitive 16) src/commands/adapter.ts:89 — adapter.normalizeVerifyRows has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · plugin-runtime.linkHostOpencli (cognitive 16) · ×1
  • plugin-runtime.linkHostOpencli (cognitive 16) src/plugin-runtime.ts:34 — plugin-runtime.linkHostOpencli has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (4 pts), boolean chains 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 · plugin.normalizePluginSource (cognitive 16) · ×1
  • plugin.normalizePluginSource (cognitive 16) REDACTED:116 — plugin.normalizePluginSource has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 3 (6 pts), boolean chains 3, match/switch 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 · plugin.updatePlugin (cognitive 16) · ×1
  • plugin.updatePlugin (cognitive 16) REDACTED:1119 — plugin.updatePlugin has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1138, 1180, 1193). 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 · buildUrl (cognitive 16) · ×1
  • buildUrl (cognitive 16) clis/ctrip/utils.js:139 — buildUrl has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 2, match/switch 1, other 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 · resolvePackageCity (cognitive 16) · ×1
  • resolvePackageCity (cognitive 16) clis/trip/utils.js:904 — resolvePackageCity has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), boolean chains 4, if/else 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · atlassianRequest (cognitive 16) · ×1
  • atlassianRequest (cognitive 16) clis/_atlassian/shared.js:161 — atlassianRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, other 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · collectProjectsFromUnknown (cognitive 16) · ×1
  • collectProjectsFromUnknown (cognitive 16) clis/gitee/trending.js:201 — collectProjectsFromUnknown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · harvestAnalyzeListCaptures (cognitive 16) · ×1
  • harvestAnalyzeListCaptures (cognitive 16) clis/xiaohongshu/creator-notes.js:184 — harvestAnalyzeListCaptures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts), other 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 · fetchLiveTags (cognitive 16) · ×1
  • fetchLiveTags (cognitive 16) clis/linux-do/feed.js:152 — fetchLiveTags has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (4 pts), other 2, ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 156, 164, 163, …). 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 · extractSubscriptionChannel (cognitive 16) · ×1
  • extractSubscriptionChannel (cognitive 16) clis/youtube/utils.js:151 — extractSubscriptionChannel has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 3. Of this number, 12 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · normalizePixivUserData (cognitive 16) · ×1
  • normalizePixivUserData (cognitive 16) clis/pixiv/utils.js:152 — normalizePixivUserData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 4, other 4, error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · resolveUserTimelineContext (cognitive 16) · ×1
  • resolveUserTimelineContext (cognitive 16) clis/twitter/user-timeline.js:154 — resolveUserTimelineContext has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 1 (2 pts), other 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 · mapRow (cognitive 16) · ×1
  • mapRow (cognitive 16) clis/slock/message-read.js:9 — mapRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8, other 7, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · searchFacebook (cognitive 16) · ×1
  • searchFacebook (cognitive 16) clis/facebook/search.js:140 — searchFacebook has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 4, ternaries 2 (4 pts), error handling 2, other 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency · Redundant and confusingly named evaluation methods. `evaluate` has two overloads (string vs function), `evaluateOnce` is a variant of string evaluation, and `evaluateWithArgs` duplicates the functionality of passing args to `evaluate` but with a different signature (Record vs spread args). This forces users to choose between inconsistent APIs for the same core browser capability. · ×1
  • Redundant and confusingly named evaluation methods. `evaluate` has two overloads (string vs function), `evaluateOnce` is a variant of string evaluation, and `evaluateWithArgs` duplicates the functionality of passing args to `evaluate` but with a different signature (Record vs spread args). This forces users to choose between inconsistent APIs for the same core browser capability. — Unify into a single `evaluate` method with a consistent signature, e.g., `evaluate<T>(fnOrCode: string | Function, ...args: unknown[]): Promise<T>`. Remove `evaluateOnce` and `evaluateWithArgs`. (signatures: IPage.evaluate(js: string): Promise<T> | IPage.evaluate(fn: BrowserEvaluateFunction<Args, T>, ...args: Args): Promise<Awaited<T>> | IPage.evaluateOnce(js: string): Promise<T> | IPage.evaluateWithArgs(js: string, args: Record<string, unknown>): Promise<any>)
D22 · Internal API Consistency · Duplicate intent with different names. `annotatedScreenshot` appears to be a specific mode of `screenshot` (likely adding visual annotations), but it is exposed as a separate top-level method rather than an option on the main `screenshot` method. · ×1
  • Duplicate intent with different names. `annotatedScreenshot` appears to be a specific mode of `screenshot` (likely adding visual annotations), but it is exposed as a separate top-level method rather than an option on the main `screenshot` method. — Merge into `screenshot(options?: ScreenshotOptions)` and add an `annotate?: boolean` option (which already exists in `ScreenshotOptions`). Remove `annotatedScreenshot`. (signatures: IPage.screenshot(options?: ScreenshotOptions): Promise<string> | IPage.annotatedScreenshot(options?: ScreenshotOptions): Promise<string>)
D22 · Internal API Consistency · Redundant waiting mechanisms. `sleep` is a simple wrapper around `wait` with a numeric argument. Exposing both creates confusion about which to use for simple delays. · ×1
  • Redundant waiting mechanisms. `sleep` is a simple wrapper around `wait` with a numeric argument. Exposing both creates confusion about which to use for simple delays. — Remove `sleep` and rely on `wait(seconds)` or `wait({ time: seconds })` for consistency. (signatures: IPage.wait(options: number | WaitOptions): Promise<void> | IPage.sleep(seconds: number): Promise<void>)
D22 · Internal API Consistency · Inconsistent action naming and return types. Actions like `click`, `dblClick`, `hover` return match metadata, while `setChecked` returns state changes, and `scrollTo` returns `any`. `typeText` and `fillText` are semantically similar but have different signatures and return types. `uploadFiles` and `setFileInput` are also semantically overlapping. · ×1
  • Inconsistent action naming and return types. Actions like `click`, `dblClick`, `hover` return match metadata, while `setChecked` returns state changes, and `scrollTo` returns `any`. `typeText` and `fillText` are semantically similar but have different signatures and return types. `uploadFiles` and `setFileInput` are also semantically overlapping. — Standardize action methods to return a consistent result object (e.g., `ActionResult`). Unify `typeText`/`fillText` into a single `fill` or `type` method. Unify `uploadFiles`/`setFileInput` into a single `setInputFiles` method. (signatures: IPage.click(ref: string, opts?): Promise<...> | IPage.dblClick(ref: string, opts?): Promise<...> | IPage.hover(ref: string, opts?): Promise<...> | IPage.focus(ref: string, opts?): Promise<...> | IPage.setChecked(ref: string, checked: boolean, opts?): Promise<...> | IPage.uploadFiles(ref: string, files: string[], opts?): Promise<...> | IPage.typeText(ref: string, text: string, opts?): Promise<...> | IPage.fillText(ref: string, text: string, opts?): Promise<...> | IPage.scrollTo(ref: string, opts?): Promise<any>)
D22 · Internal API Consistency · Fragmented cookie handling. `getCookies` retrieves cookies, but formatting/exporting them is split between utility functions in `index` and potentially other places. This scatters cookie-related logic. · ×1
  • Fragmented cookie handling. `getCookies` retrieves cookies, but formatting/exporting them is split between utility functions in `index` and potentially other places. This scatters cookie-related logic. — Move `exportCookiesToNetscape` and `formatCookieHeader` to a dedicated `CookieUtils` module or attach them as methods on a `Cookie` type or `IPage` if they are page-specific. Alternatively, keep them in utils but ensure the naming convention is consistent with other utility functions. (signatures: IPage.getCookies(opts?): Promise<BrowserCookie[]> | index.exportCookiesToNetscape(cookies: BrowserCookie[], filePath: string): void | index.formatCookieHeader(cookies: BrowserCookie[]): string)
D3 · God Classes · ClassTooLong · ×1
  • ClassTooLong: BasePage src/browser/base-page.ts:167 — ClassTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 375 over it, 1.94× 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.
D3 · God Classes · TooManyMethods · ×1
  • TooManyMethods: BasePage src/browser/base-page.ts:167 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. Most of these members implement types.IPage (32 of 48 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
D30 · Dependency Vulnerabilities · Medium CVE · ×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
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
IC1 · Incompleteness & stubs · Both branches are identical · ×1
  • Both branches are identical — the condition decides nothing clis/douyin/_shared/tos-upload.js:151 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
IC1 · Incompleteness & stubs · Guard cannot change the result · ×1
  • Guard cannot change the result — returns what the code already falls through to clis/eastmoney/_secid.js:13 — The guard above `return '0';` also returns `'0'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
P12 · CI test-gate honesty · Runner config excludes tests no gate runs · ×1
  • Runner config excludes tests no gate runs vitest.config.ts:13 — `clis/**/*.test.{ts,js}` removes 4433 test(s) in 437 file(s) (e.g. `clis/zsxq/utils.test.js`, `clis/zlibrary/commands.test.js`) from what vitest collects, and no other runner or CI command runs them — they are dead tests. Run them (another runner, project or job), or delete them.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 243 typed · 1760 plain JS — the untyped files are clis/12306/auth.js, clis/12306/me.js, clis/12306/orders.js, clis/12306/passengers.js, clis/12306/price.js, clis/12306/stations.js (+1754 more).
R10 · Code Duplication · Duplication concentrated across 161 sibling directories (383 clone groups) · ×1
  • Duplication concentrated across 161 sibling directories (383 clone groups) clis/claude/utils.js:15 — 383 duplicated blocks under clis/ have copies in at least two of the sibling directories 12306, 1688, 1point3acres, 36kr, 51job, _atlassian (+155 more sibling(s) not listed) — 230 of them are reported below, and 153 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 383 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 383 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 383 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (243 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (243 matched lines × 2 locations) clis/twitter/bookmarks.js:48 — clis/twitter/bookmarks.js:48 · clis/twitter/likes.js:64 — the two spans are one implementation copied and then locally edited — 1806 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (127 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (127 matched lines × 2 locations) clis/instagram/post.js:851 — clis/instagram/post.js:851 · clis/instagram/reel.js:222 — the two spans are one implementation copied and then locally edited — 746 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (124 identical lines × 2 files) · ×1
  • Wholesale file copy (124 identical lines × 2 files) REDACTED:15 — REDACTED:15 · REDACTED:15 — these 2 files are line-for-line copies of one another — 124 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 with local edits (122 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (122 matched lines × 2 locations) clis/claude/utils.js:15 — clis/claude/utils.js:15 · clis/deepseek/utils.js:32 — the two spans are one implementation copied and then locally edited — 791 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (106 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (106 matched lines × 2 locations) clis/hackernews/read.js:20 — clis/hackernews/read.js:20 · clis/lobsters/read.js:32 — the two spans are one implementation copied and then locally edited — 785 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (98 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (98 matched lines × 2 locations) clis/twitter/followers.js:8 — clis/twitter/followers.js:8 · clis/twitter/following.js:67 — the two spans are one implementation copied and then locally edited — 681 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (91 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (91 matched lines × 2 locations) clis/xiaohongshu/follow.js:23 — clis/xiaohongshu/follow.js:23 · clis/xiaohongshu/unfollow.js:19 — the two spans are one implementation copied and then locally edited — 544 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (81 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (81 matched lines × 2 locations) clis/xiaohongshu/comment-delete.js:96 — clis/xiaohongshu/comment-delete.js:96 · clis/xiaohongshu/comment.js:96 — the two spans are one implementation copied and then locally edited — 511 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (57 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (57 matched lines × 2 locations) clis/twitter/bookmark-folder.js:50 — clis/twitter/bookmark-folder.js:50 · clis/twitter/list-tweets.js:46 — the two spans are one implementation copied and then locally edited — 428 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) clis/twitter/thread.js:66 — clis/twitter/thread.js:66 · clis/twitter/timeline.js:90 — the two spans are one implementation copied and then locally edited — 344 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (53 identical lines × 2 files) · ×1
  • Wholesale file copy (53 identical lines × 2 files) clis/trip/flight-round.js:9 — clis/trip/flight-round.js:9 · clis/trip/flight.js:9 — these 2 files are line-for-line copies of one another — 53 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 (52 lines × 2 locations) · ×1
  • Duplicated block (52 lines × 2 locations) clis/chaoxing/assignments.js:24 — clis/chaoxing/assignments.js:24 · clis/chaoxing/exams.js:23 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (52 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (52 matched lines × 2 locations) clis/claude/ask.js:40 — clis/claude/ask.js:40 · clis/deepseek/ask.js:46 — the two spans are one implementation copied and then locally edited — 382 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (50 lines × 2 locations) · ×1
  • Duplicated block (50 lines × 2 locations) clis/bilibili/follow.js:20 — clis/bilibili/follow.js:20 · clis/bilibili/unfollow.js:12 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (47 matched lines × 2 locations) clis/autohome/utils.js:79 — clis/autohome/utils.js:79 · clis/guazi/utils.js:66 — the two spans are one implementation copied and then locally edited — 309 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) clis/hf/datasets.js:25 — clis/hf/datasets.js:25 · clis/hf/models.js:26 — 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 (46 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (46 matched lines × 2 locations) clis/twitter/download.js:99 — clis/twitter/download.js:99 · clis/twitter/user-timeline.js:82 — the two spans are one implementation copied and then locally edited — 269 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) clis/facebook/feed.js:4 — clis/facebook/feed.js:4 · clis/facebook/search.js:4 — the two spans are one implementation copied and then locally edited — 251 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) clis/hupu/like.js:32 — clis/hupu/like.js:32 · clis/hupu/unlike.js:32 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (43 lines × 2 locations) · ×1
  • Duplicated block (43 lines × 2 locations) clis/chatgpt/utils.js:520 — clis/chatgpt/utils.js:520 · clis/chatgpt/utils.js:1756 — 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 (42 lines × 3 locations) · ×1
  • Duplicated block (42 lines × 3 locations) clis/ctrip/bus.js:39 — clis/ctrip/bus.js:39 · clis/ctrip/ferry.js:40 · clis/ctrip/train.js:39 — the 3 copies are spread across 3 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 (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) clis/linkedin/profile-experience.js:609 — clis/linkedin/profile-experience.js:609 · clis/linkedin/profile-projects.js:252 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (38 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (38 matched lines × 2 locations) clis/aibase/news.js:4 — clis/aibase/news.js:4 · clis/uisdc/news.js:4 — the two spans are one implementation copied and then locally edited — 297 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (38 lines × 2 locations) · ×1
  • Duplicated block (38 lines × 2 locations) clis/twitter/search.js:50 — clis/twitter/search.js:50 · clis/twitter/user-timeline.js:16 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
R10 · Code Duplication · Duplicated block (35 lines × 2 locations) · ×1
  • Duplicated block (35 lines × 2 locations) clis/ctrip/package.js:39 — clis/ctrip/package.js:39 · clis/ctrip/tour.js:39 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (35 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (35 matched lines × 2 locations) clis/rednote/note.js:25 — clis/rednote/note.js:25 · clis/xiaohongshu/note.js:77 — the two spans are one implementation copied and then locally edited — 279 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (35 lines × 3 locations) · ×1
  • Duplicated block (35 lines × 3 locations) clis/twitter/list-tweets.js:9 — clis/twitter/list-tweets.js:9 · clis/twitter/lists.js:7 · clis/twitter/timeline.js:13 — the 3 copies are spread across 3 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) clis/coingecko/categories.js:38 — clis/coingecko/categories.js:38 · clis/coingecko/exchanges.js:36 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R2 · Cyclomatic Complexity · Complex function func (cyclomatic 100, cognitive 125) · ×1
  • Complex function func (cyclomatic 100, cognitive 125) clis/midjourney/action.js:147 — func has cyclomatic complexity 100 and cognitive complexity 125; 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 getChatGPTDeepResearchResult (cyclomatic 80, cognitive 119) · ×1
  • Complex function getChatGPTDeepResearchResult (cyclomatic 80, cognitive 119) clis/chatgpt/utils.js:1920 — getChatGPTDeepResearchResult has cyclomatic complexity 80 and cognitive complexity 119; 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 func (cyclomatic 74, cognitive 96) · ×1
  • Complex function func (cyclomatic 74, cognitive 96) clis/twitter/likes.js:207 — func has cyclomatic complexity 74 and cognitive complexity 96; 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 formatSnapshot (cyclomatic 70, cognitive 140) · ×1
  • Complex function formatSnapshot (cyclomatic 70, cognitive 140) src/snapshotFormatter.ts:197 — formatSnapshot has cyclomatic complexity 70 and cognitive complexity 140; 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 66, cognitive 99) · ×1
  • Complex function (anonymous) (cyclomatic 66, cognitive 99) src/commands/browser.ts:1891 — (anonymous) has cyclomatic complexity 66 and cognitive complexity 99; 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 resolveGenerationPlan (cyclomatic 66, cognitive 67) · ×1
  • Complex function resolveGenerationPlan (cyclomatic 66, cognitive 67) REDACTED:137 — resolveGenerationPlan has cyclomatic complexity 66 and cognitive complexity 67; 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 fetchRankedRedditSearch (cyclomatic 62, cognitive 105) · ×1
  • Complex function fetchRankedRedditSearch (cyclomatic 62, cognitive 105) clis/reddit/web-search.js:2 — fetchRankedRedditSearch has cyclomatic complexity 62 and cognitive complexity 105; 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 func (cyclomatic 62, cognitive 76) · ×1
  • Complex function func (cyclomatic 62, cognitive 76) clis/twitter/bookmarks.js:188 — func has cyclomatic complexity 62 and cognitive complexity 76; 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 handleRequest (cyclomatic 60, cognitive 93) · ×1
  • Complex function handleRequest (cyclomatic 60, cognitive 93) src/daemon.ts:262 — handleRequest has cyclomatic complexity 60 and cognitive complexity 93; 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 func (cyclomatic 56, cognitive 72) · ×1
  • Complex function func (cyclomatic 56, cognitive 72) clis/xiaohongshu/publish.js:1180 — func has cyclomatic complexity 56 and cognitive complexity 72; 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 fetchAdapters (cyclomatic 53, cognitive 87) · ×1
  • Complex function fetchAdapters (cyclomatic 53, cognitive 87) scripts/fetch-adapters.js:101 — fetchAdapters has cyclomatic complexity 53 and cognitive complexity 87; 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 applyFilter (cyclomatic 52, cognitive 55) · ×1
  • Complex function applyFilter (cyclomatic 52, cognitive 55) src/pipeline/template.ts:75 — applyFilter has cyclomatic complexity 52 and cognitive complexity 55; 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 extractAnswer (cyclomatic 51, cognitive 41) · ×1
  • Complex function extractAnswer (cyclomatic 51, cognitive 41) clis/zhihu/download-helpers.js:145 — extractAnswer has cyclomatic complexity 51 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 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 requestInPage (cyclomatic 47, cognitive 47) · ×1
  • Complex function requestInPage (cyclomatic 47, cognitive 47) clis/proton/helpers.js:15 — requestInPage has cyclomatic complexity 47 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 sendCommandRaw (cyclomatic 45, cognitive 61) · ×1
  • Complex function sendCommandRaw (cyclomatic 45, cognitive 61) src/browser/daemon-client.ts:352 — sendCommandRaw has cyclomatic complexity 45 and cognitive complexity 61; 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 func (cyclomatic 44, cognitive 69) · ×1
  • Complex function func (cyclomatic 44, cognitive 69) clis/gemini/ask.js:97 — func has cyclomatic complexity 44 and cognitive complexity 69; 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 func (cyclomatic 43, cognitive 59) · ×1
  • Complex function func (cyclomatic 43, cognitive 59) clis/douyin/publish.js:111 — func has cyclomatic complexity 43 and cognitive complexity 59; 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 func (cyclomatic 43, cognitive 43) · ×1
  • Complex function func (cyclomatic 43, cognitive 43) clis/bilibili/video.js:43 — func has cyclomatic complexity 43 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 executeUiInstagramPost (cyclomatic 42, cognitive 118) · ×1
  • Complex function executeUiInstagramPost (cyclomatic 42, cognitive 118) clis/instagram/post.js:163 — executeUiInstagramPost has cyclomatic complexity 42 and cognitive complexity 118; 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 func (cyclomatic 40, cognitive 54) · ×1
  • Complex function func (cyclomatic 40, cognitive 54) clis/deepseek/ask.js:30 — func has cyclomatic complexity 40 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.
R3 · Large Files · clis/chatgpt/utils.js · ×1
  • clis/chatgpt/utils.js: 3477 lines of code clis/chatgpt/utils.js:1 — clis/chatgpt/utils.js has 3477 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 · clis/gemini/utils.js · ×1
  • clis/gemini/utils.js: 2596 lines of code clis/gemini/utils.js:1 — clis/gemini/utils.js has 2596 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/commands/browser.ts · ×1
  • src/commands/browser.ts: 2022 lines of code src/commands/browser.ts:1 — src/commands/browser.ts has 2022 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 · clis/instagram/post.js · ×1
  • clis/instagram/post.js: 1444 lines of code clis/instagram/post.js:1 — clis/instagram/post.js has 1444 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 · clis/xiaohongshu/publish.js · ×1
  • clis/xiaohongshu/publish.js: 1440 lines of code clis/xiaohongshu/publish.js:1 — clis/xiaohongshu/publish.js has 1440 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 · clis/midjourney/utils.js · ×1
  • clis/midjourney/utils.js: 1406 lines of code clis/midjourney/utils.js:1 — clis/midjourney/utils.js has 1406 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: 1353 lines of code REDACTED:1 — REDACTED has 1353 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/browser/base-page.ts · ×1
  • src/browser/base-page.ts: 1250 lines of code src/browser/base-page.ts:1 — src/browser/base-page.ts has 1250 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 · clis/doubao/utils.js · ×1
  • clis/doubao/utils.js: 1089 lines of code clis/doubao/utils.js:1 — clis/doubao/utils.js has 1089 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 · clis/ctrip/utils.js · ×1
  • clis/ctrip/utils.js: 1032 lines of code clis/ctrip/utils.js:1 — clis/ctrip/utils.js has 1032 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: 1027 lines of code REDACTED:1 — REDACTED has 1027 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 · clis/xiaohongshu/search.js · ×1
  • clis/xiaohongshu/search.js: 1027 lines of code clis/xiaohongshu/search.js:1 — clis/xiaohongshu/search.js has 1027 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 · clis/trip/utils.js · ×1
  • clis/trip/utils.js: 959 lines of code clis/trip/utils.js:1 — clis/trip/utils.js has 959 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 · clis/notebooklm/utils.js · ×1
  • clis/notebooklm/utils.js: 866 lines of code clis/notebooklm/utils.js:1 — clis/notebooklm/utils.js has 866 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/browser/dom-snapshot.ts · ×1
  • src/browser/dom-snapshot.ts: 840 lines of code src/browser/dom-snapshot.ts:1 — src/browser/dom-snapshot.ts has 840 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 · clis/instagram/reel.js · ×1
  • clis/instagram/reel.js: 802 lines of code clis/instagram/reel.js:1 — clis/instagram/reel.js has 802 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: 785 lines of code REDACTED:1 — REDACTED has 785 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: 725 lines of code REDACTED:1 — REDACTED has 725 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/execution.ts · ×1
  • src/execution.ts: 658 lines of code src/execution.ts:1 — src/execution.ts has 658 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 · clis/wechat-channels/publish.js · ×1
  • clis/wechat-channels/publish.js: 656 lines of code clis/wechat-channels/publish.js:1 — clis/wechat-channels/publish.js has 656 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/browser/target-resolver.ts · ×1
  • src/browser/target-resolver.ts: 650 lines of code src/browser/target-resolver.ts:1 — src/browser/target-resolver.ts has 650 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 · clis/linkedin/profile-experience.js · ×1
  • clis/linkedin/profile-experience.js: 643 lines of code clis/linkedin/profile-experience.js:1 — clis/linkedin/profile-experience.js has 643 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: 642 lines of code REDACTED:1 — REDACTED has 642 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 · clis/douban/utils.js · ×1
  • clis/douban/utils.js: 636 lines of code clis/douban/utils.js:1 — clis/douban/utils.js has 636 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/daemon.ts · ×1
  • src/daemon.ts: 636 lines of code src/daemon.ts:1 — src/daemon.ts has 636 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: 634 lines of code REDACTED:1 — REDACTED 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 · clis/youtube/transcript.js · ×1
  • clis/youtube/transcript.js: 612 lines of code clis/youtube/transcript.js:1 — clis/youtube/transcript.js has 612 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 · clis/twitter/shared.js · ×1
  • clis/twitter/shared.js: 591 lines of code clis/twitter/shared.js:1 — clis/twitter/shared.js has 591 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 · clis/gmail/utils.js · ×1
  • clis/gmail/utils.js: 578 lines of code clis/gmail/utils.js:1 — clis/gmail/utils.js has 578 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/browser/cdp.ts · ×1
  • src/browser/cdp.ts: 569 lines of code src/browser/cdp.ts:1 — src/browser/cdp.ts has 569 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/convention-audit.ts · ×1
  • src/convention-audit.ts: 567 lines of code src/convention-audit.ts:1 — src/convention-audit.ts has 567 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: 557 lines of code REDACTED:1 — REDACTED has 557 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/help.ts · ×1
  • src/help.ts: 557 lines of code src/help.ts:1 — src/help.ts has 557 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 · clis/reddit/read.js · ×1
  • clis/reddit/read.js: 546 lines of code clis/reddit/read.js:1 — clis/reddit/read.js has 546 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 · clis/gitee/trending.js · ×1
  • clis/gitee/trending.js: 542 lines of code clis/gitee/trending.js:1 — clis/gitee/trending.js has 542 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 · clis/_atlassian/shared.js · ×1
  • clis/_atlassian/shared.js: 528 lines of code clis/_atlassian/shared.js:1 — clis/_atlassian/shared.js has 528 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 · clis/suno/utils.js · ×1
  • clis/suno/utils.js: 501 lines of code clis/suno/utils.js:1 — clis/suno/utils.js has 501 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/browser/daemon-client.ts · ×1
  • src/browser/daemon-client.ts: 495 lines of code src/browser/daemon-client.ts:1 — src/browser/daemon-client.ts has 495 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 · clis/linkedin/timeline.js · ×1
  • clis/linkedin/timeline.js: 494 lines of code clis/linkedin/timeline.js:1 — clis/linkedin/timeline.js has 494 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 · clis/linkedin/connect.js · ×1
  • clis/linkedin/connect.js: 493 lines of code clis/linkedin/connect.js:1 — clis/linkedin/connect.js has 493 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~656 LoC) · ×1
  • Dead file (~656 LoC) clis/youtube/transcript.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~568 LoC) · ×1
  • Dead file (~568 LoC) clis/gitee/trending.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (clis/gitee/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~358 LoC) · ×1
  • Dead file (~358 LoC) clis/hltv/player-duel.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~332 LoC) · ×1
  • Dead file (~332 LoC) clis/spotify/spotify.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~319 LoC) · ×1
  • Dead file (~319 LoC) clis/hupu/utils.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 6 in-repo import(s) from 6 other file(s) do name it (clis/hupu/detail.js, clis/hupu/like.js, clis/hupu/mentions.js and 3 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~304 LoC) · ×1
  • Dead file (~304 LoC) clis/mubu/utils.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (clis/mubu/doc.js, clis/mubu/docs.js, clis/mubu/notes.js and 2 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~258 LoC) · ×1
  • Dead file (~258 LoC) clis/bilibili/feed.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~247 LoC) · ×1
  • Dead file (~247 LoC) clis/1point3acres/utils.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 9 in-repo import(s) from 9 other file(s) do name it (clis/1point3acres/digest.js, clis/1point3acres/forum.js, clis/1point3acres/forums.js and 6 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~245 LoC) · ×1
  • Dead file (~245 LoC) clis/mubu/notes.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~234 LoC) · ×1
  • Dead file (~234 LoC) clis/deepseek/usage.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~208 LoC) · ×1
  • Dead file (~208 LoC) clis/barchart/greeks.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~206 LoC) · ×1
  • Dead file (~206 LoC) clis/youtube/video.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~200 LoC) · ×1
  • Dead file (~200 LoC) clis/gitee/user.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (clis/gitee/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~196 LoC) · ×1
  • Dead file (~196 LoC) clis/lobsters/read.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~192 LoC) · ×1
  • Dead file (~192 LoC) clis/maimai/search-talents.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~188 LoC) · ×1
  • Dead file (~188 LoC) clis/hackernews/read.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~183 LoC) · ×1
  • Dead file (~183 LoC) clis/twitter/reply-dm.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~180 LoC) · ×1
  • Dead file (~180 LoC) clis/yollomi/utils.js — no import path from any entry point (73 application, 22 tooling, 590 test roots considered), but 12 in-repo import(s) from 12 other file(s) do name it (clis/yollomi/background.js, clis/yollomi/edit.js, clis/yollomi/face-swap.js and 9 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~179 LoC) · ×1
  • Dead file (~179 LoC) clis/qwen/image.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~176 LoC) · ×1
  • Dead file (~176 LoC) clis/band/post.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~173 LoC) · ×1
  • Dead file (~173 LoC) clis/bilibili/creator-stats.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~171 LoC) · ×1
  • Dead file (~171 LoC) clis/weread/ai-outline.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~168 LoC) · ×1
  • Dead file (~168 LoC) clis/github-trending/repos.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~167 LoC) · ×1
  • Dead file (~167 LoC) clis/bilibili/summary.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~150 LoC) · ×1
  • Dead file (~150 LoC) clis/boss/resume.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~147 LoC) · ×1
  • Dead file (~147 LoC) clis/bilibili/subtitle.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~146 LoC) · ×1
  • Dead file (~146 LoC) clis/hltv/team-map-pool.js — no import path from any entry point (73 application, 22 tooling, 590 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 (~139 LoC) · ×1
  • Dead file (~139 LoC) clis/rednote/notifications.js — no import path from any entry point (73 application, 22 tooling, 590 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
Minor — 345 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×111
  • Orphaned file clis/gemini/models.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/weread/book-search.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/hltv/player-duel.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/xianyu/im.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/mercury/utils.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/upwork/utils.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/slock/in-page.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/xiaohongshu/collection-helpers.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/mubu/utils.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/geogebra/utils.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/youdao/note.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/deepseek/usage.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/linkedin/salesnav-thread.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/weibo/user-posts.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/slock/message-read.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/session-lease.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/slock/message-send.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/powerchina/search.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/reddit/reply.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/mubu/notes.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/autohome/utils.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/mercury/reimbursement-draft.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/bilibili/summary.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/weixin/search.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file clis/dongchedi/utils.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 86 more in this group — see findings.md.
M4 · Documentation accuracy · README/code drift · ×40
  • README/code drift docs/advanced/rate-limiter-plugin.md:21 — docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_RATE_MIN`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/advanced/rate-limiter-plugin.md:22 — docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_RATE_MAX`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/advanced/rate-limiter-plugin.md:23 — docs/advanced/rate-limiter-plugin.md documents the environment variable `OPENCLI_NO_RATE`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/developer/architecture.md:58 — docs/developer/architecture.md names `src/pipeline/transform.ts`, but no file or folder `src/pipeline/transform.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/developer/contributing.md:72 — docs/developer/contributing.md links to `./ts-adapter`, but `docs/developer/ts-adapter` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/developer/documentation-audit-2026-05.md:74 — docs/developer/documentation-audit-2026-05.md names `clis/twitter/timeline.test.ts`, but no file or folder `clis/twitter/timeline.test.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/developer/documentation-audit-2026-05.md:75 — docs/developer/documentation-audit-2026-05.md names `clis/reddit/read.test.ts`, but no file or folder `clis/reddit/read.test.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/developer/documentation-audit-2026-05.md:76 — docs/developer/documentation-audit-2026-05.md names `clis/bilibili/dynamic.test.ts`, but no file or folder `clis/bilibili/dynamic.test.ts` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/developer/documentation-audit-2026-05.md:116 — docs/developer/documentation-audit-2026-05.md names `src/clis/`, but no file or folder `src/clis` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/developer/ts-adapter.md:257 — docs/developer/ts-adapter.md links to `/developer/ai-workflow`, but `developer/ai-workflow` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/agent-browser-alternative.md:31 — docs/guide/agent-browser-alternative.md links to `./browser-bridge`, but `docs/guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/agent-browser-alternative.md:80 — docs/guide/agent-browser-alternative.md links to `./getting-started`, but `docs/guide/getting-started` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/agent-browser-alternative.md:80 — docs/guide/agent-browser-alternative.md links to `../comparison`, but `docs/comparison` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/agent-browser-alternative.md:80 — docs/guide/agent-browser-alternative.md links to `./extending-opencli`, but `docs/guide/extending-opencli` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/browser-bridge.md:140 — docs/guide/browser-bridge.md links to `/guide/remote-orchestration`, but `guide/remote-orchestration` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/getting-started.md:10 — docs/guide/getting-started.md links to `/adapters/`, but `adapters` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/getting-started.md:33 — docs/guide/getting-started.md links to `./browser-bridge`, but `docs/guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/getting-started.md:94 — docs/guide/getting-started.md links to `/guide/installation`, but `guide/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/getting-started.md:95 — docs/guide/getting-started.md links to `/guide/browser-bridge`, but `guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/getting-started.md:96 — docs/guide/getting-started.md links to `/guide/extending-opencli`, but `guide/extending-opencli` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/getting-started.md:97 — docs/guide/getting-started.md links to `/guide/plugins`, but `guide/plugins` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/getting-started.md:99 — docs/guide/getting-started.md links to `/developer/contributing`, but `developer/contributing` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/guide/installation.md:16 — docs/guide/installation.md links to `./browser-bridge`, but `docs/guide/browser-bridge` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/zh/comparison.md:10 — docs/zh/comparison.md links to `./guide/agent-browser-alternative`, but `docs/zh/guide/agent-browser-alternative` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/zh/comparison.md:10 — docs/zh/comparison.md links to `../comparison`, but `docs/comparison` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • + 15 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×40
  • Console output used as the logging channel clis/boss/utils.js:294 — `clis/boss/utils.js` reports through `console.*` at line 294 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/chatgpt/utils.js:72 — `clis/chatgpt/utils.js` reports through `console.*` at line 72 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/instagram/download.js:366 — `clis/instagram/download.js` reports through `console.*` at line 366 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/linkedin/search.js:331 — `clis/linkedin/search.js` reports through `console.*` at line 331 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/linkedin/search.js:334 — `clis/linkedin/search.js` reports through `console.*` at line 334 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/linkedin/search.js:389 — `clis/linkedin/search.js` reports through `console.*` at line 389 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/notebooklm/open.js:34 — `clis/notebooklm/open.js` reports through `console.*` at line 34 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/ones/login.js:64 — `clis/ones/login.js` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/spotify/spotify.js:170 — `clis/spotify/spotify.js` reports through `console.*` at line 170 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/spotify/spotify.js:171 — `clis/spotify/spotify.js` reports through `console.*` at line 171 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/twitter/utils.js:155 — `clis/twitter/utils.js` reports through `console.*` at line 155 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/notifications.js:22 — `clis/v2ex/notifications.js` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/me.js:20 — `clis/v2ex/me.js` reports through `console.*` at line 20 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/me.js:30 — `clis/v2ex/me.js` reports through `console.*` at line 30 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/me.js:93 — `clis/v2ex/me.js` reports through `console.*` at line 93 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/me.js:94 — `clis/v2ex/me.js` reports through `console.*` at line 94 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/daily.js:20 — `clis/v2ex/daily.js` reports through `console.*` at line 20 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/daily.js:30 — `clis/v2ex/daily.js` reports through `console.*` at line 30 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/daily.js:58 — `clis/v2ex/daily.js` reports through `console.*` at line 58 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/daily.js:59 — `clis/v2ex/daily.js` reports through `console.*` at line 59 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/v2ex/daily.js:68 — `clis/v2ex/daily.js` reports through `console.*` at line 68 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/xiaohongshu/publish.js:189 — `clis/xiaohongshu/publish.js` reports through `console.*` at line 189 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel clis/youtube/transcript.js:460 — `clis/youtube/transcript.js` reports through `console.*` at line 460 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/output.ts:45 — `src/output.ts` reports through `console.*` at line 45 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel src/output.ts:63 — `src/output.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 15 more in this group — see findings.md.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×40
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:97 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:136 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:147 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:152 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:157 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:159 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:166 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:168 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:170 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:186 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:217 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:221 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:226 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/utils.js:230 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/user.js:35 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/user.js:51 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/user.js:52 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:67 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:70 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:71 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:72 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:86 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:87 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:90 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex clis/1point3acres/thread.js:106 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×40
  • Silent fallback default in catch clis/12306/trains.js:32 — `extractQueryEndpoint` 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 REDACTED:453 — `normalizeMediaUrl` 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 clis/1point3acres/utils.js:90 — `getCookie` 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 clis/_shared/search-adapter.js:54 — `toHttpsUrl` 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 clis/bilibili/relation.js:14 — `parseSpaceMidUrl` 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 clis/bloomberg/businessweek.js:22 — `normalizeBusinessweekStoryPath` 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 clis/chatgpt/utils.js:248 — `projectIdFromUrl` 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 clis/chatgpt/utils.js:313 — `activateChatGPTSessionTab` 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 clis/coupang/utils.js:132 — `canonicalizeProductUrl` 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 clis/douyin/_shared/vod-upload.js:91 — `extractUserIdFromSessionToken` 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 clis/douyin/search.js:96 — `extractDouyinVideoId` 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 clis/dribbble/utils.js:143 — `extractShotRows` 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 clis/duckduckgo/search.js:19 — `decodeDdgUrl` 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 clis/gemini/utils.js:1109 — `ensureGeminiPage` 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 clis/google/images.js:83 — `cleanHttpUrl` (in `extractGoogleImageRows`) 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 clis/google/images.js:92 — `sourceName` (in `extractGoogleImageRows`) 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 REDACTED:448 — `fetchJdPrice` 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 REDACTED:130 — `extractNoticeId` 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 REDACTED:205 — `toAbsoluteJianyuUrl` 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 REDACTED:341 — `unwrapDuckDuckGoUrl` 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 clis/kimi/_utils.js:54 — `parseChatId` 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 clis/linkedin/shared.js:32 — `canonicalizeLinkedInThreadUrl` 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 clis/linkedin/shared.js:45 — `normalizeHttpUrl` 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 clis/linkedin/connect.js:64 — `canonicalizeLinkedInProfileUrl` 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 clis/linkedin/connect.js:97 — `canonicalizeLinkedInInviteUrl` 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.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate clis/gemini/models.js:6 — `!!value && typeof value === 'object' && !Array.isArray(value)` appears character-identically in 2 files — clis/gemini/models.js, clis/gemini/utils.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 clis/weread/book.js:207 — `!(error instanceof CliError) || error.code !== 'AUTH_REQUIRED'` appears character-identically in 2 files — clis/weread/book.js, clis/weread/shelf.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 clis/linkedin/profile-experience.js:27 — `!/^\/in\/[^/?#]+\/?$/.test(parsed.pathname) || parsed.pathname === '/in/me/'` appears character-identically in 2 files — clis/linkedin/profile-experience.js, clis/linkedin/profile-projects.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 clis/defillama/protocols.js:28 — `!Array.isArray(list) || list.length === 0` appears character-identically in 2 files — clis/defillama/protocols.js, clis/tvmaze/search.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 clis/facebook/notifications.js:301 — `!Array.isArray(rows) || rows.length === 0` appears character-identically in 15 files — clis/facebook/notifications.js, clis/gov-policy/utils.js, clis/hupu/hot.js, clis/tiktok/comment.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 clis/gemini/detail.js:70 — `!Array.isArray(turns) || turns.length === 0` appears character-identically in 2 files — clis/gemini/detail.js, clis/gemini/read.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 clis/douyin/search.js:55 — `!Number.isFinite(parsed) || !Number.isInteger(parsed)` appears character-identically in 13 files — clis/douyin/search.js, clis/linkedin/search.js, clis/rednote/comments.js, clis/rednote/notifications.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 clis/sinafinance/rolling-news.js:19 — `!Number.isFinite(seconds) || seconds <= 0` appears character-identically in 4 files — clis/sinafinance/rolling-news.js, clis/tiktok/creator-videos.js, clis/toutiao/utils.js, clis/weread-official/utils.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 clis/twitter/collection.js:79 — `!Number.isInteger(delay) || delay < 0 || delay > 60` appears character-identically in 2 files — clis/twitter/collection.js, clis/twitter/tweets.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 clis/reddit/search.js:130 — `!Number.isInteger(limit) || limit < 1 || limit > 1000` appears character-identically in 3 files — clis/reddit/search.js, clis/twitter/download.js, clis/xiaohongshu/user.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 clis/chess/games.js:15 — `!Number.isInteger(limit) || limit < 1 || limit > MAX_LIMIT` appears character-identically in 5 files — clis/chess/games.js, clis/linkedin-learning/shared.js, clis/linkedin/people-search.js, clis/linkedin/salesnav-inbox.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 clis/barchart/greeks.js:35 — `!Number.isInteger(limit) || limit < MIN_LIMIT || limit > MAX_LIMIT` appears character-identically in 2 files — clis/barchart/greeks.js, clis/linkedin/inbox.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 clis/bilibili/comments.js:19 — `!Number.isInteger(limit) || limit <= 0 || limit > MAX_LIMIT` appears character-identically in 3 files — clis/bilibili/comments.js, clis/zhihu/paginate.js, clis/zhihu/search.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 clis/facebook/feed.js:9 — `!Number.isInteger(n) || n < 1 || n > MAX_LIMIT` appears character-identically in 2 files — clis/facebook/feed.js, clis/facebook/search.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 clis/autohome/utils.js:100 — `!Number.isInteger(n) || n < 1 || n > max` appears character-identically in 4 files — clis/autohome/utils.js, clis/dongchedi/utils.js, clis/guazi/utils.js, clis/openfda/utils.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 clis/linkedin/shared.js:114 — `!Number.isInteger(parsed) || parsed < 1 || parsed > max` appears character-identically in 2 files — clis/linkedin/shared.js, clis/proton/helpers.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 clis/minimax/music.js:50 — `!Number.isInteger(parsed) || parsed < min || parsed > max` appears character-identically in 2 files — clis/minimax/music.js, clis/xiaohongshu/ask.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 clis/pinterest/utils.js:29 — `!Number.isInteger(parsed) || parsed <= 0` appears character-identically in 5 files — clis/pinterest/utils.js, clis/tiktok/creator-videos.js, clis/tiktok/utils.js, src/commands/auth.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate clis/chatgpt/image.js:88 — `!Number.isInteger(timeout) || timeout < 1` appears character-identically in 6 files — clis/chatgpt/image.js, clis/doubao/ask.js, clis/gemini/ask.js, clis/gemini/deep-research.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 clis/chatgpt/ask-file.js:65 — `!Number.isInteger(timeout) || timeout <= 0` appears character-identically in 3 files — clis/chatgpt/ask-file.js, clis/qwen/ask.js, clis/qwen/image.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 clis/nowcoder/posts.js:94 — `!Number.isSafeInteger(value) || value < 0` appears character-identically in 5 files — clis/nowcoder/posts.js, clis/pixiv/bookmark-utils.js, clis/pixiv/novel-download-utils.js, clis/pixiv/novel.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 clis/linkedin/profile-experience.js:613 — `!args['profile-url'] || new URL(profileUrl).pathname === '/in/me/'` appears character-identically in 2 files — clis/linkedin/profile-experience.js, clis/linkedin/profile-projects.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 clis/pixiv/detail.js:6 — `!body || Array.isArray(body) || typeof body !== 'object'` appears character-identically in 4 files — clis/pixiv/detail.js, clis/pixiv/novel-download-utils.js, clis/pixiv/novel.js, clis/pixiv/user.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 clis/flathub/app.js:48 — `!body || typeof body !== 'object' || !body.id` appears character-identically in 2 files — clis/flathub/app.js, clis/hf/paper.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 clis/bilibili/comments.js:51 — `!data || typeof data !== 'object' || Array.isArray(data)` appears character-identically in 8 files — clis/bilibili/comments.js, clis/bilibili/summary.js, clis/eastmoney/convertible.js, clis/kimi/usage.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.
D29 · Static Analysis (SAST) · REDACTED · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · Mock-dominated test · ×16
  • Mock-dominated test: selects the correct radio for each model clis/deepseek/utils.test.js:208 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: removes the default photo cap when scanning for an exact photo id clis/douban/utils.test.js:150 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses browser cookies to build instagram private api requests clis/instagram/_shared/protocol-capture.test.js:81 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: merges host-only main-domain cookies into private API requests clis/weread/private-api-regression.test.js:39 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: prefers API-subdomain cookies over main-domain cookies on name collision clis/weread/private-api-regression.test.js:66 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses the parsed user slug for user follow API calls clis/zhihu/follow.test.js:16 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: keeps the existing column article flow and its URL-derived image extensions clis/zhihu/download.test.js:85 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: derives the CDP deadline from cmd.timeout for exec (timeout*1000 - 5s, floor 10s) extension/src/background.test.ts:579 — This test sets up 14 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: applies the user --timeout arg as the ceiling for browser commands (with +30s padding) src/execution.test.ts:136 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: falls back to DEFAULT_BROWSER_COMMAND_TIMEOUT for browser commands without a --timeout arg src/execution.test.ts:166 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: skips repeated domain pre-navigation for persistent site sessions src/execution.test.ts:340 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: keeps explicit path pre-navigation for persistent site sessions src/execution.test.ts:370 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: skips closeWindow when --keep-tab=true (success path) src/execution.test.ts:514 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: releases the lease after a successful persistent write src/execution.test.ts:825 — This test sets up 4 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: logs a warning for each failed batch item in non-browser mode src/pipeline/steps/fetch.test.ts:140 — This test sets up 3 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: logs a warning for each failed batch item in browser mode src/pipeline/steps/fetch.test.ts:163 — This test sets up 4 test doubles (for example `vi.spyOn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 84 significant file(s) lose their only recent owner: REDACTED, src/browser/target-resolver.ts, src/help.ts, clis/coupang/search.js, src/convention-audit.ts, src/commands/auth.ts, clis/linkedin/search.js, clis/tiktok/utils.js (+76 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: clis/amazon/shared.js, clis/instagram/_shared/post-like.js, clis/douyin/hashtag.js, clis/toutiao/recommend.js, clis/nowcoder/auth.js. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: clis/reddit/subscribed.js, clis/bilibili/download.js, clis/twitter/list-create.js. Pair on, review, or document these before any departure.
AX6 · Interface segregation · Fat interface · ×1
  • Fat interface: IPage (24 required operations) src/types.ts:72 — `IPage` declares 24 required operations: `goto`, `evaluate`, `evaluate`, `fetchJson`, `getCookies`, `snapshot`, `click`, `typeText`, `fillText`, `pressKey`, `scrollTo`, `getFormState`, `wait`, `sleep`, `tabs`, `selectTab`, `networkRequests`, `consoleMessages`, `scroll`, `autoScroll`, `installInterceptor`, `getInterceptedRequests`, `waitForCapture`, `screenshot`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. Those 24 declarations carry 23 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 23 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 19 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 (115 single-owned of 878 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 878 of the 1456 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)) (+13 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: clis/twitter/collection.js, clis/twitter/user-timeline.js, clis/weread/book.js, clis/weread/ai-outline.js, clis/minimax/utils.js, clis/minimax/music.js, clis/bilibili/creator-stats.js, clis/douyin/videos.js (+15 more).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (174666 LoC, 926 module-visible types across 179 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 111 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: clis/gemini/models.js, clis/weread/book-search.js, clis/hltv/player-duel.js, clis/xianyu/im.js, clis/mercury/utils.js, clis/upwork/utils.js, clis/slock/in-page.js, clis/xiaohongshu/collection-helpers.js (and 103 more) (115 orphaned of 878 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 878 of the 1456 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 17493 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.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×1
  • No app-layer HTTPS enforcement detected clis/spotify/spotify.js:168 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 19/152 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~1.8 `!` null assertions per 1k TypeScript source lines — 53 assertion(s) across the 29369 source line(s) of the 138 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/pipeline/steps/browser.ts (14), src/site-slots.ts (8), src/pipeline/steps/intercept.ts (7). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Minor — 13 finding(s)
D10 · Test Quality · Skipped (documented) · ×8
  • Skipped (documented): (unnamed test) src/browser/network-cache.test.ts:77 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/browser/network-cache.test.ts:84 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/browser/cdp.test.ts:343 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/download/index.test.ts:136 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): (unnamed test) src/download/index.test.ts:149 — Skipped with a documented reason — a deferral, not lazy debt: switched off by it.skipIf
  • Skipped (documented): isolates concurrent runs: each slot run sees only its own page tests/e2e/site-slots-chrome.test.ts:229 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): brings a warm slot tab back to the front after another session took it tests/e2e/site-slots-chrome.test.ts:237 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): dequeues a waiter whose client disconnects, frees a slot on lease-release, and rejects a run that lost its slot tests/e2e/site-slots-chrome.test.ts:269 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
D12 · Dependency Hygiene · Outdated (npm) · ×5
  • Outdated (npm): commander — commander is pinned at 14.0.3; registry.npmjs.org publishes 15.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): js-yaml — js-yaml is pinned at 4.3.2; registry.npmjs.org publishes 5.5.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): turndown — turndown is pinned at 7.2.2; registry.npmjs.org publishes 7.2.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): undici — undici is pinned at 7.29.1; registry.npmjs.org publishes 8.12.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): ws — ws is pinned at 8.21.0; registry.npmjs.org publishes 8.22.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.

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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7ae37cfa2fca457f984c47ed2d071adb/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7ae37cfa2fca457f984c47ed2d071adb/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .86artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update9artifacts/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 3 file(s) — `src/browser/cdp.ts`, `src/commands/browser.ts`, `src/observation/retention.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16f0c-1834-7203-8240-5ddec5b82e23 · 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